45 Commits

Author SHA1 Message Date
b66e193714 ci: bump helm version up to 22
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
2023-05-18 00:27:02 +03:00
e292f3d434 ci: bump helm version
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
2023-05-18 00:24:07 +03:00
bfbfc4b0d2 ci: add tag event
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing
2023-05-18 00:22:27 +03:00
856d90e88b ci: fix trigger
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-18 00:20:36 +03:00
5a9eb1a6fc ci: use oci 2023-05-18 00:14:59 +03:00
4506443e47 chore: bump n8n version up to 0.227.1 2023-05-18 00:11:25 +03:00
eb3096689d ci: update
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-02 20:35:02 +03:00
4fb7dec4c2 fix: bump version up to 0.226.1
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-02 20:10:48 +03:00
5aa42df15d fix: bump version up to 0.222.3
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-20 15:03:02 +03:00
9e04dd563f fix: bump version up to 0.222.1
All checks were successful
continuous-integration/drone/push Build is passing
2023-04-04 20:06:09 +03:00
33a4092cdd fix: bump version up to 0.221.2
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-30 22:17:44 +03:00
01534912d3 chore: bump version up to 0.221.2
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-30 22:16:14 +03:00
48e01337c9 cs: fix
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-17 17:00:07 +03:00
dddfa808e9 chore: bump version up to 0.220.0 2023-03-17 16:53:24 +03:00
fe87d7373f chore: bump version up to 0.219.1
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-15 12:41:03 +03:00
de43724541 chore: bump n8n version up to 0.218.0
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 21:13:27 +03:00
429a04772a fix: rename N8N_ENABLE_METRICS to N8N_METRICS
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-28 00:27:43 +03:00
5663bb594a fix: remove checksum's from deployments
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-28 00:11:19 +03:00
90a63653bf feat: add metrics config
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-28 00:07:02 +03:00
3c4842a746 fix: bump n8n version up to 0.217.1
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-27 21:54:43 +03:00
b634953e98 feat: bump n8n version up to 0.217.1
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-24 20:46:34 +03:00
e57f4ca15d feat: bump n8n version up to 0.216.0
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-17 17:30:20 +03:00
47e32cbc2e ci: use helm plugin
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-14 23:58:29 +03:00
ddb4a2eb9b Bump n8n version up to 0.215.1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-02-13 00:55:51 +03:00
b0162f4908 Bump n8n version up to 0.213.1
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-02-13 00:43:52 +03:00
ef8f635aba Bump n8n version up to 0.213.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-01-31 18:53:34 +03:00
3497a9537e Bump n8n version up to 0.205.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-12-10 18:46:53 +03:00
4e01f912ed fix worker-hpa labels
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 17:38:06 +03:00
bf6002c156 fix webhook-deployment labels 2022-11-16 17:37:56 +03:00
ad9a7b248f Remove redundant suffix
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 17:30:55 +03:00
b143ede98b Fix collisions with labels and selectors
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 17:28:54 +03:00
7155146e00 Fix service name for webhook ingress
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 16:42:09 +03:00
3639069556 Revert "Remove $fullName var from ingress templates"
This reverts commit 92f8d4442c.
2022-11-16 16:41:43 +03:00
92f8d4442c Remove $fullName var from ingress templates
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 16:37:50 +03:00
5500ec6642 Fix: checksum must be on pod template
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 16:32:16 +03:00
fba44456e6 Include default secrets if extraEnvVarsSecret not present
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 16:28:54 +03:00
8bdea5fba6 Add N8N_PROTOCOL
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 16:10:41 +03:00
cdbceb1396 add startupProbe to main process
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 14:39:18 +03:00
e7598dc380 add checksum/secret annotation 2022-11-16 14:37:07 +03:00
c2c9255462 add checksum/config annotation
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 14:33:18 +03:00
9ca2cac8b1 add N8N_HOST and N8N_PORT to config
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 14:23:47 +03:00
744613584d fix N8N_DIAGNOSTICS_ENABLED var
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 14:17:58 +03:00
36532aef3b fix redis host
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 13:33:54 +03:00
a140216365 Remove *.tgz from .helmignore
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 13:26:41 +03:00
623fefe1d3 Add redis architecture and auth
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 12:38:07 +03:00
16 changed files with 292 additions and 242 deletions

View File

@ -5,47 +5,19 @@ name: default
trigger: trigger:
event: event:
- push - push
- tag - tag
steps: steps:
- name: lint - name: release
image: cr.grachevko.ru/docker.io/alpine/helm:latest image: cr.grachevko.ru/drone/helm:22
pull: always settings:
commands: name: n8n
- helm lint . tag: ${DRONE_TAG}
username:
- name: version from_secret: HELM_REPO_USERNAME
image: cr.grachevko.ru/docker.io/mikefarah/yq:latest password:
pull: always from_secret: HELM_REPO_PASSWORD
user: root when:
commands: event:
- yq -i '.version = "'$DRONE_TAG'"' Chart.yaml - tag
- cat Chart.yaml
depends_on:
- lint
when:
event:
- tag
- name: release
image: cr.grachevko.ru/docker.io/alpine/helm:latest
pull: always
commands:
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm dependency build
- helm plugin install https://github.com/chartmuseum/helm-push
- helm repo add $HELM_REPO_NAME $HELM_REPO_REGISTRY/$HELM_REPO_NAME --username $HELM_REPO_USERNAME --password $HELM_REPO_PASSWORD
- helm cm-push . $HELM_REPO_REGISTRY/$HELM_REPO_NAME
environment:
HELM_REPO_NAME: n8n
HELM_REPO_REGISTRY: https://harbor.grachevko.ru/chartrepo
HELM_REPO_USERNAME:
from_secret: HELM_REPO_USERNAME
HELM_REPO_PASSWORD:
from_secret: HELM_REPO_PASSWORD
depends_on:
- version
when:
event:
- tag

View File

@ -21,4 +21,3 @@
.idea/ .idea/
*.tmproj *.tmproj
.vscode/ .vscode/
*.tgz

View File

@ -3,15 +3,15 @@ name: n8n
description: A Helm chart for Kubernetes description: A Helm chart for Kubernetes
type: application type: application
version: 0.0.1 version: 0.0.1
appVersion: 0.202.1 appVersion: 0.227.1
icon: https://github.com/n8n-io/n8n/raw/master/assets/n8n-logo.png icon: https://github.com/n8n-io/n8n/raw/master/assets/n8n-logo.png
maintainers: maintainers:
- email: me@grachevko.ru - email: me@grachevko.ru
name: Konstantin Grachev name: Konstantin Grachev
sources: sources:
- https://git.grachevko.ru/n8n/chart - https://git.grachevko.ru/n8n/chart
dependencies: dependencies:
- name: redis - name: redis
version: ^17 version: ^17
repository: https://charts.bitnami.com/bitnami repository: https://charts.bitnami.com/bitnami
condition: redis.enabled condition: redis.enabled

1
TODO.md Normal file
View File

@ -0,0 +1 @@
- [ ] external redis config

View File

@ -5,6 +5,14 @@ Expand the name of the chart.
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }} {{- end }}
{{- define "n8n-webhook.name" -}}
{{ include "n8n.name" . }}-webhook
{{- end }}
{{- define "n8n-worker.name" -}}
{{ include "n8n.name" . }}-worker
{{- end }}
{{/* {{/*
Create a default fully qualified app name. Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
@ -23,6 +31,14 @@ If release name contains chart name it will be used as a full name.
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- define "n8n-webhook.fullname" -}}
{{ include "n8n.fullname" . }}-webhook
{{- end }}
{{- define "n8n-worker.fullname" -}}
{{ include "n8n.fullname" . }}-worker
{{- end }}
{{/* {{/*
Create chart name and version as used by the chart label. Create chart name and version as used by the chart label.
*/}} */}}
@ -33,15 +49,32 @@ Create chart name and version as used by the chart label.
{{/* {{/*
Common labels Common labels
*/}} */}}
{{- define "n8n.labels" -}} {{- define "common.labels" -}}
helm.sh/chart: {{ include "n8n.chart" . }} helm.sh/chart: {{ include "n8n.chart" . }}
{{ include "n8n.selectorLabels" . }}
{{- if .Chart.AppVersion }} {{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }} {{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }} {{- end }}
{{/*
n8n labels
*/}}
{{- define "n8n.labels" -}}
{{ include "common.labels" . }}
{{ include "n8n.selectorLabels" . }}
{{- end }}
{{- define "n8n-webhook.labels" -}}
{{ include "common.labels" . }}
{{ include "n8n-webhook.selectorLabels" . }}
{{- end }}
{{- define "n8n-worker.labels" -}}
{{ include "common.labels" . }}
{{ include "n8n-worker.selectorLabels" . }}
{{- end }}
{{/* {{/*
Selector labels Selector labels
*/}} */}}
@ -49,3 +82,13 @@ Selector labels
app.kubernetes.io/name: {{ include "n8n.name" . }} app.kubernetes.io/name: {{ include "n8n.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- end }}
{{- define "n8n-webhook.selectorLabels" -}}
app.kubernetes.io/name: {{ include "n8n-webhook.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- define "n8n-worker.selectorLabels" -}}
app.kubernetes.io/name: {{ include "n8n-worker.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

View File

@ -6,16 +6,21 @@ metadata:
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n.labels" . | nindent 4 }}
data: data:
N8N_HOST: {{ .Values.config.host | quote }}
N8N_PORT: {{ .Values.config.port | quote }}
N8N_PROTOCOL: {{ .Values.config.protocol | quote }}
N8N_METRICS: {{ .Values.config.metrics.enabled | quote }}
N8N_METRICS_PREFIX: {{ .Values.config.metrics.prefix | quote }}
WEBHOOK_URL: {{ .Values.config.webhook_url | quote }} WEBHOOK_URL: {{ .Values.config.webhook_url | quote }}
EXECUTIONS_MODE: "queue" EXECUTIONS_MODE: "queue"
EXECUTIONS_PROCESS: {{ .Values.config.executions.process | quote }} EXECUTIONS_PROCESS: {{ .Values.config.executions.process | quote }}
GENERIC_TIMEZONE: {{ .Values.config.timezone | quote }} GENERIC_TIMEZONE: {{ .Values.config.timezone | quote }}
EXECUTIONS_DATA_PRUNE: {{ .Values.config.executions.data.prune | quote }} EXECUTIONS_DATA_PRUNE: {{ .Values.config.executions.data.prune | quote }}
EXECUTIONS_DATA_MAX_AGE: {{ .Values.config.executions.data.max_age | quote }} EXECUTIONS_DATA_MAX_AGE: {{ .Values.config.executions.data.max_age | quote }}
N8N_DIAGNOSTICS_ENABLED: {{ .Values.config.executions.data.max_age | quote }} N8N_DIAGNOSTICS_ENABLED: {{ .Values.config.diagnostics.enabled | quote }}
NODE_FUNCTION_ALLOW_BUILTIN: {{ .Values.config.node.function.allow.builtin | quote }} NODE_FUNCTION_ALLOW_BUILTIN: {{ .Values.config.node.function.allow.builtin | quote }}
NODE_FUNCTION_ALLOW_EXTERNAL: {{ .Values.config.node.function.allow.external | quote }} NODE_FUNCTION_ALLOW_EXTERNAL: {{ .Values.config.node.function.allow.external | quote }}
QUEUE_BULL_REDIS_HOST: {{ include "n8n.fullname" . }}-redis QUEUE_BULL_REDIS_HOST: {{ include "n8n.fullname" . }}-redis-master
{{- if .Values.config.debug }} {{- if .Values.config.debug }}
N8N_LOG_LEVEL: debug N8N_LOG_LEVEL: debug
{{- end }} {{- end }}

View File

@ -11,8 +11,10 @@ spec:
{{- include "n8n.selectorLabels" . | nindent 6 }} {{- include "n8n.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.n8n.podAnnotations }}
annotations: 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 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
@ -25,31 +27,40 @@ spec:
securityContext: securityContext:
{{- toYaml .Values.n8n.podSecurityContext | nindent 8 }} {{- toYaml .Values.n8n.podSecurityContext | nindent 8 }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:
{{- toYaml .Values.n8n.securityContext | nindent 12 }} {{- toYaml .Values.n8n.securityContext | nindent 12 }}
image: "{{ .Values.n8n.image.registry }}/{{ .Values.n8n.image.repository }}:{{ .Values.n8n.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.n8n.image.registry }}/{{ .Values.n8n.image.repository }}:{{ .Values.n8n.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.n8n.image.pullPolicy }} imagePullPolicy: {{ .Values.n8n.image.pullPolicy }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "n8n.fullname" . }} name: {{ include "n8n.fullname" . }}
{{- if .Values.n8n.extraEnvVarsSecret }} {{- if .Values.n8n.extraEnvVarsSecret }}
- secretRef: - secretRef:
name: {{ .Values.n8n.extraEnvVarsSecret }} name: {{ .Values.n8n.extraEnvVarsSecret }}
{{- else }}
- secretRef:
name: {{ include "n8n.fullname" . }}
{{- end }} {{- end }}
ports: ports:
- name: http - name: http
containerPort: 5678 containerPort: 5678
protocol: TCP protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthz path: /healthz
port: http port: http
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /healthz path: /healthz
port: http port: http
resources: startupProbe:
httpGet:
path: /healthz
port: http
failureThreshold: 30
periodSeconds: 10
resources:
{{- toYaml .Values.n8n.resources | nindent 12 }} {{- toYaml .Values.n8n.resources | nindent 12 }}
{{- with .Values.n8n.nodeSelector }} {{- with .Values.n8n.nodeSelector }}
nodeSelector: nodeSelector:

View File

@ -29,30 +29,30 @@ spec:
{{- if .Values.n8n.ingress.tls }} {{- if .Values.n8n.ingress.tls }}
tls: tls:
{{- range .Values.n8n.ingress.tls }} {{- range .Values.n8n.ingress.tls }}
- hosts: - hosts:
{{- range .hosts }} {{- range .hosts }}
- {{ . | quote }} - {{ . | quote }}
{{- end }} {{- end }}
secretName: {{ .secretName }} secretName: {{ .secretName }}
{{- end }} {{- end }}
{{- end }} {{- end }}
rules: rules:
{{- range .Values.n8n.ingress.hosts }} {{- range .Values.n8n.ingress.hosts }}
- host: {{ .host | quote }} - host: {{ .host | quote }}
http: http:
paths: paths:
{{- range .paths }} {{- range .paths }}
- path: {{ .path }} - path: {{ .path }}
pathType: {{ default "ImplementationSpecific" .pathType }} pathType: {{ default "ImplementationSpecific" .pathType }}
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service: service:
name: {{ $fullName }} name: {{ $fullName }}
port: port:
number: {{ $svcPort }} number: {{ $svcPort }}
{{- else }} {{- else }}
serviceName: {{ $fullName }} serviceName: {{ $fullName }}
servicePort: {{ $svcPort }} servicePort: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -7,9 +7,9 @@ metadata:
spec: spec:
type: {{ .Values.n8n.service.type }} type: {{ .Values.n8n.service.type }}
ports: ports:
- port: {{ .Values.n8n.service.port }} - port: {{ .Values.n8n.service.port }}
targetPort: http targetPort: http
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
{{- include "n8n.selectorLabels" . | nindent 4 }} {{- include "n8n.selectorLabels" . | nindent 4 }}

View File

@ -8,8 +8,8 @@ metadata:
"helm.sh/hook": test "helm.sh/hook": test
spec: spec:
containers: containers:
- name: wget - name: wget
image: busybox image: busybox
command: [ 'wget' ] command: ['wget']
args: [ '{{ include "n8n.fullname" . }}:{{ .Values.n8n.service.port }}' ] args: ['{{ include "n8n.fullname" . }}:{{ .Values.n8n.service.port }}']
restartPolicy: Never restartPolicy: Never

View File

@ -1,24 +1,26 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "n8n.fullname" . }}-webhook name: {{ include "n8n-webhook.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-webhook.labels" . | nindent 4 }}
spec: spec:
{{- if not .Values.webhook.autoscaling.enabled }} {{- if not .Values.webhook.autoscaling.enabled }}
replicas: {{ .Values.webhook.replicaCount }} replicas: {{ .Values.webhook.replicaCount }}
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "n8n.selectorLabels" . | nindent 6 }} {{- include "n8n-webhook.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.webhook.podAnnotations }}
annotations: 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 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- include "n8n.selectorLabels" . | nindent 8 }} {{- include "n8n-webhook.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.webhook.image.pullSecrets }} {{- with .Values.webhook.image.pullSecrets }}
imagePullSecrets: imagePullSecrets:
@ -27,34 +29,37 @@ spec:
securityContext: securityContext:
{{- toYaml .Values.webhook.podSecurityContext | nindent 8 }} {{- toYaml .Values.webhook.podSecurityContext | nindent 8 }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:
{{- toYaml .Values.webhook.securityContext | nindent 12 }} {{- toYaml .Values.webhook.securityContext | nindent 12 }}
image: "{{ .Values.webhook.image.registry }}/{{ .Values.webhook.image.repository }}:{{ .Values.webhook.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.webhook.image.registry }}/{{ .Values.webhook.image.repository }}:{{ .Values.webhook.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.webhook.image.pullPolicy }} imagePullPolicy: {{ .Values.webhook.image.pullPolicy }}
command: command:
- n8n - n8n
- webhook - webhook
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "n8n.fullname" . }} name: {{ include "n8n.fullname" . }}
{{- if .Values.webhook.extraEnvVarsSecret }} {{- if .Values.webhook.extraEnvVarsSecret }}
- secretRef: - secretRef:
name: {{ .Values.webhook.extraEnvVarsSecret }} name: {{ .Values.webhook.extraEnvVarsSecret }}
{{- else }}
- secretRef:
name: {{ include "n8n.fullname" . }}
{{- end }} {{- end }}
ports: ports:
- name: http - name: http
containerPort: 5678 containerPort: 5678
protocol: TCP protocol: TCP
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthz path: /healthz
port: http port: http
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /healthz path: /healthz
port: http port: http
resources: resources:
{{- toYaml .Values.webhook.resources | nindent 12 }} {{- toYaml .Values.webhook.resources | nindent 12 }}
{{- with .Values.webhook.nodeSelector }} {{- with .Values.webhook.nodeSelector }}
nodeSelector: nodeSelector:

View File

@ -1,5 +1,5 @@
{{- if .Values.webhook.ingress.enabled -}} {{- if .Values.webhook.ingress.enabled -}}
{{- $fullName := include "n8n.fullname" . -}} {{- $fullName := include "n8n-webhook.fullname" . -}}
{{- $svcPort := .Values.webhook.service.port -}} {{- $svcPort := .Values.webhook.service.port -}}
{{- if and .Values.webhook.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if and .Values.webhook.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.webhook.ingress.annotations "kubernetes.io/ingress.class") }} {{- if not (hasKey .Values.webhook.ingress.annotations "kubernetes.io/ingress.class") }}
@ -15,9 +15,9 @@ apiVersion: extensions/v1beta1
{{- end }} {{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }}-webhook name: {{ $fullName }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-webhook.labels" . | nindent 4 }}
{{- with .Values.webhook.ingress.annotations }} {{- with .Values.webhook.ingress.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
@ -29,30 +29,30 @@ spec:
{{- if .Values.webhook.ingress.tls }} {{- if .Values.webhook.ingress.tls }}
tls: tls:
{{- range .Values.webhook.ingress.tls }} {{- range .Values.webhook.ingress.tls }}
- hosts: - hosts:
{{- range .hosts }} {{- range .hosts }}
- {{ . | quote }} - {{ . | quote }}
{{- end }} {{- end }}
secretName: {{ .secretName }} secretName: {{ .secretName }}
{{- end }} {{- end }}
{{- end }} {{- end }}
rules: rules:
{{- range .Values.webhook.ingress.hosts }} {{- range .Values.webhook.ingress.hosts }}
- host: {{ .host | quote }} - host: {{ .host | quote }}
http: http:
paths: paths:
{{- range .paths }} {{- range .paths }}
- path: {{ .path }} - path: {{ .path }}
pathType: {{ default "ImplementationSpecific" .pathType }} pathType: {{ default "ImplementationSpecific" .pathType }}
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service: service:
name: {{ $fullName }} name: {{ $fullName }}
port: port:
number: {{ $svcPort }} number: {{ $svcPort }}
{{- else }} {{- else }}
serviceName: {{ $fullName }} serviceName: {{ $fullName }}
servicePort: {{ $svcPort }} servicePort: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -1,15 +1,15 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "n8n.fullname" . }}-webhook name: {{ include "n8n-webhook.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-webhook.labels" . | nindent 4 }}
spec: spec:
type: {{ .Values.webhook.service.type }} type: {{ .Values.webhook.service.type }}
ports: ports:
- port: {{ .Values.webhook.service.port }} - port: {{ .Values.webhook.service.port }}
targetPort: http targetPort: http
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
{{- include "n8n.selectorLabels" . | nindent 4 }} {{- include "n8n-webhook.selectorLabels" . | nindent 4 }}

View File

@ -1,24 +1,26 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "n8n.fullname" . }}-worker name: {{ include "n8n-worker.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-worker.labels" . | nindent 4 }}
spec: spec:
{{- if not .Values.worker.autoscaling.enabled }} {{- if not .Values.worker.autoscaling.enabled }}
replicas: {{ .Values.worker.replicaCount }} replicas: {{ .Values.worker.replicaCount }}
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "n8n.selectorLabels" . | nindent 6 }} {{- include "n8n-worker.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.worker.podAnnotations }}
annotations: annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- with .Values.worker.podAnnotations }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- include "n8n.selectorLabels" . | nindent 8 }} {{- include "n8n-worker.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.worker.image.pullSecrets }} {{- with .Values.worker.image.pullSecrets }}
imagePullSecrets: imagePullSecrets:
@ -27,22 +29,25 @@ spec:
securityContext: securityContext:
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }} {{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:
{{- toYaml .Values.worker.securityContext | nindent 12 }} {{- toYaml .Values.worker.securityContext | nindent 12 }}
image: "{{ .Values.worker.image.registry }}/{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.worker.image.registry }}/{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.worker.image.pullPolicy }} imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
command: command:
- n8n - n8n
- worker - worker
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "n8n.fullname" . }} name: {{ include "n8n.fullname" . }}
{{- if .Values.worker.extraEnvVarsSecret }} {{- if .Values.worker.extraEnvVarsSecret }}
- secretRef: - secretRef:
name: {{ .Values.worker.extraEnvVarsSecret }} name: {{ .Values.worker.extraEnvVarsSecret }}
{{- else }}
- secretRef:
name: {{ include "n8n.fullname" . }}
{{- end }} {{- end }}
resources: resources:
{{- toYaml .Values.worker.resources | nindent 12 }} {{- toYaml .Values.worker.resources | nindent 12 }}
{{- with .Values.worker.nodeSelector }} {{- with .Values.worker.nodeSelector }}
nodeSelector: nodeSelector:

View File

@ -2,27 +2,27 @@
apiVersion: autoscaling/v2beta1 apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: {{ include "n8n.fullname" . }}-worker name: {{ include "n8n-worker.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-worker.labels" . | nindent 4 }}
spec: spec:
scaleTargetRef: scaleTargetRef:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
name: {{ include "n8n.fullname" . }} name: {{ include "n8n-worker.fullname" . }}
minReplicas: {{ .Values.worker.autoscaling.minReplicas }} minReplicas: {{ .Values.worker.autoscaling.minReplicas }}
maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }} maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }}
metrics: metrics:
{{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }} {{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource - type: Resource
resource: resource:
name: cpu name: cpu
targetAverageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }} targetAverageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
{{- end }} {{- end }}
{{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} {{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource - type: Resource
resource: resource:
name: memory name: memory
targetAverageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage }} targetAverageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -1,4 +1,7 @@
config: config:
host: ""
port: "5678"
protocol: http
debug: false debug: false
db_type: postgresdb db_type: postgresdb
postgres: postgres:
@ -23,9 +26,15 @@ config:
allow: allow:
builtin: '*' builtin: '*'
external: '*' external: '*'
metrics:
enabled: false
prefix: n8n_
redis: redis:
enabled: false enabled: false
architecture: standalone
auth:
enabled: false
existingSecret: "" existingSecret: ""
@ -39,7 +48,7 @@ n8n:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
pullSecrets: [ ] pullSecrets: []
extraEnvVarsSecret: "" extraEnvVarsSecret: ""
@ -47,20 +56,20 @@ n8n:
# Specifies whether a service account should be created # Specifies whether a service account should be created
create: false create: false
# Annotations to add to the service account # Annotations to add to the service account
annotations: { } annotations: {}
# The name of the service account to use. # The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template # If not set and create is true, a name is generated using the fullname template
name: "" name: ""
podAnnotations: { } podAnnotations: {}
podSecurityContext: { } podSecurityContext: {}
# fsGroup: 2000 # fsGroup: 2000
securityContext: { } securityContext: {}
# capabilities: # capabilities:
# drop: # drop:
# - ALL # - ALL
# readOnlyRootFilesystem: true # readOnlyRootFilesystem: true
# runAsNonRoot: true # runAsNonRoot: true
# runAsUser: 1000 # runAsUser: 1000
@ -72,36 +81,36 @@ n8n:
ingress: ingress:
enabled: false enabled: false
className: "" className: ""
annotations: { } annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
hosts: hosts:
- host: chart-example.local - host: chart-example.local
paths: paths:
- path: / - path: /
pathType: ImplementationSpecific pathType: ImplementationSpecific
tls: [ ] tls: []
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
# - chart-example.local # - chart-example.local
resources: { } resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little # choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following # resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'. # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits: # limits:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
# requests: # requests:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
nodeSelector: { } nodeSelector: {}
tolerations: [ ] tolerations: []
affinity: { } affinity: {}
webhook: webhook:
replicaCount: 1 replicaCount: 1
@ -112,7 +121,7 @@ webhook:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
pullSecrets: [ ] pullSecrets: []
extraEnvVarsSecret: "" extraEnvVarsSecret: ""
@ -120,21 +129,21 @@ webhook:
# Specifies whether a service account should be created # Specifies whether a service account should be created
create: false create: false
# Annotations to add to the service account # Annotations to add to the service account
annotations: { } annotations: {}
# The name of the service account to use. # The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template # If not set and create is true, a name is generated using the fullname template
name: "" name: ""
podAnnotations: { } podAnnotations: {}
podSecurityContext: { } podSecurityContext: {}
# fsGroup: 2000 # fsGroup: 2000
securityContext: { } securityContext: {}
# capabilities: # capabilities:
# drop: # drop:
# - ALL # - ALL
# readOnlyRootFilesystem: true # readOnlyRootFilesystem: true
# runAsNonRoot: true # runAsNonRoot: true
# runAsUser: 1000 # runAsUser: 1000
@ -145,28 +154,28 @@ webhook:
ingress: ingress:
enabled: false enabled: false
className: "" className: ""
annotations: { } annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
hosts: hosts:
- host: chart-example.local - host: chart-example.local
paths: paths:
- path: / - path: /
pathType: ImplementationSpecific pathType: ImplementationSpecific
tls: [ ] tls: []
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
# - chart-example.local # - chart-example.local
resources: { } resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little # choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following # resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'. # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits: # limits:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
# requests: # requests:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
@ -177,11 +186,11 @@ webhook:
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80
nodeSelector: { } nodeSelector: {}
tolerations: [ ] tolerations: []
affinity: { } affinity: {}
worker: worker:
replicaCount: 1 replicaCount: 1
@ -192,7 +201,7 @@ worker:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
pullSecrets: [ ] pullSecrets: []
extraEnvVarsSecret: "" extraEnvVarsSecret: ""
@ -200,21 +209,21 @@ worker:
# Specifies whether a service account should be created # Specifies whether a service account should be created
create: false create: false
# Annotations to add to the service account # Annotations to add to the service account
annotations: { } annotations: {}
# The name of the service account to use. # The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template # If not set and create is true, a name is generated using the fullname template
name: "" name: ""
podAnnotations: { } podAnnotations: {}
podSecurityContext: { } podSecurityContext: {}
# fsGroup: 2000 # fsGroup: 2000
securityContext: { } securityContext: {}
# capabilities: # capabilities:
# drop: # drop:
# - ALL # - ALL
# readOnlyRootFilesystem: true # readOnlyRootFilesystem: true
# runAsNonRoot: true # runAsNonRoot: true
# runAsUser: 1000 # runAsUser: 1000
@ -225,28 +234,28 @@ worker:
ingress: ingress:
enabled: false enabled: false
className: "" className: ""
annotations: { } annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
hosts: hosts:
- host: chart-example.local - host: chart-example.local
paths: paths:
- path: / - path: /
pathType: ImplementationSpecific pathType: ImplementationSpecific
tls: [ ] tls: []
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
# - chart-example.local # - chart-example.local
resources: { } resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little # choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following # resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'. # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits: # limits:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
# requests: # requests:
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
@ -257,8 +266,8 @@ worker:
targetCPUUtilizationPercentage: 80 targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80 # targetMemoryUtilizationPercentage: 80
nodeSelector: { } nodeSelector: {}
tolerations: [ ] tolerations: []
affinity: { } affinity: {}