From 1a9aa6c0b1d88aff292f822cef19f361e4dd90a4 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Fri, 31 May 2024 13:23:35 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/eventing 2a11bb8...a58c135: > a58c135 Prototype a MQTT Source (# 7919) > 39d2723 [main] Upgrade to latest dependencies (# 7950) > b9cba87 Add EventType v1beta3 conversion (# 7938) bumping knative.dev/networking 1d0137a...1b470c4: > 1b470c4 upgrade to latest dependencies (# 986) > 11202c5 Update community files (# 985) bumping knative.dev/serving 0b363c0...0ddd15e: > 0ddd15e Update net-kourier nightly (# 15283) > f5123b6 upgrade to latest dependencies (# 15277) > a2459ef Update net-istio nightly (# 15281) > f84265a Do not delete ingress Secret in tests for internal tls (# 15280) > f53936b revert headless svc change from k8s private svc (# 15275) > 85d485a Update net-gateway-api nightly (# 15282) Signed-off-by: Knative Automation --- go.mod | 6 +- go.sum | 12 +-- .../eventing/v1beta2/eventtype_conversion.go | 77 ++++++++++++++++++- vendor/modules.txt | 6 +- 4 files changed, 85 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 1b27eb0d8..6dce8b3b3 100644 --- a/go.mod +++ b/go.mod @@ -14,10 +14,10 @@ require ( k8s.io/api v0.29.2 k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 - knative.dev/eventing v0.41.1-0.20240529130930-2a11bb8636bf + knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05 knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea knative.dev/pkg v0.0.0-20240529181700-7d52a43448b2 - knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c + knative.dev/serving v0.41.1-0.20240531084853-0ddd15e2ba1a ) require ( @@ -102,7 +102,7 @@ require ( k8s.io/klog/v2 v2.120.1 // indirect k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect - knative.dev/networking v0.0.0-20240521183848-1d0137a18a68 // indirect + knative.dev/networking v0.0.0-20240530052748-1b470c4f662c // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index 833d21a6c..808d2d7ba 100644 --- a/go.sum +++ b/go.sum @@ -721,16 +721,16 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= 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/eventing v0.41.1-0.20240529130930-2a11bb8636bf h1:THZuEzMxX610jEqZViqNe00KOZv+mATP9MLvspgIaZE= -knative.dev/eventing v0.41.1-0.20240529130930-2a11bb8636bf/go.mod h1:IUBpMsDIfyV5836R9PN0/VyADgoDa9ykgz7gpvTseLw= +knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05 h1:OltA5F33cPH/q88XGlqUn6Ip2p2QgTSm0SJ2cNDqXzU= +knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05/go.mod h1:toAuiWQiMPHgWcXNYocPhMNx8xYFbjQsupEiQdPT83o= knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea h1:iWW6SNMrVd2hI5Y+ltKIEzXVedoQLL86b23dS5fkvXs= knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= -knative.dev/networking v0.0.0-20240521183848-1d0137a18a68 h1:Piy1jJ5r3pet0cJV5An69hMTKUfXmiQgfEFThaAfQlA= -knative.dev/networking v0.0.0-20240521183848-1d0137a18a68/go.mod h1:LFhDu22ymaEZFnFBUoSoo4Y4l+KWXujH5yQQNOaEwBc= +knative.dev/networking v0.0.0-20240530052748-1b470c4f662c h1:YeufB6la68PjSPO8xoVnVEkqIRNfLlh9DN5SmdWHRVA= +knative.dev/networking v0.0.0-20240530052748-1b470c4f662c/go.mod h1:wJvCa9TRBYi+Wrdh8fgmVeWPuwdxtCfWnnKwXVg9h1M= knative.dev/pkg v0.0.0-20240529181700-7d52a43448b2 h1:Q4xHp1Y4maNrCJQ1bATmW0LyXSsMG9KlyrDgdKHCNT8= knative.dev/pkg v0.0.0-20240529181700-7d52a43448b2/go.mod h1:GHFUP1wtD/bR/c02QADqaAK3odDJh1ddBMvXhq/goy8= -knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c h1:cGDjYQpx5ctb6ukG6nnLRty2cwBdqoYFU8vprYxzcUQ= -knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c/go.mod h1:V+1hMZueIl655axDH4IOVc6xO8/Z9Ggun/jYEpIEhOo= +knative.dev/serving v0.41.1-0.20240531084853-0ddd15e2ba1a h1:NdIf+9E9oSlz4NLFvSE5DVfiMb6GglFVhS/YoV70WAM= +knative.dev/serving v0.41.1-0.20240531084853-0ddd15e2ba1a/go.mod h1:Wh/DH5JHAH9Jdm8cHQPEWJ4hZSB2IS3nFEtAEqElBig= 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/eventing/v1beta2/eventtype_conversion.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_conversion.go index 2bdd421a5..6212e245d 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_conversion.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_conversion.go @@ -18,17 +18,86 @@ package v1beta2 import ( "context" - "fmt" "knative.dev/pkg/apis" + duckv1 "knative.dev/pkg/apis/duck/v1" + + eventing "knative.dev/eventing/pkg/apis/eventing/v1" + "knative.dev/eventing/pkg/apis/eventing/v1beta3" ) -// ConvertTo implements apis.Convertible +// ConvertTo converts the receiver into `to`. func (source *EventType) ConvertTo(ctx context.Context, to apis.Convertible) error { - return fmt.Errorf("v1beta2 is the highest known version, got: %T", to) + switch sink := to.(type) { + case *v1beta3.EventType: + + source.ObjectMeta.DeepCopyInto(&sink.ObjectMeta) + source.Status.Status.DeepCopyInto(&sink.Status.Status) + + sink.Spec.Reference = source.Spec.Reference.DeepCopy() + sink.Spec.Description = source.Spec.Description + + if source.Spec.Reference == nil && source.Spec.Broker != "" { + source.Spec.Reference = &duckv1.KReference{ + Kind: "Broker", + Name: source.Spec.Broker, + APIVersion: eventing.SchemeGroupVersion.String(), + } + } + + sink.Spec.Attributes = []v1beta3.EventAttributeDefinition{} + if source.Spec.Type != "" { + sink.Spec.Attributes = append(sink.Spec.Attributes, v1beta3.EventAttributeDefinition{ + Name: "type", + Required: true, + Value: source.Spec.Type, + }) + } + if source.Spec.Schema != nil { + sink.Spec.Attributes = append(sink.Spec.Attributes, v1beta3.EventAttributeDefinition{ + Name: "schemadata", + Required: false, + Value: source.Spec.Schema.String(), + }) + } + if source.Spec.Source != nil { + sink.Spec.Attributes = append(sink.Spec.Attributes, v1beta3.EventAttributeDefinition{ + Name: "source", + Required: true, + Value: source.Spec.Source.String(), + }) + } + return nil + default: + return apis.ConvertToViaProxy(ctx, source, &v1beta3.EventType{}, to) + } + } // ConvertFrom implements apis.Convertible func (sink *EventType) ConvertFrom(ctx context.Context, from apis.Convertible) error { - return fmt.Errorf("v1beta2 is the highest known version, got: %T", from) + switch source := from.(type) { + case *v1beta3.EventType: + + source.ObjectMeta.DeepCopyInto(&sink.ObjectMeta) + source.Status.Status.DeepCopyInto(&sink.Status.Status) + + sink.Spec.Reference = source.Spec.Reference.DeepCopy() + sink.Spec.Description = source.Spec.Description + + for _, at := range source.Spec.Attributes { + switch at.Name { + case "source": + sink.Spec.Source, _ = apis.ParseURL(at.Value) + case "type": + sink.Spec.Type = at.Value + case "schemadata": + sink.Spec.Schema, _ = apis.ParseURL(at.Value) + } + } + + return nil + default: + return apis.ConvertFromViaProxy(ctx, from, &v1beta3.EventType{}, sink) + } } diff --git a/vendor/modules.txt b/vendor/modules.txt index fc684df76..a3160078b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -966,7 +966,7 @@ k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# knative.dev/eventing v0.41.1-0.20240529130930-2a11bb8636bf +# knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05 ## explicit; go 1.21 knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test @@ -1021,7 +1021,7 @@ knative.dev/eventing/pkg/observability/client # knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea ## explicit; go 1.18 knative.dev/hack -# knative.dev/networking v0.0.0-20240521183848-1d0137a18a68 +# knative.dev/networking v0.0.0-20240530052748-1b470c4f662c ## explicit; go 1.21 knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 @@ -1090,7 +1090,7 @@ knative.dev/pkg/webhook/psbinding knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c +# knative.dev/serving v0.41.1-0.20240531084853-0ddd15e2ba1a ## explicit; go 1.21 knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1