fix: Makes use of svcPort within ingress, when defined;
This commit is contained in:
@@ -38,7 +38,7 @@ spec:
|
|||||||
paths:
|
paths:
|
||||||
- backend:
|
- backend:
|
||||||
serviceName: {{ $robustName }}
|
serviceName: {{ $robustName }}
|
||||||
servicePort: {{ .root.Values.containerPort }}
|
servicePort: {{ if .root.Values.svcPort }}{{ .root.Values.svcPort }}{{ else }}{{ .root.Values.containerPort }}{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Values.ingress }}
|
{{- with .Values.ingress }}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
suite: test deployment
|
||||||
|
templates:
|
||||||
|
- ingress.yaml
|
||||||
|
tests:
|
||||||
|
- it: Should use container port
|
||||||
|
set:
|
||||||
|
ingress:
|
||||||
|
host: chart-example.local
|
||||||
|
containerPort: 1234
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.rules[0].http.paths[0].backend.servicePort
|
||||||
|
value: 1234
|
||||||
|
- it: Should use service port
|
||||||
|
set:
|
||||||
|
ingress:
|
||||||
|
host: chart-example.local
|
||||||
|
svcPort: 1234
|
||||||
|
containerPort: 5678
|
||||||
|
asserts:
|
||||||
|
- equal:
|
||||||
|
path: spec.rules[0].http.paths[0].backend.servicePort
|
||||||
|
value: 1234
|
||||||
Reference in New Issue
Block a user