Skip to content

Commit

Permalink
Merge branch 'main' into prom-3.0
Browse files Browse the repository at this point in the history
Signed-off-by: zeritti <[email protected]>
  • Loading branch information
zeritti authored Nov 27, 2024
2 parents 9699689 + af068e7 commit 2ac44c2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
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
13 changes: 12 additions & 1 deletion charts/prometheus/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,16 @@ spec:
selector:
matchLabels:
{{- include "prometheus.server.matchLabels" . | nindent 6 }}
{{- toYaml $pdbSpec | nindent 2 }}
{{- if not (or (hasKey $pdbSpec "minAvailable") (hasKey $pdbSpec "maxUnavailable")) }}
maxUnavailable: 1
{{- end }}
{{- if hasKey $pdbSpec "minAvailable" }}
minAvailable: {{ $pdbSpec.minAvailable }}
{{- end }}
{{- if hasKey $pdbSpec "maxUnavailable" }}
maxUnavailable: {{ $pdbSpec.maxUnavailable }}
{{- end }}
{{- if hasKey $pdbSpec "unhealthyPodEvictionPolicy" }}
unhealthyPodEvictionPolicy: {{ $pdbSpec.unhealthyPodEvictionPolicy }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ server:
##
podDisruptionBudget:
enabled: false
maxUnavailable: 1
# maxUnavailable: 1
# minAvailable: 1
## unhealthyPodEvictionPolicy is available since 1.27.0 (beta)
## https://kubernetes.io/docs/tasks/run-application/configure-pdb/#unhealthy-pod-eviction-policy
Expand Down

0 comments on commit 2ac44c2

Please sign in to comment.