apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "sftpgo.fullname" . }} labels: {{- include "sftpgo.labels" . | nindent 4 }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "sftpgo.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "sftpgo.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "sftpgo.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default (printf "v%s" .Chart.AppVersion) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: - sftpgo - serve env: - name: SFTPGO_SFTPD__BIND_PORT value: "2022" - name: SFTPGO_SFTPD__BIND_ADDRESS value: "0.0.0.0" - name: SFTPGO_HTTPD__BIND_PORT value: "8080" - name: SFTPGO_HTTPD__BIND_ADDRESS value: "0.0.0.0" {{- with .Values.envFrom }} envFrom: {{- toYaml . | nindent 12 }} {{- end }} ports: - name: sftp containerPort: 2022 protocol: TCP - name: http containerPort: 8080 protocol: TCP livenessProbe: httpGet: path: /api/v1/version port: http readinessProbe: httpGet: path: /api/v1/version port: http resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.volumeMounts }} volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.volumes }} volumes: {{- toYaml . | nindent 8 }} {{- 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 }}