{{- $fullName := include "element-call.fullname" . -}} {{- with .Values.service.call }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ $fullName }} labels: {{- include "element-call.labels" $ | nindent 4 }} app.kubernetes.io/component: call spec: {{- if not $.Values.autoscaling.enabled }} replicas: {{ .replicaCount }} {{- end }} selector: matchLabels: {{- include "element-call.selectorLabels" $ | nindent 6 }} app.kubernetes.io/component: call template: metadata: {{- with .podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "element-call.labels" $ | nindent 8 }} app.kubernetes.io/component: call {{- with .podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with $.Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "element-call.serviceAccountName" (dict "root" $ "ctx" .) }} securityContext: {{- toYaml .podSecurityContext | nindent 8 }} containers: - name: call securityContext: {{- toYaml .securityContext | nindent 12 }} {{- with .image }} image: "{{ coalesce $.Values.global.image.registry .registry }}/{{ .repository }}:{{ .tag | default (printf "v%s" $.Chart.AppVersion) }}" imagePullPolicy: {{ coalesce $.Values.global.image.pullPolicy .pullPolicy }} {{- end }} ports: - name: http containerPort: 8080 protocol: TCP livenessProbe: {{- toYaml .livenessProbe | nindent 12 }} readinessProbe: {{- toYaml .readinessProbe | nindent 12 }} resources: {{- toYaml .resources | nindent 12 }} volumeMounts: - mountPath: /app/config.json name: config subPath: config.json volumes: - name: config configMap: name: {{ $fullName }} {{- with .nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}{{/* end-with .service.call */}}