You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vsphereparavirtual: support multiple VM Operator API versions (v1alpha2, v1alpha5)
Introduce a version-agnostic Hub Type / Hub Interface layer so that CPI
business logic is decoupled from any specific VM Operator API version.
The correct versioned adapter is selected at startup via the
--vmop-api-version flag, enabling backward compatibility with Supervisor
while supporting v1alpha5.
// serviceAnnotationPropagationEnabled if set to true, will propagate the service annotation to resource in supervisor cluster.
68
68
serviceAnnotationPropagationEnabledbool
69
+
70
+
// vmopAPIVersion is the VM Operator API version to use when communicating
71
+
// with the Supervisor cluster. Defaults to v1alpha2 for backward compatibility.
72
+
// Controlled via the --vm-operator-api-version flag.
73
+
vmopAPIVersionstring
69
74
)
70
75
71
76
funcinit() {
@@ -94,6 +99,7 @@ func init() {
94
99
flag.BoolVar(&vpcModeEnabled, "enable-vpc-mode", false, "If true, routable pod controller will start with VPC mode. It is useful only when route controller is enabled in vsphereparavirtual mode")
95
100
flag.StringVar(&podIPPoolType, "pod-ip-pool-type", "", "Specify if Pod IP address is Public or Private routable in VPC network. Valid values are Public and Private")
96
101
flag.BoolVar(&serviceAnnotationPropagationEnabled, "enable-service-annotation-propagation", false, "If true, will propagate the service annotation to resource in supervisor cluster.")
102
+
flag.StringVar(&vmopAPIVersion, "vm-operator-api-version", factory.V1alpha2, "the API version to use when communicating with VM Operator in supervisor mode. Valid values are: "+factory.V1alpha2+", "+factory.V1alpha5)
97
103
}
98
104
99
105
// Creates new Controller node interface and returns
0 commit comments