diff --git a/charts/qdrant/templates/configmap.yaml b/charts/qdrant/templates/configmap.yaml index c012e15..40b0f2a 100644 --- a/charts/qdrant/templates/configmap.yaml +++ b/charts/qdrant/templates/configmap.yaml @@ -8,13 +8,13 @@ data: SET_INDEX=${HOSTNAME##*-} {{- if and (.Values.snapshotRestoration.enabled) (eq (.Values.replicaCount | quote) (1 | quote)) }} echo "Starting initializing for pod $SET_INDEX and snapshots restoration" - ./entrypoint.sh {{ range .Values.snapshotRestoration.snapshots }} --snapshot {{ . }} {{ end }} + exec ./entrypoint.sh {{ range .Values.snapshotRestoration.snapshots }} --snapshot {{ . }} {{ end }} {{- else }} echo "Starting initializing for pod $SET_INDEX" if [ "$SET_INDEX" = "0" ]; then - ./entrypoint.sh --uri 'http://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:6335' + exec ./entrypoint.sh --uri 'http://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:6335' else - ./entrypoint.sh --bootstrap 'http://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:6335' --uri 'http://{{ include "qdrant.fullname" . }}-'"$SET_INDEX"'.{{ include "qdrant.fullname" . }}-headless:6335' + exec ./entrypoint.sh --bootstrap 'http://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:6335' --uri 'http://{{ include "qdrant.fullname" . }}-'"$SET_INDEX"'.{{ include "qdrant.fullname" . }}-headless:6335' fi {{ end }} production.yaml: | diff --git a/charts/qdrant/templates/statefulset.yaml b/charts/qdrant/templates/statefulset.yaml index 086590c..29a771f 100644 --- a/charts/qdrant/templates/statefulset.yaml +++ b/charts/qdrant/templates/statefulset.yaml @@ -76,7 +76,7 @@ spec: - name: {{ .name }} value: {{ .value | quote }} {{- end }} - command: ["/bin/sh", "-c"] + command: ["/bin/bash", "-c"] {{- with .Values.args }} args: {{- toYaml . | nindent 10 }} @@ -233,12 +233,11 @@ spec: {{- toYaml . | nindent 10 }} {{- end }} spec: - storageClassName: {{ .Values.persistence.storageClassName }} + storageClassName: {{ .Values.persistence.storageClassName }} accessModes: {{- range .Values.persistence.accessModes }} - {{ . | quote }} {{- end }} resources: requests: - storage: {{ .Values.persistence.size | quote }} - + storage: {{ .Values.persistence.size | quote }} diff --git a/test/integration/default_installation.bats b/test/integration/default_installation.bats index d663d1d..a789775 100644 --- a/test/integration/default_installation.bats +++ b/test/integration/default_installation.bats @@ -20,4 +20,12 @@ setup_file() { [ $status -eq 0 ] [[ "${output}" =~ .*INFO.* ]] [[ ! "${output}" =~ .*ERR.* ]] -} \ No newline at end of file +} + +@test "SIGTERM signals are propagated to qdrant" { + run kubectl rollout restart sts/qdrant -n qdrant-helm-integration + [ $status -eq 0 ] + # If signals aren't working, this will take >30 seconds and time out + run kubectl rollout status statefulset qdrant -n qdrant-helm-integration --timeout=15s + [ $status -eq 0 ] +}