Best practice to support multiple conversion webhook #2889
-
Hello! I am developing an operator that has three API versions ( It would be easy(?) to do the conversion in steps - convert v1alpha1 to v1alpha2, and then call the v1alpha2->v1alpha3. But the following document seems to tell us that we should support v1alpha1=>v1alpha3 and v1alpha1=>v1alpha3 conversions According to this issue,
These examples do not use multi-steps conversion. Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @LittleWat, The K8s docs try to cover it, see:
Also, as you saw we try to provide an example in the tutorial with: https://book.kubebuilder.io/multiversion-tutorial/tutorial.html
If you have a project version that wants to ensure the desired state on the cluster and that means all be converted to the latest/supported version v1alpha3 why would be better to create many steps to achieve the goal, why not the latest conversion should not doe something like if I find A, B, or C that still support for conversion I will make that for D which is my desired state?
I think for example that might be too much right? Also, at some point, you will deprecate and no longer support the old versions. |
Beta Was this translation helpful? Give feedback.
-
Closing since it is answered. |
Beta Was this translation helpful? Give feedback.
Hi @LittleWat,
The K8s docs try to cover it, see:
Also, as you saw we try to provide an example in the tutorial with: https://book.kubebuilder.io/multiversion-tutorial/tutorial.html
If you have a project version that…