Skip to content

Commit 184efa7

Browse files
committed
Remove GCPPD_Progressing condition
And all other <short name>_Progressing. The new DeploymentController will create GCPPDCSIDriverOperatorDeployment_Progressing as documented in the code.
1 parent b613fb9 commit 184efa7

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

pkg/operator/csidriveroperator/hypershift_deployment_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func NewHyperShiftControllerDeployment(
6565
)
6666

6767
c, err := deploymentcontroller.NewDeploymentControllerBuilder(
68-
csiOperatorConfig.ConditionPrefix,
68+
csiOperatorConfig.ConditionPrefix+deploymentControllerName,
6969
deploymentBytes,
7070
eventRecorder,
7171
guestClient.OperatorClient,

pkg/operator/operator_starter.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ func (ssr *StandaloneStarter) StartOperator(ctx context.Context) error {
197197
csiDriverConfigs)
198198
ssr.controllers = append(ssr.controllers, csiDriverController)
199199

200+
// In 4.21 we renamed <short-name>Progressing to <short-name>CSIDriverOperatorDeploymentProgressing
201+
staleProgressingConditionController := getStaleProgressingConditionController(ssr.commonClients, ssr.eventRecorder, csiDriverConfigs)
202+
ssr.controllers = append(ssr.controllers, staleProgressingConditionController)
203+
200204
vsphereProblemDetector := vsphereproblemdetector.NewVSphereProblemDetectorStarter(
201205
ssr.commonClients,
202206
resync,
@@ -320,3 +324,16 @@ func (hsr *HyperShiftStarter) populateConfigs(clients *csoclients.Clients) []csi
320324
csioperatorclient.GetPowerVSBlockCSIOperatorConfig(true),
321325
}
322326
}
327+
328+
func getStaleProgressingConditionController(client *csoclients.Clients, eventRecorder events.Recorder, csiDriverConfigs []csioperatorclient.CSIOperatorConfig) factory.Controller {
329+
var conditionTypes []string
330+
for _, csiDriverConfig := range csiDriverConfigs {
331+
conditionTypes = append(conditionTypes, csiDriverConfig.ConditionPrefix+"Progressing")
332+
}
333+
return staleconditions.NewRemoveStaleConditionsController(
334+
"RemoveStaleProgressingConditionsController",
335+
conditionTypes,
336+
client.OperatorClient,
337+
eventRecorder,
338+
)
339+
}

0 commit comments

Comments
 (0)