From eb18cc0bf7975f962385e1ec9132fa012a490184 Mon Sep 17 00:00:00 2001 From: Kumar Sukhani Date: Fri, 23 Oct 2026 20:15:24 +0200 Subject: [PATCH 1/2] Add failing test for read-only rootfs in helm test (#441) Test pod entrypoint writes ~/.curlrc, which fails on a read-only rootfs. Add a chartTests securityContext option to enforce it; stays red until fixed. --- charts/qdrant/templates/tests/test-db-interaction.yaml | 4 ++++ test/integration/readonly_rootfs.bats | 8 ++++++++ 2 files changed, 12 insertions(+) create mode 100644 test/integration/readonly_rootfs.bats diff --git a/charts/qdrant/templates/tests/test-db-interaction.yaml b/charts/qdrant/templates/tests/test-db-interaction.yaml index ed04122..8cc0ba4 100644 --- a/charts/qdrant/templates/tests/test-db-interaction.yaml +++ b/charts/qdrant/templates/tests/test-db-interaction.yaml @@ -17,6 +17,10 @@ spec: - name: test-script image: {{ .Values.chartTests.dbInteraction.image | quote }} args: ['bash', '/app/entrypoint.sh'] + {{- with .Values.chartTests.dbInteraction.containerSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} volumeMounts: - mountPath: /app name: test-script diff --git a/test/integration/readonly_rootfs.bats b/test/integration/readonly_rootfs.bats new file mode 100644 index 0000000..1544464 --- /dev/null +++ b/test/integration/readonly_rootfs.bats @@ -0,0 +1,8 @@ +setup_file() { + helm upgrade --install qdrant charts/qdrant -n qdrant-helm-integration --wait --set chartTests.dbInteraction.containerSecurityContext.readOnlyRootFilesystem=true +} + +@test "helm test - with read-only root filesystem" { + run helm test qdrant -n qdrant-helm-integration --logs + [ $status -eq 0 ] +} From 776ac90c4c5389e2fc411dab44f89aedfb18f3dd Mon Sep 17 00:00:00 2001 From: Kumar Sukhani Date: Fri, 23 Oct 2026 20:46:15 +0200 Subject: [PATCH 2/2] Fix helm test on read-only root filesystem with writable HOME emptyDir (#441) --- charts/qdrant/templates/tests/test-db-interaction.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/charts/qdrant/templates/tests/test-db-interaction.yaml b/charts/qdrant/templates/tests/test-db-interaction.yaml index 8cc0ba4..7c5d9b9 100644 --- a/charts/qdrant/templates/tests/test-db-interaction.yaml +++ b/charts/qdrant/templates/tests/test-db-interaction.yaml @@ -21,9 +21,14 @@ spec: securityContext: {{- toYaml . | nindent 8 }} {{- end }} + env: + - name: HOME + value: /tmp/home volumeMounts: - mountPath: /app name: test-script + - mountPath: /tmp/home + name: home {{- if .Values.additionalVolumeMounts }} {{- toYaml .Values.additionalVolumeMounts | default "" | nindent 8 }} {{- end}} @@ -45,6 +50,8 @@ spec: - name: test-script configMap: name: "{{ include "qdrant.fullname" . }}-test-db-interaction" + - name: home + emptyDir: {} {{- if .Values.additionalVolumes }} {{- toYaml .Values.additionalVolumes | default "" | nindent 4 }} {{- end}}