Skip to content

Commit 7e7e05b

Browse files
committed
adjustsments on the logic
1 parent 6c9d857 commit 7e7e05b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

internal/controller/postgrescluster/postgres.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,17 +583,15 @@ func (r *Reconciler) reconcilePostgresUserSecrets(
583583

584584
if err == nil {
585585
userSecrets[userName], err = r.generatePostgresUserSecret(cluster, user, secret)
586-
}
587-
if err == nil {
588586
err = errors.WithStack(r.apply(ctx, userSecrets[userName]))
589587
}
590588
}
591589

592590
return specUsers, userSecrets, err
593591
}
594592

595-
// updateCustomSecretLabels checks if a custom secret exists and updates it
596-
// with required labels if they are missing that enabled the
593+
// updateCustomSecretLabels checks if a custom secret exists - can be created manually through kubectl apply
594+
// and updates it with required labels if they are missing that enabled the
597595
// naming.AsSelector(naming.ClusterPostgresUsers(cluster.Name)) to identify them.
598596
func (r *Reconciler) updateCustomSecretLabels(
599597
ctx context.Context, cluster *v1beta1.PostgresCluster, user v1beta1.PostgresUserSpec,

0 commit comments

Comments
 (0)