mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-17 14:15:51 +02:00
Allow disabling access to the DB and the Teams API.
Command-line options --nodatabaseaccess and --noteamsapi disable all teams api interaction and access to the Postgres database. This is useful for debugging purposes when the operator runs out of cluster (with --outofcluster flag). The same effect can be achieved by setting enable_db_access and/or enable_teams_api to false.
This commit is contained in:
@@ -36,6 +36,9 @@ func (c *Cluster) SyncCluster(stopCh <-chan struct{}) {
|
||||
if err := c.syncStatefulSet(); err != nil {
|
||||
c.logger.Errorf("Can't sync StatefulSets: %s", err)
|
||||
}
|
||||
if c.DatabaseAccessDisabled() {
|
||||
return
|
||||
}
|
||||
if err := c.initDbConn(); err != nil {
|
||||
c.logger.Errorf("Can't init db connection: %s", err)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user