Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-postgres-exporter] Implement ability to define an existin… #5011

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-postgres-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "v0.16.0"
description: A Helm chart for prometheus postgres-exporter
name: prometheus-postgres-exporter
version: 6.5.0
version: 6.6.0
home: https://github.com/prometheus-community/postgres_exporter
sources:
- https://github.com/prometheus-community/postgres_exporter
Expand Down
10 changes: 8 additions & 2 deletions charts/prometheus-postgres-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.config.postgresExporter }}
{{- if or .Values.config.postgresExporter .Values.config.existingSecret.enabled }}
- name: postgres-exporter
mountPath: /etc/postgres_exporter.yml
subPath: postgres_exporter.yml
Expand Down Expand Up @@ -195,7 +195,13 @@ spec:
defaultMode: 420
name: {{ template "prometheus-postgres-exporter.fullname" . }}
name: postgres-exporter
{{- end }}
{{- else if .Values.config.existingSecret.enabled }}
- secret:
defaultMode: 420
secretName: {{ .Values.config.existingSecret.name }}
name: postgres-exporter
{{ end}}

{{- with .Values.extraVolumes }}
{{ toYaml . | nindent 6 }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/prometheus-postgres-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ config:
# options:
# sslmode: disable

# define an existing secret to be mounted as the config file
# needs to have the key 'postgres_exporter.yml'
existingSecret:
enabled: false
name: ""

nodeSelector: {}

tolerations: []
Expand Down