Do not sync roles for standby

Standby cluster is streaming from the master and does not require
to create or use databases of it's own. Hence, bypass the creation
of users or databases.

Though the standby cluster would work without this also, but will have
errors in logs, this is to avoid that.
This commit is contained in:
Rafia Sabih 2019-06-20 12:19:00 +02:00
parent cd2a713a97
commit 12458f2d32
1 changed files with 4 additions and 0 deletions

View File

@ -428,6 +428,10 @@ func (c *Cluster) syncSecrets() error {
func (c *Cluster) syncRoles() (err error) {
c.setProcessName("syncing roles")
if c.Spec.StandbyCluster != nil {
c.logger.Info("no need to sync roles for standby cluster")
return nil
}
var (
dbUsers spec.PgUserMap
userNames []string