mirror of
https://gerrit.hackerspace.pl/hscloud
synced 2025-02-16 09:46:45 +00:00
Merge "kube/postgres: add extra options configuration option"
This commit is contained in:
commit
1f717993e5
1 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,11 @@ local kube = import "kube.libsonnet";
|
|||
# Changing this option in already existing deployments will not affect
|
||||
# existing database.
|
||||
initdbArgs: null,
|
||||
|
||||
# Extra postgres configuration options passed on startup. Accepts only
|
||||
# string values.
|
||||
# Example: { max_connections: "300" }
|
||||
opts: {},
|
||||
},
|
||||
|
||||
makeName(suffix):: cfg.prefix + suffix,
|
||||
|
@ -72,6 +77,12 @@ local kube = import "kube.libsonnet";
|
|||
} + if cfg.initdbArgs != null then {
|
||||
POSTGRES_INITDB_ARGS: cfg.initdbArgs,
|
||||
} else {},
|
||||
|
||||
args: std.flatMap(
|
||||
function(k) ["-c", "%s=%s" % [k, cfg.opts[k]]],
|
||||
std.objectFields(cfg.opts),
|
||||
),
|
||||
|
||||
volumeMounts_: {
|
||||
data: { mountPath: "/var/lib/postgresql/data" },
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue