Compare commits
25 Commits
3f46388a06
...
0.2.1
Author | SHA1 | Date | |
---|---|---|---|
b0162f4908
|
|||
ef8f635aba
|
|||
3497a9537e
|
|||
4e01f912ed
|
|||
bf6002c156
|
|||
ad9a7b248f
|
|||
b143ede98b
|
|||
7155146e00
|
|||
3639069556
|
|||
92f8d4442c
|
|||
5500ec6642
|
|||
fba44456e6
|
|||
8bdea5fba6
|
|||
cdbceb1396
|
|||
e7598dc380
|
|||
c2c9255462
|
|||
9ca2cac8b1
|
|||
744613584d
|
|||
36532aef3b
|
|||
a140216365
|
|||
623fefe1d3
|
|||
00f087b635
|
|||
5306094c0c
|
|||
00d1b8dcf0
|
|||
0fa2dac744
|
@ -21,4 +21,3 @@
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
*.tgz
|
||||
|
@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 16.4.5
|
||||
digest: sha256:bed8b8c341db9fcbd4a81de0b55a47e306ba4217e8cfa300a4ba97befb13e51c
|
||||
generated: "2022-11-15T22:11:41.384512283+03:00"
|
||||
version: 17.3.11
|
||||
digest: sha256:40f0dad12458b527f362dd152bbeb042a415b0bb48376357901d2062489b0650
|
||||
generated: "2022-11-16T12:29:15.310122534+03:00"
|
||||
|
@ -3,7 +3,7 @@ name: n8n
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
version: 0.0.1
|
||||
appVersion: 0.202.1
|
||||
appVersion: 0.213.1
|
||||
icon: https://github.com/n8n-io/n8n/raw/master/assets/n8n-logo.png
|
||||
maintainers:
|
||||
- email: me@grachevko.ru
|
||||
@ -12,7 +12,6 @@ sources:
|
||||
- https://git.grachevko.ru/n8n/chart
|
||||
dependencies:
|
||||
- name: redis
|
||||
version: ~16.4.0
|
||||
version: ^17
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
alias: redis
|
||||
condition: redis.enabled
|
||||
|
@ -5,6 +5,14 @@ Expand the name of the chart.
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- 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.
|
||||
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 }}
|
||||
|
||||
{{- 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.
|
||||
*/}}
|
||||
@ -33,15 +49,32 @@ Create chart name and version as used by the chart label.
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "n8n.labels" -}}
|
||||
{{- define "common.labels" -}}
|
||||
helm.sh/chart: {{ include "n8n.chart" . }}
|
||||
{{ include "n8n.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- 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
|
||||
*/}}
|
||||
@ -49,3 +82,13 @@ Selector labels
|
||||
app.kubernetes.io/name: {{ include "n8n.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- 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 }}
|
||||
|
@ -6,16 +6,19 @@ metadata:
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
data:
|
||||
N8N_HOST: {{ .Values.config.host | quote }}
|
||||
N8N_PORT: {{ .Values.config.port | quote }}
|
||||
N8N_PROTOCOL: {{ .Values.config.protocol | quote }}
|
||||
WEBHOOK_URL: {{ .Values.config.webhook_url | quote }}
|
||||
EXECUTIONS_MODE: "queue"
|
||||
EXECUTIONS_PROCESS: {{ .Values.config.executions.process | quote }}
|
||||
GENERIC_TIMEZONE: {{ .Values.config.timezone | quote }}
|
||||
EXECUTIONS_DATA_PRUNE: {{ .Values.config.executions.data.prune | 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_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 }}
|
||||
N8N_LOG_LEVEL: debug
|
||||
{{- end }}
|
@ -4,6 +4,9 @@ metadata:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
@ -11,8 +14,10 @@ spec:
|
||||
{{- include "n8n.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.n8n.podAnnotations }}
|
||||
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:
|
||||
@ -36,6 +41,9 @@ spec:
|
||||
{{- if .Values.n8n.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.n8n.extraEnvVarsSecret }}
|
||||
{{- else }}
|
||||
- secretRef:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
@ -49,6 +57,12 @@ spec:
|
||||
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 }}
|
||||
|
@ -1,24 +1,26 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "n8n.fullname" . }}-webhook
|
||||
name: {{ include "n8n-webhook.fullname" . }}
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
{{- include "n8n-webhook.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.webhook.autoscaling.enabled }}
|
||||
replicas: {{ .Values.webhook.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "n8n.selectorLabels" . | nindent 6 }}
|
||||
{{- include "n8n-webhook.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.webhook.podAnnotations }}
|
||||
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.selectorLabels" . | nindent 8 }}
|
||||
{{- include "n8n-webhook.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.webhook.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
@ -41,6 +43,9 @@ spec:
|
||||
{{- if .Values.webhook.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.webhook.extraEnvVarsSecret }}
|
||||
{{- else }}
|
||||
- secretRef:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{- if .Values.webhook.ingress.enabled -}}
|
||||
{{- $fullName := include "n8n.fullname" . -}}
|
||||
{{- $fullName := include "n8n-webhook.fullname" . -}}
|
||||
{{- $svcPort := .Values.webhook.service.port -}}
|
||||
{{- 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") }}
|
||||
@ -15,9 +15,9 @@ apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}-webhook
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
{{- include "n8n-webhook.labels" . | nindent 4 }}
|
||||
{{- with .Values.webhook.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
|
@ -1,9 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "n8n.fullname" . }}-webhook
|
||||
name: {{ include "n8n-webhook.fullname" . }}
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
{{- include "n8n-webhook.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.webhook.service.type }}
|
||||
ports:
|
||||
@ -12,4 +12,4 @@ spec:
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "n8n.selectorLabels" . | nindent 4 }}
|
||||
{{- include "n8n-webhook.selectorLabels" . | nindent 4 }}
|
||||
|
@ -1,24 +1,29 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "n8n.fullname" . }}-worker
|
||||
name: {{ include "n8n-worker.fullname" . }}
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
{{- include "n8n-worker.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
|
||||
spec:
|
||||
{{- if not .Values.worker.autoscaling.enabled }}
|
||||
replicas: {{ .Values.worker.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "n8n.selectorLabels" . | nindent 6 }}
|
||||
{{- include "n8n-worker.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.worker.podAnnotations }}
|
||||
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 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "n8n.selectorLabels" . | nindent 8 }}
|
||||
{{- include "n8n-worker.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.worker.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
@ -41,6 +46,9 @@ spec:
|
||||
{{- if .Values.worker.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.worker.extraEnvVarsSecret }}
|
||||
{{- else }}
|
||||
- secretRef:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.worker.resources | nindent 12 }}
|
||||
|
@ -2,14 +2,14 @@
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "n8n.fullname" . }}-worker
|
||||
name: {{ include "n8n-worker.fullname" . }}
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
{{- include "n8n-worker.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
name: {{ include "n8n-worker.fullname" . }}
|
||||
minReplicas: {{ .Values.worker.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
|
15
values.yaml
15
values.yaml
@ -1,5 +1,8 @@
|
||||
config:
|
||||
debug: "false"
|
||||
host: ""
|
||||
port: "5678"
|
||||
protocol: http
|
||||
debug: false
|
||||
db_type: postgresdb
|
||||
postgres:
|
||||
database: n8n
|
||||
@ -14,16 +17,22 @@ config:
|
||||
executions:
|
||||
process: main
|
||||
data:
|
||||
prune: 'true'
|
||||
prune: true
|
||||
max_age: 8760
|
||||
diagnostics:
|
||||
enabled: 'false'
|
||||
enabled: false
|
||||
node:
|
||||
function:
|
||||
allow:
|
||||
builtin: '*'
|
||||
external: '*'
|
||||
|
||||
redis:
|
||||
enabled: false
|
||||
architecture: standalone
|
||||
auth:
|
||||
enabled: false
|
||||
|
||||
existingSecret: ""
|
||||
|
||||
nameOverride: ""
|
||||
|
Reference in New Issue
Block a user