From 503c622df5a8401fced15053bd11e4b6855f348a Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 26 Nov 2024 20:35:32 +0100 Subject: [PATCH] fix(deployment): adapt projected volume spec --- .../_deployment.tpl | 4 ++-- unittests/deployment/deployment.yaml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/prometheus-postgres-exporter/_deployment.tpl b/templates/prometheus-postgres-exporter/_deployment.tpl index d28b73e..d7cee1f 100644 --- a/templates/prometheus-postgres-exporter/_deployment.tpl +++ b/templates/prometheus-postgres-exporter/_deployment.tpl @@ -53,7 +53,7 @@ {{- define "prometheus-postgres-exporter.deployment.volumeMounts" -}} {{- $volumeMounts := dict "volumeMounts" (.Values.deployment.postgresExporter.volumeMounts | default (list) ) }} -{{- $volumeMounts = merge $volumeMounts (dict "volumeMounts" (list (dict "name" "config.d" "mountPath" "/etc/prometheus-postgres-exporter/config.d" ))) }} +{{- $volumeMounts = merge $volumeMounts (dict "volumeMounts" (list (dict "name" "config-d" "mountPath" "/etc/prometheus-postgres-exporter/config.d" ))) }} {{ toYaml $volumeMounts }} {{- end -}} @@ -72,7 +72,7 @@ {{- $webConfigSecretName = printf "%s-web-config" (include "prometheus-postgres-exporter.fullname" . ) }} {{- end }} -{{- $volumes = merge $volumes (dict "volumes" (list (dict "name" "config.d" "projected" (dict "defaultMode" "0444" "sources" (list (dict "secret" (dict "name" $exporterSecretName)) (dict "secret" (dict "name" $webConfigSecretName))))))) }} +{{- $volumes = merge $volumes (dict "volumes" (list (dict "name" "config-d" "projected" (dict "defaultMode" 444 "sources" (list (dict "secret" (dict "name" $exporterSecretName)) (dict "secret" (dict "name" $webConfigSecretName))))))) }} {{ toYaml $volumes }} diff --git a/unittests/deployment/deployment.yaml b/unittests/deployment/deployment.yaml index 887f97e..d562a71 100644 --- a/unittests/deployment/deployment.yaml +++ b/unittests/deployment/deployment.yaml @@ -42,13 +42,13 @@ tests: path: spec.template.spec.containers[0].volumeMounts value: - mountPath: /etc/prometheus-postgres-exporter/config.d - name: config.d + name: config-d - equal: path: spec.template.spec.volumes value: - - name: config.d + - name: config-d projected: - defaultMode: "0444" + defaultMode: 444 sources: - secret: name: prometheus-postgres-exporter-unittest-exporter-config @@ -143,13 +143,13 @@ tests: path: spec.template.spec.containers[0].volumeMounts value: - mountPath: /etc/prometheus-postgres-exporter/config.d - name: config.d + name: config-d - equal: path: spec.template.spec.volumes value: - - name: config.d + - name: config-d projected: - defaultMode: "0444" + defaultMode: 444 sources: - secret: name: exporter-config-secret @@ -165,13 +165,13 @@ tests: path: spec.template.spec.containers[0].volumeMounts value: - mountPath: /etc/prometheus-postgres-exporter/config.d - name: config.d + name: config-d - equal: path: spec.template.spec.volumes value: - - name: config.d + - name: config-d projected: - defaultMode: "0444" + defaultMode: 444 sources: - secret: name: prometheus-postgres-exporter-unittest-exporter-config