Allow cloning clusters from the operator. (#90)

Allow cloning clusters from the operator.

The changes add a new JSON node `clone` with possible values `cluster`
and `timestamp`. `cluster` is mandatory, and setting a non-empty
`timestamp` triggers wal-e point in time recovery. Spilo and Patroni do
the whole heavy-lifting, the operator just defines certain variables and
gathers some data about how to connect to the host to clone or the
target S3 bucket.

As a minor change, set the image pull policy to IfNotPresent instead
of Always to simplify local testing.

Change the default replication username to standby.
This commit is contained in:
Oleksii Kliukin
2017-09-08 16:47:03 +02:00
committed by GitHub
parent a0a9e8f849
commit 8b85935a7a
6 changed files with 115 additions and 13 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ type Auth struct {
OAuthTokenSecretName spec.NamespacedName `name:"oauth_token_secret_name" default:"postgresql-operator"`
InfrastructureRolesSecretName spec.NamespacedName `name:"infrastructure_roles_secret_name"`
SuperUsername string `name:"super_username" default:"postgres"`
ReplicationUsername string `name:"replication_username" default:"replication"`
ReplicationUsername string `name:"replication_username" default:"standby"`
}
// Config describes operator config