From 7fbf55aa7169d63cf39a5fb6a730bc29a040e990 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Sat, 20 Apr 2024 10:55:35 +0200 Subject: [PATCH] fix(common): improve probes There is a design mistake in the probe setup: Liveness probe: Stops the container on failure, this should happen AFTER readiness probe detects failure. Readiness Probe: Stops the service forwarding traffic. This should happen BEFORE the liveness probe detects failure Startup Probe: By having a tcp startup-probe, charts might pass CI when not fully working. or, worse, get passed-over to the readiness/liveness probes when the container is still doing maintenance work (such as plex database updates). Leading to it right-away being thrown-out by liveness/readyness --- library/common/values.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/library/common/values.yaml b/library/common/values.yaml index f051919e..888b165e 100644 --- a/library/common/values.yaml +++ b/library/common/values.yaml @@ -34,21 +34,21 @@ global: # -- Default probe timeouts probeTimeouts: liveness: - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 5 - successThreshold: 1 - readiness: - initialDelaySeconds: 10 - periodSeconds: 10 + initialDelaySeconds: 20 + periodSeconds: 15 timeoutSeconds: 5 failureThreshold: 5 successThreshold: 2 + readiness: + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 startup: initialDelaySeconds: 10 periodSeconds: 5 - timeoutSeconds: 2 + timeoutSeconds: 3 failureThreshold: 60 successThreshold: 1 # -- Define a postgresql version for CNPG @@ -200,7 +200,7 @@ workload: port: "{{ $.Values.service.main.ports.main.targetPort | default .Values.service.main.ports.main.port }}" startup: enabled: true - type: "tcp" + type: "{{ .Values.service.main.ports.main.protocol }}" port: "{{ $.Values.service.main.ports.main.targetPort | default .Values.service.main.ports.main.port }}" # -- Timezone used everywhere applicable