Fix: helm template fixes for prometheus monitoring

This commit is contained in:
Bojan Čekrlić 2023-10-27 16:02:32 +02:00
parent bcf7dcbfcb
commit 3370a9d1bc
3 changed files with 11 additions and 5 deletions

View file

@ -12,8 +12,10 @@ metadata:
data:
logrotate.conf: | {{- index .Values.metrics.logrotate "logrotate.conf" | nindent 4 }}
maillog.conf: |
template(name="metricslog" type="string" string={{ .Values.metrics.path | quote }})
action(type="omfile" DynaFile="metricslog" template="plain" DirCreateMode="0755" FileCreateMode="0644")
template(name="metricslog" type="string" string={{ .Values.metrics.maillog | quote }})
if ($syslogfacility == '2') or ($programname == 'postfix') then {
action(type="omfile" DynaFile="metricslog" template="plain" DirCreateMode="0755" FileCreateMode="0644")
}
---
apiVersion: v1
kind: ConfigMap

View file

@ -13,9 +13,6 @@ data:
{{- range $key, $value := .Values.config.postfix }}
POSTFIX_{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.metrics.enabled }}
POSTFIX_maillog_file: {{ .Values.metrics.maillog }}
{{- end }}
{{- range $key, $value := .Values.config.opendkim }}
OPENDKIM_{{ $key }}: {{ $value | quote }}
{{- end }}

View file

@ -159,6 +159,13 @@ spec:
- name: {{ $fullName | quote }}
mountPath: {{ regexFind "^/?.*/" .Values.metrics.maillog | quote }}
subPath: logs
startupProbe:
httpGet:
path: {{ .Values.metrics.path | quote }}
port: {{ .Values.metrics.port }}
initialDelaySeconds: 5
failureThreshold: 15
periodSeconds: 2
readinessProbe:
httpGet:
path: {{ .Values.metrics.path | quote }}