From 047c1eb3bc12a3628af9abfc011a05dfb6a536ce Mon Sep 17 00:00:00 2001 From: LecygneNoir Date: Fri, 2 Apr 2021 09:56:32 +0200 Subject: [PATCH] Add startupProbe (used in k8s1.16+) with very large FailureThreshold. Objective is to absolutely avoid peertube to be killed during an upgrade process. For normal start, there is no delay as StartupProbe will quuickly see everything are Ok --- templates/deployment.yaml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 41bdf80..80199d3 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -61,6 +61,13 @@ spec: - name: http containerPort: {{ .Values.ports.nginxproxyPort }} protocol: TCP + startupProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 300 + failureThreshold: 30 + periodSeconds: 10 livenessProbe: httpGet: path: / @@ -93,16 +100,27 @@ spec: containerPort: {{ .Values.ports.livePort }} protocol: TCP {{- end }} + startupProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 300 + failureThreshold: 3000 + periodSeconds: 10 livenessProbe: httpGet: path: / port: 9000 - initialDelaySeconds: 60 + initialDelaySeconds: 600 + failureThreshold: 3 + periodSeconds: 10 readinessProbe: httpGet: path: / port: 9000 - initialDelaySeconds: 60 + initialDelaySeconds: 300 + failureThreshold: 3 + periodSeconds: 10 {{- else }} ports: - name: http @@ -113,16 +131,27 @@ spec: containerPort: {{ .Values.ports.livePort }} protocol: TCP {{- end }} + startupProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 300 + failureThreshold: 3000 + periodSeconds: 10 livenessProbe: httpGet: path: / port: http - initialDelaySeconds: 60 + initialDelaySeconds: 600 + failureThreshold: 3 + periodSeconds: 10 readinessProbe: httpGet: path: / port: http - initialDelaySeconds: 60 + initialDelaySeconds: 300 + failureThreshold: 3 + periodSeconds: 10 {{- end }} command: - gosu