Merge pull request #37 from gimlet-io/path

Making ingress path configurable
This commit is contained in:
Laszlo Fogas
2022-01-19 09:05:46 +01:00
committed by GitHub
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"