Making ingress path configurable

This commit is contained in:
Laszlo Fogas
2022-01-19 09:03:10 +01:00
parent a5512f8f8a
commit df1042fb5a
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ spec:
- host: {{ .ingress.host | quote }}
http:
paths:
- path: "/"
- path: {{ .ingress.path | default "/" | quote }}
pathType: "Prefix"
backend:
service:
@@ -0,0 +1,21 @@
suite: test ingress
templates:
- ingress.yaml
tests:
- it: Should default
set:
ingress:
host: chart-example.local
asserts:
- equal:
path: spec.rules[0].http.paths[0].path
value: "/"
- it: Should use path
set:
ingress:
host: chart-example.local
path: "/mypath"
asserts:
- equal:
path: spec.rules[0].http.paths[0].path
value: "/mypath"