about summary refs log tree commit diff
path: root/k8s
diff options
context:
space:
mode:
Diffstat (limited to 'k8s')
-rw-r--r--k8s/rest-api/BUILD.bazel5
-rw-r--r--k8s/rest-api/templates/deployment.yaml2
-rw-r--r--k8s/rest-api/values.yaml3
3 files changed, 9 insertions, 1 deletions
diff --git a/k8s/rest-api/BUILD.bazel b/k8s/rest-api/BUILD.bazel
index 9ebdaf9..1364361 100644
--- a/k8s/rest-api/BUILD.bazel
+++ b/k8s/rest-api/BUILD.bazel
@@ -6,6 +6,9 @@ helm_chart(
     images = ["//src/rest-api/cmd:push"],
     install_name = "rest-api",
     stamp = 1,
-    substitutions = {"IMAGE_TAG": "rest-api-{STABLE_GIT_SHA}"},
+    substitutions = {
+        "IMAGE_TAG": "rest-api-{STABLE_GIT_SHA}",
+        "DB_PASSWORD": "{DB_PASSWORD}",
+    },
     values = "values.yaml",
 )
diff --git a/k8s/rest-api/templates/deployment.yaml b/k8s/rest-api/templates/deployment.yaml
index f2b15d8..aa61cb6 100644
--- a/k8s/rest-api/templates/deployment.yaml
+++ b/k8s/rest-api/templates/deployment.yaml
@@ -50,6 +50,8 @@ spec:
               secretKeyRef:
                 name: kafka-user-passwords
                 key: client-passwords
+          - name: DB_PASSWORD
+            value: {{ .Values.db.password }}
       {{- with .Values.nodeSelector }}
       nodeSelector:
         {{- toYaml . | nindent 8 }}
diff --git a/k8s/rest-api/values.yaml b/k8s/rest-api/values.yaml
index f79e04f..3d85a51 100644
--- a/k8s/rest-api/values.yaml
+++ b/k8s/rest-api/values.yaml
@@ -7,6 +7,9 @@
 
 replicaCount: 1
 
+db:
+  password: "{DB_PASSWORD}"
+
 image:
   repository: docker.io/baitinq/fs-tracer
   pullPolicy: IfNotPresent