Update livness probe to check for python process
This commit is contained in:
17
values.yaml
17
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
|
||||
|
Reference in New Issue
Block a user