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

OZG-6477 OZG-6439 Configure collaboration-manager grpc client

parent f85f0219
No related branches found
No related tags found
No related merge requests found
......@@ -10,12 +10,13 @@ server:
grpc:
client:
user-manager:
address: static://127.0.0.1:9000
negotiationType: PLAINTEXT
vorgang-manager:
negotiationType: PLAINTEXT
zufi-manager:
negotiationType: PLAINTEXT
collaboration-manager:
negotiationType: PLAINTEXT
ozgcloud:
feature:
......
......@@ -66,6 +66,9 @@ grpc:
zufi-manager:
address: static://127.0.0.1:9190
negotiationType: TLS
collaboration-manager:
address: static://127.0.0.1:9090
negotiationType: TLS
ozgcloud:
auth:
......
......@@ -14,7 +14,7 @@ import net.devh.boot.grpc.client.inject.GrpcClient;
@Service
public class CollaborationRemoteService {
@GrpcClient(GrpcUtil.VORGANG_MANAGER_GRPC_CLIENT) // TODO: eigener Client für collaboration manager?
@GrpcClient(GrpcUtil.COLLABORATION_MANAGER_GRPC_CLIENT)
private CollaborationRequestServiceBlockingStub serviceStub;
@Autowired
......
......@@ -37,8 +37,8 @@ import lombok.NoArgsConstructor;
public class GrpcUtil {
public static final String VORGANG_MANAGER_GRPC_CLIENT = "vorgang-manager";
public static final String ZUFI_MANAGER_GRPC_CLIENT = "zufi-manager";
public static final String COLLABORATION_MANAGER_GRPC_CLIENT = "collaboration-manager";
public static final String SERVICE_KEY = "GRPC_SERVICE";
......
......@@ -57,6 +57,10 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{ printf "dns:///%s.%s:9000" ( coalesce .Values.usermanagerName "user-manager" ) .Release.Namespace }}
{{- end -}}
{{- define "app.grpc_client_collaboration-manager_address" -}}
{{ printf "dns:///%s.%s:9090" ( coalesce .Values.collaborationManagerName "vorgang-manager" ) .Release.Namespace | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end -}}
{{- define "app.spring_cloud_config_administration_address" -}}
{{ printf "http://%s.%s:8080" ( coalesce .Values.administrationName "administration" ) .Release.Namespace }}
{{- end -}}
......
......@@ -78,6 +78,10 @@ spec:
value: {{ include "app.grpc_client_user-manager_address" . }}
- name: grpc_client_user-manager_negotiationType
value: {{ (.Values.userManager).grpcClientNegotiationType | default "TLS" }}
- name: grpc_client_collaboration-manager_address
value: {{ include "app.grpc_client_collaboration-manager_address" . }}
- name: grpc_client_collaboration-manager_negotiationType
value: {{ (.Values.collaborationManager).grpcClientNegotiationType | default "TLS" }}
- name: spring_profiles_active
value: {{ include "app.envSpringProfiles" . }}
- name: keycloak_realm
......
#
# Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den
# Ministerpräsidenten des Landes Schleswig-Holstein
# Staatskanzlei
# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung
#
# Lizenziert unter der EUPL, Version 1.2 oder - sobald
# diese von der Europäischen Kommission genehmigt wurden -
# Folgeversionen der EUPL ("Lizenz");
# Sie dürfen dieses Werk ausschließlich gemäß
# dieser Lizenz nutzen.
# Eine Kopie der Lizenz finden Sie hier:
#
# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
#
# Sofern nicht durch anwendbare Rechtsvorschriften
# gefordert oder in schriftlicher Form vereinbart, wird
# die unter der Lizenz verbreitete Software "so wie sie
# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN -
# ausdrücklich oder stillschweigend - verbreitet.
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
suite: test deployment collaboration-manager address
release:
name: alfa
namespace: sh-helm-test
templates:
- templates/deployment.yaml
set:
baseUrl: test.company.local
ozgcloud:
environment: test
bundesland: sh
bezeichner: helm
sso:
serverUrl: https://sso.company.local
imagePullSecret: image-pull-secret
tests:
- it: should set the collaboration-manager name
set:
collaborationManagerName: my-test-collaboration-manager-name
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_collaboration-manager_address
value: dns:///my-test-collaboration-manager-name.sh-helm-test:9090
......@@ -54,6 +54,11 @@ tests:
content:
name: grpc_client_user-manager_address
value: dns:///user-manager.sh-helm-test:9000
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_collaboration-manager_address
value: dns:///vorgang-manager.sh-helm-test:9090
- it: should have service binding root
set:
......@@ -150,3 +155,21 @@ tests:
content:
name: grpc_client_vorgang-manager_negotiationType
value: TLS
- it: should set collaboration-manager negotiationType plaintext
set:
collaborationManager.grpcClientNegotiationType: PLAINTEXT
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_collaboration-manager_negotiationType
value: PLAINTEXT
- it: should contain default collaboration-manager negotiationType tls
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_collaboration-manager_negotiationType
value: TLS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment