{{- if .Values.global.enableHelmTest }} apiVersion: v1 kind: Pod metadata: name: {{ template "security.fullname" . }}-test namespace: {{ .Release.Namespace }} labels: app: istio-citadel-test chart: {{ template "security.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} istio: citadel annotations: sidecar.istio.io/inject: "false" helm.sh/hook: test-success spec: {{- if .Values.global.priorityClassName }} priorityClassName: "{{ .Values.global.priorityClassName }}" {{- end }} containers: - name: "{{ template "security.fullname" . }}-test" image: pstauffer/curl:v1.0.3 imagePullPolicy: "{{ .Values.global.imagePullPolicy }}" command: ['sh', '-c', 'for i in 1 2 3; do curl http://istio-citadel:{{ .Values.global.monitoringPort }}/version && exit 0 || sleep 15; done; exit 1'] restartPolicy: Never affinity: {{- include "nodeaffinity" . | indent 4 }} {{- include "podAntiAffinity" . | indent 4 }} {{- if .Values.tolerations }} tolerations: {{ toYaml .Values.tolerations | indent 2 }} {{- else if .Values.global.defaultTolerations }} tolerations: {{ toYaml .Values.global.defaultTolerations | indent 2 }} {{- end }} {{- end }}