apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.nameOverride | default (include "sientia-module.fullname" .) }} labels: {{- include "sientia-module.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "sientia-module.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "sientia-module.labels" . | nindent 8 }} {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "sientia-module.serviceAccountName" . }} {{- with .Values.podSecurityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} {{- with .Values.securityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: {{- toYaml .Values.env | nindent 12 }} {{- with .Values.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.readinessProbe }} readinessProbe: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} volumeMounts: {{- if .Values.ssh.enabled }} - name: ssh-key mountPath: {{ .Values.ssh.sshPath }} readOnly: true - name: ssh-known-hosts mountPath: {{ .Values.ssh.knownHostsPath }} readOnly: true {{- end }} volumes: {{- if .Values.ssh.enabled }} - name: ssh-key secret: secretName: {{ .Values.ssh.secretName }} items: - key: ssh-privatekey path: id_ed25519 - name: ssh-known-hosts configMap: name: {{ include "sientia-module.fullname" . }}-ssh-known-hosts items: - key: known_hosts path: known_hosts {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}