Compare commits
69 Commits
61f92c0075
...
0.6.10
Author | SHA1 | Date | |
---|---|---|---|
8ed2daa724
|
|||
e3cffd7a96
|
|||
d407d33ee6
|
|||
897e2cbb29
|
|||
99404b6210
|
|||
d6fa8149b0
|
|||
517337bb5a
|
|||
3a984d94ea
|
|||
8640fa3a28
|
|||
6ce3f7a932 | |||
f82dc3e103
|
|||
8fcfc65a21
|
|||
334edcf72b
|
|||
081683a2c1
|
|||
e24a65060b
|
|||
f3efde9263
|
|||
2b2a037305
|
|||
3d41f894c6
|
|||
b66e193714
|
|||
e292f3d434
|
|||
bfbfc4b0d2
|
|||
856d90e88b
|
|||
5a9eb1a6fc
|
|||
4506443e47
|
|||
eb3096689d
|
|||
4fb7dec4c2
|
|||
5aa42df15d
|
|||
9e04dd563f
|
|||
33a4092cdd
|
|||
01534912d3
|
|||
48e01337c9
|
|||
dddfa808e9
|
|||
fe87d7373f
|
|||
de43724541
|
|||
429a04772a
|
|||
5663bb594a
|
|||
90a63653bf
|
|||
3c4842a746
|
|||
b634953e98
|
|||
e57f4ca15d
|
|||
47e32cbc2e
|
|||
ddb4a2eb9b
|
|||
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
|
|||
3f46388a06
|
|||
3c787efb0a
|
55
.drone.yml
55
.drone.yml
@ -5,47 +5,18 @@ name: default
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
- push
|
||||
- tag
|
||||
|
||||
steps:
|
||||
- name: lint
|
||||
image: cr.grachevko.ru/docker.io/alpine/helm:latest
|
||||
pull: always
|
||||
commands:
|
||||
- helm lint .
|
||||
|
||||
- name: version
|
||||
image: cr.grachevko.ru/docker.io/mikefarah/yq:latest
|
||||
pull: always
|
||||
user: root
|
||||
commands:
|
||||
- yq -i '.version = "'$DRONE_TAG'"' Chart.yaml
|
||||
- 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
|
||||
- name: release
|
||||
image: cr.grachevko.ru/drone/helm:24
|
||||
settings:
|
||||
tag: ${DRONE_TAG}
|
||||
username:
|
||||
from_secret: HELM_REPO_USERNAME
|
||||
password:
|
||||
from_secret: HELM_REPO_PASSWORD
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
29
.gitea/workflows/release.yaml
Normal file
29
.gitea/workflows/release.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
name: Release Chart
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
REGISTRY: harbor.grachevko.ru
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: yokawasa/action-setup-kube-tools@v0.9.3
|
||||
with:
|
||||
setup-tools: helm
|
||||
- name: deps and lint
|
||||
run: |
|
||||
helm dependency update
|
||||
helm lint --strict .
|
||||
- name: build
|
||||
run: helm package --version ${{ gitea.ref_name }} .
|
||||
- name: publish
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | helm registry login ${{ env.REGISTRY }} --username "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||
helm push ./*.tgz oci://harbor.grachevko.ru/${{ gitea.repository }}
|
@ -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"
|
||||
|
17
Chart.yaml
17
Chart.yaml
@ -3,16 +3,15 @@ name: n8n
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
version: 0.0.1
|
||||
appVersion: 0.202.1
|
||||
appVersion: 1.19.0
|
||||
icon: https://github.com/n8n-io/n8n/raw/master/assets/n8n-logo.png
|
||||
maintainers:
|
||||
- email: me@grachevko.ru
|
||||
name: Konstantin Grachev
|
||||
- email: me@grachevko.ru
|
||||
name: Konstantin Grachev
|
||||
sources:
|
||||
- https://git.grachevko.ru/n8n/chart
|
||||
- https://git.grachevko.ru/n8n/chart
|
||||
dependencies:
|
||||
- name: redis
|
||||
version: ~16.4.0
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
alias: redis
|
||||
condition: redis.enabled
|
||||
- name: redis
|
||||
version: ^17
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
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,17 +6,21 @@ metadata:
|
||||
labels:
|
||||
{{- include "n8n.labels" . | nindent 4 }}
|
||||
data:
|
||||
NODE_ENV: {{ .Values.config.node_env | quote }}
|
||||
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 }}
|
||||
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 }}
|
@ -11,8 +11,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:
|
||||
@ -25,31 +27,40 @@ spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.n8n.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
- 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" . }}
|
||||
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 }}
|
||||
- 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
|
||||
resources:
|
||||
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:
|
||||
|
@ -29,30 +29,30 @@ spec:
|
||||
{{- if .Values.n8n.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.n8n.ingress.tls }}
|
||||
- hosts:
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.n8n.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
backend:
|
||||
- path: {{ .path }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -7,9 +7,9 @@ metadata:
|
||||
spec:
|
||||
type: {{ .Values.n8n.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.n8n.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: {{ .Values.n8n.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "n8n.selectorLabels" . | nindent 4 }}
|
||||
|
@ -8,8 +8,8 @@ metadata:
|
||||
"helm.sh/hook": test
|
||||
spec:
|
||||
containers:
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: [ 'wget' ]
|
||||
args: [ '{{ include "n8n.fullname" . }}:{{ .Values.n8n.service.port }}' ]
|
||||
- name: wget
|
||||
image: busybox
|
||||
command: ['wget']
|
||||
args: ['{{ include "n8n.fullname" . }}:{{ .Values.n8n.service.port }}']
|
||||
restartPolicy: Never
|
||||
|
@ -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:
|
||||
@ -27,31 +29,37 @@ spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.webhook.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
- 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 }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
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 }}
|
||||
- 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:
|
||||
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:
|
||||
|
@ -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 }}
|
||||
@ -29,30 +29,30 @@ spec:
|
||||
{{- if .Values.webhook.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.webhook.ingress.tls }}
|
||||
- hosts:
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.webhook.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
backend:
|
||||
- path: {{ .path }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
backend:
|
||||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- else }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -1,15 +1,15 @@
|
||||
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:
|
||||
- port: {{ .Values.webhook.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
- port: {{ .Values.webhook.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "n8n.selectorLabels" . | nindent 4 }}
|
||||
{{- include "n8n-webhook.selectorLabels" . | nindent 4 }}
|
||||
|
@ -1,24 +1,26 @@
|
||||
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 }}
|
||||
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:
|
||||
@ -27,19 +29,25 @@ spec:
|
||||
securityContext:
|
||||
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.worker.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.worker.image.registry }}/{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
image: "{{ .Values.worker.image.registry }}/{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
|
||||
command:
|
||||
- n8n
|
||||
- worker
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
{{- if .Values.worker.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.worker.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.worker.extraEnvVarsSecret }}
|
||||
{{- else }}
|
||||
- secretRef:
|
||||
name: {{ include "n8n.fullname" . }}
|
||||
{{- end }}
|
||||
resources:
|
||||
resources:
|
||||
{{- toYaml .Values.worker.resources | nindent 12 }}
|
||||
{{- with .Values.worker.nodeSelector }}
|
||||
nodeSelector:
|
||||
|
@ -2,27 +2,27 @@
|
||||
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:
|
||||
{{- if .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
targetAverageUtilization: {{ .Values.worker.autoscaling.targetCPUUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
targetAverageUtilization: {{ .Values.worker.autoscaling.targetMemoryUtilizationPercentage }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
133
values.yaml
133
values.yaml
@ -1,5 +1,8 @@
|
||||
config:
|
||||
debug: "false"
|
||||
host: ""
|
||||
port: "5678"
|
||||
protocol: http
|
||||
debug: false
|
||||
db_type: postgresdb
|
||||
postgres:
|
||||
database: n8n
|
||||
@ -11,19 +14,27 @@ config:
|
||||
encryption_key: ""
|
||||
timezone: Europe/Moscow
|
||||
webhook_url: ""
|
||||
node_env: production
|
||||
executions:
|
||||
process: main
|
||||
data:
|
||||
prune: 'true'
|
||||
prune: true
|
||||
max_age: 8760
|
||||
diagnostics:
|
||||
enabled: 'false'
|
||||
enabled: false
|
||||
node:
|
||||
function:
|
||||
allow:
|
||||
builtin: '*'
|
||||
external: '*'
|
||||
metrics:
|
||||
enabled: false
|
||||
prefix: n8n_
|
||||
|
||||
redis:
|
||||
enabled: false
|
||||
architecture: standalone
|
||||
auth:
|
||||
enabled: false
|
||||
|
||||
existingSecret: ""
|
||||
|
||||
@ -37,7 +48,7 @@ n8n:
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
pullSecrets: [ ]
|
||||
pullSecrets: []
|
||||
|
||||
extraEnvVarsSecret: ""
|
||||
|
||||
@ -45,20 +56,20 @@ n8n:
|
||||
# Specifies whether a service account should be created
|
||||
create: false
|
||||
# Annotations to add to the service account
|
||||
annotations: { }
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: { }
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: { }
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: { }
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
@ -70,36 +81,36 @@ n8n:
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: { }
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: [ ]
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: { }
|
||||
resources: {}
|
||||
# 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
|
||||
# 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:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
nodeSelector: { }
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: [ ]
|
||||
tolerations: []
|
||||
|
||||
affinity: { }
|
||||
affinity: {}
|
||||
|
||||
webhook:
|
||||
replicaCount: 1
|
||||
@ -110,7 +121,7 @@ webhook:
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
pullSecrets: [ ]
|
||||
pullSecrets: []
|
||||
|
||||
extraEnvVarsSecret: ""
|
||||
|
||||
@ -118,21 +129,21 @@ webhook:
|
||||
# Specifies whether a service account should be created
|
||||
create: false
|
||||
# Annotations to add to the service account
|
||||
annotations: { }
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: { }
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: { }
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: { }
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
@ -143,28 +154,28 @@ webhook:
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: { }
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: [ ]
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: { }
|
||||
resources: {}
|
||||
# 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
|
||||
# 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:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
@ -175,11 +186,11 @@ webhook:
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
nodeSelector: { }
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: [ ]
|
||||
tolerations: []
|
||||
|
||||
affinity: { }
|
||||
affinity: {}
|
||||
|
||||
worker:
|
||||
replicaCount: 1
|
||||
@ -190,7 +201,7 @@ worker:
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
pullSecrets: [ ]
|
||||
pullSecrets: []
|
||||
|
||||
extraEnvVarsSecret: ""
|
||||
|
||||
@ -198,21 +209,21 @@ worker:
|
||||
# Specifies whether a service account should be created
|
||||
create: false
|
||||
# Annotations to add to the service account
|
||||
annotations: { }
|
||||
annotations: {}
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
podAnnotations: { }
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: { }
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: { }
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
@ -223,28 +234,28 @@ worker:
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: { }
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: [ ]
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: { }
|
||||
resources: {}
|
||||
# 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
|
||||
# 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:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
@ -255,8 +266,8 @@ worker:
|
||||
targetCPUUtilizationPercentage: 80
|
||||
# targetMemoryUtilizationPercentage: 80
|
||||
|
||||
nodeSelector: { }
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: [ ]
|
||||
tolerations: []
|
||||
|
||||
affinity: { }
|
||||
affinity: {}
|
||||
|
Reference in New Issue
Block a user