blob: 95ca1648ede9e25644e36669c95bbf28b2a0a526 [file] [log] [blame]
{{- if .Values.testFramework.enabled }}
{{- $root := . }}
apiVersion: v1
kind: Pod
metadata:
name: {{ include "dubbo-admin.fullname" . }}-test
labels:
{{- include "dubbo-admin.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
namespace: {{ include "dubbo-admin.namespace" . }}
spec:
serviceAccountName: {{ include "dubbo-admin.serviceAccountName" . }}
{{- with .Values.testFramework.securityContext }}
securityContext:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if or .Values.image.pullSecrets .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- include "dubbo-admin.imagePullSecrets" (dict "root" $root "imagePullSecrets" .Values.image.pullSecrets) | nindent 4 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- tpl (toYaml .) $root | nindent 4 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 4 }}
{{- end }}
containers:
- name: {{ .Release.Name }}-test
image: "{{ .Values.testFramework.image}}"
imagePullPolicy: "{{ .Values.testFramework.imagePullPolicy}}"
command: ["wget"]
volumeMounts:
- mountPath: /tests
name: tests
readOnly: true
volumes:
- name: tests
secret:
secretName: {{ include "dubbo-admin.fullname" . }}-secret
restartPolicy: Never
{{- end }}