Skip to content

Commit 3d75672

Browse files
authored
fix: Fix pathType for ingress (#51)
Fixes an error with some kubernetes versions, " ingress contains invalid paths: path /(.*) cannot be used with pathType Prefix" See: https://kubernetes.github.io/ingress-nginx/faq/#validation-of-path Fixes: HDX-1870
1 parent 39d37c5 commit 3d75672

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.changeset/soft-ants-hear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"helm-charts": patch
3+
---
4+
5+
fix: Fix pathType for ingress

charts/hdx-oss-v2/templates/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
http:
3535
paths:
3636
- path: /(.*)
37-
pathType: Prefix
37+
pathType: ImplementationSpecific
3838
backend:
3939
service:
4040
name: {{ include "hdx-oss.fullname" . }}-app

charts/hdx-oss-v2/tests/ingress_test.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ tests:
3131
- equal:
3232
path: spec.rules[0].host
3333
value: hyperdx.example.com
34+
# Validate main app ingress path configuration
35+
- equal:
36+
path: spec.rules[0].http.paths[0].path
37+
value: /(.*)
38+
- equal:
39+
path: spec.rules[0].http.paths[0].pathType
40+
value: ImplementationSpecific
3441
# Validate ingress annotations
3542
- equal:
3643
path: metadata.annotations
@@ -152,6 +159,13 @@ tests:
152159
- equal:
153160
path: spec.rules[0].host
154161
value: hyperdx.example.com
162+
# Validate main app ingress path configuration
163+
- equal:
164+
path: spec.rules[0].http.paths[0].path
165+
value: /(.*)
166+
- equal:
167+
path: spec.rules[0].http.paths[0].pathType
168+
value: ImplementationSpecific
155169
- equal:
156170
path: spec.tls[0].secretName
157171
value: hyperdx-tls
@@ -196,6 +210,15 @@ tests:
196210
path: spec.rules[0].host
197211
value: hyperdx.example.com
198212
documentIndex: 0
213+
# Validate main app ingress path configuration
214+
- equal:
215+
path: spec.rules[0].http.paths[0].path
216+
value: /(.*)
217+
documentIndex: 0
218+
- equal:
219+
path: spec.rules[0].http.paths[0].pathType
220+
value: ImplementationSpecific
221+
documentIndex: 0
199222
# Test the additional otel-collector ingress (document 1)
200223
- isKind:
201224
of: Ingress
@@ -281,6 +304,15 @@ tests:
281304
path: spec.rules[0].host
282305
value: hyperdx.example.com
283306
documentIndex: 0
307+
# Validate main app ingress path configuration
308+
- equal:
309+
path: spec.rules[0].http.paths[0].path
310+
value: /(.*)
311+
documentIndex: 0
312+
- equal:
313+
path: spec.rules[0].http.paths[0].pathType
314+
value: ImplementationSpecific
315+
documentIndex: 0
284316
# Test the additional otel-collector ingress (document 1)
285317
- isKind:
286318
of: Ingress

0 commit comments

Comments
 (0)