97 lines
3.2 KiB
YAML
97 lines
3.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "erpnext.fullname" . }}-scheduler
|
|
labels:
|
|
{{- include "erpnext.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: 1
|
|
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
|
|
- name: logs
|
|
mountPath: /home/frappe/frappe-bench/logs
|
|
imagePullPolicy: {{ .Values.pythonImage.pullPolicy }}
|
|
args: ["schedule"]
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- "healthcheck.sh"
|
|
{{- if and .Values.postgresHost .Values.postgresPort }}
|
|
- "-p"
|
|
- "{{ .Values.postgresHost }}:{{ .Values.postgresPort }}"
|
|
{{- end }}
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- "healthcheck.sh"
|
|
{{- if and .Values.postgresHost .Values.postgresPort }}
|
|
- "-p"
|
|
- "{{ .Values.postgresHost }}:{{ .Values.postgresPort }}"
|
|
{{- end }}
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 5
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
volumes:
|
|
- name: sites-dir
|
|
{{- if .Values.persistence.worker.enabled }}
|
|
persistentVolumeClaim:
|
|
{{- if .Values.persistence.worker.existingClaim }}
|
|
claimName: {{ .Values.persistence.worker.existingClaim }}
|
|
{{- else }}
|
|
claimName: {{ template "erpnext.fullname" . }}
|
|
{{- end }}
|
|
readOnly: false
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end }}
|
|
- name: logs
|
|
{{- if .Values.persistence.logs.enabled }}
|
|
persistentVolumeClaim:
|
|
{{- if .Values.persistence.logs.existingClaim }}
|
|
claimName: {{ .Values.persistence.logs.existingClaim }}
|
|
{{- else }}
|
|
claimName: {{ template "erpnext.fullname" . }}-logs
|
|
{{- end }}
|
|
readOnly: false
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- 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 }}
|