diff --git a/Dockerfile b/Dockerfile index 235e4d4..dbcb532 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,7 +47,7 @@ VOLUME [ "/var/spool/postfix", "/etc/postfix", "/etc/opendkim/keys" ] USER root WORKDIR /tmp -HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD printf "EHLO healthcheck\n" | nc localhost 587 | grep -qE "^220.*ESMTP Postfix" +HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix" EXPOSE 587 CMD [ "/bin/sh", "-c", "/run.sh" ] diff --git a/helm/mail/templates/statefulset.yaml b/helm/mail/templates/statefulset.yaml index 92ded49..9094a12 100644 --- a/helm/mail/templates/statefulset.yaml +++ b/helm/mail/templates/statefulset.yaml @@ -65,20 +65,29 @@ spec: readinessProbe: initialDelaySeconds: 5 periodSeconds: 60 - command: > - sh -c 'printf "EHLO healthcheck\n" | nc localhost 587 | grep -qE "^220.*ESMTP Postfix"' + 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 - command: > - sh -c 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"' + 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 - 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}"' + 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}"' envFrom: - configMapRef: name: {{ $fullName | quote }}