-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(xrd): Add support for version deprecation #2948
Conversation
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.
LGTM -- I'm a fan of this change even though in practice I believe we can still only offer one XRD version at a time. Would like to get @negz thoughts before merge.
apis/apiextensions/v1/xrd_types.go
Outdated
// +optional | ||
Deprecated *bool `json:"deprecated,omitempty"` | ||
|
||
// DeprecationWarning specifies the message that should be shown to the user when using this version. |
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.
Are these comments wrapped at 80 characters? If not could you make sure to wrap them! 🙂
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.
Fixed
Signed-off-by: Maximilian Blatt <maximilian.blatt-extern@deutschebahn.com> (external expert on behalf of DB Netz AG)
b9c8d6e
to
181f4ba
Compare
@hasheddan thanks for the review! I fixed the line lengths. Let me know if something is missing. Regarding serving multiple XRD versions: AFAIK Crossplane does support multiple versions at the same time. However, our main use case is to let users know when they use a deprecated version. In some cases we do deprecate complete XRDs so we might need this for every version. |
Kind of. It supports it as long as all the versions are identical. :) So, that said, this feature makes sense. e.g.:
Eventually we'll support introducing new API versions with different schemas per #2608. |
Description of your changes
This adds two new fields
deprecated
anddeprecationWarning
to XRDsspec.versions[]
that match their CRD counterparts.Fixes #2945
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Manually