7 Commits

Author SHA1 Message Date
3497a9537e Bump n8n version up to 0.205.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-12-10 18:46:53 +03:00
4e01f912ed fix worker-hpa labels
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 17:38:06 +03:00
bf6002c156 fix webhook-deployment labels 2022-11-16 17:37:56 +03:00
ad9a7b248f Remove redundant suffix
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 17:30:55 +03:00
b143ede98b Fix collisions with labels and selectors
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 17:28:54 +03:00
7155146e00 Fix service name for webhook ingress
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2022-11-16 16:42:09 +03:00
3639069556 Revert "Remove $fullName var from ingress templates"
This reverts commit 92f8d4442c.
2022-11-16 16:41:43 +03:00
8 changed files with 69 additions and 24 deletions

View File

@ -3,7 +3,7 @@ name: n8n
description: A Helm chart for Kubernetes description: A Helm chart for Kubernetes
type: application type: application
version: 0.0.1 version: 0.0.1
appVersion: 0.202.1 appVersion: 0.205.0
icon: https://github.com/n8n-io/n8n/raw/master/assets/n8n-logo.png icon: https://github.com/n8n-io/n8n/raw/master/assets/n8n-logo.png
maintainers: maintainers:
- email: me@grachevko.ru - email: me@grachevko.ru

View File

@ -5,6 +5,14 @@ Expand the name of the chart.
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }} {{- 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. 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). 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 }}
{{- 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. 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 Common labels
*/}} */}}
{{- define "n8n.labels" -}} {{- define "common.labels" -}}
helm.sh/chart: {{ include "n8n.chart" . }} helm.sh/chart: {{ include "n8n.chart" . }}
{{ include "n8n.selectorLabels" . }}
{{- if .Chart.AppVersion }} {{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }} {{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }} {{- 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 Selector labels
*/}} */}}
@ -49,3 +82,13 @@ Selector labels
app.kubernetes.io/name: {{ include "n8n.name" . }} app.kubernetes.io/name: {{ include "n8n.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }} {{- 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 }}

View File

@ -1,4 +1,5 @@
{{- if .Values.n8n.ingress.enabled -}} {{- if .Values.n8n.ingress.enabled -}}
{{- $fullName := include "n8n.fullname" . -}}
{{- $svcPort := .Values.n8n.service.port -}} {{- $svcPort := .Values.n8n.service.port -}}
{{- if and .Values.n8n.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- if and .Values.n8n.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.n8n.ingress.annotations "kubernetes.io/ingress.class") }} {{- if not (hasKey .Values.n8n.ingress.annotations "kubernetes.io/ingress.class") }}
@ -14,7 +15,7 @@ apiVersion: extensions/v1beta1
{{- end }} {{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ include "n8n.fullname" . }} name: {{ $fullName }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n.labels" . | nindent 4 }}
{{- with .Values.n8n.ingress.annotations }} {{- with .Values.n8n.ingress.annotations }}
@ -46,11 +47,11 @@ spec:
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service: service:
name: {{ include "n8n.fullname" . }} name: {{ $fullName }}
port: port:
number: {{ $svcPort }} number: {{ $svcPort }}
{{- else }} {{- else }}
serviceName: {{ include "n8n.fullname" . }} serviceName: {{ $fullName }}
servicePort: {{ $svcPort }} servicePort: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -1,16 +1,16 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "n8n.fullname" . }}-webhook name: {{ include "n8n-webhook.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-webhook.labels" . | nindent 4 }}
spec: spec:
{{- if not .Values.webhook.autoscaling.enabled }} {{- if not .Values.webhook.autoscaling.enabled }}
replicas: {{ .Values.webhook.replicaCount }} replicas: {{ .Values.webhook.replicaCount }}
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "n8n.selectorLabels" . | nindent 6 }} {{- include "n8n-webhook.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
annotations: annotations:
@ -20,7 +20,7 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- include "n8n.selectorLabels" . | nindent 8 }} {{- include "n8n-webhook.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.webhook.image.pullSecrets }} {{- with .Values.webhook.image.pullSecrets }}
imagePullSecrets: imagePullSecrets:

View File

@ -1,4 +1,5 @@
{{- if .Values.webhook.ingress.enabled -}} {{- if .Values.webhook.ingress.enabled -}}
{{- $fullName := include "n8n-webhook.fullname" . -}}
{{- $svcPort := .Values.webhook.service.port -}} {{- $svcPort := .Values.webhook.service.port -}}
{{- if and .Values.webhook.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} {{- 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") }} {{- if not (hasKey .Values.webhook.ingress.annotations "kubernetes.io/ingress.class") }}
@ -14,9 +15,9 @@ apiVersion: extensions/v1beta1
{{- end }} {{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ include "n8n.fullname" . }}-webhook name: {{ $fullName }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-webhook.labels" . | nindent 4 }}
{{- with .Values.webhook.ingress.annotations }} {{- with .Values.webhook.ingress.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
@ -46,11 +47,11 @@ spec:
backend: backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service: service:
name: {{ include "n8n.fullname" . }}-webhook name: {{ $fullName }}
port: port:
number: {{ $svcPort }} number: {{ $svcPort }}
{{- else }} {{- else }}
serviceName: {{ include "n8n.fullname" . }}-webhook serviceName: {{ $fullName }}
servicePort: {{ $svcPort }} servicePort: {{ $svcPort }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -1,9 +1,9 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "n8n.fullname" . }}-webhook name: {{ include "n8n-webhook.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-webhook.labels" . | nindent 4 }}
spec: spec:
type: {{ .Values.webhook.service.type }} type: {{ .Values.webhook.service.type }}
ports: ports:
@ -12,4 +12,4 @@ spec:
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
{{- include "n8n.selectorLabels" . | nindent 4 }} {{- include "n8n-webhook.selectorLabels" . | nindent 4 }}

View File

@ -1,9 +1,9 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "n8n.fullname" . }}-worker name: {{ include "n8n-worker.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-worker.labels" . | nindent 4 }}
annotations: annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} checksum/secret: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
@ -13,7 +13,7 @@ spec:
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "n8n.selectorLabels" . | nindent 6 }} {{- include "n8n-worker.selectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
annotations: annotations:
@ -23,7 +23,7 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- include "n8n.selectorLabels" . | nindent 8 }} {{- include "n8n-worker.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.worker.image.pullSecrets }} {{- with .Values.worker.image.pullSecrets }}
imagePullSecrets: imagePullSecrets:

View File

@ -2,14 +2,14 @@
apiVersion: autoscaling/v2beta1 apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: {{ include "n8n.fullname" . }}-worker name: {{ include "n8n-worker.fullname" . }}
labels: labels:
{{- include "n8n.labels" . | nindent 4 }} {{- include "n8n-worker.labels" . | nindent 4 }}
spec: spec:
scaleTargetRef: scaleTargetRef:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
name: {{ include "n8n.fullname" . }} name: {{ include "n8n-worker.fullname" . }}
minReplicas: {{ .Values.worker.autoscaling.minReplicas }} minReplicas: {{ .Values.worker.autoscaling.minReplicas }}
maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }} maxReplicas: {{ .Values.worker.autoscaling.maxReplicas }}
metrics: metrics: