diff --git a/chart/templates/pgbouncer/pgbouncer-deployment.yaml b/chart/templates/pgbouncer/pgbouncer-deployment.yaml index 85517a8409ed1..682a858f69def 100644 --- a/chart/templates/pgbouncer/pgbouncer-deployment.yaml +++ b/chart/templates/pgbouncer/pgbouncer-deployment.yaml @@ -202,7 +202,7 @@ spec: {{- if .Values.pgbouncer.extraContainers }} {{- tpl (toYaml .Values.pgbouncer.extraContainers) . | nindent 8 }} {{- end }} - {{- if or .Values.pgbouncer.mountConfigSecret Values.pgbouncer.ssl.ca .Values.pgbouncer.ssl.cert .Values.pgbouncer.ssl.key .Values.volumes .Values.pgbouncer.extraVolumes }} + {{- if or .Values.pgbouncer.mountConfigSecret .Values.pgbouncer.ssl.ca .Values.pgbouncer.ssl.cert .Values.pgbouncer.ssl.key .Values.volumes .Values.pgbouncer.extraVolumes }} volumes: {{- if .Values.pgbouncer.mountConfigSecret }} - name: pgbouncer-config diff --git a/chart/values.schema.json b/chart/values.schema.json index ea4a6abdc86e6..38b54bbfa2d0d 100644 --- a/chart/values.schema.json +++ b/chart/values.schema.json @@ -7022,7 +7022,7 @@ } }, "labels": { - "description": "Labels to add to the pgbouncer objects and pods.", + "description": "Labels to add to the PgBouncer objects and pods.", "type": "object", "default": {}, "additionalProperties": { @@ -7085,7 +7085,7 @@ "default": null }, "mountConfigSecret": { - "description": "Whether to mount the config secret files under /etc/pgbouncer/ by default.", + "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 5b24857e2ed15..3912b8314b95e 100644 --- a/helm_tests/other/test_pgbouncer.py +++ b/helm_tests/other/test_pgbouncer.py @@ -410,8 +410,8 @@ def test_should_add_component_specific_labels(self): }, show_only=["templates/pgbouncer/pgbouncer-deployment.yaml"], ) - assert "labels" in jmespath.search("metadata", docs[0]) - assert jmespath.search("metadata.labels", docs[0])["test_label"] == "test_label_value" + assert "labels" in jmespath.search("spec.template.metadata", docs[0]) + assert jmespath.search("spec.template.metadata.labels", docs[0])["test_label"] == "test_label_value" class TestPgbouncerConfig: @@ -620,7 +620,8 @@ def test_no_config_secret_mount(self): ) spec = jmespath.search("spec.template.spec", docs[0]) - assert spec is not None and "volumes" not in spec + assert spec is not None + assert "volumes" not in spec class TestPgbouncerExporter: