about summary refs log tree commit diff
path: root/k8s
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-27 21:30:54 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-05-27 23:52:44 +0200
commit81621c4f64f4a1c29906643f53314e2f71a014ae (patch)
tree503cc56b609dcad8f8eca6e64b6b9b15b02fd4fd /k8s
parentpayload-processor: fmt (diff)
downloadfs-tracer-backend-81621c4f64f4a1c29906643f53314e2f71a014ae.tar.gz
fs-tracer-backend-81621c4f64f4a1c29906643f53314e2f71a014ae.tar.bz2
fs-tracer-backend-81621c4f64f4a1c29906643f53314e2f71a014ae.zip
rest-api: connect to db and add /file/ GET endpoint
TODO: Only get files for your specific user
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