diff --git a/go.mod b/go.mod index 7a57425cb7..809117e59c 100644 --- a/go.mod +++ b/go.mod @@ -20,11 +20,11 @@ require ( k8s.io/cli-runtime v0.25.2 k8s.io/client-go v0.26.5 k8s.io/code-generator v0.26.5 - knative.dev/eventing v0.37.1-0.20230524084610-5e245ac60ff1 - knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac - knative.dev/networking v0.0.0-20230524015214-fcbedadd6544 - knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead - knative.dev/serving v0.37.1-0.20230523161715-a65732110abe + knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808 + knative.dev/hack v0.0.0-20230615155948-d7586a218601 + knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d + knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 + knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994 sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index 443ff59437..30854a92bb 100644 --- a/go.sum +++ b/go.sum @@ -1063,16 +1063,16 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8= k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -knative.dev/eventing v0.37.1-0.20230524084610-5e245ac60ff1 h1:SGl13bqxsUO1ay5iq8jvUN/WCOi7T4UcmHI808Jt4XA= -knative.dev/eventing v0.37.1-0.20230524084610-5e245ac60ff1/go.mod h1:y+smuOGee5eJxaZ6jqtuT93TROmEk65yVganVJPu8l4= -knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac h1:XQrhtfWPsyuxwSxv4GhcFnqZh75Nq+L1iZWhFMz4aPg= -knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -knative.dev/networking v0.0.0-20230524015214-fcbedadd6544 h1:vt3KiVNijeZRXCXfBv0rdL0dSNuzgww79uPStZi7YbY= -knative.dev/networking v0.0.0-20230524015214-fcbedadd6544/go.mod h1:Y0OGdDIPKUGY5WFoKBR5KKCLsnAHbYEbzfXeWs2rYJw= -knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead h1:dcBDhkP6hd9VaV9nLukg75bIrvJs4YiSVOv0h2evOFc= -knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk= -knative.dev/serving v0.37.1-0.20230523161715-a65732110abe h1:npo2CrMay/nbRbbU3Nc6IqN3HE5Qo+IOt2rzw6p/olI= -knative.dev/serving v0.37.1-0.20230523161715-a65732110abe/go.mod h1:dsvhn0bjCzJBhNpNCH4jsfMWxnaPVgexD9iVuRjwcgY= +knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808 h1:9xzp250Vqqj+3K/306/th9v5u+n1X+cRdNPgD5Ffyn4= +knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808/go.mod h1:MRpJ0pRqodV9mlPvRTLXnUOo0ExPDHyEk04Zxjn3bA0= +knative.dev/hack v0.0.0-20230615155948-d7586a218601 h1:yMe29SMHrAIt3+J+APvf4WVP6cW7ZDtUhh5uxD5ERdA= +knative.dev/hack v0.0.0-20230615155948-d7586a218601/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= +knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d h1:jrODmEPU3SYcmaec2pErrcH5AvXVDdK70XJvblTj7RE= +knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d/go.mod h1:/CM22Ocewr85rfI84I+WUMoOVZSczpsif4fScImHdfU= +knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 h1:weQWWxEEbNOPuL4qtGiBZuMSFhcjF/Cu163uktd/xFE= +knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk= +knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994 h1:pGlaiue/Ux4Gzlb2eTIPmQksmmrNv5xeXsg9GRW4mWE= +knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994/go.mod h1:G5sRe4RpjxCaNdRI/EQagvtCioMtjOIdfoboauNMpSk= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/vendor/knative.dev/eventing/pkg/apis/duck/v1/delivery_types.go b/vendor/knative.dev/eventing/pkg/apis/duck/v1/delivery_types.go index 49c26ced5d..2c0306f200 100644 --- a/vendor/knative.dev/eventing/pkg/apis/duck/v1/delivery_types.go +++ b/vendor/knative.dev/eventing/pkg/apis/duck/v1/delivery_types.go @@ -154,4 +154,26 @@ type DeliveryStatus struct { // where failed events are sent to. // +optional DeadLetterSinkURI *apis.URL `json:"deadLetterSinkUri,omitempty"` + // DeadLetterSinkCACerts are Certification Authority (CA) certificates in PEM format + // according to https://www.rfc-editor.org/rfc/rfc7468. + // +optional + DeadLetterSinkCACerts *string `json:"deadLetterSinkCACerts,omitempty"` +} + +func (ds *DeliveryStatus) IsSet() bool { + return ds.DeadLetterSinkURI != nil +} + +func NewDeliveryStatusFromAddressable(addr *duckv1.Addressable) DeliveryStatus { + return DeliveryStatus{ + DeadLetterSinkURI: addr.URL, + DeadLetterSinkCACerts: addr.CACerts, + } +} + +func NewDestinationFromDeliveryStatus(status DeliveryStatus) duckv1.Destination { + return duckv1.Destination{ + URI: status.DeadLetterSinkURI, + CACerts: status.DeadLetterSinkCACerts, + } } diff --git a/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go b/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go index 8f024debf1..5dd4986c74 100644 --- a/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go @@ -184,6 +184,11 @@ func (in *DeliveryStatus) DeepCopyInto(out *DeliveryStatus) { *out = new(apis.URL) (*in).DeepCopyInto(*out) } + if in.DeadLetterSinkCACerts != nil { + in, out := &in.DeadLetterSinkCACerts, &out.DeadLetterSinkCACerts + *out = new(string) + **out = **in + } return } 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 e85f12ed80..ebe569271e 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 @@ -21,6 +21,8 @@ import ( "knative.dev/pkg/apis" v1 "knative.dev/pkg/apis/duck/v1" + + eventingduck "knative.dev/eventing/pkg/apis/duck/v1" ) const ( @@ -104,17 +106,17 @@ func (bs *BrokerStatus) InitializeConditions() { bs.GetConditionSet().Manage(bs).InitializeConditions() } -func (bs *BrokerStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSinkURI *apis.URL) { - bs.DeadLetterSinkURI = deadLetterSinkURI +func (bs *BrokerStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSink eventingduck.DeliveryStatus) { + bs.DeliveryStatus = deadLetterSink bs.GetConditionSet().Manage(bs).MarkTrue(BrokerConditionDeadLetterSinkResolved) } func (bs *BrokerStatus) MarkDeadLetterSinkNotConfigured() { - bs.DeadLetterSinkURI = nil + bs.DeliveryStatus = eventingduck.DeliveryStatus{} bs.GetConditionSet().Manage(bs).MarkTrueWithReason(BrokerConditionDeadLetterSinkResolved, "DeadLetterSinkNotConfigured", "No dead letter sink is configured.") } func (bs *BrokerStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat string, messageA ...interface{}) { - bs.DeadLetterSinkURI = nil + bs.DeliveryStatus = eventingduck.DeliveryStatus{} bs.GetConditionSet().Manage(bs).MarkFalse(BrokerConditionDeadLetterSinkResolved, 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 5082c9a2fc..80b2510009 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 @@ -19,10 +19,11 @@ package v1 import ( corev1 "k8s.io/api/core/v1" - eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1" - messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" + + eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1" + messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1" ) type testHelper struct{} @@ -61,7 +62,7 @@ func (t testHelper) ReadyBrokerStatus() *BrokerStatus { bs.PropagateTriggerChannelReadiness(t.ReadyChannelStatus()) bs.PropagateFilterAvailability(t.AvailableEndpoints()) bs.SetAddress(apis.HTTP("example.com")) - bs.MarkDeadLetterSinkResolvedSucceeded(nil) + bs.MarkDeadLetterSinkResolvedSucceeded(eventingduckv1.DeliveryStatus{}) return bs } diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_conversion.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_conversion.go index 663c82335c..b3e0ae6ba9 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_conversion.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_conversion.go @@ -19,6 +19,8 @@ package v1beta1 import ( "context" + duckv1 "knative.dev/pkg/apis/duck/v1" + "knative.dev/eventing/pkg/apis/eventing/v1beta2" "knative.dev/pkg/apis" @@ -37,10 +39,24 @@ func (source *EventType) ConvertTo(ctx context.Context, obj apis.Convertible) er Source: source.Spec.Source, Schema: source.Spec.Schema, SchemaData: source.Spec.SchemaData, - Broker: source.Spec.Broker, Description: source.Spec.Description, } + // for old stuff, we play nice here + // default to broker, but as a reference + if source.Spec.Reference == nil && source.Spec.Broker != "" { + sink.Spec.Reference = &duckv1.KReference{ + APIVersion: "eventing.knative.dev/v1", + Kind: "Broker", + Name: source.Spec.Broker, + } + } + + // if we have a reference, use it + if source.Spec.Reference != nil { + sink.Spec.Reference = source.Spec.Reference + } + return nil default: return apis.ConvertToViaProxy(ctx, source, &v1beta2.EventType{}, sink) @@ -61,7 +77,7 @@ func (sink *EventType) ConvertFrom(ctx context.Context, obj apis.Convertible) er Source: source.Spec.Source, Schema: source.Spec.Schema, SchemaData: source.Spec.SchemaData, - Broker: source.Spec.Broker, + Reference: source.Spec.Reference, Description: source.Spec.Description, } diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_defaults.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_defaults.go index bdcfbf3573..115df98d46 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_defaults.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_defaults.go @@ -23,7 +23,7 @@ func (et *EventType) SetDefaults(ctx context.Context) { } func (ets *EventTypeSpec) SetDefaults(ctx context.Context) { - if ets.Broker == "" { + if ets.Reference == nil && ets.Broker == "" { ets.Broker = "default" } } diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_types.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_types.go index 648be1c089..0c3fd2e8ef 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_types.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/eventtype_types.go @@ -41,7 +41,6 @@ type EventType struct { // Status represents the current state of the EventType. // This data may be out of date. // +optional - // TODO might be removed https://github.com/knative/eventing/issues/2750 Status EventTypeStatus `json:"status,omitempty"` } @@ -77,10 +76,13 @@ type EventTypeSpec struct { // The contents are not validated or manipulated by the system. // +optional SchemaData string `json:"schemaData,omitempty"` - // TODO remove https://github.com/knative/eventing/issues/2750 // Broker refers to the Broker that can provide the EventType. // +optional Broker string `json:"broker,omitempty"` + // Reference is a KReference to the belonging addressable. + // For example, this could be a pointer to a Broker. + // +optional + Reference *duckv1.KReference `json:"reference,omitempty"` // Description is an optional field used to describe the EventType, in any meaningful way. // +optional Description string `json:"description,omitempty"` diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/zz_generated.deepcopy.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/zz_generated.deepcopy.go index 20ea81675b..381fbe4f51 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/zz_generated.deepcopy.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/zz_generated.deepcopy.go @@ -24,6 +24,7 @@ package v1beta1 import ( runtime "k8s.io/apimachinery/pkg/runtime" apis "knative.dev/pkg/apis" + v1 "knative.dev/pkg/apis/duck/v1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -100,6 +101,11 @@ func (in *EventTypeSpec) DeepCopyInto(out *EventTypeSpec) { *out = new(apis.URL) (*in).DeepCopyInto(*out) } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(v1.KReference) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_defaults.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_defaults.go index 67ae41c885..02b6f0f2a3 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_defaults.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_defaults.go @@ -16,14 +16,20 @@ limitations under the License. package v1beta2 -import "context" +import ( + "context" +) func (et *EventType) SetDefaults(ctx context.Context) { et.Spec.SetDefaults(ctx) + setReferenceNs(et) } func (ets *EventTypeSpec) SetDefaults(ctx context.Context) { - if ets.Broker == "" { - ets.Broker = "default" +} + +func setReferenceNs(et *EventType) { + if et.Spec.Reference != nil && et.Spec.Reference.Namespace == "" { + et.Spec.Reference.Namespace = et.GetNamespace() } } diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_lifecycle.go index a8e1bfe846..300114a8cf 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_lifecycle.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_lifecycle.go @@ -17,18 +17,14 @@ limitations under the License. package v1beta2 import ( - corev1 "k8s.io/api/core/v1" - - eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1" "knative.dev/pkg/apis" ) -var eventTypeCondSet = apis.NewLivingConditionSet(EventTypeConditionBrokerExists, EventTypeConditionBrokerReady) +var eventTypeCondSet = apis.NewLivingConditionSet(EventTypeConditionReferenceExists) const ( - EventTypeConditionReady = apis.ConditionReady - EventTypeConditionBrokerExists apis.ConditionType = "BrokerExists" - EventTypeConditionBrokerReady apis.ConditionType = "BrokerReady" + EventTypeConditionReady = apis.ConditionReady + EventTypeConditionReferenceExists apis.ConditionType = "ReferenceExists" ) // GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface. @@ -56,49 +52,14 @@ func (et *EventTypeStatus) InitializeConditions() { eventTypeCondSet.Manage(et).InitializeConditions() } -func (et *EventTypeStatus) MarkBrokerExists() { - eventTypeCondSet.Manage(et).MarkTrue(EventTypeConditionBrokerExists) -} - -func (et *EventTypeStatus) MarkBrokerDoesNotExist() { - eventTypeCondSet.Manage(et).MarkFalse(EventTypeConditionBrokerExists, "BrokerDoesNotExist", "Broker does not exist") -} - -func (et *EventTypeStatus) MarkBrokerExistsUnknown(reason, messageFormat string, messageA ...interface{}) { - eventTypeCondSet.Manage(et).MarkUnknown(EventTypeConditionBrokerExists, reason, messageFormat, messageA...) -} - -func (et *EventTypeStatus) MarkBrokerReady() { - eventTypeCondSet.Manage(et).MarkTrue(EventTypeConditionBrokerReady) -} - -func (et *EventTypeStatus) MarkBrokerFailed(reason, messageFormat string, messageA ...interface{}) { - eventTypeCondSet.Manage(et).MarkFalse(EventTypeConditionBrokerReady, reason, messageFormat, messageA...) -} - -func (et *EventTypeStatus) MarkBrokerUnknown(reason, messageFormat string, messageA ...interface{}) { - eventTypeCondSet.Manage(et).MarkUnknown(EventTypeConditionBrokerReady, reason, messageFormat, messageA...) +func (et *EventTypeStatus) MarkReferenceExists() { + eventTypeCondSet.Manage(et).MarkTrue(EventTypeConditionReferenceExists) } -func (et *EventTypeStatus) MarkBrokerNotConfigured() { - eventTypeCondSet.Manage(et).MarkUnknown(EventTypeConditionBrokerReady, - "BrokerNotConfigured", "Broker has not yet been reconciled.") +func (et *EventTypeStatus) MarkReferenceDoesNotExist() { + eventTypeCondSet.Manage(et).MarkFalse(EventTypeConditionReferenceExists, "ResourceDoesNotExist", "Resource in spec.reference does not exist") } -func (et *EventTypeStatus) PropagateBrokerStatus(bs *eventingv1.BrokerStatus) { - bc := bs.GetConditionSet().Manage(bs).GetTopLevelCondition() - if bc == nil { - et.MarkBrokerNotConfigured() - return - } - switch { - case bc.Status == corev1.ConditionUnknown: - et.MarkBrokerUnknown(bc.Reason, bc.Message) - case bc.Status == corev1.ConditionTrue: - eventTypeCondSet.Manage(et).MarkTrue(EventTypeConditionBrokerReady) - case bc.Status == corev1.ConditionFalse: - et.MarkBrokerFailed(bc.Reason, bc.Message) - default: - et.MarkBrokerUnknown("BrokerUnknown", "The status of Broker is invalid: %v", bc.Status) - } +func (et *EventTypeStatus) MarkReferenceExistsUnknown(reason, messageFormat string, messageA ...interface{}) { + eventTypeCondSet.Manage(et).MarkUnknown(EventTypeConditionReferenceExists, reason, messageFormat, messageA...) } diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_types.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_types.go index e182e2d813..8356aa3583 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_types.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_types.go @@ -41,7 +41,6 @@ type EventType struct { // Status represents the current state of the EventType. // This data may be out of date. // +optional - // TODO might be removed https://github.com/knative/eventing/issues/2750 Status EventTypeStatus `json:"status,omitempty"` } @@ -77,10 +76,14 @@ type EventTypeSpec struct { // The contents are not validated or manipulated by the system. // +optional SchemaData string `json:"schemaData,omitempty"` - // TODO remove https://github.com/knative/eventing/issues/2750 // Broker refers to the Broker that can provide the EventType. + // Deprecated: This field is deprecated and will be removed in a future release. // +optional Broker string `json:"broker,omitempty"` + // Reference is a KReference to the belonging addressable. + //For example, this could be a pointer to a Broker. + // +optional + Reference *duckv1.KReference `json:"reference,omitempty"` // Description is an optional field used to describe the EventType, in any meaningful way. // +optional Description string `json:"description,omitempty"` diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/zz_generated.deepcopy.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/zz_generated.deepcopy.go index 3163151d70..c3e2eb977a 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/zz_generated.deepcopy.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/zz_generated.deepcopy.go @@ -24,6 +24,7 @@ package v1beta2 import ( runtime "k8s.io/apimachinery/pkg/runtime" apis "knative.dev/pkg/apis" + v1 "knative.dev/pkg/apis/duck/v1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -100,6 +101,11 @@ func (in *EventTypeSpec) DeepCopyInto(out *EventTypeSpec) { *out = new(apis.URL) (*in).DeepCopyInto(*out) } + if in.Reference != nil { + in, out := &in.Reference, &out.Reference + *out = new(v1.KReference) + (*in).DeepCopyInto(*out) + } return } diff --git a/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go b/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go index d8dccea6de..e546aed32c 100644 --- a/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go +++ b/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go @@ -23,4 +23,5 @@ const ( KReferenceMapping = "kreference-mapping" NewTriggerFilters = "new-trigger-filters" TransportEncryption = "transport-encryption" + EvenTypeAutoCreate = "eventtype-auto-create" ) diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/channel_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/channel_lifecycle.go index 40aa084b45..2936a1f194 100644 --- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/channel_lifecycle.go +++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/channel_lifecycle.go @@ -19,9 +19,10 @@ package v1 import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" - eventingduck "knative.dev/eventing/pkg/apis/duck/v1" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" + + eventingduck "knative.dev/eventing/pkg/apis/duck/v1" ) var chCondSet = apis.NewLivingConditionSet( @@ -131,17 +132,17 @@ func (cs *ChannelStatus) PropagateStatuses(chs *eventingduck.ChannelableStatus) cs.SubscribableStatus = chs.SubscribableStatus } -func (cs *ChannelStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSinkURI *apis.URL) { - cs.DeliveryStatus.DeadLetterSinkURI = deadLetterSinkURI +func (cs *ChannelStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSink eventingduck.DeliveryStatus) { + cs.DeliveryStatus = deadLetterSink chCondSet.Manage(cs).MarkTrue(ChannelConditionDeadLetterSinkResolved) } func (cs *ChannelStatus) MarkDeadLetterSinkNotConfigured() { - cs.DeadLetterSinkURI = nil + cs.DeliveryStatus = eventingduck.DeliveryStatus{} chCondSet.Manage(cs).MarkTrueWithReason(ChannelConditionDeadLetterSinkResolved, "DeadLetterSinkNotConfigured", "No dead letter sink is configured.") } func (cs *ChannelStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat string, messageA ...interface{}) { - cs.DeadLetterSinkURI = nil + cs.DeliveryStatus = eventingduck.DeliveryStatus{} chCondSet.Manage(cs).MarkFalse(ChannelConditionDeadLetterSinkResolved, reason, messageFormat, messageA...) } diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/in_memory_channel_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/in_memory_channel_lifecycle.go index 1594a8a38f..6be9e29f33 100644 --- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/in_memory_channel_lifecycle.go +++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/in_memory_channel_lifecycle.go @@ -23,6 +23,8 @@ import ( "k8s.io/utils/pointer" "knative.dev/pkg/apis" v1 "knative.dev/pkg/apis/duck/v1" + + eventingduck "knative.dev/eventing/pkg/apis/duck/v1" ) var imcCondSet = apis.NewLivingConditionSet( @@ -97,10 +99,10 @@ func (imcs *InMemoryChannelStatus) InitializeConditions() { imcCondSet.Manage(imcs).InitializeConditions() } -func (imcs *InMemoryChannelStatus) SetAddress(url *apis.URL) { - imcs.Address = &v1.Addressable{URL: url} - if url != nil { - imcs.Address.Name = pointer.String(url.Scheme) +func (imcs *InMemoryChannelStatus) SetAddress(addr *v1.Addressable) { + imcs.Address = addr + if addr != nil && addr.URL != nil { + imcs.Address.Name = pointer.String(addr.URL.Scheme) imcCondSet.Manage(imcs).MarkTrue(InMemoryChannelConditionAddressable) } else { imcCondSet.Manage(imcs).MarkFalse(InMemoryChannelConditionAddressable, "emptyHostname", "hostname is the empty string") @@ -166,17 +168,17 @@ func (imcs *InMemoryChannelStatus) MarkEndpointsTrue() { imcCondSet.Manage(imcs).MarkTrue(InMemoryChannelConditionEndpointsReady) } -func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSinkURI *apis.URL) { - imcs.DeliveryStatus.DeadLetterSinkURI = deadLetterSinkURI +func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkResolvedSucceeded(ds eventingduck.DeliveryStatus) { + imcs.DeliveryStatus = ds imcCondSet.Manage(imcs).MarkTrue(InMemoryChannelConditionDeadLetterSinkResolved) } func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkNotConfigured() { - imcs.DeadLetterSinkURI = nil + imcs.DeliveryStatus = eventingduck.DeliveryStatus{} imcCondSet.Manage(imcs).MarkTrueWithReason(InMemoryChannelConditionDeadLetterSinkResolved, "DeadLetterSinkNotConfigured", "No dead letter sink is configured.") } func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat string, messageA ...interface{}) { - imcs.DeadLetterSinkURI = nil + imcs.DeliveryStatus = eventingduck.DeliveryStatus{} imcCondSet.Manage(imcs).MarkFalse(InMemoryChannelConditionDeadLetterSinkResolved, reason, messageFormat, messageA...) } diff --git a/vendor/knative.dev/eventing/pkg/apis/sources/v1/apiserver_lifecycle.go b/vendor/knative.dev/eventing/pkg/apis/sources/v1/apiserver_lifecycle.go index e12d8a397c..5b8f5d1e3b 100644 --- a/vendor/knative.dev/eventing/pkg/apis/sources/v1/apiserver_lifecycle.go +++ b/vendor/knative.dev/eventing/pkg/apis/sources/v1/apiserver_lifecycle.go @@ -20,6 +20,7 @@ import ( appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime/schema" + duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/apis" ) @@ -75,9 +76,10 @@ func (s *ApiServerSourceStatus) InitializeConditions() { } // MarkSink sets the condition that the source has a sink configured. -func (s *ApiServerSourceStatus) MarkSink(uri *apis.URL) { - s.SinkURI = uri - if uri != nil { +func (s *ApiServerSourceStatus) MarkSink(addr *duckv1.Addressable) { + if addr != nil { + s.SinkURI = addr.URL + s.SinkCACerts = addr.CACerts apiserverCondSet.Manage(s).MarkTrue(ApiServerConditionSinkProvided) } else { apiserverCondSet.Manage(s).MarkFalse(ApiServerConditionSinkProvided, "SinkEmpty", "Sink has resolved to empty.%s", "") diff --git a/vendor/knative.dev/hack/README.md b/vendor/knative.dev/hack/README.md index b3ad76c5a7..5dc34c8edd 100644 --- a/vendor/knative.dev/hack/README.md +++ b/vendor/knative.dev/hack/README.md @@ -96,7 +96,7 @@ main "$@" This is a helper script for Knative E2E test scripts. To use it: 1. [optional] Customize the test cluster. Pass the flags as described - [here](../tools/kntest/pkg/kubetest2/gke/README.md) to the `initialize` function + [here](https://github.com/knative/toolbox/blob/main/kntest/pkg/kubetest2/gke/README.md) to the `initialize` function call if the default values don't fit your needs. 1. Source the script. diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/certificate_validation.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/certificate_validation.go index 8d95308446..35787c8d56 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/certificate_validation.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/certificate_validation.go @@ -29,7 +29,7 @@ func (c *Certificate) Validate(ctx context.Context) *apis.FieldError { } // Validate inspects and validates CertificateSpec object. -func (spec *CertificateSpec) Validate(ctx context.Context) (all *apis.FieldError) { +func (spec *CertificateSpec) Validate(_ context.Context) (all *apis.FieldError) { // Spec must have at least one DNS Name. if len(spec.DNSNames) == 0 { all = all.Also(apis.ErrMissingField("dnsNames")) diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_defaults.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_defaults.go index a0cec01269..1d3ff93c81 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_defaults.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_defaults.go @@ -28,5 +28,5 @@ func (d *Domain) SetDefaults(ctx context.Context) { } // SetDefaults populates default values in DomainSpec -func (*DomainSpec) SetDefaults(ctx context.Context) { +func (*DomainSpec) SetDefaults(_ context.Context) { } diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_validation.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_validation.go index d2434e234b..85d5569728 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_validation.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/domain_validation.go @@ -50,7 +50,7 @@ func (ds *DomainSpec) Validate(ctx context.Context) *apis.FieldError { return all } -func (lb *LoadBalancerIngressSpec) Validate(ctx context.Context) *apis.FieldError { +func (lb *LoadBalancerIngressSpec) Validate(_ context.Context) *apis.FieldError { var all *apis.FieldError if lb.Domain == "" && lb.DomainInternal == "" && lb.IP == "" && !lb.MeshOnly { return all.Also(apis.ErrMissingOneOf("domain", "domainInternal", "ip", "meshOnly")) @@ -58,7 +58,7 @@ func (lb *LoadBalancerIngressSpec) Validate(ctx context.Context) *apis.FieldErro return all } -func (cfg *IngressConfig) Validate(ctx context.Context) *apis.FieldError { +func (cfg *IngressConfig) Validate(_ context.Context) *apis.FieldError { var all *apis.FieldError if cfg.Name == "" { all = all.Also(apis.ErrMissingField("name")) diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_defaults.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_defaults.go index 890717dd69..6cfc085244 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_defaults.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_defaults.go @@ -38,7 +38,7 @@ func (is *IngressSpec) SetDefaults(ctx context.Context) { } // SetDefaults populates default values in IngressTLS -func (t *IngressTLS) SetDefaults(ctx context.Context) {} +func (t *IngressTLS) SetDefaults(_ context.Context) {} // SetDefaults populates default values in IngressRule func (r *IngressRule) SetDefaults(ctx context.Context) { @@ -56,7 +56,7 @@ func (h *HTTPIngressRuleValue) SetDefaults(ctx context.Context) { } // SetDefaults populates default values in HTTPIngressPath -func (h *HTTPIngressPath) SetDefaults(ctx context.Context) { +func (h *HTTPIngressPath) SetDefaults(_ context.Context) { // If only one split is specified, we default to 100. if len(h.Splits) == 1 && h.Splits[0].Percent == 0 { h.Splits[0].Percent = 100 diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_validation.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_validation.go index ed708d4206..2a49acddbc 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_validation.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/ingress_validation.go @@ -152,7 +152,7 @@ func (b IngressBackend) Validate(ctx context.Context) *apis.FieldError { } // Validate inspects and validates IngressTLS object. -func (t *IngressTLS) Validate(ctx context.Context) *apis.FieldError { +func (t *IngressTLS) Validate(_ context.Context) *apis.FieldError { // Provided TLS setting must not be empty. if equality.Semantic.DeepEqual(t, &IngressTLS{}) { return apis.ErrMissingField(apis.CurrentField) @@ -168,7 +168,7 @@ func (t *IngressTLS) Validate(ctx context.Context) *apis.FieldError { return all } -func (t HTTPOption) Validate(ctx context.Context) (all *apis.FieldError) { +func (t HTTPOption) Validate(_ context.Context) (all *apis.FieldError) { switch t { case "", HTTPOptionEnabled, HTTPOptionRedirected: break diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_defaults.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_defaults.go index 85d7c41f1c..5614104be7 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_defaults.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_defaults.go @@ -28,5 +28,5 @@ func (r *Realm) SetDefaults(ctx context.Context) { } // SetDefaults populates default values in RealmSpec -func (*RealmSpec) SetDefaults(ctx context.Context) { +func (*RealmSpec) SetDefaults(_ context.Context) { } diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_validation.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_validation.go index 7137499d78..93caf70167 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_validation.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/realm_validation.go @@ -28,7 +28,7 @@ func (r *Realm) Validate(ctx context.Context) *apis.FieldError { } // Validate inspects and validates RealmSpec object. -func (rs *RealmSpec) Validate(ctx context.Context) *apis.FieldError { +func (rs *RealmSpec) Validate(_ context.Context) *apis.FieldError { var all *apis.FieldError if rs.External == "" && rs.Internal == "" { all = all.Also(apis.ErrMissingOneOf("external", "internal")) diff --git a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/serverlessservice_defaults.go b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/serverlessservice_defaults.go index 884754d096..cb358ad908 100644 --- a/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/serverlessservice_defaults.go +++ b/vendor/knative.dev/networking/pkg/apis/networking/v1alpha1/serverlessservice_defaults.go @@ -24,6 +24,6 @@ func (ss *ServerlessService) SetDefaults(ctx context.Context) { } // SetDefaults sets default values on the ServerlessServiceSpec. -func (*ServerlessServiceSpec) SetDefaults(ctx context.Context) { +func (*ServerlessServiceSpec) SetDefaults(_ context.Context) { // Nothing is defaultable so far. } diff --git a/vendor/knative.dev/networking/pkg/client/clientset/versioned/clientset.go b/vendor/knative.dev/networking/pkg/client/clientset/versioned/clientset.go index 2c2000b0b1..09bee31cfc 100644 --- a/vendor/knative.dev/networking/pkg/client/clientset/versioned/clientset.go +++ b/vendor/knative.dev/networking/pkg/client/clientset/versioned/clientset.go @@ -33,8 +33,7 @@ type Interface interface { NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient networkingV1alpha1 *networkingv1alpha1.NetworkingV1alpha1Client diff --git a/vendor/knative.dev/pkg/apis/duck/v1/kresource_type.go b/vendor/knative.dev/pkg/apis/duck/v1/kresource_type.go index 491c13f1f6..1f6ee8264e 100644 --- a/vendor/knative.dev/pkg/apis/duck/v1/kresource_type.go +++ b/vendor/knative.dev/pkg/apis/duck/v1/kresource_type.go @@ -23,6 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "knative.dev/pkg/apis/duck/ducktypes" "knative.dev/pkg/apis" @@ -41,6 +42,7 @@ type KRShaped interface { // Asserts KResource conformance with KRShaped var _ KRShaped = (*KResource)(nil) +// +genduck // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // KResource is a skeleton type wrapping Conditions in the manner we expect @@ -54,6 +56,11 @@ type KResource struct { Status Status `json:"status"` } +// GetFullType implements duck.Implementable +func (*KResource) GetFullType() ducktypes.Populatable { + return &KResource{} +} + // Populate implements duck.Populatable func (t *KResource) Populate() { t.Status.ObservedGeneration = 42 diff --git a/vendor/knative.dev/pkg/environment/client_config.go b/vendor/knative.dev/pkg/environment/client_config.go index 04d4220b0a..aef33927ef 100644 --- a/vendor/knative.dev/pkg/environment/client_config.go +++ b/vendor/knative.dev/pkg/environment/client_config.go @@ -19,8 +19,10 @@ package environment import ( "flag" "fmt" + "log" "math" "os" + "strconv" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" @@ -45,9 +47,19 @@ func (c *ClientConfig) InitFlags(fs *flag.FlagSet) { fs.StringVar(&c.Kubeconfig, "kubeconfig", os.Getenv("KUBECONFIG"), "Path to a kubeconfig. Only required if out-of-cluster.") - fs.IntVar(&c.Burst, "kube-api-burst", 0, "Maximum burst for throttle.") + fs.IntVar(&c.Burst, "kube-api-burst", int(envVarOrDefault("KUBE_API_BURST", 0)), "Maximum burst for throttle.") - fs.Float64Var(&c.QPS, "kube-api-qps", 0, "Maximum QPS to the server from the client.") + fs.Float64Var(&c.QPS, "kube-api-qps", envVarOrDefault("KUBE_API_QPS", 0.0), "Maximum QPS to the server from the client.") +} + +func envVarOrDefault(key string, val float64) float64 { + var err error + if v := os.Getenv(key); v != "" { + if val, err = strconv.ParseFloat(v, 64); err != nil { + log.Fatal(err) + } + } + return val } func (c *ClientConfig) GetRESTConfig() (*rest.Config, error) { diff --git a/vendor/knative.dev/pkg/injection/clients.go b/vendor/knative.dev/pkg/injection/clients.go index 92e9912185..b71ef1d943 100644 --- a/vendor/knative.dev/pkg/injection/clients.go +++ b/vendor/knative.dev/pkg/injection/clients.go @@ -62,22 +62,3 @@ func (i *impl) FetchAllClients(ctx context.Context) []interface{} { } return clients } - -// DynamicClientInjector holds the type of a callback that attaches a particular -// client type to a context. -type DynamicClientInjector func(context.Context) context.Context - -func (i *impl) RegisterDynamicClient(ci DynamicClientInjector) { - i.m.Lock() - defer i.m.Unlock() - - i.dynamicClients = append(i.dynamicClients, ci) -} - -func (i *impl) GetDynamicClients() []DynamicClientInjector { - i.m.RLock() - defer i.m.RUnlock() - - // Copy the slice before returning. - return append(i.dynamicClients[:0:0], i.dynamicClients...) -} diff --git a/vendor/knative.dev/pkg/injection/informers.go b/vendor/knative.dev/pkg/injection/informers.go index ce5d481e88..9356f8d7f9 100644 --- a/vendor/knative.dev/pkg/injection/informers.go +++ b/vendor/knative.dev/pkg/injection/informers.go @@ -28,10 +28,6 @@ import ( // informer type to a context. type InformerInjector func(context.Context) (context.Context, controller.Informer) -// DynamicInformerInjector holds the type of a callback that attaches a particular -// informer type (backed by a Dynamic) to a context. -type DynamicInformerInjector func(context.Context) context.Context - // FilteredInformersInjector holds the type of a callback that attaches a set of particular // filtered informers type to a context. type FilteredInformersInjector func(context.Context) (context.Context, []controller.Informer) @@ -43,13 +39,6 @@ func (i *impl) RegisterInformer(ii InformerInjector) { i.informers = append(i.informers, ii) } -func (i *impl) RegisterDynamicInformer(ii DynamicInformerInjector) { - i.m.Lock() - defer i.m.Unlock() - - i.dynamicInformers = append(i.dynamicInformers, ii) -} - func (i *impl) RegisterFilteredInformers(fii FilteredInformersInjector) { i.m.Lock() defer i.m.Unlock() @@ -65,14 +54,6 @@ func (i *impl) GetInformers() []InformerInjector { return append(i.informers[:0:0], i.informers...) } -func (i *impl) GetDynamicInformers() []DynamicInformerInjector { - i.m.RLock() - defer i.m.RUnlock() - - // Copy the slice before returning. - return append(i.dynamicInformers[:0:0], i.dynamicInformers...) -} - func (i *impl) GetFilteredInformers() []FilteredInformersInjector { i.m.RLock() defer i.m.RUnlock() @@ -81,22 +62,6 @@ func (i *impl) GetFilteredInformers() []FilteredInformersInjector { return append(i.filteredInformers[:0:0], i.filteredInformers...) } -func (i *impl) SetupDynamic(ctx context.Context) context.Context { - // Based on the reconcilers we have linked, build up a set of clients and inject - // them onto the context. - for _, ci := range i.GetDynamicClients() { - ctx = ci(ctx) - } - - // Based on the reconcilers we have linked, build up a set of informers - // and inject them onto the context. - for _, ii := range i.GetDynamicInformers() { - ctx = ii(ctx) - } - - return ctx -} - func (i *impl) SetupInformers(ctx context.Context, cfg *rest.Config) (context.Context, []controller.Informer) { // Based on the reconcilers we have linked, build up a set of clients and inject // them onto the context. diff --git a/vendor/knative.dev/pkg/injection/interface.go b/vendor/knative.dev/pkg/injection/interface.go index 158864015f..c6d5715ad5 100644 --- a/vendor/knative.dev/pkg/injection/interface.go +++ b/vendor/knative.dev/pkg/injection/interface.go @@ -78,29 +78,6 @@ type Interface interface { SetupInformers(context.Context, *rest.Config) (context.Context, []controller.Informer) } -// DynamicInterface is the interface for interacting with dynamicclient-based injection -// implementations, such as Dynamic below. -type DynamicInterface interface { - // RegisterDynamicClient registers a new injector callback for associating - // a new dynamicclient-based client with a context. - RegisterDynamicClient(DynamicClientInjector) - - // GetDynamicClients fetches all of the registered dynamicclient-based client injectors. - GetDynamicClients() []DynamicClientInjector - - // RegisterDynamicInformer registers a new injector callback for associating - // a new dynamicclient-based informer with a context. - RegisterDynamicInformer(DynamicInformerInjector) - - // GetDynamicInformers fetches all of the registered dynamicclient-based informer injectors. - GetDynamicInformers() []DynamicInformerInjector - - // SetupDynamic runs all of the injectors against a context, starting with - // the clients and the given stream. A context infused with the various elements - // is returned. - SetupDynamic(context.Context) context.Context -} - type ControllerConstructor func(context.Context, configmap.Watcher) *controller.Impl // NamedControllerConstructor is a ControllerConstructor with an associated name. @@ -120,10 +97,6 @@ var ( // are being run for real. Default Interface = &impl{} - // Dynamic is the injection interface to use when bootstrapping a version - // of things based on the prototype dynamicclient-based reconciler framework. - Dynamic DynamicInterface = &impl{} - // Fake is the injection interface with which informers should register // to make themselves available to the controller process when it is being // unit tested. @@ -134,11 +107,9 @@ type impl struct { m sync.RWMutex clients []ClientInjector - dynamicClients []DynamicClientInjector clientFetchers []ClientFetcher factories []InformerFactoryInjector informers []InformerInjector - dynamicInformers []DynamicInformerInjector filteredInformers []FilteredInformersInjector ducks []DuckFactoryInjector } diff --git a/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go b/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go index 2a67b266c5..0f89a860b7 100644 --- a/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go +++ b/vendor/knative.dev/serving/pkg/client/clientset/versioned/clientset.go @@ -39,8 +39,7 @@ type Interface interface { ServingV1alpha1() servingv1alpha1.ServingV1alpha1Interface } -// Clientset contains the clients for groups. Each group has exactly one -// version included in a Clientset. +// Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient autoscalingV1alpha1 *autoscalingv1alpha1.AutoscalingV1alpha1Client diff --git a/vendor/knative.dev/serving/test/e2e-networking-library.sh b/vendor/knative.dev/serving/test/e2e-networking-library.sh index e5f4d0f9bc..eaa428d1a7 100644 --- a/vendor/knative.dev/serving/test/e2e-networking-library.sh +++ b/vendor/knative.dev/serving/test/e2e-networking-library.sh @@ -26,7 +26,7 @@ function stage_gateway_api_resources() { mkdir -p "${gateway_dir}" # TODO: if we switch to istio 1.12 we can reuse stage_istio_head - curl -sL https://istio.io/downloadIstioctl | ISTIO_VERSION=1.12.2 sh - + curl -sL https://istio.io/downloadIstioctl | ISTIO_VERSION=1.17.2 sh - local params="--set values.global.proxy.clusterDomain=${CLUSTER_DOMAIN}" diff --git a/vendor/modules.txt b/vendor/modules.txt index bcad14e84e..c63c03c1f1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -934,7 +934,7 @@ k8s.io/utils/net k8s.io/utils/pointer k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/eventing v0.37.1-0.20230524084610-5e245ac60ff1 +# knative.dev/eventing v0.37.1-0.20230627143052-8f7409444808 ## explicit; go 1.19 knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/duck @@ -963,10 +963,10 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake -# knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac +# knative.dev/hack v0.0.0-20230615155948-d7586a218601 ## explicit; go 1.18 knative.dev/hack -# knative.dev/networking v0.0.0-20230524015214-fcbedadd6544 +# knative.dev/networking v0.0.0-20230622190036-3a75df5dd93d ## explicit; go 1.18 knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking @@ -981,7 +981,7 @@ knative.dev/networking/pkg/http/probe knative.dev/networking/pkg/http/proxy knative.dev/networking/pkg/http/stats knative.dev/networking/pkg/k8s -# knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead +# knative.dev/pkg v0.0.0-20230616134650-eb63a40adfb0 ## explicit; go 1.18 knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -1031,7 +1031,7 @@ knative.dev/pkg/tracing/config knative.dev/pkg/tracing/propagation knative.dev/pkg/tracing/propagation/tracecontextb3 knative.dev/pkg/tracker -# knative.dev/serving v0.37.1-0.20230523161715-a65732110abe +# knative.dev/serving v0.37.1-0.20230626132048-0462ce6dd994 ## explicit; go 1.18 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1