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,10 +152,13 @@ spec: ...@@ -152,10 +152,13 @@ spec:
value: {{ (.Values.userManager).grpcClientNegotiationType | default "TLS" }} value: {{ (.Values.userManager).grpcClientNegotiationType | default "TLS" }}
- name: grpc_client_info-manager_address - name: grpc_client_info-manager_address
value: {{ ((.Values.ozgcloud).infoManager).address }} value: {{ ((.Values.ozgcloud).infoManager).address }}
{{- if (.Values.zufiManager).enabled }}
- name: grpc_client_zufi-manager_address - name: grpc_client_zufi-manager_address
value: {{ .Values.zufiManager.address }} value: {{ .Values.zufiManager.address }}
- name: grpc_client_zufi-manager_negotiationType - name: grpc_client_zufi-manager_negotiationType
value: {{ (.Values.zufiManager).grpcClientNegotiationType | default "TLS" }} value: {{ (.Values.zufiManager).grpcClientNegotiationType | default "TLS" }}
{{- end }}
- name: ozgcloud_user-manager_url - name: ozgcloud_user-manager_url
value: {{ include "app.ozgcloud_migration_user-manager_address" . }} value: {{ include "app.ozgcloud_migration_user-manager_address" . }}
......
...@@ -32,27 +32,64 @@ set: ...@@ -32,27 +32,64 @@ set:
ozgcloud: ozgcloud:
environment: dev environment: dev
imagePullSecret: test-image-pull-secret imagePullSecret: test-image-pull-secret
tests: tests:
- it: should set the grpc zufi-manager client address - it: should set default grpc zufi-manager address
set:
zufiManager:
enabled: true
asserts: asserts:
- contains: - contains:
path: spec.template.spec.containers[0].env path: spec.template.spec.containers[0].env
content: content:
name: grpc_client_zufi-manager_address 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 - it: should contain default zufi-manager grpc negotiationType tls
set:
zufiManager:
enabled: true
asserts: asserts:
- contains: - contains:
path: spec.template.spec.containers[0].env path: spec.template.spec.containers[0].env
content: content:
name: grpc_client_zufi-manager_negotiationType name: grpc_client_zufi-manager_negotiationType
value: TLS value: TLS
- it: should contain zufi-manager grpc negotiationType plaintext - it: should contain zufi-manager grpc negotiationType plaintext
set: set:
zufiManager.grpcClientNegotiationType: PLAINTEXT zufiManager:
grpcClientNegotiationType: PLAINTEXT
enabled: true
asserts: asserts:
- contains: - contains:
path: spec.template.spec.containers[0].env path: spec.template.spec.containers[0].env
content: content:
name: grpc_client_zufi-manager_negotiationType name: grpc_client_zufi-manager_negotiationType
value: PLAINTEXT 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