Skip to content

Commit

Permalink
[prometheus-postgres-exporter] support custom TLS config (#4941)
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Pesch <[email protected]>
  • Loading branch information
volker-raschek authored Oct 27, 2024
1 parent cffb758 commit 4c4ae43
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 12 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.15.0"
description: A Helm chart for prometheus postgres-exporter
name: prometheus-postgres-exporter
version: 6.3.1
version: 6.4.0
home: https://github.com/prometheus-community/postgres_exporter
sources:
- https://github.com/prometheus-community/postgres_exporter
Expand Down
16 changes: 6 additions & 10 deletions charts/prometheus-postgres-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,14 @@ spec:
- name: http
containerPort: {{ .Values.service.targetPort }}
protocol: TCP
{{- with .Values.livenessProbe }}
livenessProbe:
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
httpGet:
path: /
port: http
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
httpGet:
path: /
port: http
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.securityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ spec:
{{- if .Values.serviceMonitor.telemetryPath }}
path: {{ .Values.serviceMonitor.telemetryPath }}
{{- end }}
{{- if .Values.serviceMonitor.scheme }}
scheme: {{ .Values.serviceMonitor.scheme }}
{{- end }}
{{- if .Values.serviceMonitor.timeout }}
scrapeTimeout: {{ .Values.serviceMonitor.timeout }}
{{- end }}
Expand All @@ -30,6 +33,10 @@ spec:
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .Values.serviceMonitor.relabelings | nindent 4 }}
{{- end }}
{{- with .Values.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml . | nindent 6 }}
{{- end }}
jobLabel: {{ template "prometheus-postgres-exporter.fullname" . }}
namespaceSelector:
Expand Down
18 changes: 17 additions & 1 deletion charts/prometheus-postgres-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ serviceMonitor:
# metricRelabelings: []
# Set relabel_configs as per https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
# relabelings: []
# HTTP scheme to use for scraping. For example `http` or `https`. Default is `http`.
# scheme: http
# TLS configuration to use when scraping the metric endpoint by Prometheus.
# tlsConfig: {}

prometheusRule:
enabled: false
Expand Down Expand Up @@ -195,13 +199,25 @@ annotations: {}

podLabels: {}

# Configurable health checks
# Configurable probes. If TLS client authentication is enabled at the exporter, TCP probe must be used.
livenessProbe:
initialDelaySeconds: 0
httpGet:
path: /
port: http
scheme: HTTP
# tcpSocket:
# port: http
timeoutSeconds: 3

readinessProbe:
initialDelaySeconds: 0
httpGet:
path: /
port: http
scheme: HTTP
# tcpSocket:
# port: http
timeoutSeconds: 1

# Labels and annotations to attach to the deployment resource
Expand Down

0 comments on commit 4c4ae43

Please sign in to comment.