2121      annotations :
2222        checksum/config : {{ include (print $.Template.BasePath "/envoy-configmap.yaml") . | sha256sum }} 
2323    spec :
24+       terminationGracePeriodSeconds : {{ .Values.terminationGracePeriodSeconds | default 30 }} 
2425      {{- with .Values.global.image.imagePullSecrets }} 
2526      imagePullSecrets : {{- toYaml . | nindent 8 }} 
2627      {{- end }} 
@@ -145,6 +146,14 @@ spec:
145146              containerPort : {{ .Values.env.port }} 
146147            - name : metrics 
147148              containerPort : {{ .Values.env.metricsPort }} 
149+           startupProbe :
150+             periodSeconds : {{ .Values.health.startupProbe.periodSeconds }} 
151+             failureThreshold : {{ .Values.health.startupProbe.failureThreshold }} 
152+             timeoutSeconds : {{ .Values.health.startupProbe.timeoutSeconds }} 
153+             httpGet :
154+               path : /ready 
155+               port : service 
156+               scheme : HTTPS 
148157          livenessProbe :
149158            initialDelaySeconds : {{ .Values.health.livenessProbe.initialDelaySeconds }} 
150159            periodSeconds : {{ .Values.health.livenessProbe.periodSeconds }} 
@@ -160,7 +169,7 @@ spec:
160169            failureThreshold : {{ .Values.health.readinessProbe.failureThreshold }} 
161170            timeoutSeconds : {{ .Values.health.readinessProbe.timeoutSeconds }} 
162171            httpGet :
163-               path : /health  
172+               path : /ready  
164173              port : service 
165174              scheme : HTTPS 
166175          resources :
@@ -172,9 +181,15 @@ spec:
172181            preStop :
173182              exec :
174183                command :
175-                   - " /bin/sh" 
176-                   - " -c" 
177-                   - " wget -O- --post-data='{}' http://localhost:$ENVOY_ADMIN_PORT/healthcheck/fail; while [ $(netstat -plunt | grep tcp | grep -v envoy | wc -l) -ne 0 ]; do sleep 1; done;" 
184+                   - /bin/sh 
185+                   - -c 
186+                   - | 
187+                     admin_port={{ .Values.envoy.adminPort }} 
188+                     # Wait for load balancer propagation (must match app container propagation delay) 
189+                     sleep 15 
190+                     wget -q -T 1 -O- --method=POST --body-data='' \ 
191+                       "http://localhost:${admin_port}/drain_listeners?graceful" || true  
192+                     exit 0 
178193command : ["envoy"] 
179194          args :
180195            - " -c" 
@@ -201,10 +216,19 @@ spec:
201216              containerPort : {{ .Values.envoy.port }} 
202217            - name : admin 
203218              containerPort : {{ .Values.envoy.adminPort }} 
219+           startupProbe :
220+             periodSeconds : {{ .Values.health.startupProbe.periodSeconds }} 
221+             failureThreshold : {{ .Values.health.startupProbe.failureThreshold }} 
222+             timeoutSeconds : {{ .Values.health.startupProbe.timeoutSeconds }} 
223+             httpGet :
224+               path : /ready 
225+               port : admin 
226+               scheme : HTTP 
204227          livenessProbe :
205228            initialDelaySeconds : {{ .Values.health.livenessProbe.initialDelaySeconds }} 
206229            periodSeconds : {{ .Values.health.livenessProbe.periodSeconds }} 
207230            failureThreshold : {{ .Values.health.livenessProbe.failureThreshold }} 
231+             timeoutSeconds : {{ .Values.health.livenessProbe.timeoutSeconds }} 
208232            httpGet :
209233              path : /ready 
210234              port : admin 
@@ -213,11 +237,12 @@ spec:
213237            initialDelaySeconds : {{ .Values.health.readinessProbe.initialDelaySeconds }} 
214238            periodSeconds : {{ .Values.health.readinessProbe.periodSeconds }} 
215239            failureThreshold : {{ .Values.health.readinessProbe.failureThreshold }} 
240+             timeoutSeconds : {{ .Values.health.readinessProbe.timeoutSeconds }} 
216241            httpGet :
217242              path : /ready 
218243              port : admin 
219244              scheme : HTTP 
220245          resources :
221246{{ toYaml .Values.envoy.resources | indent 12 }} 
222247  strategy :
223-      type :  RollingUpdate 
248+ {{ toYaml .Values.strategy | indent 4 }} 
0 commit comments