{{- if .Values.testFramework.enabled -}} apiVersion: v1 kind: Pod metadata: name: {{ .Release.Name }}-test namespace: {{ .Release.Namespace }} labels: type: helm-chart-test annotations: "helm.sh/hook": test "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded" spec: serviceAccountName: {{ .Release.Name }}-test containers: - name: bats-test image: "{{ .Values.testFramework.image.registry}}/{{ .Values.testFramework.image.repository}}:{{ .Values.testFramework.image.tag }}" imagePullPolicy: {{ .Values.testFramework.image.pullPolicy }} command: ["bats", "-t", "/tests/run.sh"] volumeMounts: - name: tests mountPath: /tests readOnly: true volumes: - name: tests configMap: name: {{ .Release.Name }}-test restartPolicy: Never {{- end -}}