mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-06 06:15:22 +02:00
Allow global configuration options for API roles.
Add options to the PgUser structure, potentially allowing to set per-role options in the cluster definition as well. Introduce api_roles_configuration operator option with the default of log_statement=all
This commit is contained in:
+5
-1
@@ -359,7 +359,11 @@ func (c *Cluster) syncRoles(readFromDatabase bool) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not init db connection: %v", err)
|
||||
}
|
||||
defer c.closeDbConn()
|
||||
defer func() {
|
||||
if err := c.closeDbConn(); err != nil {
|
||||
c.logger.Errorf("could not close db connection: %v", err)
|
||||
}
|
||||
}()
|
||||
|
||||
if readFromDatabase {
|
||||
for _, u := range c.pgUsers {
|
||||
|
||||
Reference in New Issue
Block a user