Skip to content

Commit

Permalink
New: Make it posssible to configure helm probes
Browse files Browse the repository at this point in the history
  • Loading branch information
bokysan committed May 18, 2021
1 parent 97b9237 commit ef33ca9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 27 deletions.
29 changes: 3 additions & 26 deletions helm/mail/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,9 @@ spec:
- name: smtp
containerPort: 587
protocol: TCP
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 60
exec:
command:
- sh
- -c
- 'printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"'
livenessProbe:
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 1
exec:
command:
- sh
- -c
- 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"'
startupProbe:
initialDelaySeconds: 2
periodSeconds: 5
failureThreshold: 12
exec:
command:
- sh
- -c
- 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "{postfix-script}" && ps axf | fgrep -v grep | fgrep -q "{opendkim.sh}"'
readinessProbe: {{- toYaml .Values.readinessProbe | nindent 12 }}
livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }}
startupProbe: {{- toYaml .Values.startupProbe | nindent 12 }}
envFrom:
- configMapRef:
name: {{ $fullName | quote }}
Expand Down
32 changes: 31 additions & 1 deletion helm/mail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ container:

# Define data which should be stored in a Secret
# (and shared with the pod as environment variables)
# secret: {}
# secret:
# hello: world

config:
general: {}
Expand Down Expand Up @@ -103,3 +104,32 @@ persistence:
existingClaim: ""
size: 1Gi
storageClass: ""


readinessProbe:
initialDelaySeconds: 30
periodSeconds: 60
failureThreshold: 2
exec:
command:
- sh
- -c
- 'printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"'
livenessProbe:
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 2
exec:
command:
- sh
- -c
- 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"'
startupProbe:
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 12
exec:
command:
- sh
- -c
- 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "{postfix-script}" && ps axf | fgrep -v grep | fgrep -q "{opendkim.sh}"'

0 comments on commit ef33ca9

Please sign in to comment.