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:
		
							parent
							
								
									cd2a713a97
								
							
						
					
					
						commit
						12458f2d32
					
				|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue