From e54f07fd3f06364c89256bec15f111e34d0e989b Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 14 Mar 2021 22:13:11 +0000 Subject: [PATCH 1/5] Allow customising readiness and liveness probes for slow setups. --- charts/funkwhale/templates/deployment.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/charts/funkwhale/templates/deployment.yaml b/charts/funkwhale/templates/deployment.yaml index 6fbf379..5cb8e11 100644 --- a/charts/funkwhale/templates/deployment.yaml +++ b/charts/funkwhale/templates/deployment.yaml @@ -52,6 +52,9 @@ spec: command: - stat - /run/funkwhale/funkwhale.sock + failureThreshold: {{ .values.api.readinessProbe.failureThreshold | default 3 }} + periodSeconds: {{ .values.api.readinessProbe.periodSeconds | default 10 }} + initialDelaySeconds: {{ .values.api.readinessProbe.initialDelaySeconds | default 5 }} envFrom: - configMapRef: name: {{ include "funkwhale.fullname" . }} @@ -97,9 +100,15 @@ spec: httpGet: path: / port: http + failureThreshold: {{ .values.front.livenessProbe.failureThreshold | default 3 }} + periodSeconds: {{ .values.front.livenessProbe.periodSeconds | default 10 }} + initialDelaySeconds: {{ .values.front.livenessProbe.initialDelaySeconds | default 5 }} readinessProbe: tcpSocket: port: http + failureThreshold: {{ .values.front.readinessProbe.failureThreshold | default 3 }} + periodSeconds: {{ .values.front.readinessProbe.periodSeconds | default 10 }} + initialDelaySeconds: {{ .values.front.readinessProbe.initialDelaySeconds | default 5 }} volumeMounts: - mountPath: /run/funkwhale name: funkwhale-sock From 5b83a90e731154407785527a1a68b245389bc5c4 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 14 Mar 2021 22:19:26 +0000 Subject: [PATCH 2/5] Fix case on Value --- charts/funkwhale/templates/deployment.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/funkwhale/templates/deployment.yaml b/charts/funkwhale/templates/deployment.yaml index 5cb8e11..9229909 100644 --- a/charts/funkwhale/templates/deployment.yaml +++ b/charts/funkwhale/templates/deployment.yaml @@ -52,9 +52,9 @@ spec: command: - stat - /run/funkwhale/funkwhale.sock - failureThreshold: {{ .values.api.readinessProbe.failureThreshold | default 3 }} - periodSeconds: {{ .values.api.readinessProbe.periodSeconds | default 10 }} - initialDelaySeconds: {{ .values.api.readinessProbe.initialDelaySeconds | default 5 }} + failureThreshold: {{ .Values.api.readinessProbe.failureThreshold | default 3 }} + periodSeconds: {{ .Values.api.readinessProbe.periodSeconds | default 10 }} + initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds | default 5 }} envFrom: - configMapRef: name: {{ include "funkwhale.fullname" . }} @@ -100,15 +100,15 @@ spec: httpGet: path: / port: http - failureThreshold: {{ .values.front.livenessProbe.failureThreshold | default 3 }} - periodSeconds: {{ .values.front.livenessProbe.periodSeconds | default 10 }} - initialDelaySeconds: {{ .values.front.livenessProbe.initialDelaySeconds | default 5 }} + failureThreshold: {{ .Values.front.livenessProbe.failureThreshold | default 3 }} + periodSeconds: {{ .Values.front.livenessProbe.periodSeconds | default 10 }} + initialDelaySeconds: {{ .Values.front.livenessProbe.initialDelaySeconds | default 5 }} readinessProbe: tcpSocket: port: http - failureThreshold: {{ .values.front.readinessProbe.failureThreshold | default 3 }} - periodSeconds: {{ .values.front.readinessProbe.periodSeconds | default 10 }} - initialDelaySeconds: {{ .values.front.readinessProbe.initialDelaySeconds | default 5 }} + failureThreshold: {{ .Values.front.readinessProbe.failureThreshold | default 3 }} + periodSeconds: {{ .Values.front.readinessProbe.periodSeconds | default 10 }} + initialDelaySeconds: {{ .Values.front.readinessProbe.initialDelaySeconds | default 5 }} volumeMounts: - mountPath: /run/funkwhale name: funkwhale-sock From c78a0ac0fcc530ff547c005e56e4a8ca5e4b9e3c Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Thu, 18 Mar 2021 08:53:43 +0000 Subject: [PATCH 3/5] Add custom probes to default values --- charts/funkwhale/values.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 45e85c4..0799963 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -122,6 +122,8 @@ api: tolerations: [] affinity: {} + readinessProbe: {} + livenessProbe: {} front: image: @@ -153,6 +155,8 @@ front: tolerations: [] affinity: {} + readinessProbe: {} + livenessProbe: {} celery: beat: From cf8f81e87d145405d9224cc342550aa81487fea8 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Tue, 23 Mar 2021 23:17:26 +0000 Subject: [PATCH 4/5] Remove livenessProbe from api values, as there isn't one. --- charts/funkwhale/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 0e21573..d0aa05a 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -128,7 +128,6 @@ api: affinity: {} readinessProbe: {} - livenessProbe: {} front: image: From 2d666d597eff5bd15c9966bce431cb112595f35a Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Tue, 23 Mar 2021 23:27:22 +0000 Subject: [PATCH 5/5] Add customisable startup probes. --- charts/funkwhale/templates/deployment.yaml | 22 ++++++++++++++++++---- charts/funkwhale/values.yaml | 2 ++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/charts/funkwhale/templates/deployment.yaml b/charts/funkwhale/templates/deployment.yaml index 9229909..bd80a91 100644 --- a/charts/funkwhale/templates/deployment.yaml +++ b/charts/funkwhale/templates/deployment.yaml @@ -53,8 +53,16 @@ spec: - stat - /run/funkwhale/funkwhale.sock failureThreshold: {{ .Values.api.readinessProbe.failureThreshold | default 3 }} - periodSeconds: {{ .Values.api.readinessProbe.periodSeconds | default 10 }} + periodSeconds: {{ .Values.api.readinessProbe.periodSeconds | default 5 }} initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds | default 5 }} + startupProbe: + exec: + command: + - stat + - /run/funkwhale/funkwhale.sock + failureThreshold: {{ .Values.api.startupProbe.failureThreshold | default 3 }} + periodSeconds: {{ .Values.api.startupProbe.periodSeconds | default 20 }} + initialDelaySeconds: {{ .Values.api.startupProbe.initialDelaySeconds | default 5 }} envFrom: - configMapRef: name: {{ include "funkwhale.fullname" . }} @@ -101,14 +109,20 @@ spec: path: / port: http failureThreshold: {{ .Values.front.livenessProbe.failureThreshold | default 3 }} - periodSeconds: {{ .Values.front.livenessProbe.periodSeconds | default 10 }} - initialDelaySeconds: {{ .Values.front.livenessProbe.initialDelaySeconds | default 5 }} + periodSeconds: {{ .Values.front.livenessProbe.periodSeconds | default 20 }} + initialDelaySeconds: {{ .Values.front.livenessProbe.initialDelaySeconds | default 15 }} readinessProbe: tcpSocket: port: http failureThreshold: {{ .Values.front.readinessProbe.failureThreshold | default 3 }} - periodSeconds: {{ .Values.front.readinessProbe.periodSeconds | default 10 }} + periodSeconds: {{ .Values.front.readinessProbe.periodSeconds | default 5 }} initialDelaySeconds: {{ .Values.front.readinessProbe.initialDelaySeconds | default 5 }} + startupProbe: + tcpSocket: + port: http + failureThreshold: {{ .Values.front.startupProbe.failureThreshold | default 3 }} + periodSeconds: {{ .Values.front.startupProbe.periodSeconds | default 20 }} + initialDelaySeconds: {{ .Values.front.startupProbe.initialDelaySeconds | default 5 }} volumeMounts: - mountPath: /run/funkwhale name: funkwhale-sock diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index d0aa05a..345ef6c 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -128,6 +128,7 @@ api: affinity: {} readinessProbe: {} + startupProbe: {} front: image: @@ -161,6 +162,7 @@ front: affinity: {} readinessProbe: {} livenessProbe: {} + startupProbe: {} celery: beat: