Skip to content

Commit

Permalink
Fix: helm template fixes for prometheus monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed Oct 27, 2023
1 parent bcf7dcb commit 3370a9d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions helm/mail/templates/configmap-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions helm/mail/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
7 changes: 7 additions & 0 deletions helm/mail/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 3370a9d

Please sign in to comment.