What's the correct way to extend my crd & its controller without multiversion #63958
Labels
kind/support
Categorizes issue or PR as a support question.
needs-sig
Indicates an issue or PR lacks a `sig/foo` label and requires one.
I'm developing on k8s v1.9.2. I've implemented a crd(let's call it A) and write a controller on it. The controller create deployments, services according to A's some fields. But I get stuck when I try to figure out the controller's future upgrade scheme.
I know in 1.9.2, crd can't have multiple versions, and assuming A's definition likes the following:
And assuming I have some A's instances running in the cluster, e.g. a1, a2, a3. And a* have their related resources running, e.g. some deployments.
Under my test, when I add a new field to A, recompile & restart my controller, the old running a* have a default value on the new field automatically. But I don't know the backend mechanism.
And the questions are:
What's the best way to extend my A, e.g. add new field Field2 or change the Field1 from int32 to string and keep the already running instances (a1, a2, a3...) upgrade to the new A definition smoothly?
Or, in another way, add/change/delete a field of A, which modifications are acceptable?
Can you give me the recommend way to do the future upgrade of A without pulling all already running a* down?
The text was updated successfully, but these errors were encountered: