diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index ca756599792558620754a1a0a3f48c37bf71b904..a5932236210a96e8b671969620f939ad14619ca6 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -163,11 +163,12 @@ spec: - name: grpc_client_zufi-manager_negotiationType value: {{ (.Values.zufiManager).grpcClientNegotiationType | default "PLAINTEXT" }} {{- end}} + {{- if (.Values.forwarding).enabled }} - name: grpc_client_forwarder_address - value: {{ (.Values.forwarder).address }} + value: {{ (.Values.forwarding).address }} - name: grpc_client_forwarder_negotiationType - value: {{ (.Values.forwarder).grpcClientNegotiationType | default "TLS" }} - + value: {{ (.Values.forwarding).grpcClientNegotiationType | default "TLS" }} + {{- end }} {{- if not (.Values.database).useExternal }} - name: spring_data_mongodb_uri valueFrom: diff --git a/src/test/helm/deployment_forwarder_env_test.yaml b/src/test/helm/deployment_forwarder_env_test.yaml index fefb761dc274ae86a63c798b6ffe7101ebd7a224..fd7a77f810286abfaef04c28e5aa0c6f35abbc0c 100644 --- a/src/test/helm/deployment_forwarder_env_test.yaml +++ b/src/test/helm/deployment_forwarder_env_test.yaml @@ -35,9 +35,22 @@ set: bezeichner: helm imagePullSecret: test-image-pull-secret tests: + - it: should be disabled by default + asserts: + - notContains: + path: spec.template.spec.containers[0].env + content: + name: ozgcloud_forwarder_address + any: true + - notContains: + path: spec.template.spec.containers[0].env + content: + name: grpc_client_forwarder_negotiationType + any: true - it: should set the grpc forwarder client address set: - forwarder: + forwarding: + enabled: true address: https://forwarder.my-wonderful-domain.local:9000 asserts: - contains: @@ -46,6 +59,9 @@ tests: name: grpc_client_forwarder_address value: https://forwarder.my-wonderful-domain.local:9000 - it: should set the default negotiation type + set: + forwarding: + enabled: true asserts: - contains: path: spec.template.spec.containers[0].env @@ -54,7 +70,8 @@ tests: value: TLS - it: should set the negotiation type set: - forwarder: + forwarding: + enabled: true grpcClientNegotiationType: PLAINTEXT asserts: - contains: