Skip to content

Add ability to configure operator webhooks - #238

Merged
duhminick merged 11 commits into
mainfrom
dominic-failurepolicy
Sep 18, 2025
Merged

duhminick merged 11 commits into
mainfrom
dominic-failurepolicy

Conversation

@duhminick

Copy link
Copy Markdown
Contributor

Issue #, if available: N/A

Description of changes: Adds the ability to configure admissionWebhooks to be

  1. Created or not
  2. Failure policy
  3. Namespace selector

Failure policy and namespace selector has fallback logic for backwards compatability. Essentially for the most part, the order of priority is

  1. {pod, namespace, workload, agents, instrumentations}.failurePolicy/namespaceSelector
  2. [In special cases] pod.failurePolicy/namespaceSelector -- namely for the namespace/workload mutation webhook
  3. admissionWebhooks.failurePolicy/namespaceSelector

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -280,10 +273,7 @@ webhooks:
caBundle: {{ $ca.Cert | b64enc }}
failurePolicy: Ignore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't get populated with agents failurepolicy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't being controlled before so opted to not have it be controllable

sky333999
sky333999 previously approved these changes Sep 18, 2025
@duhminick
duhminick merged commit 960870c into main Sep 18, 2025
@duhminick
duhminick deleted the dominic-failurepolicy branch September 18, 2025 22:15
movence pushed a commit that referenced this pull request Sep 24, 2025
* Add ability to configure operator webhooks

* Reduce if statements on namespaceSelector

* Do not specify default value for webhook create

* Fix comment

* Use helper function for namespaceSelector(s)

* Fix null namespaceSelector override

* Add admission webhooks integration tests

* Operator webhook with cert manager uses helper

* Address comment for variable name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants