{{- if or .Values.global.aws.enabled .Values.global.azure.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: neuvector-csp-pod namespace: {{ .Release.Namespace }} labels: chart: {{ template "neuvector.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} {{- with .Values.global.aws.annotations }} annotations: {{ toYaml . | indent 4 }} {{- end }} spec: selector: matchLabels: app: neuvector-csp-pod template: metadata: labels: app: neuvector-csp-pod release: {{ .Release.Name }} spec: {{- if .Values.global.aws.imagePullSecrets }} imagePullSecrets: - name: {{ .Values.global.aws.imagePullSecrets }} {{- end }} {{- if .Values.global.azure.imagePullSecrets }} imagePullSecrets: - name: {{ .Values.global.azure.imagePullSecrets }} {{- end }} containers: - env: - name: ADAPTER_NAMESPACE value: {{ .Release.Namespace }} - name: USAGE_CRD_PLURAL value: "cspadapterusagerecords" - name: USAGE_RESOURCE value: "neuvector-usage" - name: USAGE_API_VERSION value: "v1" - name: USAGE_API_GROUP value: "susecloud.net" {{- if .Values.global.azure.enabled }} - name: "CLIENT_ID" value: "{{ .Values.global.azure.identity.clientId }}" - name: "EXTENSION_RESOURCE_ID" value: "{{ .Values.global.azure.extension.resourceId }}" - name: "PLAN_ID" value: "{{ .Values.global.azure.marketplace.planId }}" {{- end }} {{- if and .Values.global.aws.enabled .Values.global.aws.image.digest }} image: "{{ .Values.registry }}/{{ .Values.global.aws.image.repository }}@{{ .Values.global.aws.image.digest }}" {{- else if and .Values.global.aws.enabled .Values.global.aws.image.tag }} image: "{{ .Values.registry }}/{{ .Values.global.aws.image.repository }}:{{ .Values.global.aws.image.tag }}" {{- else if and .Values.global.azure.enabled }} image: "{{ .Values.global.azure.images.neuvector_csp_pod.registry }}/{{ .Values.global.azure.images.neuvector_csp_pod.image }}@{{ .Values.global.azure.images.neuvector_csp_pod.digest }}" {{- end }} name: neuvector-csp-pod {{- if .Values.global.aws.enabled }} imagePullPolicy: "{{ .Values.global.aws.image.imagePullPolicy }}" {{- else if .Values.global.azure.enabled }} imagePullPolicy: "{{ .Values.global.azure.images.neuvector_csp_pod.imagePullPolicy }}" {{- end }} {{- if .Values.global.aws.enabled }} serviceAccountName: {{ .Values.global.aws.serviceAccount }} serviceAccount: {{ .Values.global.aws.serviceAccount }} {{- else if .Values.global.azure.enabled }} serviceAccountName: {{ .Values.global.azure.serviceAccount }} serviceAccount: {{ .Values.global.azure.serviceAccount }} {{- end }} {{- end }}