From 5f1de7ecbd186cc61607159f683c948a600d2a3d Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 4 Feb 2025 11:47:52 +0100 Subject: [PATCH] chore(helm): Adding secret with db secrets Use all the db jobs with secret from this. Signed-off-by: rjshrjndrn --- .../openreplay/templates/configmap.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/scripts/helmcharts/openreplay/templates/configmap.yaml b/scripts/helmcharts/openreplay/templates/configmap.yaml index 8189a3163..4f68d1d5d 100644 --- a/scripts/helmcharts/openreplay/templates/configmap.yaml +++ b/scripts/helmcharts/openreplay/templates/configmap.yaml @@ -8,3 +8,26 @@ metadata: "helm.sh/hook-weight": "-6" # Higher precidence, so the first the config map will get created. data: version: {{ .Chart.AppVersion }} +--- +# If some jobs or crons are doing db operations, or using credentias, +# it should fetch them from this secret. +apiVersion: v1 +kind: Secret +metadata: + name: openreplay-secrets + namespace: "{{ .Release.Namespace }}" + annotations: + "helm.sh/hook": pre-install, pre-upgrade + "helm.sh/hook-weight": "-6" # Higher precidence, so the first the config map will get created. + "helm.sh/hook-delete-policy": "before-hook-creation" +data: + PGHOST: "{{ .Values.global.postgresql.postgresqlHost | b64enc }}" + PGPORT: "{{ .Values.global.postgresql.postgresqlPort | b64enc }}" + PGDATABASE: "{{ .Values.global.postgresql.postgresqlDatabase | b64enc }}" + PGUSER: "{{ .Values.global.postgresql.postgresqlUser | b64enc }}" + PGPASSWORD: "{{ .Values.global.postgresql.postgresqlPassword | b64enc }}" + CLICKHOUSE_USER: "{{ .Values.global.clickhouse.username | b64enc }}" + CLICKHOUSE_PASSWORD: "{{ .Values.global.clickhouse.password | b64enc }}" + MINIO_HOST: "{{ .Values.global.minio.minioHost | b64enc }}" + MINIO_ACCESS_KEY: "{{ .Values.global.s3.accessKey | b64enc }}" + MINIO_SECRET_KEY: "{{ .Values.global.s3.secretKey | b64enc }}"