forked from hswaw/hscloud
Merge "kube/redis: implement optional cfg.password option"
This commit is contained in:
commit
7e3447f3ff
1 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,7 @@ local kube = import "kube.libsonnet";
|
|||
appName: error "app name must be set",
|
||||
storageClassName: "waw-hdd-redundant-1",
|
||||
prefix: "", # if set, should be 'foo-'
|
||||
password: null,
|
||||
|
||||
image: "redis:5.0.4-alpine",
|
||||
resources: {
|
||||
|
@ -65,13 +66,16 @@ local kube = import "kube.libsonnet";
|
|||
args: [
|
||||
"redis-server",
|
||||
"--appendonly", "yes",
|
||||
],
|
||||
] + (if cfg.password != null then ["--requirepass", "$(REDIS_PASSWORD)"] else []),
|
||||
ports_: {
|
||||
client: { containerPort: 6379 },
|
||||
},
|
||||
volumeMounts_: {
|
||||
data: { mountPath: "/data" },
|
||||
},
|
||||
env_: {
|
||||
[if cfg.password != null then "REDIS_PASSWORD"]: cfg.password,
|
||||
},
|
||||
resources: cfg.resources,
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue