Fix rendering for volumes and mounts in Armada pod
Rendering for custom volume mounts in the Armada deployment is broken: the tiller container is missing the volumeMounts: key, and the volume mounts are not being applied at all to the armada_api container. This change allows distinct volume mounts for the containers, defined under: .pod.mounts.armada_api.armada_api.volumeMounts .pod.mounts.armada_api.tiller.volumeMounts The pod's volumes: key includes a concatenation of whatever is defined under these keys (without any deduplication): .pod.mounts.armada_api.armada_api.volumes .pod.mounts.armada_api.tiller.volumes Change-Id: I7b5dd491df01cf30be9f2f2c2b25c427472832fb
This commit is contained in:
parent
268d7a3958
commit
4e74fa8ff2
|
@ -39,6 +39,7 @@ httpGet:
|
|||
{{- $labels := tuple $envAll "armada" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" -}}
|
||||
{{- $mounts_armada_api := .Values.pod.mounts.armada_api.armada_api }}
|
||||
{{- $mounts_armada_api_init := .Values.pod.mounts.armada_api.init_container }}
|
||||
{{- $mounts_armada_api_tiller := .Values.pod.mounts.armada_api.tiller }}
|
||||
{{- $prometheus_annotations := $envAll.Values.monitoring.prometheus.armada }}
|
||||
{{- $serviceAccountName := "armada-api" }}
|
||||
{{ tuple $envAll "api" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
||||
|
@ -154,6 +155,7 @@ spec:
|
|||
mountPath: /etc/armada/policy.yaml
|
||||
subPath: policy.yaml
|
||||
readOnly: true
|
||||
{{ if $mounts_armada_api.volumeMounts }}{{ toYaml $mounts_armada_api.volumeMounts | indent 12 }}{{ end }}
|
||||
{{- if .Values.conf.tiller.enabled }}
|
||||
- name: tiller
|
||||
{{ tuple $envAll "tiller" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||
|
@ -194,8 +196,9 @@ spec:
|
|||
protocol: TCP
|
||||
{{ dict "envAll" $envAll "component" "armada" "container" "tiller" "type" "readiness" "probeTemplate" (include "tillerReadinessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
|
||||
{{ dict "envAll" $envAll "component" "armada" "container" "tiller" "type" "liveness" "probeTemplate" (include "tillerLivenessProbeTemplate" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | trim | indent 10 }}
|
||||
volumeMounts:
|
||||
{{ if $mounts_armada_api_tiller.volumeMounts }}{{ toYaml $mounts_armada_api_tiller.volumeMounts | indent 12 }}{{ end }}
|
||||
{{- end }}
|
||||
{{ if $mounts_armada_api.volumeMounts }}{{ toYaml $mounts_armada_api.volumeMounts | indent 12 }}{{ end }}
|
||||
volumes:
|
||||
- name: pod-tmp
|
||||
emptyDir: {}
|
||||
|
@ -210,4 +213,7 @@ spec:
|
|||
name: armada-etc
|
||||
defaultMode: 0444
|
||||
{{ if $mounts_armada_api.volumes }}{{ toYaml $mounts_armada_api.volumes | indent 8 }}{{ end }}
|
||||
{{- if .Values.conf.tiller.enabled }}
|
||||
{{ if $mounts_armada_api_tiller.volumes }}{{ toYaml $mounts_armada_api_tiller.volumes | indent 8 }}{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -300,6 +300,12 @@ pod:
|
|||
mounts:
|
||||
armada_api:
|
||||
init_container: null
|
||||
armada_api:
|
||||
volumes: []
|
||||
volumeMounts: []
|
||||
tiller:
|
||||
volumes: []
|
||||
volumeMounts: []
|
||||
affinity:
|
||||
anti:
|
||||
type:
|
||||
|
|
Loading…
Reference in New Issue