From d9d809ac1e9054bab1d361f06b70a3b3c63d51b3 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Thu, 4 Jul 2024 13:13:40 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/hack 0914314...b979959: > b979959 Update community files (# 387) bumping knative.dev/serving 75f7393...208138f: > 208138f Update net-gateway-api nightly (# 15372) > 4bbb7cf Fix external domain tls test setup (# 15366) > 05b60b5 Update community files (# 15369) bumping knative.dev/pkg 3f6a546...7ecd548: > 7ecd548 Update community files (# 3071) bumping knative.dev/caching b42b259...9cad6d8: > 9cad6d8 Update community files (# 878) bumping knative.dev/eventing 96c30bd...332d974: > 332d974 Update TokenVerifier to verify AuthZ too (# 8063) > 3264b21 List applying EventPolicies in Brokers status (# 8060) > 657c3cd List applying policies in job sink (# 8064) > 98ed09c [main] Update community files (# 8069) > e2d782f # 7879: Changes to add filters field (# 7930) > d18595f :bug: Codecov reject any coverage drop (# 8065) > 399bb86 Reconcile EventPolicies when features configmap changes (# 8059) > 4f2b53f Set APIVersion and Kind of EventPolicy manually in OwnerReference of backing channels policy (# 8031) Signed-off-by: Knative Automation --- go.mod | 10 ++--- go.sum | 20 ++++----- .../pkg/apis/eventing/v1/broker_lifecycle.go | 18 ++++++++ .../pkg/apis/eventing/v1/test_helper.go | 2 + .../apis/sinks/v1alpha1/job_sink_lifecycle.go | 41 +++++++++++++++++++ .../pkg/apis/sinks/v1alpha1/job_sink_types.go | 5 +++ .../pkg/apis/sinks/v1alpha1/test_helpers.go | 28 +++++++++++++ .../sinks/v1alpha1/zz_generated.deepcopy.go | 1 + .../pkg/reconciler/testing/v1/broker.go | 39 ++++++++++++++++++ .../pkg/reconciler/testing/v1/factory.go | 3 ++ .../pkg/reconciler/testing/v1/listers.go | 12 ++++++ .../test/e2e-external-domain-tls-tests.sh | 3 +- vendor/modules.txt | 10 ++--- 13 files changed, 171 insertions(+), 21 deletions(-) create mode 100644 vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/test_helpers.go diff --git a/go.mod b/go.mod index aadee52e7..6ac6ea3e2 100644 --- a/go.mod +++ b/go.mod @@ -21,11 +21,11 @@ require ( k8s.io/client-go v0.29.2 k8s.io/code-generator v0.29.2 k8s.io/utils v0.0.0-20240102154912-e7106e64919e - knative.dev/caching v0.0.0-20240626233642-b42b259a7e5f - knative.dev/eventing v0.41.1-0.20240701131713-96c30bd21612 - knative.dev/hack v0.0.0-20240607132042-09143140a254 - knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4 - knative.dev/serving v0.41.1-0.20240701085953-75f7393aaed4 + knative.dev/caching v0.0.0-20240704014535-9cad6d80717e + knative.dev/eventing v0.41.1-0.20240704114759-332d97416ac4 + knative.dev/hack v0.0.0-20240704013904-b9799599afcf + knative.dev/pkg v0.0.0-20240704013837-7ecd5485cbc6 + knative.dev/serving v0.41.1-0.20240704121952-208138f3c357 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index fa62d7268..d89b46093 100644 --- a/go.sum +++ b/go.sum @@ -1359,18 +1359,18 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/caching v0.0.0-20240626233642-b42b259a7e5f h1:SPEsG7FI3wYRrKur3ehSOug2pLajN+3IPn0jMAh4dXc= -knative.dev/caching v0.0.0-20240626233642-b42b259a7e5f/go.mod h1:+zWxJUVU24/gsSSOKkP0/Vfwr+Wi4HH29sHxRn3AH9c= -knative.dev/eventing v0.41.1-0.20240701131713-96c30bd21612 h1:Bs2fXBPUv+Df4YqIDNJRRRYGKrduST/AA4Foa9S23LA= -knative.dev/eventing v0.41.1-0.20240701131713-96c30bd21612/go.mod h1:3h0QrfHELs61mrTI4GDPEQh4rwsap0YYA5XgRrNgnlc= -knative.dev/hack v0.0.0-20240607132042-09143140a254 h1:1YFnu3U6dWZg0oxm6GU8kEdA9A+BvSWKJO7sg3N0kq8= -knative.dev/hack v0.0.0-20240607132042-09143140a254/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/caching v0.0.0-20240704014535-9cad6d80717e h1:2ltkKr0+pmgc+3MJPdq0qddAxmcpE1EGvOCuw6Ok19I= +knative.dev/caching v0.0.0-20240704014535-9cad6d80717e/go.mod h1:+zWxJUVU24/gsSSOKkP0/Vfwr+Wi4HH29sHxRn3AH9c= +knative.dev/eventing v0.41.1-0.20240704114759-332d97416ac4 h1:ws/Nij9JHKBiszBhKKrBIvI3fSBxDQZpoDnPW7IeGGo= +knative.dev/eventing v0.41.1-0.20240704114759-332d97416ac4/go.mod h1:3h0QrfHELs61mrTI4GDPEQh4rwsap0YYA5XgRrNgnlc= +knative.dev/hack v0.0.0-20240704013904-b9799599afcf h1:n92FmZRywgtHso7pFAku7CW0qvRAs1hXtMQqO0R6eiE= +knative.dev/hack v0.0.0-20240704013904-b9799599afcf/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= knative.dev/networking v0.0.0-20240611072033-3b8764c0bb4c h1:Q+DdJYzvhwAVWMQtP6mbEr5dNxpr+K9HAF9RqJmZefY= knative.dev/networking v0.0.0-20240611072033-3b8764c0bb4c/go.mod h1:WhZLv94eOMDGHbdZiMrw6cnRfN3WEcFgpjUcV0A48pI= -knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4 h1:slPKf3UKdBFZlz+hFy+KXzTgY9yOePLzRuEhKzgc5a4= -knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4/go.mod h1:Wikg4u73T6vk9TctrxZt60VXzqmGEQIx0iKfk1+9o4c= -knative.dev/serving v0.41.1-0.20240701085953-75f7393aaed4 h1:dTxEVyu43JWV6lsGCwkjdCIoQvCZF3mkrM2IlIWuc/g= -knative.dev/serving v0.41.1-0.20240701085953-75f7393aaed4/go.mod h1:7+wAf1rE/O2O+92Ft8Bfw3LnDirkg4c/+jKU3giMIoc= +knative.dev/pkg v0.0.0-20240704013837-7ecd5485cbc6 h1:/oGRGm/csTc0sUHo00MQ3NQrJaRP7iMTGC9bXpeEuuU= +knative.dev/pkg v0.0.0-20240704013837-7ecd5485cbc6/go.mod h1:Wikg4u73T6vk9TctrxZt60VXzqmGEQIx0iKfk1+9o4c= +knative.dev/serving v0.41.1-0.20240704121952-208138f3c357 h1:LUUArHnvmOanPVY9m79b3Ye6o4Nq3VnsoNoaBFyv3Gg= +knative.dev/serving v0.41.1-0.20240704121952-208138f3c357/go.mod h1:7+wAf1rE/O2O+92Ft8Bfw3LnDirkg4c/+jKU3giMIoc= 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/eventing/pkg/apis/eventing/v1/broker_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_lifecycle.go index 9bc846e89..ab4d0fdb2 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_lifecycle.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/broker_lifecycle.go @@ -32,6 +32,7 @@ const ( BrokerConditionFilter apis.ConditionType = "FilterReady" BrokerConditionAddressable apis.ConditionType = "Addressable" BrokerConditionDeadLetterSinkResolved apis.ConditionType = "DeadLetterSinkResolved" + BrokerConditionEventPoliciesReady apis.ConditionType = "EventPoliciesReady" ) var brokerCondSet = apis.NewLivingConditionSet( @@ -40,6 +41,7 @@ var brokerCondSet = apis.NewLivingConditionSet( BrokerConditionFilter, BrokerConditionAddressable, BrokerConditionDeadLetterSinkResolved, + BrokerConditionEventPoliciesReady, ) var brokerCondSetLock = sync.RWMutex{} @@ -118,3 +120,19 @@ func (bs *BrokerStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat s bs.DeliveryStatus = eventingduck.DeliveryStatus{} bs.GetConditionSet().Manage(bs).MarkFalse(BrokerConditionDeadLetterSinkResolved, reason, messageFormat, messageA...) } + +func (bs *BrokerStatus) MarkEventPoliciesTrue() { + bs.GetConditionSet().Manage(bs).MarkTrue(BrokerConditionEventPoliciesReady) +} + +func (bs *BrokerStatus) MarkEventPoliciesTrueWithReason(reason, messageFormat string, messageA ...interface{}) { + bs.GetConditionSet().Manage(bs).MarkTrueWithReason(BrokerConditionEventPoliciesReady, reason, messageFormat, messageA...) +} + +func (bs *BrokerStatus) MarkEventPoliciesFailed(reason, messageFormat string, messageA ...interface{}) { + bs.GetConditionSet().Manage(bs).MarkFalse(BrokerConditionEventPoliciesReady, reason, messageFormat, messageA...) +} + +func (bs *BrokerStatus) MarkEventPoliciesUnknown(reason, messageFormat string, messageA ...interface{}) { + bs.GetConditionSet().Manage(bs).MarkUnknown(BrokerConditionEventPoliciesReady, reason, messageFormat, messageA...) +} diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/test_helper.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/test_helper.go index 9775f84dd..e2337e940 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/test_helper.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/test_helper.go @@ -66,6 +66,7 @@ func (t testHelper) ReadyBrokerStatus() *BrokerStatus { URL: apis.HTTP("example.com"), }) bs.MarkDeadLetterSinkResolvedSucceeded(eventingduckv1.DeliveryStatus{}) + bs.MarkEventPoliciesTrue() return bs } @@ -77,6 +78,7 @@ func (t testHelper) ReadyBrokerStatusWithoutDLS() *BrokerStatus { bs.SetAddress(&duckv1.Addressable{ URL: apis.HTTP("example.com"), }) + bs.MarkEventPoliciesTrue() bs.MarkDeadLetterSinkNotConfigured() return bs } diff --git a/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_lifecycle.go index b0cdea216..bc29a4156 100644 --- a/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_lifecycle.go +++ b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_lifecycle.go @@ -23,6 +23,7 @@ import ( "knative.dev/pkg/apis" "knative.dev/eventing/pkg/apis/sinks" + duckv1 "knative.dev/pkg/apis/duck/v1" ) const ( @@ -30,10 +31,15 @@ const ( JobSinkConditionReady = apis.ConditionReady JobSinkConditionAddressable apis.ConditionType = "Addressable" + + // JobSinkConditionEventPoliciesReady has status True when all the applying EventPolicies for this + // JobSink are ready. + JobSinkConditionEventPoliciesReady apis.ConditionType = "EventPoliciesReady" ) var JobSinkCondSet = apis.NewLivingConditionSet( JobSinkConditionAddressable, + JobSinkConditionEventPoliciesReady, ) // GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface. @@ -71,8 +77,43 @@ func (s *JobSinkStatus) InitializeConditions() { JobSinkCondSet.Manage(s).InitializeConditions() } +// MarkAddressableReady marks the Addressable condition to True. +func (s *JobSinkStatus) MarkAddressableReady() { + JobSinkCondSet.Manage(s).MarkTrue(JobSinkConditionAddressable) +} + +// MarkEventPoliciesFailed marks the EventPoliciesReady condition to False with the given reason and message. +func (s *JobSinkStatus) MarkEventPoliciesFailed(reason, messageFormat string, messageA ...interface{}) { + JobSinkCondSet.Manage(s).MarkFalse(JobSinkConditionEventPoliciesReady, reason, messageFormat, messageA...) +} + +// MarkEventPoliciesUnknown marks the EventPoliciesReady condition to Unknown with the given reason and message. +func (s *JobSinkStatus) MarkEventPoliciesUnknown(reason, messageFormat string, messageA ...interface{}) { + JobSinkCondSet.Manage(s).MarkUnknown(JobSinkConditionEventPoliciesReady, reason, messageFormat, messageA...) +} + +// MarkEventPoliciesTrue marks the EventPoliciesReady condition to True. +func (s *JobSinkStatus) MarkEventPoliciesTrue() { + JobSinkCondSet.Manage(s).MarkTrue(JobSinkConditionEventPoliciesReady) +} + +// MarkEventPoliciesTrueWithReason marks the EventPoliciesReady condition to True with the given reason and message. +func (s *JobSinkStatus) MarkEventPoliciesTrueWithReason(reason, messageFormat string, messageA ...interface{}) { + JobSinkCondSet.Manage(s).MarkTrueWithReason(JobSinkConditionEventPoliciesReady, reason, messageFormat, messageA...) +} + func (e *JobSink) SetJobStatusSelector() { if e.Spec.Job != nil { e.Status.JobStatus.Selector = fmt.Sprintf("%s=%s", sinks.JobSinkNameLabel, e.GetName()) } } + +func (s *JobSinkStatus) SetAddress(address *duckv1.Addressable) { + s.Address = address + if address == nil || address.URL.IsEmpty() { + JobSinkCondSet.Manage(s).MarkFalse(JobSinkConditionAddressable, "EmptyHostname", "hostname is the empty string") + } else { + JobSinkCondSet.Manage(s).MarkTrue(JobSinkConditionAddressable) + + } +} diff --git a/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_types.go b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_types.go index 501dfdf65..18c9153d9 100644 --- a/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_types.go +++ b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/job_sink_types.go @@ -22,6 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1" duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/kmeta" ) @@ -68,6 +69,10 @@ type JobSinkStatus struct { // +optional JobStatus JobStatus `json:"job,omitempty"` + + // AppliedEventPoliciesStatus contains the list of EventPolicies which apply to this JobSink + // +optional + eventingduckv1.AppliedEventPoliciesStatus `json:",inline"` } type JobStatus struct { diff --git a/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/test_helpers.go b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/test_helpers.go new file mode 100644 index 000000000..ca14a4674 --- /dev/null +++ b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/test_helpers.go @@ -0,0 +1,28 @@ +/* +Copyright 2024 The Knative Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1alpha1 + +import ( + "github.com/google/go-cmp/cmp/cmpopts" + "knative.dev/pkg/apis" +) + +var ( + ignoreAllButTypeAndStatus = cmpopts.IgnoreFields( + apis.Condition{}, + "LastTransitionTime", "Message", "Reason", "Severity") +) diff --git a/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go index 8aefd015f..58c9fdfaf 100644 --- a/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go @@ -114,6 +114,7 @@ func (in *JobSinkStatus) DeepCopyInto(out *JobSinkStatus) { in.Status.DeepCopyInto(&out.Status) in.AddressStatus.DeepCopyInto(&out.AddressStatus) out.JobStatus = in.JobStatus + in.AppliedEventPoliciesStatus.DeepCopyInto(&out.AppliedEventPoliciesStatus) return } diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/broker.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/broker.go index d7ddbd31c..96b4f9d9f 100644 --- a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/broker.go +++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/broker.go @@ -18,10 +18,14 @@ import ( "fmt" "time" + eventingv1alpha1 "knative.dev/eventing/pkg/apis/eventing/v1alpha1" + "knative.dev/eventing/pkg/apis/feature" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" + eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1" eventingv1 "knative.dev/eventing/pkg/apis/duck/v1" "knative.dev/eventing/pkg/apis/eventing" v1 "knative.dev/eventing/pkg/apis/eventing/v1" @@ -288,3 +292,38 @@ func WithBrokersAddresses(addresses []duckv1.Addressable) BrokerOption { b.GetConditionSet().Manage(b.GetStatus()).MarkTrue(v1.BrokerConditionAddressable) } } + +func WithBrokerEventPoliciesReady() BrokerOption { + return func(b *v1.Broker) { + b.Status.MarkEventPoliciesTrue() + } +} + +func WithBrokerEventPoliciesNotReady(reason, message string) BrokerOption { + return func(b *v1.Broker) { + b.Status.MarkEventPoliciesFailed(reason, message) + } +} + +func WithBrokerEventPoliciesListed(policyNames ...string) BrokerOption { + return func(b *v1.Broker) { + for _, name := range policyNames { + b.Status.Policies = append(b.Status.Policies, eventingduckv1.AppliedEventPolicyRef{ + APIVersion: eventingv1alpha1.SchemeGroupVersion.String(), + Name: name, + }) + } + } +} + +func WithBrokerEventPoliciesReadyBecauseOIDCDisabled() BrokerOption { + return func(b *v1.Broker) { + b.Status.MarkEventPoliciesTrueWithReason("OIDCDisabled", "Feature %q must be enabled to support Authorization", feature.OIDCAuthentication) + } +} + +func WithBrokerEventPoliciesReadyBecauseNoPolicyAndOIDCEnabled() BrokerOption { + return func(b *v1.Broker) { + b.Status.MarkEventPoliciesTrueWithReason("DefaultAuthorizationMode", "Default authz mode is %q", feature.AuthorizationAllowSameNamespace) + } +} diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/factory.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/factory.go index 0481c6cdf..ded0d6684 100644 --- a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/factory.go +++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/factory.go @@ -41,6 +41,7 @@ import ( ktesting "k8s.io/client-go/testing" "knative.dev/pkg/controller" + "knative.dev/eventing/pkg/apis/sinks" fakeeventingclient "knative.dev/eventing/pkg/client/injection/client/fake" fakekubeclient "knative.dev/pkg/client/injection/kube/client/fake" fakedynamicclient "knative.dev/pkg/injection/clients/dynamicclient/fake" @@ -76,6 +77,8 @@ func MakeFactory(ctor Ctor, unstructured bool, logger *zap.SugaredLogger) Factor ctx, dynamicClient := fakedynamicclient.With(ctx, NewScheme(), ToUnstructured(t, r.Objects)...) + ctx = sinks.WithConfig(ctx, &sinks.Config{KubeClient: kubeClient}) + // The dynamic client's support for patching is BS. Implement it // here via PrependReactor (this can be overridden below by the // provided reactors). diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go index 0c7c3546d..ecc91831e 100644 --- a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go +++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/listers.go @@ -18,6 +18,7 @@ package testing import ( appsv1 "k8s.io/api/apps/v1" + batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -26,6 +27,7 @@ import ( "k8s.io/apimachinery/pkg/runtime" fakekubeclientset "k8s.io/client-go/kubernetes/fake" appsv1listers "k8s.io/client-go/listers/apps/v1" + batchv1listers "k8s.io/client-go/listers/batch/v1" corev1listers "k8s.io/client-go/listers/core/v1" rbacv1listers "k8s.io/client-go/listers/rbac/v1" "k8s.io/client-go/tools/cache" @@ -35,6 +37,7 @@ import ( eventingv1beta2 "knative.dev/eventing/pkg/apis/eventing/v1beta2" flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" + sinksv1alpha1 "knative.dev/eventing/pkg/apis/sinks/v1alpha1" sourcesv1 "knative.dev/eventing/pkg/apis/sources/v1" fakeeventingclientset "knative.dev/eventing/pkg/client/clientset/versioned/fake" eventinglisters "knative.dev/eventing/pkg/client/listers/eventing/v1" @@ -42,6 +45,7 @@ import ( eventingv1beta2listers "knative.dev/eventing/pkg/client/listers/eventing/v1beta2" flowslisters "knative.dev/eventing/pkg/client/listers/flows/v1" messaginglisters "knative.dev/eventing/pkg/client/listers/messaging/v1" + sinkslisters "knative.dev/eventing/pkg/client/listers/sinks/v1alpha1" sourcelisters "knative.dev/eventing/pkg/client/listers/sources/v1" testscheme "knative.dev/eventing/pkg/reconciler/testing/scheme" duckv1 "knative.dev/pkg/apis/duck/v1" @@ -118,6 +122,10 @@ func (l *Listers) GetEventPolicyLister() eventingv1alpha1listers.EventPolicyList return eventingv1alpha1listers.NewEventPolicyLister(l.indexerFor(&eventingv1alpha1.EventPolicy{})) } +func (l *Listers) GetJobSinkLister() sinkslisters.JobSinkLister { + return sinkslisters.NewJobSinkLister(l.indexerFor(&sinksv1alpha1.JobSink{})) +} + func (l *Listers) GetPingSourceLister() sourcelisters.PingSourceLister { return sourcelisters.NewPingSourceLister(l.indexerFor(&sourcesv1.PingSource{})) } @@ -213,3 +221,7 @@ func (l *Listers) GetNodeLister() corev1listers.NodeLister { func (l *Listers) GetPodLister() corev1listers.PodLister { return corev1listers.NewPodLister(l.indexerFor(&corev1.Pod{})) } + +func (l *Listers) GetJobLister() batchv1listers.JobLister { + return batchv1listers.NewJobLister(l.indexerFor(&batchv1.Job{})) +} diff --git a/vendor/knative.dev/serving/test/e2e-external-domain-tls-tests.sh b/vendor/knative.dev/serving/test/e2e-external-domain-tls-tests.sh index 48aee90b0..33c86a084 100644 --- a/vendor/knative.dev/serving/test/e2e-external-domain-tls-tests.sh +++ b/vendor/knative.dev/serving/test/e2e-external-domain-tls-tests.sh @@ -122,11 +122,12 @@ function setup_selfsigned_per_namespace_external_domain_tls() { kubectl delete kcert --all -n "${TLS_TEST_NAMESPACE}" # Enable namespace certificate only for "${TLS_TEST_NAMESPACE}" namespaces - selector="matchExpressions: + local selector="matchExpressions: - key: kubernetes.io/metadata.name operator: In values: [${TLS_TEST_NAMESPACE}] " + selector=${selector//$'\n'/\\n} toggle_feature namespace-wildcard-cert-selector "$selector" config-network kubectl apply -f ${E2E_YAML_DIR}/test/config/externaldomaintls/certmanager/selfsigned/ diff --git a/vendor/modules.txt b/vendor/modules.txt index fe3dee3bf..3c43f1b26 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1319,11 +1319,11 @@ k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/caching v0.0.0-20240626233642-b42b259a7e5f +# knative.dev/caching v0.0.0-20240704014535-9cad6d80717e ## explicit; go 1.22 knative.dev/caching/pkg/apis/caching knative.dev/caching/pkg/apis/caching/v1alpha1 -# knative.dev/eventing v0.41.1-0.20240701131713-96c30bd21612 +# knative.dev/eventing v0.41.1-0.20240704114759-332d97416ac4 ## explicit; go 1.22 knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/duck @@ -1431,7 +1431,7 @@ knative.dev/eventing/test/upgrade/prober/wathola/fetcher knative.dev/eventing/test/upgrade/prober/wathola/forwarder knative.dev/eventing/test/upgrade/prober/wathola/receiver knative.dev/eventing/test/upgrade/prober/wathola/sender -# knative.dev/hack v0.0.0-20240607132042-09143140a254 +# knative.dev/hack v0.0.0-20240704013904-b9799599afcf ## explicit; go 1.18 knative.dev/hack # knative.dev/networking v0.0.0-20240611072033-3b8764c0bb4c @@ -1451,7 +1451,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-20240626134149-3f6a546ac3a4 +# knative.dev/pkg v0.0.0-20240704013837-7ecd5485cbc6 ## explicit; go 1.22 knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate @@ -1533,7 +1533,7 @@ knative.dev/pkg/webhook knative.dev/pkg/webhook/certificates knative.dev/pkg/webhook/certificates/resources knative.dev/pkg/webhook/resourcesemantics/conversion -# knative.dev/serving v0.41.1-0.20240701085953-75f7393aaed4 +# knative.dev/serving v0.41.1-0.20240704121952-208138f3c357 ## explicit; go 1.22 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1