Skip to content

Commit 064c145

Browse files
authored
fix: Changed the ingress logic to allow different types of pathType (#251) (#271)
Changed the ingress logic to allow different types of pathType in place of the hardcoded 'pathType: Prefix'
1 parent ed4d69b commit 064c145

7 files changed

Lines changed: 22 additions & 18 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ ingress:
135135
hosts:
136136
- host: workflow.example.com
137137
paths: []
138+
# - path: /
139+
# pathType: Prefix
138140
tls:
139141
- hosts:
140142
- workflow.example.com

charts/n8n/Chart.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: n8n
3-
version: 2.0.0
3+
version: 2.0.1
44
appVersion: 1.122.4
55
type: application
66
description: "Helm Chart for deploying n8n on Kubernetes, a fair-code workflow automation platform with native AI capabilities for technical teams. Easily automate tasks across different services."
@@ -35,6 +35,4 @@ annotations:
3535
# supported kinds are added, changed, deprecated, removed, fixed and security.
3636
artifacthub.io/changes: |
3737
- kind: changed
38-
description: "BREAKING CHANGE: Replace Bitnami Valkey dependency with official Valkey Helm chart from valkey.io"
39-
- kind: changed
40-
description: "update n8n to version 1.122.4"
38+
description: "Changed the ingress logic to allow different types of pathType in place of the hardcoded 'pathType: Prefix'"

charts/n8n/templates/NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{- if .Values.ingress.enabled }}
33
{{- range $host := .Values.ingress.hosts }}
44
{{- range .paths }}
5-
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
5+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
66
{{- end }}
77
{{- end }}
88
{{- else if contains "NodePort" (default "ClusterIP" .Values.main.service.type) }}

charts/n8n/templates/ingress.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,38 +31,38 @@ spec:
3131
http:
3232
paths:
3333
{{- range .paths }}
34-
- path: {{ . }}
35-
pathType: Prefix
34+
- path: {{ .path }}
35+
pathType: {{ .pathType }}
3636
backend:
3737
service:
3838
name: {{ $fullName }}
3939
port:
4040
number: {{ $.Values.main.service.port | default 80 }}
4141
{{- if $.Values.webhook.enabled }}
42-
- path: {{ . }}webhook/
43-
pathType: Prefix
42+
- path: {{ trimSuffix "/" .path }}/webhook/
43+
pathType: {{ .pathType }}
4444
backend:
4545
service:
4646
name: {{ $fullName }}-webhook
4747
port:
4848
number: {{ $.Values.webhook.service.port | default 80 }}
4949
# Note: The default URL for manual workflow executions is /webhook-test/*. Make sure that these URLs route to your main process.
50-
- path: {{ . }}webhook-test/
51-
pathType: Prefix
50+
- path: {{ trimSuffix "/" .path }}/webhook-test/
51+
pathType: {{ .pathType }}
5252
backend:
5353
service:
5454
name: {{ $fullName }}
5555
port:
5656
number: {{ $.Values.main.service.port | default 80 }}
57-
- path: {{ . }}webhook-waiting/
58-
pathType: Prefix
57+
- path: {{ trimSuffix "/" .path }}/webhook-waiting/
58+
pathType: {{ .pathType }}
5959
backend:
6060
service:
6161
name: {{ $fullName }}-webhook
6262
port:
6363
number: {{ $.Values.webhook.service.port | default 80 }}
64-
- path: {{ . }}form/
65-
pathType: Prefix
64+
- path: {{ trimSuffix "/" .path }}/form/
65+
pathType: {{ .pathType }}
6666
backend:
6767
service:
6868
name: {{ $fullName }}-webhook

charts/n8n/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ ingress:
3939
className: ""
4040
hosts:
4141
- host: workflow.example.com
42-
paths: []
42+
paths:
43+
- path: /
44+
pathType: Prefix
4345
tls: []
4446
# - hosts:
4547
# - workflow.example.com

examples/values_full.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ ingress:
103103
hosts:
104104
- host: *hostname
105105
paths:
106-
- /
106+
- path: /
107+
pathType: Prefix
107108
tls:
108109
- secretName: n8n-ingress-tls
109110
hosts:

examples/values_small_prod.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ ingress:
6060
hosts:
6161
- host: n8n-dev.8gears.com
6262
paths:
63-
- /
63+
- path: /
64+
pathType: Prefix
6465
tls:
6566
- secretName: n8n-ingress-tls
6667
hosts:

0 commit comments

Comments
 (0)