Skip to content

Commit c174ac2

Browse files
committed
feat(helm): support extra volumes, mounts and cli job args
1 parent 7ce1e2a commit c174ac2

File tree

9 files changed

+68
-5
lines changed

9 files changed

+68
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,6 @@ observability_ui/node_modules/
169169

170170
# Terraform
171171
.terraform*
172+
173+
# Helm
174+
**/*.tgz

deploy/charts/observability-app/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: dataops-observability-app
33
type: application
44
appVersion: "2.x.x"
5-
version: "2.1.0"
5+
version: "2.2.0"
66

77
description: DataOps Observability
88
home: https://datakitchen.io

deploy/charts/observability-app/templates/agent-api.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ spec:
6161
name: {{ .Values.observability.keys_secrets_name | quote }}
6262
key: AGENT_API_KEY_FLASK_SECRET
6363
{{- end }}
64+
{{- with .Values.extraVolumeMounts }}
65+
volumeMounts:
66+
{{ toYaml . | nindent 12 }}
67+
{{- end }}
6468
command: [ "/dk/bin/gunicorn" ]
6569
args: [ "-c", "/dk/gunicorn.conf.py", "agent_api.app:app" ]
6670
readinessProbe:
@@ -74,6 +78,10 @@ spec:
7478
- name: Host
7579
value: {{ tpl .Values.agent_api.hostname . | quote }}
7680
{{- end }}
81+
{{- with .Values.extraVolumes }}
82+
volumes:
83+
{{ toYaml . | nindent 8 }}
84+
{{- end }}
7785
{{- with .Values.agent_api.nodeSelector }}
7886
nodeSelector:
7987
{{- toYaml . | nindent 8 }}
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
{{- range .Values.cli_hook.enable }}
1+
{{- range $index, $job := .Values.cli_hook.enable }}
22
apiVersion: batch/v1
33
kind: Job
44
metadata:
5-
name: "cli-job"
5+
name: cli-job-{{ default $index .name }}
66
annotations:
77
"helm.sh/hook": {{ join ", " .phases }}
88
"helm.sh/hook-weight": {{ default 0 .weight | quote }}
99
"helm.sh/hook-delete-policy": hook-succeeded, before-hook-creation
1010
spec:
1111
template:
1212
metadata:
13-
name: "cli-job"
13+
name: cli-job-{{ default $index .name }}
1414
spec:
1515
restartPolicy: Never
1616
{{- with $.Values.imagePullSecrets }}
1717
imagePullSecrets:
1818
{{- toYaml . | nindent 8 }}
1919
{{- end }}
20+
serviceAccountName: {{ include "observability.serviceAccountName" $ }}
2021
containers:
2122
- name: cli-hook
2223
image: {{ include "observability.cli_hook.image" $ | quote }}
@@ -25,9 +26,21 @@ spec:
2526
{{- include "observability.environment.base" $ | nindent 12 }}
2627
{{- include "observability.environment.database" $ | nindent 12 }}
2728
{{- include "observability.environment.pythonpath" $ | nindent 12 }}
29+
{{- with $.Values.extraVolumeMounts }}
30+
volumeMounts:
31+
{{ toYaml . | nindent 12 }}
32+
{{- end }}
2833
command:
2934
{{- range .command }}
3035
- {{ . | quote -}}
3136
{{- end }}
37+
args:
38+
{{- range .args }}
39+
- {{ . | quote -}}
40+
{{- end }}
41+
{{- with $.Values.extraVolumes }}
42+
volumes:
43+
{{ toYaml . | nindent 8 }}
44+
{{- end }}
3245
---
3346
{{- end }}

deploy/charts/observability-app/templates/event-api.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ spec:
6262
name: {{ .Values.observability.keys_secrets_name | quote }}
6363
key: EVENTS_KEY_FLASK_SECRET
6464
{{- end }}
65+
{{- with .Values.extraVolumeMounts }}
66+
volumeMounts:
67+
{{ toYaml . | nindent 12 }}
68+
{{- end }}
6569
command: [ "/dk/bin/gunicorn" ]
6670
args: [ "-c", "/dk/gunicorn.conf.py", "event_api.app:app" ]
6771
readinessProbe:
@@ -75,7 +79,10 @@ spec:
7579
- name: Host
7680
value: {{ tpl .Values.event_api.hostname . | quote }}
7781
{{- end }}
78-
82+
{{- with .Values.extraVolumes }}
83+
volumes:
84+
{{ toYaml . | nindent 8 }}
85+
{{- end }}
7986
{{- with .Values.event_api.nodeSelector }}
8087
nodeSelector:
8188
{{- toYaml . | nindent 8 }}

deploy/charts/observability-app/templates/observability-api.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ spec:
6161
name: {{ .Values.observability.keys_secrets_name | quote }}
6262
key: OBSERVABILITY_KEY_FLASK_SECRET
6363
{{- end }}
64+
{{- with .Values.extraVolumeMounts }}
65+
volumeMounts:
66+
{{ toYaml . | nindent 12 }}
67+
{{- end }}
6468
command: [ "/dk/bin/gunicorn" ]
6569
args: [ "-c", "/dk/gunicorn.conf.py", "observability_api.app:app" ]
6670
readinessProbe:
@@ -74,6 +78,10 @@ spec:
7478
- name: Host
7579
value: {{ tpl .Values.observability_api.hostname . | quote }}
7680
{{- end }}
81+
{{- with .Values.extraVolumes }}
82+
volumes:
83+
{{ toYaml . | nindent 8 }}
84+
{{- end }}
7785
{{- with .Values.observability_api.nodeSelector }}
7886
nodeSelector:
7987
{{- toYaml . | nindent 8 }}

deploy/charts/observability-app/templates/rules-engine.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,16 @@ spec:
4545
{{- include "observability.environment.database" . | nindent 12 }}
4646
{{- include "observability.environment.kafka" . | nindent 12 }}
4747
{{- include "observability.environment.smtp" . | nindent 12 }}
48+
{{- with .Values.extraVolumeMounts }}
49+
volumeMounts:
50+
{{ toYaml . | nindent 12 }}
51+
{{- end }}
4852
command: [ "/dk/bin/rules-engine" ]
4953
{{- include "observability.probes.readiness_cmd" "rules-engine" | nindent 10 -}}
54+
{{- with .Values.extraVolumes }}
55+
volumes:
56+
{{ toYaml . | nindent 8 }}
57+
{{- end }}
5058
{{- with .Values.rules_engine.nodeSelector }}
5159
nodeSelector:
5260
{{- toYaml . | nindent 8 }}

deploy/charts/observability-app/templates/run-manager.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,16 @@ spec:
4444
{{- include "observability.environment.base" . | nindent 12 }}
4545
{{- include "observability.environment.database" . | nindent 12 }}
4646
{{- include "observability.environment.kafka" . | nindent 12 }}
47+
{{- with .Values.extraVolumeMounts }}
48+
volumeMounts:
49+
{{ toYaml . | nindent 12 }}
50+
{{- end }}
4751
command: ["/dk/bin/run-manager"]
4852
{{- include "observability.probes.readiness_cmd" "run-manager" | nindent 10 -}}
53+
{{- with .Values.extraVolumes }}
54+
volumes:
55+
{{ toYaml . | nindent 8 }}
56+
{{- end }}
4957
{{- with .Values.run_manager.nodeSelector }}
5058
nodeSelector:
5159
{{- toYaml . | nindent 8 }}

deploy/charts/observability-app/templates/scheduler.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,16 @@ spec:
4444
{{- include "observability.environment.base" . | nindent 12 }}
4545
{{- include "observability.environment.database" . | nindent 12 }}
4646
{{- include "observability.environment.kafka" . | nindent 12 }}
47+
{{- with .Values.extraVolumeMounts }}
48+
volumeMounts:
49+
{{ toYaml . | nindent 12 }}
50+
{{- end }}
4751
command: [ "/dk/bin/scheduler" ]
4852
{{- include "observability.probes.readiness_cmd" "scheduler" | nindent 10 -}}
53+
{{- with .Values.extraVolumes }}
54+
volumes:
55+
{{ toYaml . | nindent 8 }}
56+
{{- end }}
4957
{{- with .Values.scheduler.nodeSelector }}
5058
nodeSelector:
5159
{{- toYaml . | nindent 8 }}

0 commit comments

Comments
 (0)