Commit 1a8540fa authored by Thomas Beermann's avatar Thomas Beermann
Browse files

add liveness and readiness probes

parent 03f61e21
......@@ -22,7 +22,34 @@ spec:
heritage: {{ .Release.Service }}
spec:
containers:
- env:
- name: cerebrum
image: {{ .Values.cerebrum.image.repository }}:{{ .Values.cerebrum.image.tag }}
imagePullPolicy: {{ .Values.cerebrum.image.pullPolicy }}
ports:
- containerPort: {{ .Values.cerebrum.service.targetPort }}
{{- if .Values.cerebrum.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: {{ .Values.cerebrum.service.targetPort }}
initialDelaySeconds: {{ .Values.cerebrum.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.cerebrum.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.cerebrum.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.cerebrum.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.cerebrum.livenessProbe.successThreshold }}
{{- end }}
{{- if .Values.cerebrum.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: {{ .Values.cerebrum.service.targetPort }}
initialDelaySeconds: {{ .Values.cerebrum.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.cerebrum.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.cerebrum.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.cerebrum.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.cerebrum.readinessProbe.successThreshold }}
{{- end }}
env:
{{- if .Values.cerebrum.config.mongodb.database }}
- name: MONGODB_DB
value: {{ .Values.cerebrum.config.mongodb.database | quote }}
......@@ -60,11 +87,6 @@ spec:
- name: CONTEXT_PATH
value: {{ .Values.cerebrum.config.contextPath | quote }}
{{- end }}
name: cerebrum
image: {{ .Values.cerebrum.image.repository }}:{{ .Values.cerebrum.image.tag }}
imagePullPolicy: {{ .Values.cerebrum.image.pullPolicy }}
ports:
- containerPort: {{ .Values.cerebrum.service.targetPort }}
resources:
{{ toYaml .Values.cerebrum.resources | indent 10 }}
{{- with .Values.cerebrum.nodeSelector }}
......
......@@ -27,6 +27,28 @@ spec:
imagePullPolicy: {{ .Values.webapp.image.pullPolicy }}
ports:
- containerPort: {{ .Values.webapp.service.targetPort }}
{{- if .Values.webapp.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: {{ .Values.webapp.service.targetPort }}
initialDelaySeconds: {{ .Values.webapp.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.webapp.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.webapp.livenessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.webapp.livenessProbe.failureThreshold }}
successThreshold: {{ .Values.webapp.livenessProbe.successThreshold }}
{{- end }}
{{- if .Values.webapp.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: {{ .Values.webapp.service.targetPort }}
initialDelaySeconds: {{ .Values.webapp.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.webapp.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.webapp.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.webapp.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.webapp.readinessProbe.successThreshold }}
{{- end }}
env:
- name: CLIENT_SECRET
valueFrom:
......
......@@ -15,6 +15,22 @@ cerebrum:
name: http
annotations: {}
livenessProbe:
enabled: true
initialDelaySeconds: 60
periodSeconds: 3
timeoutSeconds: 3
failureThreshold: 6
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
config:
mongodb:
host: helmholtz-mongo-mongodb
......@@ -57,6 +73,22 @@ webapp:
name: http
annotations: {}
livenessProbe:
enabled: true
initialDelaySeconds: 60
periodSeconds: 3
timeoutSeconds: 3
failureThreshold: 6
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
config:
contextPath: "/"
......
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