Skip to content

Commit 5bf2f47

Browse files
upgrade to latest dependencies
bumping knative.dev/caching 1d81ccd...1640296: > 1640296 upgrade to latest dependencies (# 870) bumping knative.dev/serving 0b363c0...a2459ef: > 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) 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) Signed-off-by: Knative Automation <[email protected]>
1 parent 3854919 commit 5bf2f47

File tree

4 files changed

+85
-16
lines changed

4 files changed

+85
-16
lines changed

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ require (
2121
k8s.io/client-go v0.29.2
2222
k8s.io/code-generator v0.29.2
2323
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
24-
knative.dev/caching v0.0.0-20240529131508-1d81ccdabd76
25-
knative.dev/eventing v0.41.1-0.20240529130930-2a11bb8636bf
24+
knative.dev/caching v0.0.0-20240530052547-16402967a78f
25+
knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05
2626
knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea
2727
knative.dev/pkg v0.0.0-20240529181700-7d52a43448b2
28-
knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c
28+
knative.dev/serving v0.41.1-0.20240531003236-a2459efd3217
2929
sigs.k8s.io/yaml v1.4.0
3030
)
3131

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,18 +1357,18 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
13571357
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
13581358
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
13591359
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
1360-
knative.dev/caching v0.0.0-20240529131508-1d81ccdabd76 h1:5vl4tKLlPEeLhIdz/qcWPj9VebR418CRFc0HEVBiKBk=
1361-
knative.dev/caching v0.0.0-20240529131508-1d81ccdabd76/go.mod h1:UVHZBmJSg432L3mZAbhsvGwNX7QlR7IAJoZVimHmZ7g=
1362-
knative.dev/eventing v0.41.1-0.20240529130930-2a11bb8636bf h1:THZuEzMxX610jEqZViqNe00KOZv+mATP9MLvspgIaZE=
1363-
knative.dev/eventing v0.41.1-0.20240529130930-2a11bb8636bf/go.mod h1:IUBpMsDIfyV5836R9PN0/VyADgoDa9ykgz7gpvTseLw=
1360+
knative.dev/caching v0.0.0-20240530052547-16402967a78f h1:1mIgTIqwNfNH8pqNQx0megJH4hQT2Ey4l6uhGxwOYrA=
1361+
knative.dev/caching v0.0.0-20240530052547-16402967a78f/go.mod h1:N0rlC1y05vb9EAMB0AMMEwmSj8urK1vUoqwyC5zxVDM=
1362+
knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05 h1:OltA5F33cPH/q88XGlqUn6Ip2p2QgTSm0SJ2cNDqXzU=
1363+
knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05/go.mod h1:toAuiWQiMPHgWcXNYocPhMNx8xYFbjQsupEiQdPT83o=
13641364
knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea h1:iWW6SNMrVd2hI5Y+ltKIEzXVedoQLL86b23dS5fkvXs=
13651365
knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
13661366
knative.dev/networking v0.0.0-20240521183848-1d0137a18a68 h1:Piy1jJ5r3pet0cJV5An69hMTKUfXmiQgfEFThaAfQlA=
13671367
knative.dev/networking v0.0.0-20240521183848-1d0137a18a68/go.mod h1:LFhDu22ymaEZFnFBUoSoo4Y4l+KWXujH5yQQNOaEwBc=
13681368
knative.dev/pkg v0.0.0-20240529181700-7d52a43448b2 h1:Q4xHp1Y4maNrCJQ1bATmW0LyXSsMG9KlyrDgdKHCNT8=
13691369
knative.dev/pkg v0.0.0-20240529181700-7d52a43448b2/go.mod h1:GHFUP1wtD/bR/c02QADqaAK3odDJh1ddBMvXhq/goy8=
1370-
knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c h1:cGDjYQpx5ctb6ukG6nnLRty2cwBdqoYFU8vprYxzcUQ=
1371-
knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c/go.mod h1:V+1hMZueIl655axDH4IOVc6xO8/Z9Ggun/jYEpIEhOo=
1370+
knative.dev/serving v0.41.1-0.20240531003236-a2459efd3217 h1:WymQFTYry1xPttr0XHpjpZLmVDueR2z9f9mzIwBMrEw=
1371+
knative.dev/serving v0.41.1-0.20240531003236-a2459efd3217/go.mod h1:V+1hMZueIl655axDH4IOVc6xO8/Z9Ggun/jYEpIEhOo=
13721372
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
13731373
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
13741374
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=

vendor/knative.dev/eventing/pkg/apis/eventing/v1beta2/eventtype_conversion.go

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,86 @@ package v1beta2
1818

1919
import (
2020
"context"
21-
"fmt"
2221

2322
"knative.dev/pkg/apis"
23+
duckv1 "knative.dev/pkg/apis/duck/v1"
24+
25+
eventing "knative.dev/eventing/pkg/apis/eventing/v1"
26+
"knative.dev/eventing/pkg/apis/eventing/v1beta3"
2427
)
2528

26-
// ConvertTo implements apis.Convertible
29+
// ConvertTo converts the receiver into `to`.
2730
func (source *EventType) ConvertTo(ctx context.Context, to apis.Convertible) error {
28-
return fmt.Errorf("v1beta2 is the highest known version, got: %T", to)
31+
switch sink := to.(type) {
32+
case *v1beta3.EventType:
33+
34+
source.ObjectMeta.DeepCopyInto(&sink.ObjectMeta)
35+
source.Status.Status.DeepCopyInto(&sink.Status.Status)
36+
37+
sink.Spec.Reference = source.Spec.Reference.DeepCopy()
38+
sink.Spec.Description = source.Spec.Description
39+
40+
if source.Spec.Reference == nil && source.Spec.Broker != "" {
41+
source.Spec.Reference = &duckv1.KReference{
42+
Kind: "Broker",
43+
Name: source.Spec.Broker,
44+
APIVersion: eventing.SchemeGroupVersion.String(),
45+
}
46+
}
47+
48+
sink.Spec.Attributes = []v1beta3.EventAttributeDefinition{}
49+
if source.Spec.Type != "" {
50+
sink.Spec.Attributes = append(sink.Spec.Attributes, v1beta3.EventAttributeDefinition{
51+
Name: "type",
52+
Required: true,
53+
Value: source.Spec.Type,
54+
})
55+
}
56+
if source.Spec.Schema != nil {
57+
sink.Spec.Attributes = append(sink.Spec.Attributes, v1beta3.EventAttributeDefinition{
58+
Name: "schemadata",
59+
Required: false,
60+
Value: source.Spec.Schema.String(),
61+
})
62+
}
63+
if source.Spec.Source != nil {
64+
sink.Spec.Attributes = append(sink.Spec.Attributes, v1beta3.EventAttributeDefinition{
65+
Name: "source",
66+
Required: true,
67+
Value: source.Spec.Source.String(),
68+
})
69+
}
70+
return nil
71+
default:
72+
return apis.ConvertToViaProxy(ctx, source, &v1beta3.EventType{}, to)
73+
}
74+
2975
}
3076

3177
// ConvertFrom implements apis.Convertible
3278
func (sink *EventType) ConvertFrom(ctx context.Context, from apis.Convertible) error {
33-
return fmt.Errorf("v1beta2 is the highest known version, got: %T", from)
79+
switch source := from.(type) {
80+
case *v1beta3.EventType:
81+
82+
source.ObjectMeta.DeepCopyInto(&sink.ObjectMeta)
83+
source.Status.Status.DeepCopyInto(&sink.Status.Status)
84+
85+
sink.Spec.Reference = source.Spec.Reference.DeepCopy()
86+
sink.Spec.Description = source.Spec.Description
87+
88+
for _, at := range source.Spec.Attributes {
89+
switch at.Name {
90+
case "source":
91+
sink.Spec.Source, _ = apis.ParseURL(at.Value)
92+
case "type":
93+
sink.Spec.Type = at.Value
94+
case "schemadata":
95+
sink.Spec.Schema, _ = apis.ParseURL(at.Value)
96+
}
97+
}
98+
99+
return nil
100+
default:
101+
return apis.ConvertFromViaProxy(ctx, from, &v1beta3.EventType{}, sink)
102+
}
34103
}

vendor/modules.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,11 +1315,11 @@ k8s.io/utils/pointer
13151315
k8s.io/utils/ptr
13161316
k8s.io/utils/strings/slices
13171317
k8s.io/utils/trace
1318-
# knative.dev/caching v0.0.0-20240529131508-1d81ccdabd76
1318+
# knative.dev/caching v0.0.0-20240530052547-16402967a78f
13191319
## explicit; go 1.21
13201320
knative.dev/caching/pkg/apis/caching
13211321
knative.dev/caching/pkg/apis/caching/v1alpha1
1322-
# knative.dev/eventing v0.41.1-0.20240529130930-2a11bb8636bf
1322+
# knative.dev/eventing v0.41.1-0.20240530202412-a58c1352db05
13231323
## explicit; go 1.21
13241324
knative.dev/eventing/pkg/apis/config
13251325
knative.dev/eventing/pkg/apis/duck
@@ -1516,7 +1516,7 @@ knative.dev/pkg/webhook
15161516
knative.dev/pkg/webhook/certificates
15171517
knative.dev/pkg/webhook/certificates/resources
15181518
knative.dev/pkg/webhook/resourcesemantics/conversion
1519-
# knative.dev/serving v0.41.1-0.20240529171320-0b363c0d791c
1519+
# knative.dev/serving v0.41.1-0.20240531003236-a2459efd3217
15201520
## explicit; go 1.21
15211521
knative.dev/serving/pkg/apis/autoscaling
15221522
knative.dev/serving/pkg/apis/autoscaling/v1alpha1

0 commit comments

Comments
 (0)