Skip to content

Commit

Permalink
Merge pull request #37 from gimlet-io/path
Browse files Browse the repository at this point in the history
Making ingress path configurable
  • Loading branch information
laszlocph authored Jan 19, 2022
2 parents a2b0e07 + df1042f commit ee9e8e9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/onechart/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- host: {{ .ingress.host | quote }}
http:
paths:
- path: "/"
- path: {{ .ingress.path | default "/" | quote }}
pathType: "Prefix"
backend:
service:
Expand Down
21 changes: 21 additions & 0 deletions charts/onechart/tests/ingress_path_test.yaml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit ee9e8e9

Please sign in to comment.