File tree 1 file changed +12
-0
lines changed
controllers/workspace/provision
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,18 @@ func SyncDeploymentToCluster(
92
92
}
93
93
}
94
94
95
+ if ! cmp .Equal (specDeployment .Spec .Selector , clusterDeployment .Spec .Selector ) {
96
+ clusterAPI .Logger .Info ("Deployment selector is different. Recreating deployment..." )
97
+ clusterDeployment .Spec = specDeployment .Spec
98
+ err := clusterAPI .Client .Delete (context .TODO (), clusterDeployment )
99
+ if err != nil {
100
+ return DeploymentProvisioningStatus {ProvisioningStatus {Err : err }}
101
+ }
102
+ return DeploymentProvisioningStatus {
103
+ ProvisioningStatus : ProvisioningStatus {Requeue : true },
104
+ }
105
+ }
106
+
95
107
if ! cmp .Equal (specDeployment , clusterDeployment , deploymentDiffOpts ) {
96
108
clusterAPI .Logger .Info ("Updating deployment..." )
97
109
clusterDeployment .Spec = specDeployment .Spec
You can’t perform that action at this time.
0 commit comments