diff --git a/charts/cryostat/templates/cryostat_deployment.yaml b/charts/cryostat/templates/cryostat_deployment.yaml index 3ebe0ed..4a2ea02 100644 --- a/charts/cryostat/templates/cryostat_deployment.yaml +++ b/charts/cryostat/templates/cryostat_deployment.yaml @@ -141,10 +141,10 @@ spec: failureThreshold: 18 resources: {{- toYaml .Values.core.resources | nindent 12 }} + {{- if .Values.core.config.eventTemplates.configMapNames}} volumeMounts: - {{- range .Values.core.config.eventTemplates.configMapNames }} - - name: {{ . }} - mountPath: /opt/cryostat.d/templates.d/{{ . }} + - name: declarative-event-templates + mountPath: /opt/cryostat.d/templates.d readOnly: true {{- end }} - name: {{ printf "%s-%s" .Chart.Name "grafana" }} @@ -222,9 +222,11 @@ spec: secret: secretName: {{ .Release.Name }}-proxy-tls {{- end }} - {{- range .Values.core.config.eventTemplates.configMapNames}} - - name: {{ . }} - configMap: - name: {{ . }} - optional: false - {{- end }} + - name: declarative-event-templates + projected: + sources: + {{- range .Values.core.config.eventTemplates.configMapNames}} + - configMap: + name: {{ . }} + optional: false + {{- end }} diff --git a/charts/cryostat/tests/cryostat_deployment_test.yaml b/charts/cryostat/tests/cryostat_deployment_test.yaml index f02b414..4978db3 100644 --- a/charts/cryostat/tests/cryostat_deployment_test.yaml +++ b/charts/cryostat/tests/cryostat_deployment_test.yaml @@ -523,11 +523,8 @@ tests: - equal: path: spec.template.spec.containers[?(@.name=='cryostat')].volumeMounts value: - - name: a - mountPath: /opt/cryostat.d/templates.d/a - readOnly: true - - name: b - mountPath: /opt/cryostat.d/templates.d/b + - name: declarative-event-templates + mountPath: /opt/cryostat.d/templates.d readOnly: true - equal: path: spec.template.spec.volumes @@ -535,11 +532,12 @@ tests: - name: alpha-config configMap: name: RELEASE-NAME-alpha-config - - name: a - configMap: - name: a - optional: false - - name: b - configMap: - name: b - optional: false + - name: declarative-event-templates + projected: + sources: + - configMap: + name: a + optional: false + - configMap: + name: b + optional: false