Skip to content

Commit b4c0e64

Browse files
authored
Improve nginx deployment (#4085)
1. For 60 seconds, check if no containers in the pod crash loop and only then declare that the pod ready. 2. Add readiness probe. Traffic will be forwarded only to pods that pass the readiness check. 3. Adjust probes to start only after 60 seconds to match the change mention in 1. 4. During upgrade, allow an additional pod to be scheduled for the new replicaset. 5. Don't allow the deployment to have less that 3 pod ready, even during upgrade. Signed-off-by: gbenhaim <gbenhaim@redhat.com>
1 parent d0850ac commit b4c0e64

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

components/ui/base/proxy/proxy.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ spec:
1212
selector:
1313
matchLabels:
1414
app: proxy
15+
minReadySeconds: 60
1516
strategy:
1617
rollingUpdate:
17-
maxSurge: 25%
18-
maxUnavailable: 25%
18+
maxSurge: 1
19+
maxUnavailable: 0
1920
template:
2021
metadata:
2122
labels:
@@ -62,10 +63,20 @@ spec:
6263
path: /health
6364
port: 8080
6465
scheme: HTTP
65-
initialDelaySeconds: 10
66+
initialDelaySeconds: 60
6667
periodSeconds: 60
6768
successThreshold: 1
6869
timeoutSeconds: 1
70+
readinessProbe:
71+
failureThreshold: 3
72+
httpGet:
73+
path: /health
74+
port: 8080
75+
scheme: HTTP
76+
initialDelaySeconds: 60
77+
periodSeconds: 30
78+
successThreshold: 3
79+
timeoutSeconds: 1
6980
ports:
7081
- containerPort: 8080
7182
name: web

0 commit comments

Comments
 (0)