Skip to content

Commit a4f95e9

Browse files
authored
do not rotate secrets for standby clusters (zalando#2175)
1 parent 28cd2f1 commit a4f95e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cluster/sync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ func (c *Cluster) updateSecret(
759759

760760
// globally enabled rotation is only allowed for manifest and bootstrapped roles
761761
allowedRoleTypes := []spec.RoleOrigin{spec.RoleOriginManifest, spec.RoleOriginBootstrap}
762-
rotationAllowed := !pwdUser.IsDbOwner && util.SliceContains(allowedRoleTypes, pwdUser.Origin)
762+
rotationAllowed := !pwdUser.IsDbOwner && util.SliceContains(allowedRoleTypes, pwdUser.Origin) && c.Spec.StandbyCluster == nil
763763

764764
if (c.OpConfig.EnablePasswordRotation && rotationAllowed) || rotationEnabledInManifest {
765765
updateSecretMsg, err = c.rotatePasswordInSecret(secret, secretUsername, pwdUser.Origin, currentTime, retentionUsers)

0 commit comments

Comments
 (0)