@@ -37,8 +37,8 @@ const (
37
37
// TODO(jlegrone): add this everywhere
38
38
deployOwnerKey = ".metadata.controller"
39
39
buildIDLabel = "temporal.io/build-id"
40
- // TemporalWorkerDeploymentFinalizer is the finalizer used to ensure proper cleanup of resources
41
- TemporalWorkerDeploymentFinalizer = "temporal.io/temporal-worker-deployment-finalizer"
40
+ // temporalWorkerDeploymentFinalizer is the finalizer used to ensure proper cleanup of resources
41
+ temporalWorkerDeploymentFinalizer = "temporal.io/temporal-worker-deployment-finalizer"
42
42
43
43
// Cleanup timeout and polling constants
44
44
cleanupTimeout = 2 * time .Minute
@@ -94,8 +94,8 @@ func (r *TemporalWorkerDeploymentReconciler) Reconcile(ctx context.Context, req
94
94
}
95
95
96
96
// Add finalizer if it doesn't exist
97
- if ! controllerutil .ContainsFinalizer (& workerDeploy , TemporalWorkerDeploymentFinalizer ) {
98
- controllerutil .AddFinalizer (& workerDeploy , TemporalWorkerDeploymentFinalizer )
97
+ if ! controllerutil .ContainsFinalizer (& workerDeploy , temporalWorkerDeploymentFinalizer ) {
98
+ controllerutil .AddFinalizer (& workerDeploy , temporalWorkerDeploymentFinalizer )
99
99
if err := r .Update (ctx , & workerDeploy ); err != nil {
100
100
l .Error (err , "unable to add finalizer" )
101
101
return ctrl.Result {}, err
@@ -217,7 +217,7 @@ func (r *TemporalWorkerDeploymentReconciler) Reconcile(ctx context.Context, req
217
217
func (r * TemporalWorkerDeploymentReconciler ) handleDeletion (ctx context.Context , l logr.Logger , workerDeploy * temporaliov1alpha1.TemporalWorkerDeployment ) (ctrl.Result , error ) {
218
218
l .Info ("Handling deletion of TemporalWorkerDeployment" )
219
219
220
- if ! controllerutil .ContainsFinalizer (workerDeploy , TemporalWorkerDeploymentFinalizer ) {
220
+ if ! controllerutil .ContainsFinalizer (workerDeploy , temporalWorkerDeploymentFinalizer ) {
221
221
// Finalizer has already been removed, allow deletion to proceed
222
222
return ctrl.Result {}, nil
223
223
}
@@ -229,7 +229,7 @@ func (r *TemporalWorkerDeploymentReconciler) handleDeletion(ctx context.Context,
229
229
}
230
230
231
231
// Remove the finalizer to allow deletion
232
- controllerutil .RemoveFinalizer (workerDeploy , TemporalWorkerDeploymentFinalizer )
232
+ controllerutil .RemoveFinalizer (workerDeploy , temporalWorkerDeploymentFinalizer )
233
233
if err := r .Update (ctx , workerDeploy ); err != nil {
234
234
l .Error (err , "Failed to remove finalizer" )
235
235
return ctrl.Result {}, err
0 commit comments