diff --git a/charts/pgbouncer/Chart.yaml b/charts/pgbouncer/Chart.yaml index f86f83b..7871293 100644 --- a/charts/pgbouncer/Chart.yaml +++ b/charts/pgbouncer/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: pgbouncer description: A Helm chart for deploying PgBouncer, a PostgreSQL connection pooler, on Kubernetes type: application -version: 3.1.0 +version: 3.1.1 appVersion: 1.24.1 kubeVersion: ">= 1.22.0-0" icon: https://icoretech.github.io/helm/charts/pgbouncer/logo.png diff --git a/charts/pgbouncer/templates/deployment.yaml b/charts/pgbouncer/templates/deployment.yaml index b211936..fec5446 100644 --- a/charts/pgbouncer/templates/deployment.yaml +++ b/charts/pgbouncer/templates/deployment.yaml @@ -144,13 +144,13 @@ spec: - name: PGBOUNCER_USER valueFrom: secretKeyRef: - name: {{ .Values.config.existingAdminSecret | default (printf "%s-secret" (include "pgbouncer.fullname" .)) }} - key: {{ .Values.config.adminUserKey | default "adminUser" }} + name: {{ .Values.pgbouncerExporter.config.existingStatsSecret | default (printf "%s-secret" (include "pgbouncer.fullname" .)) }} + key: {{ .Values.pgbouncerExporter.config.statsUserKey | default "adminUser" }} - name: PGBOUNCER_PASS valueFrom: secretKeyRef: - name: {{ .Values.config.existingAdminSecret | default (printf "%s-secret" (include "pgbouncer.fullname" .)) }} - key: {{ .Values.config.adminPasswordKey | default "adminPassword" }} + name: {{ .Values.pgbouncerExporter.config.existingStatsSecret | default (printf "%s-secret" (include "pgbouncer.fullname" .)) }} + key: {{ .Values.pgbouncerExporter.config.statsPasswordKey | default "adminPassword" }} {{- if .Values.pgbouncerExporter.resources }} resources: {{ toYaml .Values.pgbouncerExporter.resources | trimSuffix "\n" | nindent 10 }} {{- end }} diff --git a/charts/pgbouncer/values.yaml b/charts/pgbouncer/values.yaml index c28d147..455b8b2 100644 --- a/charts/pgbouncer/values.yaml +++ b/charts/pgbouncer/values.yaml @@ -254,6 +254,22 @@ pgbouncerExporter: # -- Exporter log format (logfmt or json) format: logfmt # -- Resource requests and limits for the exporter container. + config: + # -- If set, reference this existing Secret name instead. + existingStatsSecret: "pgbouncer-stats-user" + + # -- The key in the existingStatsSecret that corresponds to the admin username. + statsUserKey: statsUser + + # -- The key in the existingStatsSecret that corresponds to the admin password. + statsPasswordKey: statsPassword + + # -- If no existingStatsSecret is used, this admin username is placed in a new Secret. + statsUser: {{ .Values.config.adminUser }} + + # -- If no existingStatsSecret is used, this admin password is placed in a new Secret. + statsPassword: {{ .Values.config.adminPassword }} + resources: limits: cpu: 250m