From 0ee92c7129ad4d4caf2d40fbf1a1ef1e1f307e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomislav=20Kopi=C4=87?= Date: Sat, 13 Sep 2025 15:40:47 +0200 Subject: [PATCH] Update livness probe to check for python process --- values.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/values.yaml b/values.yaml index b141025..1d302a9 100644 --- a/values.yaml +++ b/values.yaml @@ -53,25 +53,26 @@ podLabels: {} # Optional Kubernetes labels for pods podSecurityContext: {} # Pod-level security settings securityContext: {} # Container-level security settings -# Liveness probe to check if the miner process is running livenessProbe: exec: command: - /bin/sh - -c - - "pgrep -x duino-miner > /dev/null" - initialDelaySeconds: 30 # Delay before first check - periodSeconds: 60 # Check interval + # Check if any Python process is running (assumes your miner runs via Python) + # If no process is found, the command exits with a non-zero code → Kubernetes marks container as unhealthy + - "pidof python > /dev/null" + initialDelaySeconds: 30 # Wait 30 seconds before first check to allow the miner to start + periodSeconds: 60 # Check every 60 seconds -# Readiness probe to check if the miner is ready readinessProbe: exec: command: - /bin/sh - -c - - "pgrep -x duino-miner > /dev/null" - initialDelaySeconds: 10 # Delay before first check - periodSeconds: 30 # Check interval + # Same check as liveness: ensures a Python process is running before marking the pod ready + - "pidof python > /dev/null" + initialDelaySeconds: 10 # Wait 10 seconds before first check to allow container startup + periodSeconds: 30 # Check every 30 seconds # Volumes and mounts (if needed) volumes: [] # Define extra volumes here