sigs.k8s.io/cluster-api@v1.7.1/docs/proposals/images/capi-provider-operator/fig2.plantuml (about) 1 @startuml 2 title Upgrade Provider and change contract version 3 actor User 4 participant APIServer 5 participant "Management Cluster\nController" as Controller 6 7 note over APIServer 8 Current State: 9 A core provider exists with version 10 v0.3.10 abiding by contract v1alpha3 11 end note 12 ==== 13 User -> APIServer: kubectl apply -f updated-provider.yaml 14 15 activate APIServer 16 APIServer --> Controller: upgrade core provider to v0.4.0\nwhich abides by contract v1alpha4 17 activate Controller 18 Controller -> Controller: Reconcile 19 20 Controller -> APIServer: Get existing Core provider 21 APIServer --> Controller: Response 22 23 note over Controller 24 - Verify if the Core provider exists 25 - Get the Status.Contract of existing provider 26 end note 27 28 Controller -> APIServer: Get metadata from ConfigMap for v0.4.0 29 APIServer --> Controller: Response 30 31 note over Controller 32 Identify that we are upgrading 33 the contract of the providers. 34 end note 35 36 Controller -> APIServer: Get all providers 37 APIServer --> Controller: Response 38 39 note over Controller 40 For each existing provider, 41 fetch version that abides by new contract. 42 If there is a provider that doesn't have a 43 version that abides by new contract, 44 then set condition, notify user of error? 45 Else continue... 46 end note 47 48 Controller -> APIServer: Pause all providers\nto avoid reconciliation 49 50 Controller -> APIServer: Delete each provider 51 Controller -> APIServer: Install new provider 52 53 note over Controller 54 Confirm all health checks, 55 providers are running. 56 end note 57 58 Controller -> APIServer: Unpause all providers 59 60 deactivate APIServer 61 deactivate Controller 62 @enduml