Skip to content
Snippets Groups Projects
Commit a4ec1a58 authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

OZG-7573 set grpc port conditional

parent 53e12c31
No related branches found
No related tags found
1 merge request!11OZG-7573 add grpc port to service
...@@ -32,9 +32,11 @@ metadata: ...@@ -32,9 +32,11 @@ metadata:
component: eingang-adapter-service component: eingang-adapter-service
spec: spec:
ports: ports:
{{- if (.Values.forwarding).enabled }}
- name: grpc-9090 - name: grpc-9090
port: 9090 port: 9090
protocol: TCP protocol: TCP
{{- end }}
- name: http - name: http
port: 8080 port: 8080
protocol: TCP protocol: TCP
......
...@@ -49,7 +49,10 @@ tests: ...@@ -49,7 +49,10 @@ tests:
- equal: - equal:
path: spec.type path: spec.type
value: ClusterIP value: ClusterIP
- it: ports should contain the grpc port - it: should contain the grpc port in the ports list if forwarding enabled
set:
forwarding:
enabled: true
asserts: asserts:
- contains: - contains:
path: spec.ports path: spec.ports
...@@ -59,6 +62,19 @@ tests: ...@@ -59,6 +62,19 @@ tests:
protocol: TCP protocol: TCP
count: 1 count: 1
any: true any: true
- it: should not contain the grpc port in the ports list if forwarding disabled
set:
forwarding:
enabled: false
asserts:
- notContains:
path: spec.ports
content:
name: grpc-9090
port: 9090
protocol: TCP
count: 1
any: true
- it: ports should contain the 8080 default http port - it: ports should contain the 8080 default http port
asserts: asserts:
- contains: - contains:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment