kubernetes / sample-controller

Repository for sample controller. Complements sample-apiserver
Apache License 2.0
3.14k stars 1.08k forks source link

[Question] How to version the CRDs ? #68

Closed alok87 closed 4 years ago

alok87 commented 4 years ago

Doc - https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning/

For adding a version say v1beta1 and v1, should i keep copies of the v1apha1 folders or rename them. Renaming them won't keep things backward compatible.

devdattakulkarni commented 4 years ago

In your controller code you should keep all the versions (v1alpha1, v1beta1, v1) as long as you plan to support them. You will want to follow some deprecation policy for removing previous versions and inform your users well ahead of time when the support for previous versions will be removed from your controller.