Configure pg_hba in the local postgresql configuration of Patroni. (#361)

Previously, the operator put pg_hba into the bootstrap/pg_hba key of
Patroni. That had 2 adverse effects:
 - pg_hba.conf was shadowed by Spilo default section in the local
   postgresql configuration
 - when updating pg_hba in the cluster manifest, the updated lines were
   not propagated to DCS, since the key was defined in the boostrap
   section of Patroni.

Include some minor refactoring, moving methods to unexported when
possible and commenting out usage of md5, so that gosec won't complain.

Per https://github.com/zalando-incubator/postgres-operator/issues/330

Review by @zerg-junior
This commit is contained in:
Oleksii Kliukin
2018-08-08 11:01:26 +02:00
committed by GitHub
parent 199aa6508c
commit e933908084
6 changed files with 55 additions and 52 deletions
+1
View File
@@ -71,6 +71,7 @@ type Sidecar struct {
Env []v1.EnvVar `json:"env,omitempty"`
}
// UserFlags defines flags (such as superuser, nologin) that could be assigned to individual users
type UserFlags []string
// PostgresStatus contains status of the PostgreSQL cluster (running, creation failed etc.)