Making ingress path configurable
This commit is contained in:
@@ -39,7 +39,7 @@ spec:
|
|||||||
- host: {{ .ingress.host | quote }}
|
- host: {{ .ingress.host | quote }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: "/"
|
- path: {{ .ingress.path | default "/" | quote }}
|
||||||
pathType: "Prefix"
|
pathType: "Prefix"
|
||||||
backend:
|
backend:
|
||||||
service:
|
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"
|
||||||
Reference in New Issue
Block a user