Skip to content

Commit 1759e40

Browse files
committed
Rename function addPauseReconcileAnnotation -> maybeAddPauseReconcileAnnotation
1 parent 4f379d1 commit 1759e40

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

internal/deployer/deploy_via_operator.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (d *Deployer) deployCentralOperator(ctx context.Context, resources, exposur
105105
return fmt.Errorf("failed waiting for Central: %w", err)
106106
}
107107

108-
if err := d.addPauseReconcileAnnotation(ctx, "central", "stackrox-central-services", d.centralNamespace); err != nil {
108+
if err := d.maybeAddPauseReconcileAnnotation(ctx, "central", "stackrox-central-services", d.centralNamespace); err != nil {
109109
d.logger.Warningf("failed to add pause-reconcile annotation: %v", err)
110110
}
111111

@@ -593,7 +593,7 @@ func (d *Deployer) deploySecuredClusterOperator(ctx context.Context, resources s
593593
return fmt.Errorf("failed waiting for SecuredCluster: %w", err)
594594
}
595595

596-
if err := d.addPauseReconcileAnnotation(ctx, "securedcluster", "stackrox-secured-cluster-services", d.sensorNamespace); err != nil {
596+
if err := d.maybeAddPauseReconcileAnnotation(ctx, "securedcluster", "stackrox-secured-cluster-services", d.sensorNamespace); err != nil {
597597
d.logger.Warningf("failed to add pause-reconcile annotation: %v", err)
598598
}
599599

internal/deployer/deployer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ func (d *Deployer) SetPauseReconciliation(enabled bool) {
513513
d.pauseReconciliation = enabled
514514
}
515515

516-
// addPauseReconcileAnnotation adds the stackrox.io/pause-reconcile annotation to a custom resource
517-
func (d *Deployer) addPauseReconcileAnnotation(ctx context.Context, resourceType, resourceName, namespace string) error {
516+
// maybeAddPauseReconcileAnnotation adds the stackrox.io/pause-reconcile annotation to a custom resource
517+
func (d *Deployer) maybeAddPauseReconcileAnnotation(ctx context.Context, resourceType, resourceName, namespace string) error {
518518
if !d.pauseReconciliation {
519519
return nil
520520
}

0 commit comments

Comments
 (0)