Skip to content

Commit 3028f66

Browse files
committed
Add startup probes and relax probe timings for CI stability
Add startupProbe to porch-server, porch-controllers, and function-runner to prevent premature pod kills during slow CI startup. Increase readiness failureThreshold and periodSeconds to tolerate transient delays. Also adds a livenessProbe to function-runner which previously had none. Signed-off-by: Fiachra Corcoran <fiachra.corcoran@est.tech>
1 parent 172e027 commit 3028f66

3 files changed

Lines changed: 44 additions & 11 deletions

File tree

deployments/porch/2-function-runner.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,34 @@ spec:
6767
- containerPort: 9464
6868
name: metrics
6969
# Add grpc readiness probe to ensure the cache is ready
70+
startupProbe:
71+
exec:
72+
command:
73+
- /home/nonroot/grpc-health-probe
74+
- -addr
75+
- localhost:9445
76+
initialDelaySeconds: 5
77+
periodSeconds: 5
78+
failureThreshold: 30
7079
readinessProbe:
7180
exec:
7281
command:
7382
- /home/nonroot/grpc-health-probe
7483
- -addr
7584
- localhost:9445
85+
periodSeconds: 5
86+
failureThreshold: 3
87+
timeoutSeconds: 3
88+
livenessProbe:
89+
exec:
90+
command:
91+
- /home/nonroot/grpc-health-probe
92+
- -addr
93+
- localhost:9445
94+
initialDelaySeconds: 30
95+
periodSeconds: 30
96+
failureThreshold: 3
97+
timeoutSeconds: 5
7698
resources:
7799
requests:
78100
memory: "64Mi"

deployments/porch/3-porch-server.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,19 @@ spec:
9494
- --repo-operation-retry-attempts=3
9595
- --max-request-body-size=6291456 # Keep this in sync with function-runner's corresponding argument
9696
- --cache-type=db
97-
#adding livenessProbes and readinessProbes for porch server
97+
startupProbe:
98+
httpGet:
99+
path: /healthz
100+
port: 4443
101+
scheme: HTTPS
102+
initialDelaySeconds: 5
103+
periodSeconds: 5
104+
failureThreshold: 30
98105
livenessProbe:
99106
httpGet:
100107
path: /healthz
101108
port: 4443
102109
scheme: HTTPS
103-
initialDelaySeconds: 30
104110
periodSeconds: 30
105111
failureThreshold: 3
106112
successThreshold: 1
@@ -110,11 +116,10 @@ spec:
110116
path: /readyz
111117
port: 4443
112118
scheme: HTTPS
113-
initialDelaySeconds: 5
114-
periodSeconds: 5
115-
failureThreshold: 3
119+
periodSeconds: 10
120+
failureThreshold: 6
116121
successThreshold: 1
117-
timeoutSeconds: 3
122+
timeoutSeconds: 5
118123
---
119124
apiVersion: v1
120125
kind: Service

deployments/porch/9-controllers.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,29 @@ spec:
8686
limits:
8787
memory: 1Gi
8888
cpu: 1000m
89+
startupProbe:
90+
httpGet:
91+
path: /healthz
92+
port: 8081
93+
scheme: HTTP
94+
initialDelaySeconds: 5
95+
periodSeconds: 5
96+
failureThreshold: 30
8997
livenessProbe:
9098
failureThreshold: 3
9199
httpGet:
92100
path: /healthz
93101
port: 8081
94102
scheme: HTTP
95-
initialDelaySeconds: 30
96103
periodSeconds: 30
97104
successThreshold: 1
98105
timeoutSeconds: 5
99106
readinessProbe:
100-
failureThreshold: 3
107+
failureThreshold: 6
101108
httpGet:
102109
path: /readyz
103110
port: 8081
104111
scheme: HTTP
105-
initialDelaySeconds: 5
106-
periodSeconds: 5
112+
periodSeconds: 10
107113
successThreshold: 1
108-
timeoutSeconds: 3
114+
timeoutSeconds: 5

0 commit comments

Comments
 (0)