kube: standardize convention for passing postgres options
Declare options when creating postgres {}, then pass env by taking from postgres's cfg and svc. This is both to reduce chance of making a mistake, and to improve copy-pasteability of jsonnets
Change-Id: Ief16a6825af64795f3b10e1e617b96c3d1c2a578
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1807
Reviewed-by: q3k <q3k@hackerspace.pl>
diff --git a/hswaw/paperless/paperless.libsonnet b/hswaw/paperless/paperless.libsonnet
index dc9d5d9..0572b1f 100644
--- a/hswaw/paperless/paperless.libsonnet
+++ b/hswaw/paperless/paperless.libsonnet
@@ -144,7 +144,7 @@
A_REDIS_PASSWORD: top.redis.cfg.password,
PAPERLESS_REDIS: "redis://:$(A_REDIS_PASSWORD)@redis:6379",
- PAPERLESS_DBHOST: "postgres",
+ PAPERLESS_DBHOST: top.postgres.svc.host,
PAPERLESS_DBNAME: top.postgres.cfg.database,
PAPERLESS_DBUSER: top.postgres.cfg.username,
PAPERLESS_DBPASS: top.postgres.cfg.password,