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

Merge pull request 'ozg-3938-grpc-tls' (#561) from ozg-3938-grpc-tls into master

parents adc34000 8c70168e
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,8 @@ grpc: ...@@ -12,6 +12,8 @@ grpc:
user-manager: user-manager:
address: static://127.0.0.1:9000 address: static://127.0.0.1:9000
negotiationType: PLAINTEXT negotiationType: PLAINTEXT
vorgang-manager:
negotiationType: PLAINTEXT
ozgcloud: ozgcloud:
feature: feature:
......
...@@ -57,7 +57,7 @@ grpc: ...@@ -57,7 +57,7 @@ grpc:
client: client:
vorgang-manager: vorgang-manager:
address: static://127.0.0.1:9090 address: static://127.0.0.1:9090
negotiationType: PLAINTEXT negotiationType: TLS
user-manager: user-manager:
address: static://127.0.0.1:9000 address: static://127.0.0.1:9000
negotiationType: TLS negotiationType: TLS
......
...@@ -72,6 +72,8 @@ spec: ...@@ -72,6 +72,8 @@ spec:
value: "/bindings" value: "/bindings"
- name: grpc_client_vorgang-manager_address - name: grpc_client_vorgang-manager_address
value: {{ include "app.grpc_client_vorgang_manager_address" . }} value: {{ include "app.grpc_client_vorgang_manager_address" . }}
- name: grpc_client_vorgang-manager_negotiationType
value: {{ (.Values.vorgangManager).grpcClientNegotiationType | default "TLS" }}
- name: grpc_client_user-manager_address - name: grpc_client_user-manager_address
value: {{ include "app.grpc_client_user-manager_address" . }} value: {{ include "app.grpc_client_user-manager_address" . }}
- name: grpc_client_user-manager_negotiationType - name: grpc_client_user-manager_negotiationType
...@@ -176,12 +178,6 @@ spec: ...@@ -176,12 +178,6 @@ spec:
mountPath: "/bindings/ca-certificates/type" mountPath: "/bindings/ca-certificates/type"
subPath: type subPath: type
readOnly: true readOnly: true
{{- if not .Values.disableUserManagerGrpcTls }}
- name: user-manager-tls-certificate
mountPath: "/bindings/ca-certificates/user-manager-tls-ca.pem"
subPath: ca.crt
readOnly: true
{{- end }}
- name: temp-dir - name: temp-dir
mountPath: "/tmp" mountPath: "/tmp"
{{- if (.Values.sso).tlsCertName }} {{- if (.Values.sso).tlsCertName }}
...@@ -190,15 +186,13 @@ spec: ...@@ -190,15 +186,13 @@ spec:
subPath: tls.crt subPath: tls.crt
readOnly: true readOnly: true
{{- end }} {{- end }}
- name: namespace-ca-cert
mountPath: "/bindings/namespace-certificate"
readOnly: true
volumes: volumes:
- name: bindings - name: bindings
configMap: configMap:
name: alfa-bindings-type name: alfa-bindings-type
{{- if not .Values.disableUserManagerGrpcTls }}
- name: user-manager-tls-certificate
secret:
secretName: user-manager-tls-cert
{{- end }}
- name: temp-dir - name: temp-dir
emptyDir: {} emptyDir: {}
{{- if (.Values.sso).tlsCertName }} {{- if (.Values.sso).tlsCertName }}
...@@ -206,6 +200,17 @@ spec: ...@@ -206,6 +200,17 @@ spec:
secret: secret:
secretName: {{ .Values.sso.tlsCertName }} secretName: {{ .Values.sso.tlsCertName }}
{{- end }} {{- end }}
- name: namespace-ca-cert
projected:
sources:
- secret:
name: {{ include "app.namespace" . }}-ca-cert
optional: true
items:
- key: ca.crt
path: ca.crt
- configMap:
name: alfa-bindings-type
dnsConfig: {} dnsConfig: {}
dnsPolicy: ClusterFirst dnsPolicy: ClusterFirst
imagePullSecrets: imagePullSecrets:
......
...@@ -38,7 +38,7 @@ set: ...@@ -38,7 +38,7 @@ set:
baseUrl: test.company.local baseUrl: test.company.local
imagePullSecret: image-pull-secret imagePullSecret: image-pull-secret
tests: tests:
- it: should have volumes - it: should have volume mounts
set: set:
usermanagerName: user-manager usermanagerName: user-manager
asserts: asserts:
...@@ -49,13 +49,6 @@ tests: ...@@ -49,13 +49,6 @@ tests:
mountPath: "/bindings/ca-certificates/type" mountPath: "/bindings/ca-certificates/type"
subPath: type subPath: type
readOnly: true readOnly: true
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: user-manager-tls-certificate
mountPath: "/bindings/ca-certificates/user-manager-tls-ca.pem"
subPath: ca.crt
readOnly: true
- contains: - contains:
path: spec.template.spec.containers[0].volumeMounts path: spec.template.spec.containers[0].volumeMounts
content: content:
...@@ -68,7 +61,13 @@ tests: ...@@ -68,7 +61,13 @@ tests:
mountPath: "/bindings/ca-certificates/ssl-tls-ca.pem" mountPath: "/bindings/ca-certificates/ssl-tls-ca.pem"
subPath: ca.crt subPath: ca.crt
readOnly: true readOnly: true
- it: should have volume mounts - contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: namespace-ca-cert
mountPath: "/bindings/namespace-certificate"
readOnly: true
- it: should have volumes
set: set:
usermanagerName: user-manager usermanagerName: user-manager
asserts: asserts:
...@@ -78,12 +77,6 @@ tests: ...@@ -78,12 +77,6 @@ tests:
name: bindings name: bindings
configMap: configMap:
name: alfa-bindings-type name: alfa-bindings-type
- contains:
path: spec.template.spec.volumes
content:
name: user-manager-tls-certificate
secret:
secretName: user-manager-tls-cert
- contains: - contains:
path: spec.template.spec.volumes path: spec.template.spec.volumes
content: content:
...@@ -93,6 +86,20 @@ tests: ...@@ -93,6 +86,20 @@ tests:
path: spec.template.spec.volumes path: spec.template.spec.volumes
content: content:
name: sso-tls-certificate name: sso-tls-certificate
- contains:
path: spec.template.spec.volumes
content:
name: namespace-ca-cert
projected:
sources:
- secret:
items:
- key: ca.crt
path: ca.crt
name: sh-helm-test-ca-cert
optional: true
- configMap:
name: alfa-bindings-type
- it: should have sso tls cert mount - it: should have sso tls cert mount
set: set:
usermanagerName: user-manager usermanagerName: user-manager
......
...@@ -132,3 +132,21 @@ tests: ...@@ -132,3 +132,21 @@ tests:
content: content:
name: grpc_client_user-manager_negotiationType name: grpc_client_user-manager_negotiationType
value: TLS value: TLS
- it: should set vorgang-manager negotiationType plaintext
set:
vorgangManager.grpcClientNegotiationType: PLAINTEXT
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_vorgang-manager_negotiationType
value: PLAINTEXT
- it: should contain default vorgang-manager negotiationType tls
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: grpc_client_vorgang-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