cleanup
parent
a0536118e8
commit
c362aee81b
|
|
@ -1,24 +0,0 @@
|
||||||
# Patterns to ignore when building packages.
|
|
||||||
# This supports shell glob matching, relative path matching, and
|
|
||||||
# negation (prefixed with !). Only one pattern per line.
|
|
||||||
.DS_Store
|
|
||||||
# Common VCS dirs
|
|
||||||
.git/
|
|
||||||
.gitignore
|
|
||||||
.bzr/
|
|
||||||
.bzrignore
|
|
||||||
.hg/
|
|
||||||
.hgignore
|
|
||||||
.svn/
|
|
||||||
# Common backup files
|
|
||||||
*.swp
|
|
||||||
*.bak
|
|
||||||
*.tmp
|
|
||||||
*.orig
|
|
||||||
*~
|
|
||||||
# Various IDEs
|
|
||||||
.project
|
|
||||||
.idea/
|
|
||||||
*.tmproj
|
|
||||||
.vscode/
|
|
||||||
./
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
apiVersion: v2
|
|
||||||
name: n8n-helm
|
|
||||||
description: A Helm chart for n8n on Kubernetes
|
|
||||||
type: application
|
|
||||||
metadata:
|
|
||||||
|
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
|
||||||
# to the chart and its templates, including the app version.
|
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
|
||||||
version: 0.1.3
|
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
|
||||||
appVersion: 0.18.0
|
|
||||||
icon: https://n8n.io/n8n-logo.png
|
|
||||||
keywords:
|
|
||||||
- n8n
|
|
||||||
- automation
|
|
||||||
- nodemation
|
|
||||||
- workflow-automatio
|
|
||||||
maintainers:
|
|
||||||
- email: pratik@improwised.com
|
|
||||||
name: pratik-{{ .Release.Name }}
|
|
||||||
sources:
|
|
||||||
- https://github.com/n8n-io/n8n
|
|
||||||
- https://hub.docker.com/_/postgres
|
|
||||||
dependencies:
|
|
||||||
- condition: postgres.enabled
|
|
||||||
name: postgresql
|
|
||||||
repository: "@bitnami"
|
|
||||||
version: 9.1.1
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
||||||
# n8n-helm chart:chart_with_upwards_trend:
|
|
||||||
----
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
[n8n](https://n8n.io/) is an extendable workflow automation tool. With a fair-code distribution model, n8n will always have visible source code, be available to self-host, and allow you to add your own custom functions, logic and apps. n8n's node-based approach makes it highly versatile, enabling you to connect anything to everything. this is unofficial helm chart of n8n
|
|
||||||
|
|
||||||
----
|
|
||||||
## Prerequisites
|
|
||||||
- Kubernetes 1.12+
|
|
||||||
- Helm 3.0+
|
|
||||||
- PV provisioner support in the underlying infrastructure
|
|
||||||
- ----
|
|
||||||
## Installing the Chart
|
|
||||||
|
|
||||||
To install the chart with the release name `myn8n`:
|
|
||||||
```sh
|
|
||||||
$ git clone https://github.com/n8n-helm/n8n-helm.git
|
|
||||||
$ helm install myn8n ./n8n-helm
|
|
||||||
# to test chart
|
|
||||||
$ helm test myn8n
|
|
||||||
```
|
|
||||||
|
|
||||||
These commands deploy n8n on the Kubernetes cluster in the default configuration.
|
|
||||||
|
|
||||||
> **Tip**: List all releases using `helm list`
|
|
||||||
----
|
|
||||||
## Uninstalling the Chart
|
|
||||||
|
|
||||||
To uninstall/delete the `myn8n` deployment:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ helm delete myn8n
|
|
||||||
```
|
|
||||||
|
|
||||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
|
||||||
|
|
||||||
> **note**: Deleting the release will delete attached PVC containing n8n encryption key. Please be cautious before doing it.
|
|
||||||
|
|
||||||
----
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
The following tables lists the configurable parameters of the NGINX Open Source chart and their default values.
|
|
||||||
|
|
||||||
| Parameter| Description| Default|
|
|
||||||
|--------------------------------------------|----------------------------------------------------------------------------------------------|-----------------------------------------------------------|
|
|
||||||
| `global.imageRegistry` | Global Docker image registry | haha |
|
|
||||||
| `image.repository` | n8n Image | `n8nio/n8n` |
|
|
||||||
| `image.restartPolicy` | n8n Image restart policy | `Always` |
|
|
||||||
| `image.pullPolicy` | n8n Image pull policy | `IfNotPresent` |
|
|
||||||
| `image.tag` | tag of Image | `latest` |
|
|
||||||
| `nameOverride` | String to partially override n8n.fullname template with a string (will prepend the release name) | `nil` |
|
|
||||||
| `fullnameOverride` | String to fully override postgresql.fullname template with a string | `nil` |
|
|
||||||
| `commonannotations` | Annotations that will added to all the Kubernetes objects | `{}`(evaluated as a template) |
|
|
||||||
| `atuh.enabled` | Enbale basic authentication | `false` |
|
|
||||||
| `atuh.n8nAuthUsername`| Basuc Auth username | `nil` |
|
|
||||||
| `atuh.n8nAuthPass`| Basuc Auth password | `nil` |
|
|
||||||
| `existingSecret`| Name of an existing secrets | `nil` |
|
|
||||||
| `networkPolicy.enabled`| creation of NetworkPolicy | `false` |
|
|
||||||
| `networkPolicy.explicitNamespacesSelector`| Explicitly Namespaces for Network policy | `{}`(evaluated as a template) |
|
|
||||||
| `service.type` | Kubernetes Service type | `ClusterIP` |
|
|
||||||
| `service.port` | n8n port | `5678` |
|
|
||||||
| `service.annotations` | Annotations for n8n service | `{}`(evaluated as a template) |
|
|
||||||
| `testFramework.enabled` | enable n8n connection test | `true` |
|
|
||||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
|
||||||
| `persistence.mountPath` | Path to mount the volume at | `/mnt/n8n/.n8n` |
|
|
||||||
| `persistence.accessModes` | PVC Access Mode for n8n volume | `[ReadWriteOnce]` |
|
|
||||||
| `persistence.size` | PVC Storage Request for n8n volume | `2Gi` |
|
|
||||||
| `ingress.enabled` | Switch to create ingress for n8n deployment | `true` |
|
|
||||||
| `ingress.hostname` | hostname for ingress | `nil` |
|
|
||||||
| `ingress.tls` | TLS for ingress | `[]`(evaluated as a template) |
|
|
||||||
| `ingress.tls.hosts[]` | Array of TLS hosts for ingress record | `[]` |
|
|
||||||
| `ingress.tls.secretName` | TLS secret name | `n8n.local-tls` |
|
|
||||||
| `ingress.annotations` | Ingress annotations | `{}`(evaluated as a template) |
|
|
||||||
| `ingress.certManager` | Annotations for cert-manager | `true` |
|
|
||||||
| `ingress.secrets[]` | Provide own certificates | `nil` |
|
|
||||||
| `ingress.secrets[].name` | TLS Secret Name | `nil` |
|
|
||||||
| `ingress.secrets[].key` | TLS Secret Key | `nil` |
|
|
||||||
| `ingress.secrets[].certificate` | TLS Secret Name Certificate | `nil` |
|
|
||||||
| `resources` | 'CPU/Memory resource requests/limits' | Memory: `500Mi`, CPU: `500Mi`(evaluated as a template) |
|
|
||||||
| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` |
|
|
||||||
| `nodeSelector` | Node labels for pod assignment for n8n deployment | `{}`(evaluated as a template) |
|
|
||||||
| `affinity` | Affinity labels for pod assignment for n8n deployment | `{}`(evaluated as a template) |
|
|
||||||
| `tolerations` | Toleration labels for pod assignment for n8n deployment | `[]` (evaluated as a template) |
|
|
||||||
| `livenessProbe` | livenessProbe for n8n deployment | `{}`(evaluated as a template) |
|
|
||||||
| `readinessProbe` | readinessProbe for n8n deployment | `{}`(evaluated as a template) |
|
|
||||||
| `postgresql.testFramework.enabled` | enable postgres connection test | `true` |
|
|
||||||
| `postgresql.enabled` | (override) enable or disable postgress | `true` |
|
|
||||||
| `postgresql.postgresqlUsername` | (override) Postgresql default username | `nodemation` |
|
|
||||||
| `postgresql.postgresqlDatabase` | (override) Postgresql default database | `nodemation` |
|
|
||||||
| `postgresql.postgresqlPassword` | (override) Postgresql default password for username | `nodemation` |
|
|
||||||
|
|
||||||
|
|
||||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ helm install myn8n \
|
|
||||||
--set imagePullPolicy=Always \
|
|
||||||
./n8n-helm
|
|
||||||
```
|
|
||||||
|
|
||||||
The above command sets the `imagePullPolicy` to `Always`.
|
|
||||||
|
|
||||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
|
||||||
|
|
||||||
```bash
|
|
||||||
$ helm install myn8n -f values.yaml ./n8n-helm
|
|
||||||
```
|
|
||||||
|
|
||||||
> **Tip**: You can use the default [values.yaml](values.yaml) or override your own values.yaml
|
|
||||||
----
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
|
|
||||||
1. Wait for 5 second in order to n8n discover and connect to postgress
|
|
||||||
|
|
||||||
2. n8n dashboard URL is http://localhost:5678
|
|
||||||
|
|
@ -1,115 +0,0 @@
|
||||||
{{- define "n8n-helm.common.labels.standard" -}}
|
|
||||||
app.kubernetes.io/name: {{ default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
{{- if .Chart.AppVersion }}
|
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.common.labels.matchLabels" -}}
|
|
||||||
app.kubernetes.io/name: {{ default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Expand the name of the chart.
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.name" -}}
|
|
||||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- 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).
|
|
||||||
If release name contains chart name it will be used as a full name.
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.fullname" -}}
|
|
||||||
{{- if .Values.fullnameOverride }}
|
|
||||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- else }}
|
|
||||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
|
||||||
{{- if contains $name .Release.Name }}
|
|
||||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- else }}
|
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Create chart name and version as used by the chart label.
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.chart" -}}
|
|
||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Namespace
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.namespace" -}}
|
|
||||||
{{- default "default" .Values.namespace }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
DB Hostname
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.dbhost" -}}
|
|
||||||
{{ .Release.Name }}-postgresql.{{ .Release.Namespace }}.svc.cluster.local
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the proper Storage Class
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.storageClass" -}}
|
|
||||||
{{- if .Values.persistence.storageClass -}}
|
|
||||||
{{- if (eq "-" .Values.persistence.storageClass) -}}
|
|
||||||
{{- printf "storageClassName: \"\"" -}}
|
|
||||||
{{- else }}
|
|
||||||
{{- printf "storageClassName: %s" .Values.persistence.storageClass -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Get the password secret.
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.secretName" -}}
|
|
||||||
{{- if .Values.existingSecret }}
|
|
||||||
{{- printf "%s" (tpl .Values.existingSecret $) -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- printf "%s-secrets" (include "n8n-helm.fullname" .) -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Renders a value that contains template.
|
|
||||||
Usage:
|
|
||||||
{{ include "n8n-hem.tplValue" (dict "value" .Values.path.to.the.Value "context" $) }}
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-hem.tplValue" -}}
|
|
||||||
{{- if typeIs "string" .value }}
|
|
||||||
{{- tpl .value .context }}
|
|
||||||
{{- else }}
|
|
||||||
{{- tpl (.value | toYaml) .context }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Return the appropriate apiVersion for networkpolicy.
|
|
||||||
*/}}
|
|
||||||
{{- define "n8n-helm.networkPolicy.apiVersion" -}}
|
|
||||||
{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
||||||
"extensions/v1beta1"
|
|
||||||
{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
|
||||||
"networking.k8s.io/v1"
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: {{ template "n8n-helm.fullname" . }}-config
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
app: {{ template "n8n-helm.fullname" . }}
|
|
||||||
data:
|
|
||||||
DB_TYPE: postgresdb
|
|
||||||
DB_POSTGRESDB_DATABASE: {{ default "postgres" .Values.postgresql.postgresqlDatabase | quote }}
|
|
||||||
DB_POSTGRESDB_HOST: {{ template "n8n-helm.dbhost" . }}
|
|
||||||
DB_POSTGRESDB_PORT: {{ .Values.postgresql.service.port | quote }}
|
|
||||||
DB_POSTGRESDB_USER: {{ default "postgres" .Values.postgresql.postgresqlUsername | quote }}
|
|
||||||
{{- if .Values.auth.enable }}
|
|
||||||
N8N_BASIC_AUTH_ACTIVE: "true"
|
|
||||||
N8N_BASIC_AUTH_USER: {{ default "nodemation" .Values.auth.n8nAuthUsername | quote }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,87 +0,0 @@
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: {{ template "n8n-helm.fullname" . }}-deployment
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
app: {{ template "n8n-helm.fullname" . }}
|
|
||||||
spec:
|
|
||||||
replicas: {{ default "1" .Values.replicaCount }}
|
|
||||||
selector:
|
|
||||||
matchLabels: {{- include "n8n-helm.common.labels.matchLabels" . | nindent 6 }}
|
|
||||||
app: {{ template "n8n-helm.fullname" . }}
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 8 }}
|
|
||||||
app: {{ template "n8n-helm.fullname" . }}
|
|
||||||
annotations:
|
|
||||||
{{- if .Values.commonannotations }}
|
|
||||||
{{- range $key, $value := .Values.commonannotations }}
|
|
||||||
{{ $key }}: {{ $value | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
{{- if .Values.schedulerName }}
|
|
||||||
schedulerName: "{{ .Values.schedulerName }}"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.nodeSelector }}
|
|
||||||
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.affinity }}
|
|
||||||
affinity: {{- toYaml .Values.affinity | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.tolerations }}
|
|
||||||
tolerations: {{- toYaml .Values.tolerations | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
restartPolicy: {{ .Values.image.restartPolicy }}
|
|
||||||
containers:
|
|
||||||
- name: {{ template "n8n-helm.fullname" . }}
|
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
||||||
{{- if .Values.resources }}
|
|
||||||
resources: {{- toYaml .Values.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if or .Values.livenessProbe .Values.readinessProbe }}
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 5678
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.livenessProbe }}
|
|
||||||
livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.readinessProbe }}
|
|
||||||
readinessProbe: {{- toYaml .Values.readinessProbe | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
command: ["/bin/sh"]
|
|
||||||
args: ["-c", "sleep 20; n8n start"]
|
|
||||||
env:
|
|
||||||
{{- if .Values.auth.enable }}
|
|
||||||
- name: N8N_BASIC_AUTH_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ template "n8n-helm.secretName" . }}
|
|
||||||
key: n8nAuthPass
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.postgresql.enabled }}
|
|
||||||
- name: DB_POSTGRESDB_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: {{ template "n8n-helm.secretName" . }}
|
|
||||||
key: postgresqlDbPass
|
|
||||||
{{- end }}
|
|
||||||
envFrom:
|
|
||||||
- configMapRef:
|
|
||||||
name: {{ template "n8n-helm.fullname" . }}-config
|
|
||||||
ports:
|
|
||||||
- name: {{ template "n8n-helm.fullname" . }}
|
|
||||||
containerPort: {{ .Values.service.port }}
|
|
||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
volumeMounts:
|
|
||||||
- name: {{ include "n8n-helm.fullname" . }}-data
|
|
||||||
mountPath: /root/.n8n
|
|
||||||
volumes:
|
|
||||||
- name: {{ include "n8n-helm.fullname" . }}-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: {{ include "n8n-helm.fullname" . }}-data
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
{{- if .Values.ingress.enabled }}
|
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: {{ template "n8n-helm.fullname" . }}-ingress
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
annotations:
|
|
||||||
{{- if .Values.ingress.tls }}
|
|
||||||
ingress.kubernetes.io/secure-backends: "true"
|
|
||||||
{{- if .Values.ingress.certManager }}
|
|
||||||
kubernetes.io/tls-acme: "true"
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- range $key, $value := .Values.ingress.annotations }}
|
|
||||||
{{ $key }}: {{ $value | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.commonannotations }}
|
|
||||||
{{- range $key, $value := .Values.commonannotations }}
|
|
||||||
{{ $key }}: {{ $value | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
{{- if .Values.ingress.hostname }}
|
|
||||||
- host: {{ .Values.ingress.hostname }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
backend:
|
|
||||||
serviceName: "{{ template "n8n-helm.fullname" . }}-service"
|
|
||||||
servicePort: {{ .Values.service.port }}
|
|
||||||
{{- else }}
|
|
||||||
- http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
backend:
|
|
||||||
serviceName: "{{ template "n8n-helm.fullname" . }}-service"
|
|
||||||
servicePort: {{ .Values.service.port }}
|
|
||||||
{{- end }}
|
|
||||||
{{- range .Values.ingress.hosts }}
|
|
||||||
- host: {{ .name }}
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: {{ default "/" .path }}
|
|
||||||
backend:
|
|
||||||
serviceName: "{{ template "n8n-helm.fullname" . }}-service"
|
|
||||||
servicePort: {{ $.Values.service.port }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.ingress.tls }}
|
|
||||||
tls:
|
|
||||||
{{ toYaml .Values.ingress.tls | indent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
{{- if .Values.networkPolicy.enabled }}
|
|
||||||
kind: NetworkPolicy
|
|
||||||
apiVersion: {{ template "n8n-helm.networkPolicy.apiVersion" . }}
|
|
||||||
metadata:
|
|
||||||
name: {{ template "n8n-helm.fullname" . }}
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
annotations:
|
|
||||||
{{- if .Values.commonannotations }}
|
|
||||||
{{- range $key, $value := .Values.commonannotations }}
|
|
||||||
{{ $key }}: {{ $value | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
podSelector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "n8n-helm.common.labels.matchLabels" . | nindent 6 }}
|
|
||||||
ingress:
|
|
||||||
- ports:
|
|
||||||
- port: 5678
|
|
||||||
{{- if not .Values.networkPolicy.allowExternal }}
|
|
||||||
from:
|
|
||||||
- podSelector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "n8n-helm.common.labels.matchLabels" . | nindent 12 }}
|
|
||||||
{{- if .Values.networkPolicy.explicitNamespacesSelector }}
|
|
||||||
namespaceSelector:
|
|
||||||
{{ toYaml .Values.networkPolicy.explicitNamespacesSelector | indent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
egress:
|
|
||||||
- ports:
|
|
||||||
- port: 5678
|
|
||||||
{{- if not .Values.networkPolicy.allowExternal }}
|
|
||||||
to:
|
|
||||||
- podSelector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "n8n-helm.common.labels.matchLabels" . | nindent 12 }}
|
|
||||||
{{- if .Values.networkPolicy.explicitNamespacesSelector }}
|
|
||||||
namespaceSelector:
|
|
||||||
{{ toYaml .Values.networkPolicy.explicitNamespacesSelector | indent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{{- if .Values.persistence.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: {{ include "n8n-helm.fullname" . }}-data
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
{{ include "n8n-helm.storageClass" . }}
|
|
||||||
accessModes:
|
|
||||||
{{- range .Values.persistence.accessModes }}
|
|
||||||
- {{ . | quote }}
|
|
||||||
{{- end }}
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: {{ .Values.persistence.size | quote }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{{- if not .Values.existingSecret }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ template "n8n-helm.fullname" . }}-secrets
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
app: {{ template "n8n-helm.fullname" . }}
|
|
||||||
type: Opaque
|
|
||||||
data:
|
|
||||||
#DB_POSTGRESDB_PASSWORD
|
|
||||||
postgresqlDbPass: {{ .Values.postgresql.postgresqlPassword | b64enc | quote }}
|
|
||||||
|
|
||||||
{{- if .Values.auth.enabled }}
|
|
||||||
#N8N_BASIC_AUTH_PASSWORD
|
|
||||||
n8nAuthPass: {{ default "nodemation" .Values.auth.n8nAuthPass | b64enc | quote }}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
kind: Service
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: {{ template "n8n-helm.fullname" . }}-service
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
app: {{ template "n8n-helm.fullname" . }}
|
|
||||||
annotations:
|
|
||||||
{{- if .Values.service.annotations }}
|
|
||||||
{{- include "n8n-hem.tplValue" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.commonannotations }}
|
|
||||||
{{- range $key, $value := .Values.commonannotations }}
|
|
||||||
{{ $key }}: {{ $value | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
selector: {{- include "n8n-helm.common.labels.matchLabels" . | nindent 4 }}
|
|
||||||
app: {{ template "n8n-helm.fullname" . }}
|
|
||||||
ports:
|
|
||||||
- name: {{ template "n8n-helm.fullname" . }}
|
|
||||||
port: {{ default "5678" .Values.service.port }}
|
|
||||||
targetPort: {{ default "5678" .Values.service.port }}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{{- if .Values.testFramework.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: n8n-working-test
|
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": test-success
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: n8n-working-test
|
|
||||||
image: "alpine"
|
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
||||||
env:
|
|
||||||
- name: N8N_HOST
|
|
||||||
value: {{ template "n8n-helm.fullname" . }}-service.default.svc.cluster.local:{{ .Values.service.port }}
|
|
||||||
command:
|
|
||||||
- /bin/sh
|
|
||||||
- -ec
|
|
||||||
- sleep 10; apk update; apk add curl; curl -m 10 -s -o /dev/null -I -w "%{http_code}" $N8N_HOST
|
|
||||||
restartPolicy: Never
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
{{- if .Values.postgresql.testFramework.enabled }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Pod
|
|
||||||
metadata:
|
|
||||||
name: {{ template "postgresql.fullname" . }}-connection-test
|
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": test-success
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: {{ template "postgresql.fullname" . }}-connection-test
|
|
||||||
image: "{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
|
|
||||||
imagePullPolicy: {{ .Values.postgresql.image.pullPolicy }}
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
value: {{ .Values.postgresql.postgresqlDatabase | quote }}
|
|
||||||
- name: POSTGRES_USER
|
|
||||||
value: {{ .Values.postgresql.postgresqlUsername | quote }}
|
|
||||||
- name: POSTGRES_PASS
|
|
||||||
value: {{ .Values.postgresql.postgresqlPassword | quote }}
|
|
||||||
- name: POSTGRES_PORT
|
|
||||||
value: {{ .Values.postgresql.service.port | quote }}
|
|
||||||
- name: POSTGRES_HOST
|
|
||||||
value: {{ template "n8n-helm.dbhost" . }}
|
|
||||||
command:
|
|
||||||
- /bin/bash
|
|
||||||
- -ec
|
|
||||||
- PGPASSWORD=$POSTGRES_PASS psql -h $POSTGRES_HOST -p $POSTGRES_PORT -U $POSTGRES_USER -d $POSTGRES_DB
|
|
||||||
restartPolicy: Never
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{{- if .Values.ingress.enabled }}
|
|
||||||
{{- range .Values.ingress.secrets }}
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: {{ .name }}
|
|
||||||
labels:
|
|
||||||
{{- include "n8n-helm.common.labels.standard" . | nindent 4 }}
|
|
||||||
type: kubernetes.io/tls
|
|
||||||
data:
|
|
||||||
tls.crt: {{ .certificate | b64enc }}
|
|
||||||
tls.key: {{ .key | b64enc }}
|
|
||||||
---
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
@ -1,193 +0,0 @@
|
||||||
# Default values for n8n-helm.
|
|
||||||
# This is a YAML-formatted file.
|
|
||||||
# Declare variables to be passed into your templates.
|
|
||||||
|
|
||||||
replicaCount: 1
|
|
||||||
|
|
||||||
## String to partially override n8n-helm.fullname template (will maintain the release name)
|
|
||||||
##
|
|
||||||
nameOverride: ""
|
|
||||||
|
|
||||||
## common annotations
|
|
||||||
commonannotations: {}
|
|
||||||
|
|
||||||
## String to fully override n8n-helm.fullname template
|
|
||||||
##
|
|
||||||
fullnameOverride: ""
|
|
||||||
|
|
||||||
image:
|
|
||||||
repository: n8nio/n8n
|
|
||||||
restartPolicy: Always
|
|
||||||
tag: "latest"
|
|
||||||
## Specify a imagePullPolicy
|
|
||||||
## Defaults set to 'IfNotPresent'
|
|
||||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
|
||||||
##
|
|
||||||
pullPolicy: IfNotPresent
|
|
||||||
|
|
||||||
|
|
||||||
auth:
|
|
||||||
# enable the n8n basic auth
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
## Basic Auth username
|
|
||||||
## Defaults to 'nodemation' if not set
|
|
||||||
#n8nAuthUsername: nodemation
|
|
||||||
|
|
||||||
## Basic Auth password
|
|
||||||
## Defaults to 'nodemation' if not set
|
|
||||||
#n8nAuthPass: nodemation
|
|
||||||
|
|
||||||
## n8n password using existing secret. which includes n8nAuthPass and
|
|
||||||
## postgresqlDbPass as key for the respective value
|
|
||||||
#existingSecret: myn8n-secrets
|
|
||||||
|
|
||||||
networkPolicy:
|
|
||||||
## Enable creation of NetworkPolicy resources. Only Ingress traffic is filtered for now.
|
|
||||||
##
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
## if explicitNamespacesSelector is missing or set to {}, only client Pods that are in the networkPolicy's namespace
|
|
||||||
## and that match other criteria, the ones that have the good label, can reach the DB.
|
|
||||||
## But sometimes, we want the DB to be accessible to clients from other namespaces, in this case, we can use this
|
|
||||||
## LabelSelector to select these namespaces, note that the networkPolicy's namespace should also be explicitly added.
|
|
||||||
##
|
|
||||||
## Example:
|
|
||||||
## explicitNamespacesSelector:
|
|
||||||
## matchLabels:
|
|
||||||
## role: frontend
|
|
||||||
## matchExpressions:
|
|
||||||
## - {key: role, operator: In, values: [frontend]}
|
|
||||||
explicitNamespacesSelector: {}
|
|
||||||
|
|
||||||
service:
|
|
||||||
## Kubernetes service type
|
|
||||||
type: ClusterIP
|
|
||||||
## n8n port
|
|
||||||
port: 5678
|
|
||||||
## add extra annotation for service
|
|
||||||
annotations: {}
|
|
||||||
|
|
||||||
testFramework:
|
|
||||||
## Set to true to enable testing of n8n
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
persistence:
|
|
||||||
enabled: true
|
|
||||||
## A manually managed Persistent Volume and Claim
|
|
||||||
## The path the volume will be mounted at, useful when using different
|
|
||||||
##
|
|
||||||
mountPath: /mnt/n8n/.n8n
|
|
||||||
|
|
||||||
##Storage class as per your provider
|
|
||||||
#storageClass: "-"
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
size: 2Gi
|
|
||||||
|
|
||||||
|
|
||||||
ingress:
|
|
||||||
## Set to true to enable ingress
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
## When the ingress is enabled, a host pointing to this will be created if hostname is set. Default it will point to localhost:80
|
|
||||||
#hostname: n8n.local.com
|
|
||||||
|
|
||||||
# If tls is set, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
|
|
||||||
## The tls configuration for the ingress
|
|
||||||
## see: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
|
|
||||||
## Uncomment below to enable tls / https for let's encrypt / cert-manager
|
|
||||||
## Set this to true in order to enable TLS on the ingress record
|
|
||||||
## A side effect of this will be that the backend n8n service will be connected at port 443
|
|
||||||
#tls:
|
|
||||||
#- hosts:
|
|
||||||
# - n8n.local
|
|
||||||
# secretName: n8n.local-tls
|
|
||||||
|
|
||||||
## Ingress annotations done as key:value pairs
|
|
||||||
## For a full list of possible ingress annotations, please see
|
|
||||||
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
|
|
||||||
|
|
||||||
annotations: {}
|
|
||||||
|
|
||||||
## Set this to true in order to add the corresponding annotations for cert-manager. validate that tls is set
|
|
||||||
#certManager: true
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
## If you're providing your own certificates, please use this to add the certificates as secrets
|
|
||||||
## key and certificate should start with -----BEGIN CERTIFICATE----- or
|
|
||||||
## -----BEGIN RSA PRIVATE KEY-----
|
|
||||||
##
|
|
||||||
## name should line up with a tlsSecret set further up
|
|
||||||
## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
|
|
||||||
##
|
|
||||||
## It is also possible to create and manage the certificates outside of this helm chart
|
|
||||||
## Please see README.md for more information
|
|
||||||
# - name: n8n.local-tls
|
|
||||||
# key:
|
|
||||||
# certificate:
|
|
||||||
|
|
||||||
## Configure resource requests and limits
|
|
||||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
|
||||||
##
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: "500Mi"
|
|
||||||
cpu: "500m"
|
|
||||||
limits:
|
|
||||||
memory: "500Mi"
|
|
||||||
cpu: "500m"
|
|
||||||
|
|
||||||
## Use an alternate scheduler, e.g. "stork".
|
|
||||||
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
|
|
||||||
##
|
|
||||||
# schedulerName:
|
|
||||||
##
|
|
||||||
## n8n parameters
|
|
||||||
##
|
|
||||||
## Node, affinity, tolerations, and priorityclass settings for pod assignment
|
|
||||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
|
|
||||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
|
||||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
|
||||||
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption
|
|
||||||
nodeSelector: {}
|
|
||||||
affinity: {}
|
|
||||||
tolerations: []
|
|
||||||
|
|
||||||
## Configure extra options for liveness and readiness probes
|
|
||||||
## This is http get liveness and readiness probes
|
|
||||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
|
|
||||||
|
|
||||||
#livenessProbe:
|
|
||||||
# httpGet:
|
|
||||||
# path: /
|
|
||||||
# port: 5678
|
|
||||||
# initialDelaySeconds: 20
|
|
||||||
# timeoutSeconds: 10
|
|
||||||
# periodSeconds: 5
|
|
||||||
# failureThreshold: 2
|
|
||||||
#
|
|
||||||
#readinessProbe:
|
|
||||||
# httpGet:
|
|
||||||
# path: /
|
|
||||||
# port: 5678
|
|
||||||
# initialDelaySeconds: 20
|
|
||||||
# timeoutSeconds: 10
|
|
||||||
# periodSeconds: 5
|
|
||||||
# failureThreshold: 2
|
|
||||||
|
|
||||||
postgresql:
|
|
||||||
## enable for testing postgresql connection
|
|
||||||
testFramework:
|
|
||||||
enabled: true
|
|
||||||
## by default postgress is enable, Whether to deploy a postgress server to use database to store workflows set enables as per your requirements.
|
|
||||||
enabled: true
|
|
||||||
#Below are overriden values for postgres db
|
|
||||||
## PostgreSQL admin password (used when `postgresqlUsername` is not `postgres`)
|
|
||||||
#postgresqlPostgresPassword: nodemation
|
|
||||||
#n8n will connect to postgres using below username if not set then default 'postgres'
|
|
||||||
postgresqlUsername: postgres
|
|
||||||
#n8n will connect to below postgres databse if not set then default 'postgres'
|
|
||||||
postgresqlDatabase: nodemation
|
|
||||||
#n8n will connect to postgres using below password if not set then default 'postgres'
|
|
||||||
postgresqlPassword: nodemation
|
|
||||||
Loading…
Reference in New Issue