frappe_docker/installation/kubernetes/helm-charts/erpnext/templates/deployment-socketio.yaml
Revant Nandgaonkar 2162c63a48 feat: kubernetes installation
helm chart for erpnext
job resources to create, backup, migrate sites
2020-03-07 22:35:02 +05:30

67 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "erpnext.fullname" . }}-socketio
labels:
{{- include "erpnext.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "erpnext.name" . }}-socketio
app.kubernetes.io/instance: {{ .Release.Name }}-socketio
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "erpnext.name" . }}-socketio
app.kubernetes.io/instance: {{ .Release.Name }}-socketio
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.socketIOImage.repository }}:{{ .Values.socketIOImage.tag }}"
volumeMounts:
- name: sites-dir
mountPath: /home/frappe/frappe-bench/sites
imagePullPolicy: {{ .Values.socketIOImage.pullPolicy }}
ports:
- name: http
containerPort: 9000
protocol: TCP
livenessProbe:
tcpSocket:
port: {{ .Values.socketIOPort }}
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
tcpSocket:
port: {{ .Values.socketIOPort }}
initialDelaySeconds: 5
periodSeconds: 10
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 }}