@@ -37,8 +37,8 @@ const (
3737 // TODO(jlegrone): add this everywhere
3838 deployOwnerKey = ".metadata.controller"
3939 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"
4242
4343 // Cleanup timeout and polling constants
4444 cleanupTimeout = 2 * time .Minute
@@ -94,8 +94,8 @@ func (r *TemporalWorkerDeploymentReconciler) Reconcile(ctx context.Context, req
9494 }
9595
9696 // 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 )
9999 if err := r .Update (ctx , & workerDeploy ); err != nil {
100100 l .Error (err , "unable to add finalizer" )
101101 return ctrl.Result {}, err
@@ -217,7 +217,7 @@ func (r *TemporalWorkerDeploymentReconciler) Reconcile(ctx context.Context, req
217217func (r * TemporalWorkerDeploymentReconciler ) handleDeletion (ctx context.Context , l logr.Logger , workerDeploy * temporaliov1alpha1.TemporalWorkerDeployment ) (ctrl.Result , error ) {
218218 l .Info ("Handling deletion of TemporalWorkerDeployment" )
219219
220- if ! controllerutil .ContainsFinalizer (workerDeploy , TemporalWorkerDeploymentFinalizer ) {
220+ if ! controllerutil .ContainsFinalizer (workerDeploy , temporalWorkerDeploymentFinalizer ) {
221221 // Finalizer has already been removed, allow deletion to proceed
222222 return ctrl.Result {}, nil
223223 }
@@ -229,7 +229,7 @@ func (r *TemporalWorkerDeploymentReconciler) handleDeletion(ctx context.Context,
229229 }
230230
231231 // Remove the finalizer to allow deletion
232- controllerutil .RemoveFinalizer (workerDeploy , TemporalWorkerDeploymentFinalizer )
232+ controllerutil .RemoveFinalizer (workerDeploy , temporalWorkerDeploymentFinalizer )
233233 if err := r .Update (ctx , workerDeploy ); err != nil {
234234 l .Error (err , "Failed to remove finalizer" )
235235 return ctrl.Result {}, err
0 commit comments