diff --git a/chart/templates/pgbouncer/pgbouncer-deployment.yaml b/chart/templates/pgbouncer/pgbouncer-deployment.yaml index e3bdcffb25562..85517a8409ed1 100644 --- a/chart/templates/pgbouncer/pgbouncer-deployment.yaml +++ b/chart/templates/pgbouncer/pgbouncer-deployment.yaml @@ -195,7 +195,7 @@ spec: {{- if $containerLifecycleHooksMetricsExporter }} lifecycle: {{- tpl (toYaml $containerLifecycleHooksMetricsExporter) . | nindent 12 }} {{- end }} - {{- if or .Values.pgbouncer.metricsExporterSidecar.extraVolumeMounts }} + {{- if .Values.pgbouncer.metricsExporterSidecar.extraVolumeMounts }} volumeMounts: {{- tpl (toYaml .Values.pgbouncer.metricsExporterSidecar.extraVolumeMounts) . | nindent 12 }} {{- end}} diff --git a/chart/values.schema.json b/chart/values.schema.json index e6f5e95483f74..ea4a6abdc86e6 100644 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -7085,7 +7085,7 @@ "default": null }, "mountConfigSecret": { - "description": "Whether to mount the config secret files at a default location (/etc/pgbouncer/*).", + "description": "Whether to mount the config secret files under /etc/pgbouncer/ by default.", "type": "boolean", "x-docsSection": "Common", "default": true diff --git a/helm_tests/other/test_pgbouncer.py b/helm_tests/other/test_pgbouncer.py index d94d742684972..5b24857e2ed15 100644 --- a/helm_tests/other/test_pgbouncer.py +++ b/helm_tests/other/test_pgbouncer.py @@ -738,10 +738,12 @@ def test_unused_secret_key(self): } def test_extra_volume_mounts(self): - extra_volume_mounts = [{ - "name": "test-volume", - "mountPath": "/mnt/test_volume", - }] + extra_volume_mounts = [ + { + "name": "test-volume", + "mountPath": "/mnt/test_volume", + } + ] docs = render_chart( "test-pgbouncer-stats", @@ -757,7 +759,9 @@ def test_extra_volume_mounts(self): show_only=["templates/pgbouncer/pgbouncer-deployment.yaml"], ) - assert jmespath.search("spec.template.spec.containers[1].volumeMounts", docs[0]) == extra_volume_mounts + assert ( + jmespath.search("spec.template.spec.containers[1].volumeMounts", docs[0]) == extra_volume_mounts + ) class TestPgBouncerServiceAccount: