This repository has been archived on 2024-07-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
chart/templates/webhook-deployment.yaml
Konstantin Grachev 48e01337c9
All checks were successful
continuous-integration/drone/push Build is passing
cs: fix
2023-03-17 17:00:07 +03:00

76 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "n8n-webhook.fullname" . }}
labels:
{{- include "n8n-webhook.labels" . | nindent 4 }}
spec:
{{- if not .Values.webhook.autoscaling.enabled }}
replicas: {{ .Values.webhook.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "n8n-webhook.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.webhook.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "n8n-webhook.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.webhook.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.webhook.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.webhook.securityContext | nindent 12 }}
image: "{{ .Values.webhook.image.registry }}/{{ .Values.webhook.image.repository }}:{{ .Values.webhook.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.webhook.image.pullPolicy }}
command:
- n8n
- webhook
envFrom:
- configMapRef:
name: {{ include "n8n.fullname" . }}
{{- if .Values.webhook.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.webhook.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
resources:
{{- toYaml .Values.webhook.resources | nindent 12 }}
{{- with .Values.webhook.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.webhook.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.webhook.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}