doc(README): adapt warning blockquote
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-11-25 23:17:33 +01:00
parent 7d02c5f7b3
commit 98fe8fe2a4
4 changed files with 98 additions and 7 deletions

View File

@ -50,10 +50,9 @@
{{- end }}
{{/* volumeMounts */}}
{{- define "prometheus-postgres-exporter.deployment.volumeMounts" -}}
{{- $volumeMounts := dict "volumeMounts" (.Values.deployment.postgresExporter.volumeMounts | default (list) ) }}
{{- $volumeMounts = merge $volumeMounts (dict "volumeMounts" (list (dict "name" "exporter-config" "mountPath" "/etc/prometheus-postgres-exporter/config.d" ))) }}
{{- $volumeMounts = merge $volumeMounts (dict "volumeMounts" (list (dict "name" "config.d" "mountPath" "/etc/prometheus-postgres-exporter/config.d" ))) }}
{{ toYaml $volumeMounts }}
{{- end -}}
@ -61,10 +60,18 @@
{{- define "prometheus-postgres-exporter.deployment.volumes" -}}
{{- $volumes := dict "volumes" (.Values.deployment.volumes | default (list) ) }}
{{- $secretName := .Values.config.exporterConfig.existingSecret.secretName -}}
{{- if not .Values.config.exporterConfig.existingSecret.enabled }}
{{- if and (not .Values.config.exporterConfig.existingSecret.enabled) (not .Values.config.webConfig.existingSecret.enabled) (not .Values.config.webConfig.secret.webConfig) }}
{{- $secretName = printf "%s-exporter-config" (include "prometheus-postgres-exporter.fullname" . ) }}
{{- $volumes = merge $volumes (dict "volumes" (list (dict "name" "config.d" "secret" (dict "secretName" $secretName)))) }}
{{- end }}
{{- if and (not .Values.config.exporterConfig.existingSecret.enabled) (or .Values.config.webConfig.existingSecret.enabled .Values.config.webConfig.secret.webConfig) }}
{{- $exporterConfigSecretName = .Values.config.exporterConfig.existingSecret.secretName }}
{{- $webConfigSecretName = .Values.config.webConfig.existingSecret.secretName }}
{{- if -}}
{{- end }}
{{- $volumes = merge $volumes (dict "volumes" (list (dict "name" "exporter-config" "secret" (dict "secretName" $secretName)))) }}
{{ toYaml $volumes }}
{{- end -}}

View File

@ -23,7 +23,12 @@ spec:
containers:
- name: postgres-exporter
args:
{{- if or .Values.config.exporterConfig.existingSecret.enabled .Values.config.exporterConfig.secret.exporterConfig }}
- "--config.file=/etc/prometheus-postgres-exporter/config.d/exporterConfig.yaml"
{{- end }}
{{- if or .Values.config.webConfig.existingSecret.enabled .Values.config.webConfig.secret.webConfig }}
- "--web.config.file=/etc/prometheus-postgres-exporter/config.d/webConfig.yaml"
{{- end }}
- "--web.listen-address=:9187"
{{- range .Values.deployment.postgresExporter.args }}
- {{ . | quote }}