Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve healtchecks #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mailu/templates/fetchmail/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@ spec:
command:
- sh
- -c
- 'ps ax | grep [/]fetchmail.py'
- 'ps ax | grep [/]fetchmail.py && df'
{{- end }}
{{- if .Values.fetchmail.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.fetchmail.livenessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- 'ps ax | grep [/]fetchmail.py'
- 'ps ax | grep [/]fetchmail.py && df'
{{- end }}
{{- if .Values.fetchmail.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.fetchmail.readinessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- 'ps ax | grep [/]fetchmail.py'
- 'ps ax | grep [/]fetchmail.py && df'
{{- end }}
volumes:
- name: data
Expand Down
6 changes: 3 additions & 3 deletions mailu/templates/oletools/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@ spec:
command:
- sh
- -c
- 'echo PING|nc -q1 localhost 11343|grep PONG'
- 'echo PING|nc -q1 localhost 11343|grep PONG && df'
{{- end }}
{{- if .Values.oletools.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.oletools.livenessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- 'echo PING|nc -q1 localhost 11343|grep PONG'
- 'echo PING|nc -q1 localhost 11343|grep PONG && df'
{{- end }}
{{- if .Values.oletools.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.oletools.readinessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- 'echo PING|nc -q1 localhost 11343|grep PONG'
- 'echo PING|nc -q1 localhost 11343|grep PONG && df'
{{- end }}
{{- if .Values.oletools.extraVolumes }}
volumes:
Expand Down
6 changes: 3 additions & 3 deletions mailu/templates/postfix/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,23 @@ spec:
command:
- sh
- -c
- '! /usr/libexec/postfix/master -t'
- '! /usr/libexec/postfix/master -t && df'
{{- end }}
{{- if .Values.postfix.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.postfix.livenessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- '! /usr/libexec/postfix/master -t'
- '! /usr/libexec/postfix/master -t && df'
{{- end }}
{{- if .Values.postfix.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.postfix.readinessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- '! /usr/libexec/postfix/master -t'
- '! /usr/libexec/postfix/master -t && df'
{{- end }}
volumes:
- name: data
Expand Down
24 changes: 15 additions & 9 deletions mailu/templates/rspamd/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,27 @@ spec:
{{- end }}
{{- if .Values.rspamd.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.rspamd.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: rspamd-http
exec:
command:
- /bin/sh
- -c
- 'curl --fail http://localhost:11334/ 2>&1 | grep "Rspamd" && df'
{{- end }}
{{- if .Values.rspamd.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.rspamd.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: rspamd-http
exec:
command:
- /bin/sh
- -c
- 'curl --fail http://localhost:11334/ 2>&1 | grep "Rspamd" && df'
{{- end }}
{{- if .Values.rspamd.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.rspamd.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: rspamd-http
exec:
command:
- /bin/sh
- -c
- 'curl --fail http://localhost:11334/ 2>&1 | grep "Rspamd" && df'
{{- end }}
volumes:
- name: data
Expand Down
6 changes: 3 additions & 3 deletions mailu/templates/webdav/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,23 @@ spec:
command:
- sh
- -c
- 'ps ax | grep [/]radicale.conf'
- 'ps ax | grep [/]radicale.conf && df'
{{- end }}
{{- if .Values.webdav.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.webdav.livenessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- 'ps ax | grep [/]radicale.conf'
- 'ps ax | grep [/]radicale.conf && df'
{{- end }}
{{- if .Values.webdav.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.webdav.readinessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- sh
- -c
- 'ps ax | grep [/]radicale.conf'
- 'ps ax | grep [/]radicale.conf && df'
{{- end }}
volumes:
- name: data
Expand Down
27 changes: 9 additions & 18 deletions mailu/templates/webmail/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,34 +107,25 @@ spec:
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.webmail.startupProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- curl
- -f
- -L
- -H
- 'User-Agent: health'
- "http://localhost/ping"
- sh
- -c
- 'curl -f -L -H "User-Agent: health" http://localhost/ping && df'
{{- end }}
{{- if .Values.webmail.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.webmail.livenessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- curl
- -f
- -L
- -H
- 'User-Agent: health'
- "http://localhost/ping"
- sh
- -c
- 'curl -f -L -H "User-Agent: health" http://localhost/ping && df'
{{- end }}
{{- if .Values.webmail.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.webmail.readinessProbe "enabled") "context" $) | nindent 12 }}
exec:
command:
- curl
- -f
- -L
- -H
- 'User-Agent: health'
- "http://localhost/ping"
- sh
- -c
- 'curl -f -L -H "User-Agent: health" http://localhost/ping && df'
{{- end }}
volumes:
- name: data
Expand Down