apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "n8n.fullname" . }} labels: {{- include "n8n.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: {{- include "n8n.selectorLabels" . | nindent 6 }} template: metadata: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} {{- with .Values.n8n.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "n8n.selectorLabels" . | nindent 8 }} spec: {{- with .Values.n8n.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} securityContext: {{- toYaml .Values.n8n.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.n8n.securityContext | nindent 12 }} image: "{{ .Values.n8n.image.registry }}/{{ .Values.n8n.image.repository }}:{{ .Values.n8n.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.n8n.image.pullPolicy }} envFrom: - configMapRef: name: {{ include "n8n.fullname" . }} {{- if .Values.n8n.extraEnvVarsSecret }} - secretRef: name: {{ .Values.n8n.extraEnvVarsSecret }} {{- else }} - secretRef: name: {{ include "n8n.fullname" . }} {{- end }} ports: - name: http containerPort: 5678 protocol: TCP livenessProbe: httpGet: path: /healthz port: http readinessProbe: httpGet: path: /healthz port: http startupProbe: httpGet: path: /healthz port: http failureThreshold: 30 periodSeconds: 10 resources: {{- toYaml .Values.n8n.resources | nindent 12 }} {{- with .Values.n8n.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.n8n.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.n8n.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }}