mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-21 11:05:16 +02:00
do not reset secrets of standby clusters (#3044)
* do not reset secrets of standby clusters align error message with unit test * check for other env vars, too
This commit is contained in:
@@ -385,7 +385,7 @@ func (c *Cluster) Create() (err error) {
|
||||
|
||||
// create database objects unless we are running without pods or disabled
|
||||
// that feature explicitly
|
||||
if !(c.databaseAccessDisabled() || c.getNumberOfInstances(&c.Spec) <= 0 || c.Spec.StandbyCluster != nil) {
|
||||
if !(c.databaseAccessDisabled() || c.getNumberOfInstances(&c.Spec) <= 0 || isStandbyCluster(&c.Spec)) {
|
||||
c.logger.Infof("Create roles")
|
||||
if err = c.createRoles(); err != nil {
|
||||
return fmt.Errorf("could not create users: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user