diff --git a/charts/cluster/templates/cluster.yaml b/charts/cluster/templates/cluster.yaml index 492be6c9c1..fd3b358c62 100644 --- a/charts/cluster/templates/cluster.yaml +++ b/charts/cluster/templates/cluster.yaml @@ -75,6 +75,12 @@ spec: - name: {{ include "cluster.fullname" . }}-monitoring key: custom-queries {{- end }} + {{- if not (empty .Values.cluster.monitoring.customQueriesSecret) }} + {{- with .Values.cluster.monitoring.customQueriesSecret }} + customQueriesSecret: + {{- toYaml . | nindent 6 }} + {{ end }} + {{- end }} {{- if not (empty .Values.cluster.monitoring.podMonitor.relabelings) }} {{- with .Values.cluster.monitoring.podMonitor.relabelings }} podMonitorRelabelings: diff --git a/charts/cluster/values.schema.json b/charts/cluster/values.schema.json index 73a28104de..1a481e935c 100644 --- a/charts/cluster/values.schema.json +++ b/charts/cluster/values.schema.json @@ -211,6 +211,9 @@ "disableDefaultQueries": { "type": "boolean" }, + "customQueriesSecret": { + "type": "array" + }, "customQueries": { "type": "array" }, diff --git a/charts/cluster/values.yaml b/charts/cluster/values.yaml index b2150fdfdf..adef3e6c77 100644 --- a/charts/cluster/values.yaml +++ b/charts/cluster/values.yaml @@ -198,6 +198,10 @@ cluster: # - ratio: # usage: GAUGE # description: "Cache hit ratio" + # -- The list of secrets containing the custom queries + customQueriesSecret: [] + # - name: custom-queries-secret + # key: custom-queries # -- Configuration of the PostgreSQL server. # See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-PostgresConfiguration