Add WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP env-var#3103
Conversation
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
|
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. DetailsInstructions 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.
Can we default this as false and have the return type be bool
There was a problem hiding this comment.
@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 <5735406+thesuperzapper@users.noreply.github.com>
|
/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. DetailsIn 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 DetailsNeeds 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 DetailsIn 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_OWNERSHIPto set theDisableNamespaceOwnershipwebhook option added by 🧹 Give users the ability to disable namespace ownership of webhook configurations #3095ownerReferencesfor webhooks) serving#15483/kind enhancement
Related knative/serving#15483
Release Note
Docs