|
30 | 30 | {{- toYaml . | nindent 8 }} |
31 | 31 | {{- end }} |
32 | 32 | serviceAccountName: {{ include "comet-common.names.serviceAccount" . }} |
| 33 | + terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} |
33 | 34 | securityContext: |
34 | 35 | {{- toYaml .Values.podSecurityContext | nindent 8 }} |
35 | 36 | initContainers: |
@@ -160,24 +161,44 @@ spec: |
160 | 161 | - name: {{ include "s3proxy.portName" . }} |
161 | 162 | containerPort: {{ .Values.service.targetPort }} |
162 | 163 | protocol: TCP |
163 | | - # tcpSocket probes only check the TCP accept, so they work unchanged |
164 | | - # against a TLS-only port (no handshake performed). |
| 164 | + # /healthz responds without authentication (S3Proxy >= 3.2.0), |
| 165 | + # distinguishing a serving proxy from one that merely accepts TCP. |
| 166 | + # The kubelet does not verify certificates for HTTPS probes, so a |
| 167 | + # self-signed keystore works when native TLS is enabled. S3Proxy |
| 168 | + # releases after 3.3.0 fail readiness while draining in-flight |
| 169 | + # requests on shutdown, removing terminating pods from Service |
| 170 | + # endpoints. |
165 | 171 | livenessProbe: |
166 | | - tcpSocket: |
| 172 | + httpGet: |
| 173 | + path: /healthz |
167 | 174 | port: {{ include "s3proxy.portName" . }} |
| 175 | +{{- if .Values.config.tls.enabled }} |
| 176 | + scheme: HTTPS |
| 177 | +{{- end }} |
168 | 178 | initialDelaySeconds: 30 |
169 | 179 | periodSeconds: 10 |
170 | 180 | timeoutSeconds: 5 |
171 | 181 | successThreshold: 1 |
172 | 182 | failureThreshold: 3 |
173 | 183 | readinessProbe: |
174 | | - tcpSocket: |
| 184 | + httpGet: |
| 185 | + path: /healthz |
175 | 186 | port: {{ include "s3proxy.portName" . }} |
| 187 | +{{- if .Values.config.tls.enabled }} |
| 188 | + scheme: HTTPS |
| 189 | +{{- end }} |
176 | 190 | initialDelaySeconds: 10 |
177 | 191 | periodSeconds: 5 |
178 | 192 | timeoutSeconds: 3 |
179 | 193 | successThreshold: 1 |
180 | 194 | failureThreshold: 3 |
| 195 | + lifecycle: |
| 196 | + # Endpoint removal propagates asynchronously; keep serving |
| 197 | + # briefly so late-routed connections do not land on a pod that |
| 198 | + # has already begun shutting down. |
| 199 | + preStop: |
| 200 | + exec: |
| 201 | + command: ["sleep", "5"] |
181 | 202 | resources: |
182 | 203 | {{- toYaml .Values.resources | nindent 12 }} |
183 | 204 | volumeMounts: |
|
0 commit comments