apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "erpnext.fullname" . }}-scheduler labels: {{- include "erpnext.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app.kubernetes.io/name: {{ include "erpnext.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: app.kubernetes.io/name: {{ include "erpnext.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ template "erpnext.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.pythonImage.repository }}:{{ .Values.pythonImage.tag }}" volumeMounts: - name: sites-dir mountPath: /home/frappe/frappe-bench/sites imagePullPolicy: {{ .Values.pythonImage.pullPolicy }} command: ["docker-entrypoint.sh"] args: ["schedule"] {{ if .Values.runAsRoot }} env: - name: "RUN_AS_ROOT" value: "1" {{ end }} livenessProbe: exec: command: - "docker-entrypoint.sh" - "doctor" initialDelaySeconds: 15 periodSeconds: 5 readinessProbe: exec: command: - "docker-entrypoint.sh" - "doctor" initialDelaySeconds: 15 periodSeconds: 5 resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: sites-dir persistentVolumeClaim: claimName: {{ template "erpnext.fullname" . }} readOnly: false {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}