@@ -1358,7 +1358,7 @@ func (r *ReconcileArgoCD) storeRemovedLabelsForCleanup(obj client.Object, remove
13581358 obj .SetAnnotations (annotations )
13591359
13601360 // Update the object
1361- return r .Client . Update (context .TODO (), obj )
1361+ return r .Update (context .TODO (), obj )
13621362}
13631363
13641364func (r * ReconcileArgoCD ) processRemovedLabels (argocd * argoproj.ArgoCD ) error {
@@ -1386,7 +1386,7 @@ func (r *ReconcileArgoCD) processRemovedLabels(argocd *argoproj.ArgoCD) error {
13861386 // Clear the annotation
13871387 delete (annotations , RemovedLabelsAnnotation )
13881388 argocd .SetAnnotations (annotations )
1389- return r .Client . Update (context .TODO (), argocd )
1389+ return r .Update (context .TODO (), argocd )
13901390 }
13911391
13921392 return nil
@@ -1452,7 +1452,7 @@ func (r *ReconcileArgoCD) cleanupLabelsFromComponent(argocd *argoproj.ArgoCD, la
14521452 Name : resourceName ,
14531453 }
14541454
1455- if err := r .Client . Get (context .TODO (), key , obj ); err != nil {
1455+ if err := r .Get (context .TODO (), key , obj ); err != nil {
14561456 if apierrors .IsNotFound (err ) {
14571457 // Component doesn't exist, nothing to clean up
14581458 return nil
@@ -1479,7 +1479,7 @@ func (r *ReconcileArgoCD) cleanupLabelsFromComponent(argocd *argoproj.ArgoCD, la
14791479 }
14801480 if modified {
14811481 resource .Spec .Template .Labels = podTemplateLabels
1482- if err := r .Client . Update (context .TODO (), resource ); err != nil {
1482+ if err := r .Update (context .TODO (), resource ); err != nil {
14831483 return fmt .Errorf ("failed to update pod template labels for %s deployment: %w" , componentName , err )
14841484 }
14851485 log .Info ("Removed labels from pod template" ,
@@ -1499,7 +1499,7 @@ func (r *ReconcileArgoCD) cleanupLabelsFromComponent(argocd *argoproj.ArgoCD, la
14991499 }
15001500 if modified {
15011501 resource .Spec .Template .Labels = podTemplateLabels
1502- if err := r .Client . Update (context .TODO (), resource ); err != nil {
1502+ if err := r .Update (context .TODO (), resource ); err != nil {
15031503 return fmt .Errorf ("failed to update pod template labels for %s statefulset: %w" , componentName , err )
15041504 }
15051505 log .Info ("Removed labels from pod template" ,
@@ -1528,7 +1528,7 @@ func (r *ReconcileArgoCD) removeLabelsFromObject(obj client.Object, labelsToRemo
15281528
15291529 if modified {
15301530 obj .SetLabels (currentLabels )
1531- return r .Client . Update (context .TODO (), obj )
1531+ return r .Update (context .TODO (), obj )
15321532 }
15331533
15341534 return nil
0 commit comments