Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧹 Give users the ability to disable namespace ownership of webhook configurations #3095

Merged

Conversation

jonathan-innis
Copy link
Contributor

@jonathan-innis jonathan-innis commented Sep 23, 2024

Changes

Allow users to configure DisableNamespaceOwnership in webhook options. This ensures that users that have other manifest managers of ValidatingWebhookConfigurations and MutatingWebhookConfigurations don't hit conflicts when ownership is overridden.

This has specific detrimental impact when using ArgoCD which checks for ownerReferences before determining whether it should prune a resource. This has caused issues for kubernetes-sigs/karpenter, which uses knative/pkg for webhook management.

I've tested this change in the sigs.k8s.io/karpenter codebase with this commit and it's completely solved our Argo interaction issues.

/kind cleanup

Fixes knative/serving#15483

Release Note

Allow passing `DisableNamespaceOwnership` in `webhook.Options` to remove webhook ownerReferences

Docs


@knative-prow knative-prow bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 23, 2024
Copy link

knative-prow bot commented Sep 23, 2024

Hi @jonathan-innis. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow knative-prow bot requested a review from skonto September 23, 2024 06:37
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.45%. Comparing base (aaab500) to head (cf5f7be).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
webhook/configmaps/configmaps.go 66.66% 1 Missing and 1 partial ⚠️
webhook/resourcesemantics/defaulting/defaulting.go 66.66% 1 Missing and 1 partial ⚠️
...k/resourcesemantics/validation/reconcile_config.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3095      +/-   ##
==========================================
- Coverage   78.47%   78.45%   -0.02%     
==========================================
  Files         191      191              
  Lines        8938     8941       +3     
==========================================
+ Hits         7014     7015       +1     
- Misses       1662     1663       +1     
- Partials      262      263       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jonathan-innis
Copy link
Contributor Author

/assign ReToCode

@dprotaso
Copy link
Member

dprotaso commented Sep 24, 2024

Instead of adding such a knob I'm wondering if we should remove this functionality

@ReToCode @pierDipi @skonto curious about your thoughts?

Also I asked a clarifying question here: knative/serving#15483 (comment)

@dprotaso
Copy link
Member

/ok-to-test

@knative-prow knative-prow bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 25, 2024
@dprotaso
Copy link
Member

I'm going to approve this to unblock - but I think we should revisit the practice of the setting the owner reference here

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 26, 2024
Copy link

knative-prow bot commented Sep 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, jonathan-innis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 26, 2024
@knative-prow knative-prow bot merged commit c4843b7 into knative:main Sep 26, 2024
37 of 40 checks passed
@jonathan-innis jonathan-innis deleted the allow-disable-namespace-ownership branch September 26, 2024 01:32
thesuperzapper pushed a commit to deployKF/knative-pkg that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix using KNative with ArgoCD (don't set ownerReferences for webhooks)
3 participants