File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,11 @@ func (r *OpenStackCluster) ValidateUpdate(oldRaw runtime.Object) (admission.Warn
130130 old .Spec .ControlPlaneAvailabilityZones = []string {}
131131 r .Spec .ControlPlaneAvailabilityZones = []string {}
132132
133+ // Allow the scheduling to be changed from CAPI managed to Nova and
134+ // vice versa.
135+ old .Spec .ControlPlaneOmitAvailabilityZone = false
136+ r .Spec .ControlPlaneOmitAvailabilityZone = false
137+
133138 // Allow change to the allowAllInClusterTraffic.
134139 old .Spec .AllowAllInClusterTraffic = false
135140 r .Spec .AllowAllInClusterTraffic = false
Original file line number Diff line number Diff line change @@ -234,6 +234,21 @@ func TestOpenStackCluster_ValidateUpdate(t *testing.T) {
234234 },
235235 wantErr : false ,
236236 },
237+ {
238+ name : "Modifying OpenstackCluster.Spec.ControlPlaneOmitAvailabilityZone is allowed" ,
239+ oldTemplate : & OpenStackCluster {
240+ Spec : OpenStackClusterSpec {
241+ CloudName : "foobar" ,
242+ },
243+ },
244+ newTemplate : & OpenStackCluster {
245+ Spec : OpenStackClusterSpec {
246+ CloudName : "foobar" ,
247+ ControlPlaneOmitAvailabilityZone : true ,
248+ },
249+ },
250+ wantErr : false ,
251+ },
237252 {
238253 name : "Changing OpenStackCluster.Spec.APIServerFixedIP is allowed when API Server Floating IP is disabled" ,
239254 oldTemplate : & OpenStackCluster {
You can’t perform that action at this time.
0 commit comments