From e54f07fd3f06364c89256bec15f111e34d0e989b Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 14 Mar 2021 22:13:11 +0000 Subject: [PATCH 01/15] 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 02/15] 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 03/15] 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 06e15afbacd20e0ea9914b6d2a44d00e7142e3ae Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Thu, 18 Mar 2021 08:58:50 +0000 Subject: [PATCH 04/15] Allow disabling the default Redis installation when a custom one is specified. --- charts/funkwhale/requirements.yaml | 1 + charts/funkwhale/values.yaml | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/funkwhale/requirements.yaml b/charts/funkwhale/requirements.yaml index 153994b..d1d204e 100644 --- a/charts/funkwhale/requirements.yaml +++ b/charts/funkwhale/requirements.yaml @@ -2,3 +2,4 @@ dependencies: - name: redis version: ~10.6.10 repository: https://charts.bitnami.com/bitnami + condition: redis.internal.enabled diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 45e85c4..4ee0c07 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -47,6 +47,13 @@ database: database: funkwhale redis: + password: funkwhale + redisPort: 6379 + host: {{ template "funkwhale.fullname" . }}-redis-master + # If you already have a Redis service you'd like to use, set + # this to false and adjust the host to use your existing service. + internal: + enabled: true cluster: enabled: false master: @@ -55,9 +62,6 @@ redis: slave: persistence: enabled: false - password: funkwhale - redisPort: 6379 - host: {{ template "funkwhale.fullname" . }}-redis-master djangoSecret: '' From 7d86a26e14ff7d57eeb585eedc2821c69b2ff715 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 21 Mar 2021 00:32:44 +0000 Subject: [PATCH 05/15] Update to using values.redis.enabled. --- charts/funkwhale/requirements.yaml | 2 +- charts/funkwhale/values.yaml | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/charts/funkwhale/requirements.yaml b/charts/funkwhale/requirements.yaml index d1d204e..894419e 100644 --- a/charts/funkwhale/requirements.yaml +++ b/charts/funkwhale/requirements.yaml @@ -2,4 +2,4 @@ dependencies: - name: redis version: ~10.6.10 repository: https://charts.bitnami.com/bitnami - condition: redis.internal.enabled + condition: redis.enabled diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 4ee0c07..14d4006 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -47,13 +47,14 @@ database: database: funkwhale redis: - password: funkwhale - redisPort: 6379 - host: {{ template "funkwhale.fullname" . }}-redis-master # If you already have a Redis service you'd like to use, set # this to false and adjust the host to use your existing service. - internal: - enabled: true + enabled: true + + host: {{ template "funkwhale.fullname" . }}-redis-master + redisPort: 6379 + password: funkwhale + cluster: enabled: false master: From 8406f013d961bcbdf42174cf92f4b120dc245ca7 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 21 Mar 2021 01:44:14 +0000 Subject: [PATCH 06/15] Fix disabling internal redis installation and validate state of redis.enabled and redis.host --- charts/funkwhale/templates/_helpers.tpl | 18 +++++++++++++----- charts/funkwhale/values.yaml | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/charts/funkwhale/templates/_helpers.tpl b/charts/funkwhale/templates/_helpers.tpl index 46d57eb..200ebd8 100644 --- a/charts/funkwhale/templates/_helpers.tpl +++ b/charts/funkwhale/templates/_helpers.tpl @@ -7,11 +7,7 @@ Expand the name of the chart. {{- end -}} {{- define "funkwhale.dbUrl" -}} -postgres://{{ .Values.database.user}}:{{ .Values.database.password }}@{{ .Values.database.host }}:{{ .Values.database.port }}/{{ .Values.database.database }} -{{- end -}} - -{{- define "funkwhale.redisUrl" -}} -redis://:{{ .Values.redis.password }}@{{ .Values.redis.host }}:{{ .Values.redis.redisPort }}/0 +postgres://{{ .Values.database.user }}:{{ .Values.database.password }}@{{ .Values.database.host }}:{{ .Values.database.port }}/{{ .Values.database.database }} {{- end -}} {{/* @@ -45,3 +41,15 @@ Create the correct image tag name {{- define "funkwhale.imageTag" -}} {{- .Values.image.tag | default .Chart.AppVersion -}} {{- end -}} + +{{- define "funkwhale.redisUrl" -}} +{{- if and .Values.redis.enabled .Values.redis.host -}} +{{ fail "Setting both redis.enabled and redis.host will deploy an internal Redis service and attempt to use an external one - please set only one of the two!" }} +{{- else if .Values.redis.enabled -}} +redis://:{{ .Values.redis.password }}@{{ template "funkwhale.fullname" . }}:{{ .Values.redis.redisPort }}/0 +{{- else if .Values.redis.host -}} +redis://:{{ .Values.redis.password }}@{{ .Values.redis.host }}:{{ .Values.redis.redisPort }}/0 +{{- else -}} +{{ fail "Either redis.enabled or redis.host are required!" }} +{{- end -}} +{{- end -}} diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 14d4006..3fc2efe 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -51,7 +51,7 @@ redis: # this to false and adjust the host to use your existing service. enabled: true - host: {{ template "funkwhale.fullname" . }}-redis-master + host: '' redisPort: 6379 password: funkwhale From dd260937ef63fa64a537c418a7948a285dc631fb Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 21 Mar 2021 02:14:45 +0000 Subject: [PATCH 07/15] Add comment specfying how to override the Redis image --- charts/funkwhale/values.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 3fc2efe..d22bb2f 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -51,6 +51,13 @@ redis: # this to false and adjust the host to use your existing service. enabled: true + # If you wan to run Redis on a Raspbery Pi or another ARM-based + # system, use the official Docker image instead of the Bitnami one + # as the Bitnami images are only available as amd64. + # image: + # repository: redis + # tag: 6.0.12 + host: '' redisPort: 6379 password: funkwhale From 83e98fcde01261af64a2904c8950b0a145c59019 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 21 Mar 2021 10:21:00 +0000 Subject: [PATCH 08/15] Remove comment about setting redis image to upstream for ARM compatibility for now. --- charts/funkwhale/values.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index d22bb2f..3fc2efe 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -51,13 +51,6 @@ redis: # this to false and adjust the host to use your existing service. enabled: true - # If you wan to run Redis on a Raspbery Pi or another ARM-based - # system, use the official Docker image instead of the Bitnami one - # as the Bitnami images are only available as amd64. - # image: - # repository: redis - # tag: 6.0.12 - host: '' redisPort: 6379 password: funkwhale From 094a76b6475e2619e6b40acfd6f70853a7911ec6 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 21 Mar 2021 12:26:31 +0000 Subject: [PATCH 09/15] Automatically generate random secrets for the redis password and django secret --- charts/funkwhale/templates/_helpers.tpl | 4 ++-- charts/funkwhale/templates/secret.yaml | 8 +++++++- charts/funkwhale/values.yaml | 11 ++++++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/charts/funkwhale/templates/_helpers.tpl b/charts/funkwhale/templates/_helpers.tpl index c3f3c9d..fbb92f1 100644 --- a/charts/funkwhale/templates/_helpers.tpl +++ b/charts/funkwhale/templates/_helpers.tpl @@ -7,11 +7,11 @@ Expand the name of the chart. {{- end -}} {{- define "funkwhale.dbUrl" -}} -postgres://{{ .Values.database.user}}:{{ .Values.database.password }}@{{ .Values.database.host }}:{{ .Values.database.port }}/{{ .Values.database.database }} +postgres://{{ .Values.database.user }}:{{ .Values.database.password }}@{{ .Values.database.host }}:{{ .Values.database.port }}/{{ .Values.database.database }} {{- end -}} {{- define "funkwhale.redisUrl" -}} -redis://:{{ .Values.redis.password }}@{{ .Values.redis.host | default (printf "%s-%s" (include "funkwhale.fullname" .) "redis-master") }}:{{ .Values.redis.redisPort }}/0 +redis://:{{ default uuidv4 .Values.redis.password }}@{{ .Values.redis.host | default (printf "%s-%s" (include "funkwhale.fullname" .) "redis-master") }}:{{ .Values.redis.redisPort }}/0 {{- end -}} {{/* diff --git a/charts/funkwhale/templates/secret.yaml b/charts/funkwhale/templates/secret.yaml index fbc05a1..dcfa3cf 100644 --- a/charts/funkwhale/templates/secret.yaml +++ b/charts/funkwhale/templates/secret.yaml @@ -1,3 +1,5 @@ +{{- $secret := (lookup "v1" "Secret" .Release.Namespace (include "funkwhale.fullname" .)) -}} + apiVersion: v1 kind: Secret metadata: @@ -10,7 +12,11 @@ metadata: data: CACHE_URL: {{ include "funkwhale.redisUrl" . | b64enc }} DATABASE_URL: {{ include "funkwhale.dbUrl" . | b64enc }} - DJANGO_SECRET_KEY: {{ .Values.djangoSecret | b64enc }} + {{ if $secret -}} + DJANGO_SECRET_KEY: {{ $secret.data.DJANGO_SECRET_KEY }} + {{ else -}} + DJANGO_SECRET_KEY: {{ (default uuidv4 .Values.djangoSecret) | b64enc }} + {{ end }} {{- range $key, $val := .Values.extraSecret }} {{ $key }}: {{ $val | b64enc }} diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index a0f9834..17e3940 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -47,6 +47,14 @@ database: database: funkwhale redis: + # If you already have a Redis service you'd like to use, set + # this to false and adjust the host to use your existing service. + enabled: true + + host: '' + redisPort: 6379 + password: '' + cluster: enabled: false master: @@ -55,9 +63,6 @@ redis: slave: persistence: enabled: false - password: funkwhale - redisPort: 6379 - # host: {{ template "funkwhale.fullname" . }}-redis-master djangoSecret: '' From e5ec464e0905abb6291d48bce3abbcabdc974ca6 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 21 Mar 2021 15:14:35 +0000 Subject: [PATCH 10/15] Fix merge. --- charts/funkwhale/templates/_helpers.tpl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/charts/funkwhale/templates/_helpers.tpl b/charts/funkwhale/templates/_helpers.tpl index cc016dc..5bf807d 100644 --- a/charts/funkwhale/templates/_helpers.tpl +++ b/charts/funkwhale/templates/_helpers.tpl @@ -10,10 +10,6 @@ Expand the name of the chart. postgres://{{ .Values.database.user }}:{{ .Values.database.password }}@{{ .Values.database.host }}:{{ .Values.database.port }}/{{ .Values.database.database }} {{- end -}} -{{- define "funkwhale.redisUrl" -}} -redis://:{{ .Values.redis.password }}@{{ .Values.redis.host | default (printf "%s-%s" (include "funkwhale.fullname" .) "redis-master") }}:{{ .Values.redis.redisPort }}/0 -{{- end -}} - {{/* Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). @@ -50,7 +46,7 @@ Create the correct image tag name {{- if and .Values.redis.enabled .Values.redis.host -}} {{ fail "Setting both redis.enabled and redis.host will deploy an internal Redis service and attempt to use an external one - please set only one of the two!" }} {{- else if .Values.redis.enabled -}} -redis://:{{ .Values.redis.password }}@{{ template "funkwhale.fullname" . }}:{{ .Values.redis.redisPort }}/0 +redis://:{{ .Values.redis.password }}@{{ template "funkwhale.fullname" . }}-redis-master:{{ .Values.redis.redisPort }}/0 {{- else if .Values.redis.host -}} redis://:{{ .Values.redis.password }}@{{ .Values.redis.host }}:{{ .Values.redis.redisPort }}/0 {{- else -}} From f3c1b188aca5cbf08669b88bd602b3292dc3e7d0 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 21 Mar 2021 22:27:25 +0000 Subject: [PATCH 11/15] Remove auto-generating Redis password. --- charts/funkwhale/templates/_helpers.tpl | 2 +- charts/funkwhale/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/funkwhale/templates/_helpers.tpl b/charts/funkwhale/templates/_helpers.tpl index fbb92f1..e6f5c7b 100644 --- a/charts/funkwhale/templates/_helpers.tpl +++ b/charts/funkwhale/templates/_helpers.tpl @@ -11,7 +11,7 @@ postgres://{{ .Values.database.user }}:{{ .Values.database.password }}@{{ .Value {{- end -}} {{- define "funkwhale.redisUrl" -}} -redis://:{{ default uuidv4 .Values.redis.password }}@{{ .Values.redis.host | default (printf "%s-%s" (include "funkwhale.fullname" .) "redis-master") }}:{{ .Values.redis.redisPort }}/0 +redis://:{{ .Values.redis.password }}@{{ .Values.redis.host | default (printf "%s-%s" (include "funkwhale.fullname" .) "redis-master") }}:{{ .Values.redis.redisPort }}/0 {{- end -}} {{/* diff --git a/charts/funkwhale/values.yaml b/charts/funkwhale/values.yaml index 17e3940..3f217a5 100644 --- a/charts/funkwhale/values.yaml +++ b/charts/funkwhale/values.yaml @@ -53,7 +53,7 @@ redis: host: '' redisPort: 6379 - password: '' + password: 'funkwhale' cluster: enabled: false From ef73f557813ebeccaa60f2053890bea51d82dd41 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Mon, 22 Mar 2021 23:52:05 +0000 Subject: [PATCH 12/15] Switch to filter syntax for djangoSecret default --- charts/funkwhale/templates/secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/funkwhale/templates/secret.yaml b/charts/funkwhale/templates/secret.yaml index dcfa3cf..77f68a6 100644 --- a/charts/funkwhale/templates/secret.yaml +++ b/charts/funkwhale/templates/secret.yaml @@ -15,7 +15,7 @@ data: {{ if $secret -}} DJANGO_SECRET_KEY: {{ $secret.data.DJANGO_SECRET_KEY }} {{ else -}} - DJANGO_SECRET_KEY: {{ (default uuidv4 .Values.djangoSecret) | b64enc }} + DJANGO_SECRET_KEY: {{ (.Values.djangoSecret | default uuidv4) | b64enc }} {{ end }} {{- range $key, $val := .Values.extraSecret }} From a3e99f6601a4d48a200fe9f602ff7091d5831c24 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 23 Mar 2021 11:32:55 +0100 Subject: [PATCH 13/15] matrix-synapse: Update example values for jemalloc --- charts/matrix-synapse/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index 54483a3..cb38ddb 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -159,8 +159,8 @@ synapse: ## Additional environment variables to apply to the main Synapse pod ## extraEnv: {} - # - name: USE_JEMALLOC - # value: "1" + # - name: LD_PRELOAD + # value: /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 # - name: SYNAPSE_CACHE_FACTOR # value: "2" @@ -263,8 +263,8 @@ workers: ## Additional environment variables to add to the worker. ## extraEnv: {} - # - name: USE_JEMALLOC - # value: "1" + # - name: LD_PRELOAD + # value: /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 # - name: SYNAPSE_CACHE_FACTOR # value: "1.0" From cf8f81e87d145405d9224cc342550aa81487fea8 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Tue, 23 Mar 2021 23:17:26 +0000 Subject: [PATCH 14/15] 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 15/15] 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: