From a527638b89060a050e3ef7038433b49002ab5b55 Mon Sep 17 00:00:00 2001 From: shahargl Date: Mon, 19 Aug 2024 11:47:13 +0300 Subject: [PATCH 1/4] feat: add extraInitContainers and env from secrets --- charts/keep/Chart.yaml | 2 +- charts/keep/templates/keep-backend.yaml | 19 +++++++++++++++++++ charts/keep/values.yaml | 5 +++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/charts/keep/Chart.yaml b/charts/keep/Chart.yaml index 91f2dbb..03518ac 100644 --- a/charts/keep/Chart.yaml +++ b/charts/keep/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: keep -version: 0.0.7 +version: 0.1.0 description: Keep Helm Chart type: application icon: https://platform.keephq.dev/_next/image?url=%2Fkeep.png&w=48&q=75 diff --git a/charts/keep/templates/keep-backend.yaml b/charts/keep/templates/keep-backend.yaml index 67e304d..bd15f6c 100644 --- a/charts/keep/templates/keep-backend.yaml +++ b/charts/keep/templates/keep-backend.yaml @@ -80,6 +80,25 @@ spec: image: busybox command: ['sh', '-c', 'until nc -z keep-database 3306; do sleep 1; done;'] {{- end }} + {{- range .Values.backend.extraInitContainers }} + - name: {{ .name }} + image: {{ .image }} + {{- with .imagePullPolicy }} + imagePullPolicy: {{ . }} + {{- end }} + {{- with .command }} + command: {{ toYaml . | nindent 12 }} + {{- end }} + {{- with .args }} + args: {{ toYaml . | nindent 12 }} + {{- end }} + {{- with .env }} + env: {{ toYaml . | nindent 12 }} + {{- end }} + {{- with .volumeMounts }} + volumeMounts: {{ toYaml . | nindent 12 }} + {{- end }} + {{- end }} {{- with .Values.backend.nodeSelector }} nodeSelector: diff --git a/charts/keep/values.yaml b/charts/keep/values.yaml index 478513f..37e9c1c 100644 --- a/charts/keep/values.yaml +++ b/charts/keep/values.yaml @@ -44,6 +44,7 @@ backend: repository: us-central1-docker.pkg.dev/keephq/keep/keep-api pullPolicy: Always tag: "latest" + extraInitContainers: [] imagePullSecrets: [] podAnnotations: {} podSecurityContext: {} @@ -253,6 +254,7 @@ database: nodeSelector: {} tolerations: [] affinity: {} +<<<<<<< Updated upstream healthCheck: enabled: false probes: @@ -266,3 +268,6 @@ database: port: 3306 extraVolumeMounts: [] extraVolumes: [] +======= + +>>>>>>> Stashed changes From c608c40c4d7ec034616171af13c14473b3e8941e Mon Sep 17 00:00:00 2001 From: shahargl Date: Mon, 19 Aug 2024 11:48:07 +0300 Subject: [PATCH 2/4] feat: redundant --- charts/keep/values.yaml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/charts/keep/values.yaml b/charts/keep/values.yaml index 37e9c1c..5c50e9f 100644 --- a/charts/keep/values.yaml +++ b/charts/keep/values.yaml @@ -254,20 +254,4 @@ database: nodeSelector: {} tolerations: [] affinity: {} -<<<<<<< Updated upstream - healthCheck: - enabled: false - probes: - readinessProbe: - tcpSocket: - port: 3306 - initialDelaySeconds: 30 - periodSeconds: 10 - livenessProbe: - tcpSocket: - port: 3306 - extraVolumeMounts: [] - extraVolumes: [] -======= ->>>>>>> Stashed changes From b72853726750b0ab4252260cd1a9c3568d30e5cb Mon Sep 17 00:00:00 2001 From: shahargl Date: Mon, 19 Aug 2024 11:48:28 +0300 Subject: [PATCH 3/4] feat: revert --- charts/keep/values.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/charts/keep/values.yaml b/charts/keep/values.yaml index 5c50e9f..34f226b 100644 --- a/charts/keep/values.yaml +++ b/charts/keep/values.yaml @@ -254,4 +254,16 @@ database: nodeSelector: {} tolerations: [] affinity: {} - + healthCheck: + enabled: false + probes: + readinessProbe: + tcpSocket: + port: 3306 + initialDelaySeconds: 30 + periodSeconds: 10 + livenessProbe: + tcpSocket: + port: 3306 + extraVolumeMounts: [] + extraVolumes: [] From 699b1cd1428b0bd9ef9c2d05c20418de0adbe5c9 Mon Sep 17 00:00:00 2001 From: shahargl Date: Mon, 19 Aug 2024 12:04:31 +0300 Subject: [PATCH 4/4] feat: fix --- charts/keep/templates/keep-backend.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/charts/keep/templates/keep-backend.yaml b/charts/keep/templates/keep-backend.yaml index bd15f6c..f1cfc88 100644 --- a/charts/keep/templates/keep-backend.yaml +++ b/charts/keep/templates/keep-backend.yaml @@ -44,7 +44,23 @@ spec: env: {{- range .Values.backend.env }} - name: {{ .name }} + {{- if .secretKeyRef }} + valueFrom: + secretKeyRef: + name: {{ .secretName }} + key: {{ .secretKey }} + {{- else if .configMapKeyRef }} + valueFrom: + configMapKeyRef: + name: {{ .configMapName }} + key: {{ .configMapKey }} + {{- else if .fieldRef }} + valueFrom: + fieldRef: + fieldPath: metadata.namespace + {{- else }} value: {{ .value | quote }} + {{- end }} {{- end }} {{- if .Values.backend.openAiApi.enabled }} - name: OPENAI_API_KEY