{{- if .Values.regularPodTest.create -}} {{- $isWindows := (contains "windows" .Values.targetNodeOs) -}} {{- $osSelector := printf "kubernetes.io/os" -}} apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.regularPodTest.label }} labels: app: {{ .Values.regularPodTest.label }} spec: selector: matchLabels: app: {{ .Values.regularPodTest.label }} template: metadata: labels: app: {{ .Values.regularPodTest.label }} spec: nodeSelector: {{ $osSelector }}: {{ $isWindows | ternary "windows" "linux" }} {{- with .Values.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.linuxNodeSelector }} {{- toYaml . | nindent 8 }} {{- end }} {{- if (not $isWindows) }} serviceAccountName: {{ template "webhook-test-proxy.serviceAccountName" . }} securityContext: runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 {{- end }} containers: - name: {{ .Values.regularPodTest.label }} image: {{ .Values.webhookTestProxy.image.repository }}:{{ .Values.webhookTestProxy.image.tag }} imagePullPolicy: {{ .Values.webhookTestProxy.image.pullPolicy }} env: - name: PORT value: {{ .Values.regularPodTest.port | quote }} {{- end -}}