From 805d2d1e6f080f323aa513184a4c37a1e5071b96 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Mon, 21 Oct 2024 14:23:59 -0400 Subject: [PATCH] upgrade to latest dependencies (#1918) bumping knative.dev/pkg 95b4b97...4af9a0d: > 4af9a0d Add `WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP` env-var (# 3106) bumping knative.dev/serving 83b6695...77c7e1d: > 77c7e1d Update net-contour nightly (# 15578) > 5ebf2c7 Update net-kourier nightly (# 15577) > b474b3e Update net-gateway-api nightly (# 15576) > cb2a9c6 Update net-istio nightly (# 15579) > 6544bfe Update community files (# 15574) bumping knative.dev/eventing 33a9027...6aa49dc: > 6aa49dc [main] Update community files (# 8256) Signed-off-by: Knative Automation --- go.mod | 6 +++--- go.sum | 12 ++++++------ vendor/knative.dev/pkg/webhook/env.go | 14 ++++++++++++++ vendor/knative.dev/pkg/webhook/webhook.go | 12 ++++++++++-- vendor/modules.txt | 6 +++--- 5 files changed, 36 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 252ac70dbe..8ab74683a8 100644 --- a/go.mod +++ b/go.mod @@ -21,11 +21,11 @@ require ( k8s.io/client-go v0.30.3 k8s.io/code-generator v0.30.3 knative.dev/caching v0.0.0-20241015090132-ccfb189fed8e - knative.dev/eventing v0.42.1-0.20241015093232-33a90276231c + knative.dev/eventing v0.42.1-0.20241016013536-6aa49dc1db88 knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d - knative.dev/pkg v0.0.0-20241015082832-95b4b97567b5 + knative.dev/pkg v0.0.0-20241021053726-4af9a0d3f8b5 knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364 - knative.dev/serving v0.42.1-0.20241015121732-83b66956e605 + knative.dev/serving v0.42.1-0.20241016153129-77c7e1df0cd1 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index af746f9f56..e5aae4653d 100644 --- a/go.sum +++ b/go.sum @@ -1395,18 +1395,18 @@ k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1 k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/caching v0.0.0-20241015090132-ccfb189fed8e h1:SFUaPsSwBOLnrakXCoOi+iGe74xGW3TRDwDXmD29xyo= knative.dev/caching v0.0.0-20241015090132-ccfb189fed8e/go.mod h1:Gdarh0MOPnzYhT7/f5FFFClwRbbp0bJGK8J2Viu1g54= -knative.dev/eventing v0.42.1-0.20241015093232-33a90276231c h1:E9P3HuWrT9Tmx97HsER5fVdiRGSJvmAHGErQt5i/yR4= -knative.dev/eventing v0.42.1-0.20241015093232-33a90276231c/go.mod h1:5+F5Htg4l8TMn2bb8sjCiFdojIFqrSPyUj81/VXIVdA= +knative.dev/eventing v0.42.1-0.20241016013536-6aa49dc1db88 h1:Y50FB+2J5/DejNBre3klilKPmJFx31wv1OtTbpQUrjA= +knative.dev/eventing v0.42.1-0.20241016013536-6aa49dc1db88/go.mod h1:5+F5Htg4l8TMn2bb8sjCiFdojIFqrSPyUj81/VXIVdA= knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d h1:aCfX7kwkvgGxXXGbso5tLqdwQmzBkJ9d+EIRwksKTvk= knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY= knative.dev/networking v0.0.0-20241010132208-75d9920a9248 h1:yc8FzuFsaPRPF0qeFcfJQ5n8CqmQF5a631e/+VwyTkM= knative.dev/networking v0.0.0-20241010132208-75d9920a9248/go.mod h1:rIDqdud8+jryNa9LgHQZ0kOpR0k5fC6bkV0aAPhfSzM= -knative.dev/pkg v0.0.0-20241015082832-95b4b97567b5 h1:0ZKQVzST2Y3nSud1hNzTYM+UhTHKOJLjSfmZmzjwpN4= -knative.dev/pkg v0.0.0-20241015082832-95b4b97567b5/go.mod h1:StJI72GWcm/iErmk4RqFJiOo8RLbVqPbHxUqeVwAzeo= +knative.dev/pkg v0.0.0-20241021053726-4af9a0d3f8b5 h1:T+40/2nEh78mT31zYUMjL3ENrZSM6jNApGgz+tcDqwc= +knative.dev/pkg v0.0.0-20241021053726-4af9a0d3f8b5/go.mod h1:StJI72GWcm/iErmk4RqFJiOo8RLbVqPbHxUqeVwAzeo= knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364 h1:DIc+vbaFKOSGktPXJ1MaXIXoDjlmUIXQkHiZaPcYGbQ= knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364/go.mod h1:PVRnK/YQo9s3foRtut00oAxvCPc9f/qV2PApZh/rMPw= -knative.dev/serving v0.42.1-0.20241015121732-83b66956e605 h1:9wqd/sjMGSOX6PzXxxm6DuVsOmqRdjWlz2Ac151IkJQ= -knative.dev/serving v0.42.1-0.20241015121732-83b66956e605/go.mod h1:/exlE2+mo78cVXz/Xws1OjxzOJGTBqDCO3gjVf8E0MA= +knative.dev/serving v0.42.1-0.20241016153129-77c7e1df0cd1 h1:TqrfLWy75MFJiYN3JnoYThFqTAtN9D7pdqx2aumpa70= +knative.dev/serving v0.42.1-0.20241016153129-77c7e1df0cd1/go.mod h1:/exlE2+mo78cVXz/Xws1OjxzOJGTBqDCO3gjVf8E0MA= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= diff --git a/vendor/knative.dev/pkg/webhook/env.go b/vendor/knative.dev/pkg/webhook/env.go index ffb7570110..e622f5f97b 100644 --- a/vendor/knative.dev/pkg/webhook/env.go +++ b/vendor/knative.dev/pkg/webhook/env.go @@ -32,6 +32,8 @@ const ( secretNameEnvKey = "WEBHOOK_SECRET_NAME" //nolint:gosec // This is not a hardcoded credential tlsMinVersionEnvKey = "WEBHOOK_TLS_MIN_VERSION" + + disableNamespaceOwnershipEnvKey = "WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP" ) // PortFromEnv returns the webhook port set by portEnvKey, or default port if env var is not set. @@ -82,3 +84,15 @@ func TLSMinVersionFromEnv(defaultTLSMinVersion uint16) uint16 { panic(fmt.Sprintf("the environment variable %q has to be either '1.2' or '1.3'", tlsMinVersionEnvKey)) } } + +func DisableNamespaceOwnershipFromEnv() *bool { + disableNamespaceOwnership := os.Getenv(disableNamespaceOwnershipEnvKey) + if disableNamespaceOwnership == "" { + return nil + } + disableNamespaceOwnershipBool, err := strconv.ParseBool(disableNamespaceOwnership) + if err != nil { + panic(fmt.Sprintf("failed to convert the environment variable %q : %v", disableNamespaceOwnershipEnvKey, err)) + } + return &disableNamespaceOwnershipBool +} diff --git a/vendor/knative.dev/pkg/webhook/webhook.go b/vendor/knative.dev/pkg/webhook/webhook.go index 1b90e75fca..dc19817969 100644 --- a/vendor/knative.dev/pkg/webhook/webhook.go +++ b/vendor/knative.dev/pkg/webhook/webhook.go @@ -81,8 +81,10 @@ type Options struct { // before shutting down. GracePeriod time.Duration - // DisableNamespaceOwnership configures whether the webhook adds an owner reference for the SYSTEM_NAMESPACE - // Disabling this is useful when you expect the webhook configuration to be managed by something other than knative + // DisableNamespaceOwnership configures if the SYSTEM_NAMESPACE is added as an owner reference to the + // webhook configuration resources. Overridden by the WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP environment variable. + // Disabling can be useful to avoid breaking systems that expect ownership to indicate a true controller + // relationship: https://github.com/knative/serving/issues/15483 DisableNamespaceOwnership bool // ControllerOptions encapsulates options for creating a new controller, @@ -164,6 +166,12 @@ func New( return nil, fmt.Errorf("unsupported TLS version: %d", opts.TLSMinVersion) } + // if the environment variable is set, it overrides the value in the Options + disableNamespaceOwnership := DisableNamespaceOwnershipFromEnv() + if disableNamespaceOwnership != nil { + opts.DisableNamespaceOwnership = *disableNamespaceOwnership + } + syncCtx, cancel := context.WithCancel(context.Background()) webhook = &Webhook{ diff --git a/vendor/modules.txt b/vendor/modules.txt index 89214601b1..53548c05f1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1365,7 +1365,7 @@ k8s.io/utils/trace ## explicit; go 1.22.0 knative.dev/caching/pkg/apis/caching knative.dev/caching/pkg/apis/caching/v1alpha1 -# knative.dev/eventing v0.42.1-0.20241015093232-33a90276231c +# knative.dev/eventing v0.42.1-0.20241016013536-6aa49dc1db88 ## explicit; go 1.22.0 knative.dev/eventing/cmd/heartbeats knative.dev/eventing/pkg/apis @@ -1472,7 +1472,7 @@ knative.dev/networking/pkg/http/proxy knative.dev/networking/pkg/http/stats knative.dev/networking/pkg/ingress knative.dev/networking/pkg/k8s -# knative.dev/pkg v0.0.0-20241015082832-95b4b97567b5 +# knative.dev/pkg v0.0.0-20241021053726-4af9a0d3f8b5 ## explicit; go 1.22.0 knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate @@ -1581,7 +1581,7 @@ knative.dev/reconciler-test/pkg/resources/service knative.dev/reconciler-test/pkg/resources/serviceaccount knative.dev/reconciler-test/pkg/state knative.dev/reconciler-test/resources/certificate -# knative.dev/serving v0.42.1-0.20241015121732-83b66956e605 +# knative.dev/serving v0.42.1-0.20241016153129-77c7e1df0cd1 ## explicit; go 1.22.0 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1