From 970d7627797fe2b96f797e413b27f09484b80c7b Mon Sep 17 00:00:00 2001 From: cccs-tom <59839056+cccs-tom@users.noreply.github.com> Date: Sat, 21 Aug 2021 20:53:13 -0400 Subject: [PATCH] feat: Add extraVolumes and extraVolumeMounts to all main containers (#16361) --- helm/superset/Chart.yaml | 2 +- helm/superset/templates/deployment-beat.yaml | 6 ++++++ helm/superset/templates/deployment-worker.yaml | 6 ++++++ helm/superset/templates/deployment.yaml | 6 ++++++ helm/superset/templates/init-job.yaml | 6 ++++++ helm/superset/values.yaml | 16 ++++++++++++++++ 6 files changed, 41 insertions(+), 1 deletion(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 8f39c30543620..30a409e083d8e 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -22,7 +22,7 @@ maintainers: - name: craig-rueda email: craig@craigrueda.com url: https://github.com/craig-rueda -version: 0.3.5 +version: 0.3.6 dependencies: - name: postgresql version: 10.2.0 diff --git a/helm/superset/templates/deployment-beat.yaml b/helm/superset/templates/deployment-beat.yaml index e5705fa08b097..2775d287498c8 100644 --- a/helm/superset/templates/deployment-beat.yaml +++ b/helm/superset/templates/deployment-beat.yaml @@ -86,6 +86,9 @@ spec: - name: superset-config mountPath: {{ .Values.configMountPath | quote }} readOnly: true + {{- with .Values.extraVolumeMounts }} + {{- tpl (toYaml .) $ | nindent 12 -}} + {{- end }} resources: {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} @@ -108,4 +111,7 @@ spec: - name: superset-config secret: secretName: {{ tpl .Values.configFromSecret . }} + {{- with .Values.extraVolumes }} + {{- tpl (toYaml .) $ | nindent 8 -}} + {{- end }} {{- end -}} diff --git a/helm/superset/templates/deployment-worker.yaml b/helm/superset/templates/deployment-worker.yaml index c228b35dc96d1..8bb2cc81c15d0 100644 --- a/helm/superset/templates/deployment-worker.yaml +++ b/helm/superset/templates/deployment-worker.yaml @@ -87,6 +87,9 @@ spec: - name: superset-config mountPath: {{ .Values.configMountPath | quote }} readOnly: true + {{- with .Values.extraVolumeMounts }} + {{- tpl (toYaml .) $ | nindent 12 -}} + {{- end }} resources: {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} @@ -109,3 +112,6 @@ spec: - name: superset-config secret: secretName: {{ tpl .Values.configFromSecret . }} + {{- with .Values.extraVolumes }} + {{- tpl (toYaml .) $ | nindent 8 -}} + {{- end }} diff --git a/helm/superset/templates/deployment.yaml b/helm/superset/templates/deployment.yaml index 919078299525f..ec6b4f453ea58 100644 --- a/helm/superset/templates/deployment.yaml +++ b/helm/superset/templates/deployment.yaml @@ -95,6 +95,9 @@ spec: mountPath: {{ .Values.extraConfigMountPath | quote }} readOnly: true {{- end }} + {{- with .Values.extraVolumeMounts }} + {{- tpl (toYaml .) $ | nindent 12 -}} + {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} @@ -127,3 +130,6 @@ spec: configMap: name: {{ template "superset.fullname" . }}-extra-config {{- end }} + {{- with .Values.extraVolumes }} + {{- tpl (toYaml .) $ | nindent 8 -}} + {{- end }} diff --git a/helm/superset/templates/init-job.yaml b/helm/superset/templates/init-job.yaml index 45ab2235b7a5f..fb30abc8cef23 100644 --- a/helm/superset/templates/init-job.yaml +++ b/helm/superset/templates/init-job.yaml @@ -60,6 +60,9 @@ spec: mountPath: {{ .Values.extraConfigMountPath | quote }} readOnly: true {{- end }} + {{- with .Values.extraVolumeMounts }} + {{- tpl (toYaml .) $ | nindent 10 -}} + {{- end }} command: {{ tpl (toJson .Values.init.command) . }} resources: {{ toYaml .Values.init.resources | indent 10 }} @@ -76,5 +79,8 @@ spec: configMap: name: {{ template "superset.fullname" . }}-extra-config {{- end }} + {{- with .Values.extraVolumes }} + {{- tpl (toYaml .) $ | nindent 8 -}} + {{- end }} restartPolicy: Never {{- end }} diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index c6ad3e10ff33a..c8577774afb8e 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -82,6 +82,22 @@ extraConfigs: {} extraSecrets: {} +extraVolumes: [] + # - name: customConfig + # configMap: + # name: '{{ template "superset.fullname" . }}-custom-config' + # - name: additionalSecret + # secret: + # secretName: my-secret + # defaultMode: 0600 + +extraVolumeMounts: [] + # - name: customConfig + # mountPath: /mnt/config + # readOnly: true + # - name: additionalSecret: + # mountPath: /mnt/secret + # A dictionary of overrides to append at the end of superset_config.py - the name does not matter # WARNING: the order is not guaranteed configOverrides: {}