From 5cafc8b8ac1f008915b1572f337d70e5dd2fa564 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Mon, 15 Jul 2024 16:26:46 -0400 Subject: [PATCH] upgrade to latest dependencies (#1837) bumping knative.dev/serving 63a741d...44a5d78: > 44a5d78 Enable cluster local TLS tests for Contour (# 15378) bumping knative.dev/eventing a61107c...e73f2c9: > e73f2c9 List applying policies in Parallel (# 8083) Signed-off-by: Knative Automation --- go.mod | 4 +- go.sum | 8 ++-- .../pkg/apis/flows/v1/parallel_lifecycle.go | 26 ++++++++++++- .../pkg/reconciler/testing/v1/parallel.go | 38 +++++++++++++++++++ vendor/modules.txt | 4 +- 5 files changed, 71 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 7d38d585e9..f466e22b10 100644 --- a/go.mod +++ b/go.mod @@ -22,10 +22,10 @@ require ( k8s.io/code-generator v0.29.2 k8s.io/utils v0.0.0-20240102154912-e7106e64919e knative.dev/caching v0.0.0-20240710185920-2a0991fd01c1 - knative.dev/eventing v0.41.1-0.20240712123059-a61107c3df2b + knative.dev/eventing v0.41.1-0.20240712133327-e73f2c91d08a knative.dev/hack v0.0.0-20240704013904-b9799599afcf knative.dev/pkg v0.0.0-20240708181110-b4e5f07a2c37 - knative.dev/serving v0.41.1-0.20240711164751-63a741da0574 + knative.dev/serving v0.41.1-0.20240712154308-44a5d78184db sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index 64021b2d16..9522ecbe50 100644 --- a/go.sum +++ b/go.sum @@ -1361,16 +1361,16 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/caching v0.0.0-20240710185920-2a0991fd01c1 h1:fNk70esXX3GxN5v6xKchWVoae9BW6jBiUzAicVqBGLk= knative.dev/caching v0.0.0-20240710185920-2a0991fd01c1/go.mod h1:rlvmaffzOCaGghn9rhdRLiExKfEtdiC08vFnBq7QKrg= -knative.dev/eventing v0.41.1-0.20240712123059-a61107c3df2b h1:ke+JdVg2DalEgABVDZiR643ppjDf/mBnaQCP1QciNv4= -knative.dev/eventing v0.41.1-0.20240712123059-a61107c3df2b/go.mod h1:L8tQXb16XICD+5QJDcrDPjP+nncsszPT3hnOsKke15U= +knative.dev/eventing v0.41.1-0.20240712133327-e73f2c91d08a h1:m6KKXqX7zV03dVbPOGa9sgHaL81S/9k/tkEZypoyNAo= +knative.dev/eventing v0.41.1-0.20240712133327-e73f2c91d08a/go.mod h1:L8tQXb16XICD+5QJDcrDPjP+nncsszPT3hnOsKke15U= 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-20240704015122-370ddbb8fd13 h1:ik1TeuFTNAweZiQhUZKnKjE27Imk2vnJXMyanLzcTzo= knative.dev/networking v0.0.0-20240704015122-370ddbb8fd13/go.mod h1:x0GM7pp5hLZ0OBpJvHsJxMMJ0XKYWW3PQHCMGBlo9Ls= knative.dev/pkg v0.0.0-20240708181110-b4e5f07a2c37 h1:YJopww8+M2C6vdiKzHAP98917VxEZhkBJ66P3ilhU/4= knative.dev/pkg v0.0.0-20240708181110-b4e5f07a2c37/go.mod h1:QB3K3LuhP+jeEZmiEPapv2bfeSSLVSMWuTAw2SSM7uw= -knative.dev/serving v0.41.1-0.20240711164751-63a741da0574 h1:7AosntsH+dHmsd2TWQE2f6lVoJ6xWcQ8yKjsHpX9Gbc= -knative.dev/serving v0.41.1-0.20240711164751-63a741da0574/go.mod h1:kjO+YscsftZ1aJsrcYkaNMerp3Mm1PLCJhOzOG43HgY= +knative.dev/serving v0.41.1-0.20240712154308-44a5d78184db h1:Zc4h+D+lLS1B0NmF16wVdILM2if3f0Vf4GLRIwc1aFE= +knative.dev/serving v0.41.1-0.20240712154308-44a5d78184db/go.mod h1:kjO+YscsftZ1aJsrcYkaNMerp3Mm1PLCJhOzOG43HgY= 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/flows/v1/parallel_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/flows/v1/parallel_lifecycle.go index 99c283108a..e8cbb3da13 100644 --- a/vendor/knative.dev/eventing/pkg/apis/flows/v1/parallel_lifecycle.go +++ b/vendor/knative.dev/eventing/pkg/apis/flows/v1/parallel_lifecycle.go @@ -25,7 +25,7 @@ import ( pkgduckv1 "knative.dev/pkg/apis/duck/v1" ) -var pCondSet = apis.NewLivingConditionSet(ParallelConditionReady, ParallelConditionChannelsReady, ParallelConditionSubscriptionsReady, ParallelConditionAddressable) +var pCondSet = apis.NewLivingConditionSet(ParallelConditionReady, ParallelConditionChannelsReady, ParallelConditionSubscriptionsReady, ParallelConditionAddressable, ParallelConditionEventPoliciesReady) const ( // ParallelConditionReady has status True when all subconditions below have been set to True. @@ -42,6 +42,10 @@ const ( // ParallelConditionAddressable has status true when this Parallel meets // the Addressable contract and has a non-empty hostname. ParallelConditionAddressable apis.ConditionType = "Addressable" + + // ParallelConditionEventPoliciesReady has status True when applying EventPolicies for this + // Parallel are ready or if there are no EventPolicies. + ParallelConditionEventPoliciesReady apis.ConditionType = "EventPoliciesReady" ) // GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface. @@ -217,3 +221,23 @@ func (ps *ParallelStatus) setAddress(address *pkgduckv1.Addressable) { pCondSet.Manage(ps).MarkTrue(ParallelConditionAddressable) } } + +// MarkEventPoliciesFailed marks the ParallelConditionEventPoliciesReady as False with the given reason and message. +func (ps *ParallelStatus) MarkEventPoliciesFailed(reason, messageFormat string, messageA ...interface{}) { + pCondSet.Manage(ps).MarkFalse(ParallelConditionEventPoliciesReady, reason, messageFormat, messageA...) +} + +// MarkEventPoliciesUnknown marks the ParallelConditionEventPoliciesReady as Unknown with the given reason and message. +func (ps *ParallelStatus) MarkEventPoliciesUnknown(reason, messageFormat string, messageA ...interface{}) { + pCondSet.Manage(ps).MarkUnknown(ParallelConditionEventPoliciesReady, reason, messageFormat, messageA...) +} + +// MarkEventPoliciesTrue marks the ParallelConditionEventPoliciesReady as True. +func (ps *ParallelStatus) MarkEventPoliciesTrue() { + pCondSet.Manage(ps).MarkTrue(ParallelConditionEventPoliciesReady) +} + +// MarkEventPoliciesTrueWithReason marks the ParallelConditionEventPoliciesReady as True with the given reason and message. +func (ps *ParallelStatus) MarkEventPoliciesTrueWithReason(reason, messageFormat string, messageA ...interface{}) { + pCondSet.Manage(ps).MarkTrueWithReason(ParallelConditionEventPoliciesReady, reason, messageFormat, messageA...) +} diff --git a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/parallel.go b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/parallel.go index f77f417079..936faf823c 100644 --- a/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/parallel.go +++ b/vendor/knative.dev/eventing/pkg/reconciler/testing/v1/parallel.go @@ -21,6 +21,9 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1" + "knative.dev/eventing/pkg/apis/eventing/v1alpha1" + "knative.dev/eventing/pkg/apis/feature" flowsv1 "knative.dev/eventing/pkg/apis/flows/v1" messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" duckv1 "knative.dev/pkg/apis/duck/v1" @@ -113,3 +116,38 @@ func WithFlowsParallelAddressableNotReady(reason, message string) FlowsParallelO p.Status.MarkAddressableNotReady(reason, message) } } + +func WithFlowsParallelEventPoliciesReady() FlowsParallelOption { + return func(p *flowsv1.Parallel) { + p.Status.MarkEventPoliciesTrue() + } +} + +func WithFlowsParallelEventPoliciesNotReady(reason, message string) FlowsParallelOption { + return func(p *flowsv1.Parallel) { + p.Status.MarkEventPoliciesFailed(reason, message) + } +} + +func WithFlowsParallelEventPoliciesReadyBecauseOIDCDisabled() FlowsParallelOption { + return func(p *flowsv1.Parallel) { + p.Status.MarkEventPoliciesTrueWithReason("OIDCDisabled", "Feature %q must be enabled to support Authorization", feature.OIDCAuthentication) + } +} + +func WithFlowsParallelEventPoliciesReadyBecauseNoPolicyAndOIDCEnabled() FlowsParallelOption { + return func(p *flowsv1.Parallel) { + p.Status.MarkEventPoliciesTrueWithReason("DefaultAuthorizationMode", "Default authz mode is %q", feature.AuthorizationAllowSameNamespace) + } +} + +func WithFlowsParallelEventPoliciesListed(policyNames ...string) FlowsParallelOption { + return func(p *flowsv1.Parallel) { + for _, name := range policyNames { + p.Status.Policies = append(p.Status.Policies, eventingduckv1.AppliedEventPolicyRef{ + APIVersion: v1alpha1.SchemeGroupVersion.String(), + Name: name, + }) + } + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 0dff848d4f..d2760c2af3 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1323,7 +1323,7 @@ k8s.io/utils/trace ## explicit; go 1.22 knative.dev/caching/pkg/apis/caching knative.dev/caching/pkg/apis/caching/v1alpha1 -# knative.dev/eventing v0.41.1-0.20240712123059-a61107c3df2b +# knative.dev/eventing v0.41.1-0.20240712133327-e73f2c91d08a ## explicit; go 1.22 knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/duck @@ -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.20240711164751-63a741da0574 +# knative.dev/serving v0.41.1-0.20240712154308-44a5d78184db ## explicit; go 1.22 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1