-
Notifications
You must be signed in to change notification settings - Fork 45
crd: add label with CRD version #116
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MrFreezeex The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
4d043a4
to
502a1a2
Compare
502a1a2
to
44d81a1
Compare
/cc @skitt @tpantelis WDYT of this? |
Gateway API does something similar to this, including the "bundle version" (GitHub release version for the spec, different from the Kubernetes versioning like v1/v1alpha1) and release channel in CRD annotations https://github.com/kubernetes-sigs/gateway-api/blob/main/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml#L6-L7 cc @robscott @youngnick I think maybe one of y'all have mentioned this in a talk about why we do this and how it can be useful? |
Yes, the apiVersion field is a bit coarse-grained and only really tracks breaking changes. So having a schema version that tracks if compatible, additive changes have been made is very useful. That's why we include a bundle version in Gateway API CRDs. |
I'd also recommend noting the procedure down in some release instructions somewhere - otherwise it's easy to forget. |
Hmm well there's not really a properly defined release so far, but maybe this could be the same as the git tag which would make it an actual release? It would also mean that we would want to make a new release/git tag almost every-time we change the CRD. WDYT @skitt? |
a2927ff
to
f1ba46d
Compare
Triage notes:
|
Since we want to track changes, I think the version should be bumped whenever there’s a change — so the bump should be part of the PR making the change, not part of the release. This also means that the CRD version won’t be the same as the project tag, but that’s fine. We’ll use a version triplet in the same style as Gateway API. |
f1ba46d
to
516483e
Compare
Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
516483e
to
7653199
Compare
I updated the PR to start from v0.1.0 since it's not correlated with this repo version (and also adding the v prefix like GW-API). It's very similar to GW-API the only thing is that GW-API use the term "bundle-version" and this is proposing the term "crd-schema-version". I feel like since it's not part of the release and that GW-API has different bundles (standard, experimental) the term "crd-schema-version" is better suited since I think we are in slighly different scenario than GW-API. But I don't feel strongly about it so I'm happy to change the term if this means landing this faster and/or that "bundle-version" (or something else) is better liked (cc @mikemorris). |
Add a CRD version label that must be updated each time we update the corresponding CRD to facilitate install from go.
In cilium we are doing this for our internal CRDs with some logic that check this label so that we don't accidentally downgrade the version and it would be super useful if we can have directly in the mcs-api repo for MCS-API CRDs to facilitate that check.
When we would be updating the CRD we would basically need to bump the version in config/crd-base and launch
make manifest
to regenerate the label in the config/crd folder (or just update directly there).Followup to #115