Commit 5e19a47f authored by Sandro Mathys's avatar Sandro Mathys
Browse files

make livenessProve and readinessProbe configurable

parent 522b236f
......@@ -65,6 +65,14 @@ spec:
image: "{{ include "shibboleth-sp.backend.image" . }}"
imagePullPolicy: "{{ include "shibboleth-sp.backend.imagePullPolicy" . }}"
command: ["shibd", "-t"]
{{- if .Values.backend.readinessProbe }}
readinessProbe:
{{ .Values.backend.readinessProbe | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.backend.livenessProbe }}
livenessProbe:
{{ .Values.backend.livenessProbe | toYaml | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.backend.resources | nindent 12 }}
volumeMounts:
......@@ -198,22 +206,18 @@ spec:
- name: apache
containerPort: 8080
protocol: TCP
{{- if .Values.frontend.workaround.readinessProbe.enabled }}
{{- if .Values.frontend.readinessProbe }}
readinessProbe:
httpGet:
scheme: HTTP
port: apache
# will also return HTTP 500 if shibboleth backend is dead
path: /
initialDelaySeconds: 10
periodSeconds: 10
{{- .Values.frontend.readinessProbe | toYaml | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.frontend.workaround.livenessProbe.enabled }}
{{- if .Values.frontend.livenessProbe }}
livenessProbe:
httpGet:
scheme: HTTP
port: apache
# will counter-intuitively return HTTP 200 even if shibboleth backend is dead
path: /Shibboleth.sso/Session
initialDelaySeconds: 10
periodSeconds: 10
{{- .Values.frontend.livenessProbe | toYaml | nindent 12 }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.frontend.resources | nindent 12 }}
volumeMounts:
......
......@@ -107,6 +107,9 @@ backend:
drop:
- all
readinessProbe: {}
livenessProbe: {}
resources: {}
# requests:
# cpu:
......@@ -226,6 +229,42 @@ frontend:
drop:
- all
# overwriting this is not currently possible, but a fix seems close to merging, see:
# https://github.com/helm/helm/issues/9136
# https://github.com/helm/helm/pull/9138
# It might be possible to overwrite it on the command line with --set
readinessProbe:
httpGet:
scheme: HTTP
port: apache
# will also return HTTP 500 if shibboleth backend is dead
path: /
initialDelaySeconds: 10
periodSeconds: 10
# Overwriting this is not currently possible, but a fix seems close to merging, see:
# https://github.com/helm/helm/issues/9136
# https://github.com/helm/helm/pull/9138
# It might be possible to overwrite it on the command line with --set
livenessProbe:
httpGet:
scheme: HTTP
port: apache
# will counter-intuitively return HTTP 200 even if shibboleth backend is dead
path: /Shibboleth.sso/Session
initialDelaySeconds: 10
periodSeconds: 10
# TODO: remove when the issue mentioned above is fixed
# TODO: also remove related code in templates/deployment.yaml
# Enables / disables the livenessProbe and readinessProbe.
# Will be removed in future.
workaround:
readinessProbe:
enabled: true
livenessProbe:
enabled: true
resources: {}
# requests:
# cpu:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment