mirror of
https://github.com/bokysan/docker-postfix.git
synced 2025-09-10 08:25:38 +08:00
Replace localhost with 127.0.0.1 for healthcheck (#50)
Additionally change the commands in the pod probes from a single string to a list of strings.
This commit is contained in:
parent
9f66388199
commit
a956398b37
2 changed files with 16 additions and 7 deletions
|
@ -47,7 +47,7 @@ VOLUME [ "/var/spool/postfix", "/etc/postfix", "/etc/opendkim/keys" ]
|
||||||
USER root
|
USER root
|
||||||
WORKDIR /tmp
|
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
|
EXPOSE 587
|
||||||
CMD [ "/bin/sh", "-c", "/run.sh" ]
|
CMD [ "/bin/sh", "-c", "/run.sh" ]
|
||||||
|
|
|
@ -65,20 +65,29 @@ spec:
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 60
|
periodSeconds: 60
|
||||||
command: >
|
exec:
|
||||||
sh -c 'printf "EHLO healthcheck\n" | nc localhost 587 | grep -qE "^220.*ESMTP Postfix"'
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- 'printf "EHLO healthcheck\n" | nc 127.0.0.1 587 | grep -qE "^220.*ESMTP Postfix"'
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
failureThreshold: 1
|
failureThreshold: 1
|
||||||
command: >
|
exec:
|
||||||
sh -c 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"'
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- 'ps axf | fgrep -v grep | fgrep -q "{supervisord}" && ps axf | fgrep -v grep | fgrep -q "/usr/libexec/postfix/master"'
|
||||||
startupProbe:
|
startupProbe:
|
||||||
initialDelaySeconds: 2
|
initialDelaySeconds: 2
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
failureThreshold: 12
|
failureThreshold: 12
|
||||||
command: >
|
exec:
|
||||||
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}"'
|
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:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: {{ $fullName | quote }}
|
name: {{ $fullName | quote }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue