-
Notifications
You must be signed in to change notification settings - Fork 331
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
Add WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP
env-var
#3103
Add WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP
env-var
#3103
Conversation
Signed-off-by: Mathew Wicks <[email protected]>
Welcome @thesuperzapper! It looks like this is your first PR to knative/pkg 🎉 |
Hi @thesuperzapper. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
func DisableNamespaceOwnershipFromEnv() *bool { | ||
disableNamespaceOwnership := os.Getenv(disableNamespaceOwnershipEnvKey) | ||
if disableNamespaceOwnership == "" { | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we default this as false
and have the return type be bool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dprotaso the behavior I was intending was that WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP
overrides the DisableNamespaceOwnership
webhook option only when the env-var is set.
To do this, I need to be able to distinguish between an unset env-var and a false
one:
Signed-off-by: Mathew Wicks <[email protected]>
/hold |
@dprotaso I was saying in knative/serving#15483 (comment), we should make both changes (that is, set the controller flag to false, AND let users disable the owner references fully). As long as you agree on the way this PR does the disabling, it should be safe to merge. Also, it would be a real shame if KServe/Kubeflow/deployKF had to run a forked version of kNative for this simple change that doesn't change any default behavior. |
/lgtm I'll merge this in to unblock for now - but I don't consider this functionality stable. We may make edits to the mechanism in a future date especially if ArgoCD merges the PR mentioned in the serving issue. /cherry-pick release-1.16 |
@dprotaso: once the present PR merges, I will cherry-pick it on top of release-1.16 in a new PR and assign it to you. In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, thesuperzapper 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 |
/hold cancel |
OpenCensus flake /retest |
@dprotaso: new pull request created: #3106 In response to this:
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. |
Changes
WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP
to set theDisableNamespaceOwnership
webhook option added by 🧹 Give users the ability to disable namespace ownership of webhook configurations #3095ownerReferences
for webhooks) serving#15483/kind enhancement
Related knative/serving#15483
Release Note
Docs