diff --git a/values.yaml b/values.yaml index 7d4109b..ce700c0 100644 --- a/values.yaml +++ b/values.yaml @@ -77,18 +77,34 @@ livenessProbe: command: - sh - -c - - pgrep -f "scouter.worker.worker" - initialDelaySeconds: 20 - periodSeconds: 30 + - | + APP_UP=$(curl -s http://localhost:9090/metrics | grep '^app_up{' | grep -o '[0-9]' | head -1) + if [ "$APP_UP" = "1" ]; then + exit 0 + else + exit 1 + fi + initialDelaySeconds: 30 + periodSeconds: 15 + timeoutSeconds: 5 + failureThreshold: 3 readinessProbe: exec: command: - sh - -c - - pgrep -f "scouter.worker.worker" - initialDelaySeconds: 10 - periodSeconds: 15 + - | + APP_UP=$(curl -s http://localhost:9090/metrics | grep '^app_up{' | grep -o '[0-9]' | head -1) + if [ "$APP_UP" = "1" ]; then + exit 0 + else + exit 1 + fi + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 2 # This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/