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 - name: logs mountPath: /home/frappe/frappe-bench/logs 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 {{- 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 }}