-
Notifications
You must be signed in to change notification settings - Fork 225
WIP: change storage version to v1beta1 #1504
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ func (c *KafkaChannel) SetDefaults(ctx context.Context) { | |
c.Annotations = make(map[string]string) | ||
} | ||
if _, ok := c.Annotations[messaging.SubscribableDuckVersionAnnotation]; !ok { | ||
c.Annotations[messaging.SubscribableDuckVersionAnnotation] = "v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aliok why was this at I also checked here: https://github.com/knative/eventing/pull/3169/files and there (matching to IMC) it was at beta1... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't mean that this is the KafkaChannel version. This is the duck type version KafkaChannel supports. So, it should be v1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It should've been v1 too. But, there's no difference between v1beta1 and v1 Channelable/Subscribable duck type, so, v1beta1 should also work. ...until v1beta1 support is deleted. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So, we should revert this to v1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, so we have to default the annotation to the version that we are currently storing. Why? Because for different serving versions we run the conversion hook, and we can adjust the annotation to match if we fiddle with the fields. For things that we are storing, however, we can't do any modifications because the conversion hook does not run. As @aliok says, since they are the same we should be safe here, but just wanted to give the reasoning for why we set the annotations differently and what the "correct" way to do that is. Hope that helps @matzew @aliok |
||
c.Annotations[messaging.SubscribableDuckVersionAnnotation] = "v1beta1" | ||
} | ||
|
||
c.Spec.SetDefaults(ctx) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not so sure about this change here.
v1alpha1 Channelable duck type support is removed from eventing.
I think we should get rid of the the v1alpha1 channel resource completely, providing a migration script.
cc @vaikas for confirmation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd like us to get rid of the v1alpha1 shapes asap.