-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dedicated Workers and Webhooks Instances (#24)
* Add dedicated Workers and Webhooks Instances * disable scaling per default enable redis persistence when used * Delete commands.shj * ignore debug yaml files * change pruneData default cleanup values.yaml from basicAuth * increase chart version * update redis dependency * ignore all custom values * remote test annotations * move deploymentPodEnvironments into helper * add worker and webhook resource limits * extend readme * increase n8n version to 0.196.0 Co-authored-by: Stefan Warnat <[email protected]>
- Loading branch information
Showing
13 changed files
with
390 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/values.*.yaml | ||
commands.sh | ||
yamls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: redis | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 17.2.0 | ||
digest: sha256:989a8e3f05d54b04db15e782bd24ca5a5872a36f5dc02b7882b25491a5a5ddde | ||
generated: "2022-09-30T08:49:11.0457529+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{{- if .Values.scaling.webhook.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "n8n.fullname" . }}-webhook | ||
labels: | ||
{{- include "n8n.labels" . | nindent 4 }} | ||
spec: | ||
{{- if not .Values.autoscaling.enabled }} | ||
replicas: {{ .Values.scaling.webhook.count }} | ||
{{- end }} | ||
strategy: | ||
type: {{ .Values.deploymentStrategy.type }} | ||
selector: | ||
matchLabels: | ||
{{- include "n8n.selectorLabels" . | nindent 6 }} | ||
app.kubernetes.io/type: webhooks | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/config: {{ print .Values | sha256sum }} | ||
{{- with .Values.podAnnotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "n8n.selectorLabels" . | nindent 8 }} | ||
app.kubernetes.io/type: webhooks | ||
{{- if .Values.podLabels }} | ||
{{ toYaml .Values.podLabels | nindent 8 }} | ||
{{- end }} | ||
|
||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "n8n.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: ["n8n"] | ||
args: ["webhook"] | ||
env: | ||
{{- include "n8n.deploymentPodEnvironments" . | nindent 12 }} | ||
ports: | ||
- name: http | ||
containerPort: {{ get .Values.config "port" | default 5678 }} | ||
protocol: TCP | ||
resources: | ||
{{- toYaml .Values.webhookResources | nindent 12 }} | ||
volumeMounts: | ||
- name: data | ||
mountPath: /root/.n8n | ||
{{- if .Values.config }} | ||
- name: config-volume | ||
mountPath: /n8n-config | ||
{{- end }} | ||
{{- if .Values.secret }} | ||
- name: secret-volume | ||
mountPath: /n8n-secret | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: "data" | ||
{{ include "n8n.pvc" . }} | ||
{{- if .Values.config }} | ||
- name: config-volume | ||
configMap: | ||
name: {{ include "n8n.fullname" . }} | ||
{{- end }} | ||
{{- if .Values.secret }} | ||
- name: secret-volume | ||
secret: | ||
secretName: {{ include "n8n.fullname" . }} | ||
items: | ||
- key: "secret.json" | ||
path: "secret.json" | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{{- if .Values.scaling.enabled }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "n8n.fullname" . }}-worker | ||
labels: | ||
{{- include "n8n.labels" . | nindent 4 }} | ||
spec: | ||
{{- if not .Values.autoscaling.enabled }} | ||
replicas: {{ .Values.scaling.worker.count }} | ||
{{- end }} | ||
strategy: | ||
type: {{ .Values.deploymentStrategy.type }} | ||
selector: | ||
matchLabels: | ||
{{- include "n8n.selectorLabels" . | nindent 6 }} | ||
app.kubernetes.io/type: worker | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/config: {{ print .Values | sha256sum }} | ||
{{- with .Values.podAnnotations }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "n8n.selectorLabels" . | nindent 8 }} | ||
app.kubernetes.io/type: worker | ||
{{- if .Values.podLabels }} | ||
{{ toYaml .Values.podLabels | nindent 8 }} | ||
{{- end }} | ||
|
||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "n8n.serviceAccountName" . }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
command: ["n8n"] | ||
args: ["worker", "--concurrency={{ .Values.scaling.worker.concurrency }}"] | ||
env: | ||
{{- include "n8n.deploymentPodEnvironments" . | nindent 12 }} | ||
ports: | ||
- name: http | ||
containerPort: {{ get .Values.config "port" | default 5678 }} | ||
protocol: TCP | ||
resources: | ||
{{- toYaml .Values.workerResources | nindent 12 }} | ||
volumeMounts: | ||
- name: data | ||
mountPath: /root/.n8n | ||
{{- if .Values.config }} | ||
- name: config-volume | ||
mountPath: /n8n-config | ||
{{- end }} | ||
{{- if .Values.secret }} | ||
- name: secret-volume | ||
mountPath: /n8n-secret | ||
{{- end }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: "data" | ||
{{ include "n8n.pvc" . }} | ||
{{- if .Values.config }} | ||
- name: config-volume | ||
configMap: | ||
name: {{ include "n8n.fullname" . }} | ||
{{- end }} | ||
{{- if .Values.secret }} | ||
- name: secret-volume | ||
secret: | ||
secretName: {{ include "n8n.fullname" . }} | ||
items: | ||
- key: "secret.json" | ||
path: "secret.json" | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.