Skip to content
Snippets Groups Projects
Commit e7148d4d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6004 zufi only set env vars when zufi is enabled

parent 4deab425
No related branches found
No related tags found
No related merge requests found
......@@ -152,11 +152,14 @@ spec:
value: {{ (.Values.userManager).grpcClientNegotiationType | default "TLS" }}
- name: grpc_client_info-manager_address
value: {{ ((.Values.ozgcloud).infoManager).address }}
{{- if (.Values.zufiManager).enabled }}
- name: grpc_client_zufi-manager_address
value: {{ .Values.zufiManager.address }}
- name: grpc_client_zufi-manager_negotiationType
value: {{ (.Values.zufiManager).grpcClientNegotiationType | default "TLS" }}
{{- end }}
- name: ozgcloud_user-manager_url
value: {{ include "app.ozgcloud_migration_user-manager_address" . }}
{{- if not (.Values.database).useExternal }}
......
......@@ -32,27 +32,64 @@ set:
ozgcloud:
environment: dev
imagePullSecret: test-image-pull-secret
tests:
- it: should set the grpc zufi-manager client address
- it: should set default grpc zufi-manager address
set:
zufiManager:
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_zufi-manager_address
value: dns://zufi-server.zufi:9090
value: zufi-server.zufi:9090
- it: should set custom grpc zufi-manager address
set:
zufiManager:
enabled: true
address: customAddress
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_zufi-manager_address
value: customAddress
- it: should contain default zufi-manager grpc negotiationType tls
set:
zufiManager:
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_zufi-manager_negotiationType
value: TLS
- it: should contain zufi-manager grpc negotiationType plaintext
set:
zufiManager.grpcClientNegotiationType: PLAINTEXT
zufiManager:
grpcClientNegotiationType: PLAINTEXT
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_zufi-manager_negotiationType
value: PLAINTEXT
- it: should not set zufi env vars by default
asserts:
- notContains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_zufi-manager_address
any: true
- notContains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_zufi-manager_negotiationType
any: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment