Fix: Add preStop hook to allow graceful network shutdown (#121)

Adding a preStop sleep to allow other controllers to remove the pod from the network path.
Without, there's a risk of breaking in-flight requests when the container is already stopped but the endpoints/endpointsSlice objects haven't been updated.

Source:  https://learnk8s.io/graceful-shutdown
This commit is contained in:
Henrik Schmidt
2023-12-21 11:32:16 +00:00
committed by GitHub
parent ee98d0c82d
commit dd8b4e5cc7

View File

@@ -157,6 +157,10 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
lifecycle:
preStop:
exec:
command: ["sleep", "3"]
volumeMounts:
- name: qdrant-storage
mountPath: /qdrant/storage