forked from hswaw/hscloud
kube/postgres: expose cfg.initdbArgs
This option allows easy customization of certain initial database properties, like encoding or collation. See: https://www.postgresql.org/docs/9.5/app-initdb.html Adding this option in already existing deployments will only cause postgres pod restart, but no data loss or schema changes! Intended to be used in further matrix deployment cleanups. Change-Id: I49a017c21a228f983bea6bafa7dac962a75d05c9
This commit is contained in:
parent
ee62857c70
commit
1816f58448
1 changed files with 9 additions and 1 deletions
|
@ -18,6 +18,12 @@ local kube = import "kube.libsonnet";
|
|||
password: error "password must be set",
|
||||
|
||||
storageSize: "30Gi",
|
||||
|
||||
# This option can be used to customize initial database creation. For
|
||||
# available options see: https://www.postgresql.org/docs/9.5/app-initdb.html
|
||||
# Changing this option in already existing deployments will not affect
|
||||
# existing database.
|
||||
initdbArgs: null,
|
||||
},
|
||||
|
||||
makeName(suffix):: cfg.prefix + suffix,
|
||||
|
@ -63,7 +69,9 @@ local kube = import "kube.libsonnet";
|
|||
POSTGRES_USER: cfg.username,
|
||||
POSTGRES_PASSWORD: cfg.password,
|
||||
PGDATA: "/var/lib/postgresql/data/pgdata",
|
||||
},
|
||||
} + if cfg.initdbArgs != null then {
|
||||
POSTGRES_INITDB_ARGS: cfg.initdbArgs,
|
||||
} else {},
|
||||
volumeMounts_: {
|
||||
data: { mountPath: "/var/lib/postgresql/data" },
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue