diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index b8008b1e..0e556b4e 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -98,25 +98,25 @@ spec: {{- range .Values.configMounts }} - name: {{ .name }} configMap: - name: {{ .configMap }} + name: {{ tpl .configMap $ }} {{- end }} {{- range .Values.coordinator.configMounts }} - name: {{ .name }} configMap: - name: {{ .configMap }} + name: {{ tpl .configMap $ }} {{- end }} {{- range .Values.secretMounts }} - name: {{ .name }} secret: - secretName: {{ .secretName }} + secretName: {{ tpl .secretName $ }} {{- end }} {{- range .Values.coordinator.secretMounts }} - name: {{ .name }} secret: - secretName: {{ .secretName }} + secretName: {{ tpl .secretName $ }} {{- end }} {{- with .Values.coordinator.additionalVolumes }} - {{- . | toYaml | nindent 8 }} + {{- tpl (. | toYaml) $ | nindent 8 }} {{- end }} {{- if .Values.initContainers.coordinator }} initContainers: @@ -136,7 +136,7 @@ spec: env: {{- toYaml .Values.env | nindent 12 }} envFrom: - {{- toYaml .Values.envFrom | nindent 12 }} + {{- tpl (toYaml .Values.envFrom) . | nindent 12 }} volumeMounts: - mountPath: {{ .Values.server.config.path }} name: config-volume diff --git a/charts/trino/templates/deployment-worker.yaml b/charts/trino/templates/deployment-worker.yaml index 4b0ad81e..bb9e7e49 100644 --- a/charts/trino/templates/deployment-worker.yaml +++ b/charts/trino/templates/deployment-worker.yaml @@ -80,25 +80,25 @@ spec: {{- range .Values.configMounts }} - name: {{ .name }} configMap: - name: {{ .configMap }} + name: {{ tpl .configMap $ }} {{- end }} {{- range .Values.worker.configMounts }} - name: {{ .name }} configMap: - name: {{ .configMap }} + name: {{ tpl .configMap $ }} {{- end }} {{- range .Values.secretMounts }} - name: {{ .name }} secret: - secretName: {{ .secretName }} + secretName: {{ tpl .secretName $ }} {{- end }} {{- range .Values.worker.secretMounts }} - name: {{ .name }} secret: - secretName: {{ .secretName }} + secretName: {{ tpl .secretName $ }} {{- end }} {{- with .Values.worker.additionalVolumes }} - {{- . | toYaml | nindent 8 }} + {{- tpl (. | toYaml) $ | nindent 8 }} {{- end }} {{- if .Values.initContainers.worker }} initContainers: @@ -122,7 +122,7 @@ spec: env: {{- toYaml .Values.env | nindent 12 }} envFrom: - {{- toYaml .Values.envFrom | nindent 12 }} + {{- tpl (toYaml .Values.envFrom) . | nindent 12 }} volumeMounts: - mountPath: {{ .Values.server.config.path }} name: config-volume diff --git a/charts/trino/templates/ingress.yaml b/charts/trino/templates/ingress.yaml index 33543d72..1da324c3 100644 --- a/charts/trino/templates/ingress.yaml +++ b/charts/trino/templates/ingress.yaml @@ -17,7 +17,7 @@ spec: {{- range .hosts }} - {{ . | quote }} {{- end }} - secretName: {{ .secretName }} + secretName: {{ tpl .secretName $ }} {{- end }} {{- end }} rules: diff --git a/charts/trino/templates/tests/test-connection.yaml b/charts/trino/templates/tests/test-connection.yaml index bc85f0f8..66f7fe8d 100644 --- a/charts/trino/templates/tests/test-connection.yaml +++ b/charts/trino/templates/tests/test-connection.yaml @@ -58,6 +58,6 @@ spec: volumes: - name: certificates secret: - secretName: certificates + secretName: {{ .Release.Namespace }}-certificates {{- end }} restartPolicy: Never diff --git a/tests/trino/test-values.yaml b/tests/trino/test-values.yaml index 705ee460..c1aa3fad 100644 --- a/tests/trino/test-values.yaml +++ b/tests/trino/test-values.yaml @@ -41,7 +41,7 @@ auth: secretMounts: - name: certificates - secretName: certificates + secretName: '{{ .Release.Namespace }}-certificates' path: /etc/trino/certificates coordinator: diff --git a/tests/trino/test.sh b/tests/trino/test.sh index a7787f29..ecba8043 100755 --- a/tests/trino/test.sh +++ b/tests/trino/test.sh @@ -91,7 +91,7 @@ openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \ -keyout cert.key -out cert.crt kubectl create namespace "$NAMESPACE" --dry-run=client --output yaml | kubectl apply --filename - -kubectl -n "$NAMESPACE" create secret tls certificates --cert=cert.crt --key=cert.key --dry-run=client --output yaml | kubectl apply --filename - +kubectl -n "$NAMESPACE" create secret tls "$NAMESPACE"-certificates --cert=cert.crt --key=cert.key --dry-run=client --output yaml | kubectl apply --filename - cat <