Skip to content

Commit e260fd7

Browse files
jmoodyCopilot
andauthored
add startupProbe to account for long warmup time and tune the readiness probe (#60383)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 54eb7ba commit e260fd7

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

config/kubernetes/default/deployments/webapp.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,18 @@ spec:
6565
preStop:
6666
exec:
6767
command: ['sleep', '5']
68-
readinessProbe:
68+
startupProbe:
69+
httpGet:
70+
path: /healthcheck
71+
port: http
6972
initialDelaySeconds: 5
73+
periodSeconds: 5
74+
failureThreshold: 12
75+
timeoutSeconds: 5
76+
readinessProbe:
77+
timeoutSeconds: 5
78+
periodSeconds: 10
79+
failureThreshold: 3
7080
httpGet:
71-
# WARNING: This should be updated to a meaningful endpoint for your application which will return a 200 once the app is fully started.
72-
# See: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes
7381
path: /healthcheck
7482
port: http

config/kubernetes/production/deployments/webapp.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,18 @@ spec:
6868
preStop:
6969
exec:
7070
command: ['sleep', '5']
71-
readinessProbe:
71+
startupProbe:
72+
httpGet:
73+
path: /healthcheck
74+
port: http
7275
initialDelaySeconds: 5
76+
periodSeconds: 5
77+
failureThreshold: 12
78+
timeoutSeconds: 5
79+
readinessProbe:
80+
timeoutSeconds: 5
81+
periodSeconds: 10
82+
failureThreshold: 3
7383
httpGet:
74-
# WARNING: This should be updated to a meaningful endpoint for your application which will return a 200 once the app is fully started.
75-
# See: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes
7684
path: /healthcheck
7785
port: http

0 commit comments

Comments
 (0)