{{- if .Values.global.aurva_proxy.enabled }} apiVersion: apps/v1 kind: Deployment metadata: labels: {{- include "application.labels" . | nindent 4 }} {{- if .Values.aurva_proxy.additionalLabels }} {{ toYaml .Values.aurva_proxy.additionalLabels | indent 4 }} {{- end }} {{- with (mergeOverwrite (deepCopy .Values.global.deploymentAnnotations) .Values.aurva_proxy.annotations) }} annotations: {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} name: {{ include "aurva-proxy.fullname" . }} namespace: {{ .Values.namespaceOverride }} spec: replicas: {{ default 4 .Values.aurva_proxy.replicas }} selector: matchLabels: {{ include "aurva-proxy.selectorLabels" . | indent 6 }} {{- if .Values.aurva_proxy.strategy }} strategy: {{ toYaml .Values.aurva_proxy.strategy | indent 4 }} {{- end }} {{- if not (kindIs "invalid" .Values.aurva_proxy.revisionHistoryLimit) }} revisionHistoryLimit: {{ .Values.aurva_proxy.revisionHistoryLimit }} {{- end }} template: metadata: labels: {{ include "aurva-proxy.selectorLabels" . | indent 8 }} {{- if .Values.aurva_proxy.podLabels }} {{ toYaml .Values.aurva_proxy.podLabels | indent 8 }} {{- end }} {{- if or .Values.aurva_proxy.additionalPodAnnotations }} annotations: {{- end }} {{- with .Values.aurva_proxy.additionalPodAnnotations }} {{ toYaml . | indent 8 }} {{- end }} spec: {{- with .Values.aurva_proxy.priorityClassName | default .Values.global.priorityClassName }} priorityClassName: {{ . }} {{- end }} {{- if .Values.aurva_proxy.nodeSelector }} nodeSelector: {{ toYaml .Values.aurva_proxy.nodeSelector | indent 8 }} {{- end }} {{- if .Values.aurva_proxy.tolerations }} tolerations: {{ toYaml .Values.aurva_proxy.tolerations | indent 8 -}} {{- end }} {{- if .Values.aurva_proxy.affinity }} affinity: {{ toYaml .Values.aurva_proxy.affinity | indent 8 -}} {{- end }} serviceAccountName: {{ .Release.Name }}-{{ include "aurva-proxy.proxyServiceAccountName" . }} {{- if .Values.aurva_proxy.imagePullSecrets }} imagePullSecrets: - name: {{ .Values.aurva_proxy.imagePullSecrets }} {{- end }} containers: - name: {{ template "aurva-proxy.fullname" . }} {{- if .Values.aurva_proxy.image.digest }} image: "{{ .Values.aurva_proxy.image.repository }}@{{ .Values.aurva_proxy.image.digest }}" {{- else if .Values.aurva_proxy.image.tag }} image: "{{ .Values.aurva_proxy.image.repository }}:{{ .Values.aurva_proxy.image.tag }}" {{- end }} imagePullPolicy: {{ .Values.aurva_proxy.image.pullPolicy }} {{- if .Values.aurva_proxy.envFrom }} envFrom: {{- range $value := .Values.aurva_proxy.envFrom }} {{- if (eq .type "secret") }} - secretRef: {{- if .name }} name: {{ include "application.tplvalues.render" ( dict "value" $value.name "context" $ ) }} {{- end }} {{- end }} {{- end }} {{- end }} {{- if .Values.aurva_proxy.env }} env: {{- range $key, $value := .Values.aurva_proxy.env }} - name: {{ include "application.tplvalues.render" ( dict "value" $key "context" $ ) }} {{ include "application.tplvalues.render" ( dict "value" $value "context" $ ) | indent 10 }} {{- end }} {{- end }} resources: {{- toYaml .Values.aurva_proxy.resources | nindent 12 }} {{- with .Values.aurva_proxy.dnsConfig }} dnsConfig: {{- toYaml . | nindent 8 }} {{- end }} dnsPolicy: {{ .Values.aurva_proxy.dnsPolicy }} {{- end }}