diff --git a/n8n/templates/NOTES.txt b/n8n/templates/NOTES.txt index d671ac0..bbf2473 100644 --- a/n8n/templates/NOTES.txt +++ b/n8n/templates/NOTES.txt @@ -1,10 +1,6 @@ 1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.host }} {{- else if contains "NodePort" .Values.service.type }} export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "n8n.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") diff --git a/n8n/templates/ingress.yaml b/n8n/templates/ingress.yaml index 024cfda..374d871 100644 --- a/n8n/templates/ingress.yaml +++ b/n8n/templates/ingress.yaml @@ -1,11 +1,7 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "n8n.fullname" . -}} {{- $svcPort := .Values.service.port -}} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ $fullName }} @@ -27,15 +23,21 @@ spec: {{- end }} {{- end }} rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} + - host: {{ .Values.ingress.host | quote }} http: paths: - {{- range .paths }} - - path: {{ .path }} + - path: / + pathType: Prefix backend: - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} + service: + name: {{ include "n8n.fullname" . }}-main + port: + name: http + - path: /webhook/ + pathType: Prefix + backend: + service: + name: {{ include "n8n.fullname" . }}-webhook + port: + name: http {{- end }} diff --git a/n8n/values.yaml b/n8n/values.yaml index 7776ff1..087f2d8 100644 --- a/n8n/values.yaml +++ b/n8n/values.yaml @@ -81,14 +81,12 @@ service: port: 80 ingress: - enabled: false + enabled: true annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: [] + host: n8n.local tls: [] # - secretName: chart-example-tls # hosts: