From 81621c4f64f4a1c29906643f53314e2f71a014ae Mon Sep 17 00:00:00 2001 From: Baitinq Date: Mon, 27 May 2024 21:30:54 +0200 Subject: rest-api: connect to db and add /file/ GET endpoint TODO: Only get files for your specific user --- k8s/rest-api/BUILD.bazel | 5 ++++- k8s/rest-api/templates/deployment.yaml | 2 ++ k8s/rest-api/values.yaml | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'k8s') 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 -- cgit 1.4.1