Skip to content

Commit

Permalink
upgrade to latest dependencies (#535)
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing-redis 9a9d31c...3e9af22:
  > 3e9af22 upgrade to latest dependencies (# 629)
  > 6e530d7 upgrade to latest dependencies (# 621)
bumping knative.dev/eventing 6aa49dc...291c0a8:
  > 291c0a8 [main] Upgrade to latest dependencies (# 8262)
bumping knative.dev/pkg 95b4b97...9b9d535:
  > 9b9d535 Fix `WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP` env-var (# 3108)
  > 4af9a0d Add `WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP` env-var (# 3106)
bumping knative.dev/eventing-kafka-broker 5907bde...4dace1e:
  > 4dace1e upgrade to latest dependencies (# 4142)
  > 5a94650 upgrade to latest dependencies (# 4111)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Oct 23, 2024
1 parent fa8dd69 commit a1a9724
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 18 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ require (
k8s.io/apimachinery v0.30.3
k8s.io/client-go v0.30.3
k8s.io/code-generator v0.30.3
knative.dev/eventing v0.42.1-0.20241016013536-6aa49dc1db88
knative.dev/eventing-kafka-broker v0.42.1-0.20241017072023-5907bde1b979
knative.dev/eventing-redis v0.42.1-0.20241016014614-9a9d31cb7e42
knative.dev/eventing v0.43.0
knative.dev/eventing-kafka-broker v0.43.0
knative.dev/eventing-redis v0.43.0
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d
knative.dev/pkg v0.0.0-20241015082832-95b4b97567b5
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad
knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364
sigs.k8s.io/controller-runtime v0.13.1
)
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -774,16 +774,16 @@ k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 h1:1Wof1cGQgA5pqgo8MxKPtf
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8/go.mod h1:Os6V6dZwLNii3vxFpxcNaTmH8LJJBkOTg1N0tOA0fvA=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
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/eventing-kafka-broker v0.42.1-0.20241017072023-5907bde1b979 h1:HxLVX1tA9plp06VnEqytj2kLK6ttr6oEbgjaXvMUg9E=
knative.dev/eventing-kafka-broker v0.42.1-0.20241017072023-5907bde1b979/go.mod h1:pRG/v/0ncmZD3ObbGEVn8m+SDw4/7+Jb+bZsG4V39z4=
knative.dev/eventing-redis v0.42.1-0.20241016014614-9a9d31cb7e42 h1:iIExt6MNQ5RlygOy51xAEmg1MJLw9lKL1VqiJ+3Jhmk=
knative.dev/eventing-redis v0.42.1-0.20241016014614-9a9d31cb7e42/go.mod h1:MOs0Ag415vg9xWCEK5r3XS+inBKR1upbwst971VNUr0=
knative.dev/eventing v0.43.0 h1:GELHZ0yYosMeV78l4alMsd7HJciEu6a3T2C5l7MPi3Y=
knative.dev/eventing v0.43.0/go.mod h1:pdrF+bEUfRkNn9ifWXS7DoVj5W31gA5KQVd8iwplXUo=
knative.dev/eventing-kafka-broker v0.43.0 h1:nTmooSgJEnvOau8C9yYzIS/SSCSg7Z5/lO6BS4TwEEk=
knative.dev/eventing-kafka-broker v0.43.0/go.mod h1:f9hqo0xTwWCiBfARF1Gwo25wLv1oUX4Wahuhg9nR+II=
knative.dev/eventing-redis v0.43.0 h1:5LKvsArbdzH9LWHHN0T/zTG5JI+4xWZA9c/Ez83RkQw=
knative.dev/eventing-redis v0.43.0/go.mod h1:pXu3OFEAfx7ScxMzLv5PwATCFNGLLTX8Fr4q3Hbq8F0=
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/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-20241021183759-9b9d535af5ad h1:Nrjtr2H168rJeamH4QdyLMV1lEKHejNhaj1ymgQMfLk=
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad/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=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
6 changes: 6 additions & 0 deletions vendor/knative.dev/pkg/webhook/configmaps/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ func NewAdmissionController(
secretInformer := secretinformer.Get(ctx)
options := webhook.GetOptions(ctx)

// if this environment variable is set, it overrides the value in the Options
disableNamespaceOwnership := webhook.DisableNamespaceOwnershipFromEnv()
if disableNamespaceOwnership != nil {
options.DisableNamespaceOwnership = *disableNamespaceOwnership
}

key := types.NamespacedName{Name: name}

wh := &reconciler{
Expand Down
14 changes: 14 additions & 0 deletions vendor/knative.dev/pkg/webhook/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ func newController(ctx context.Context, name string, optsFunc ...OptionFunc) *co
f(opts)
}

// if this environment variable is set, it overrides the value in the Options
disableNamespaceOwnership := webhook.DisableNamespaceOwnershipFromEnv()
if disableNamespaceOwnership != nil {
wopts.DisableNamespaceOwnership = *disableNamespaceOwnership
}

key := types.NamespacedName{Name: name}

wh := &reconciler{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ func newController(ctx context.Context, name string, optsFunc ...OptionFunc) *co
f(opts)
}

// if this environment variable is set, it overrides the value in the Options
disableNamespaceOwnership := webhook.DisableNamespaceOwnershipFromEnv()
if disableNamespaceOwnership != nil {
woptions.DisableNamespaceOwnership = *disableNamespaceOwnership
}

wh := &reconciler{
LeaderAwareFuncs: pkgreconciler.LeaderAwareFuncs{
// Have this reconciler enqueue our singleton whenever it becomes leader.
Expand Down
6 changes: 4 additions & 2 deletions vendor/knative.dev/pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.42.1-0.20241016013536-6aa49dc1db88
# knative.dev/eventing v0.43.0
## explicit; go 1.22.0
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/duck
Expand Down Expand Up @@ -992,7 +992,7 @@ knative.dev/eventing/pkg/client/listers/sources/v1
knative.dev/eventing/pkg/client/listers/sources/v1beta2
knative.dev/eventing/pkg/crossnamespace
knative.dev/eventing/pkg/eventingtls
# knative.dev/eventing-kafka-broker v0.42.1-0.20241017072023-5907bde1b979
# knative.dev/eventing-kafka-broker v0.43.0
## explicit; go 1.22.0
knative.dev/eventing-kafka-broker/control-plane/pkg/apis/bindings
knative.dev/eventing-kafka-broker/control-plane/pkg/apis/bindings/v1
Expand All @@ -1017,14 +1017,14 @@ knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/t
knative.dev/eventing-kafka-broker/control-plane/pkg/client/clientset/versioned/typed/sources/v1beta1
knative.dev/eventing-kafka-broker/control-plane/pkg/client/injection/client
knative.dev/eventing-kafka-broker/test/rekt/resources/kafkasource
# knative.dev/eventing-redis v0.42.1-0.20241016014614-9a9d31cb7e42
# knative.dev/eventing-redis v0.43.0
## explicit; go 1.22.0
knative.dev/eventing-redis/pkg/source/apis/sources
knative.dev/eventing-redis/pkg/source/apis/sources/v1alpha1
# knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d
## explicit; go 1.21
knative.dev/hack
# knative.dev/pkg v0.0.0-20241015082832-95b4b97567b5
# knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad
## explicit; go 1.22.0
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down

0 comments on commit a1a9724

Please sign in to comment.