17 Commits

Author SHA1 Message Date
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
00f087b635 Remove redis alias
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 12:29:35 +03:00
5306094c0c bump redis dependency up to 17.3.11
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 12:17:25 +03:00
00d1b8dcf0 unwrap booleans
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-15 22:56:27 +03:00
0fa2dac744 add redis.enabled to values.yaml
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-15 22:51:53 +03:00
3f46388a06 add command for webhook and worker
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-15 22:46:38 +03:00
3c787efb0a Remove unnecessary node_env 2022-11-15 22:45:02 +03:00
9 changed files with 58 additions and 16 deletions

View File

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

View File

@ -1,6 +1,6 @@
dependencies: dependencies:
- name: redis - name: redis
repository: https://charts.bitnami.com/bitnami repository: https://charts.bitnami.com/bitnami
version: 16.4.5 version: 17.3.11
digest: sha256:bed8b8c341db9fcbd4a81de0b55a47e306ba4217e8cfa300a4ba97befb13e51c digest: sha256:40f0dad12458b527f362dd152bbeb042a415b0bb48376357901d2062489b0650
generated: "2022-11-15T22:11:41.384512283+03:00" generated: "2022-11-16T12:29:15.310122534+03:00"

View File

@ -12,7 +12,6 @@ sources:
- https://git.grachevko.ru/n8n/chart - https://git.grachevko.ru/n8n/chart
dependencies: dependencies:
- name: redis - name: redis
version: ~16.4.0 version: ^17
repository: https://charts.bitnami.com/bitnami repository: https://charts.bitnami.com/bitnami
alias: redis
condition: redis.enabled condition: redis.enabled

1
TODO.md Normal file
View File

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

View File

@ -6,17 +6,19 @@ metadata:
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n.labels" . | nindent 4 }}
data: 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 }}
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

@ -4,6 +4,9 @@ metadata:
name: {{ include "n8n.fullname" . }} name: {{ include "n8n.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- 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: spec:
replicas: 1 replicas: 1
selector: selector:
@ -11,8 +14,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:
@ -36,6 +41,9 @@ spec:
{{- 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
@ -49,6 +57,12 @@ spec:
httpGet: httpGet:
path: /healthz path: /healthz
port: http port: http
startupProbe:
httpGet:
path: /healthz
port: http
failureThreshold: 30
periodSeconds: 10
resources: resources:
{{- toYaml .Values.n8n.resources | nindent 12 }} {{- toYaml .Values.n8n.resources | nindent 12 }}
{{- with .Values.n8n.nodeSelector }} {{- with .Values.n8n.nodeSelector }}

View File

@ -13,8 +13,10 @@ spec:
{{- include "n8n.selectorLabels" . | nindent 6 }} {{- include "n8n.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:
@ -32,12 +34,18 @@ spec:
{{- 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:
- n8n
- 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

View File

@ -4,6 +4,9 @@ metadata:
name: {{ include "n8n.fullname" . }}-worker name: {{ include "n8n.fullname" . }}-worker
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- 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: spec:
{{- if not .Values.worker.autoscaling.enabled }} {{- if not .Values.worker.autoscaling.enabled }}
replicas: {{ .Values.worker.replicaCount }} replicas: {{ .Values.worker.replicaCount }}
@ -13,8 +16,10 @@ spec:
{{- include "n8n.selectorLabels" . | nindent 6 }} {{- include "n8n.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:
@ -32,12 +37,18 @@ spec:
{{- 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:
- n8n
- 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 }}

View File

@ -1,5 +1,8 @@
config: config:
debug: "false" host: ""
port: "5678"
protocol: http
debug: false
db_type: postgresdb db_type: postgresdb
postgres: postgres:
database: n8n database: n8n
@ -11,20 +14,25 @@ config:
encryption_key: "" encryption_key: ""
timezone: Europe/Moscow timezone: Europe/Moscow
webhook_url: "" webhook_url: ""
node_env: production
executions: executions:
process: main process: main
data: data:
prune: 'true' prune: true
max_age: 8760 max_age: 8760
diagnostics: diagnostics:
enabled: 'false' enabled: false
node: node:
function: function:
allow: allow:
builtin: '*' builtin: '*'
external: '*' external: '*'
redis:
enabled: false
architecture: standalone
auth:
enabled: false
existingSecret: "" existingSecret: ""
nameOverride: "" nameOverride: ""