From 8cae443dd54b48d59ae57e1cbbc7ffc56fb7307d Mon Sep 17 00:00:00 2001 From: Lukas Malte Monnerjahn <lukasmalte.monnerjahn@dataport.de> Date: Tue, 25 Mar 2025 15:02:01 +0100 Subject: [PATCH] OZG-4880 use secret for osiv2_auth --- src/main/helm/templates/deployment.yaml | 16 ++++---- .../helm/templates/osiv2_auth_secret.yaml | 37 +++++++++++++++++++ 2 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 src/main/helm/templates/osiv2_auth_secret.yaml diff --git a/src/main/helm/templates/deployment.yaml b/src/main/helm/templates/deployment.yaml index 966a166ed..f74799ec3 100644 --- a/src/main/helm/templates/deployment.yaml +++ b/src/main/helm/templates/deployment.yaml @@ -101,9 +101,15 @@ spec: value: {{ (.Values.ozgcloud.osiv2).enabled }} {{- if (.Values.ozgcloud.osiv2).enabled}} - name: ozgcloud_osiv2_auth_client-id - value: {{ .Values.ozgcloud.osiv2.auth.clientid }} + valueFrom: + secretKeyRef: + name: osiv2-auth + key: client-id - name: ozgcloud_osiv2_auth_client-secret - value: {{ .Values.ozgcloud.osiv2.auth.clientsecret }} + valueFrom: + secretKeyRef: + name: osiv2-auth + key: client-secret - name: ozgcloud_osiv2_auth_scope value: {{ .Values.ozgcloud.osiv2.auth.scope }} - name: ozgcloud_osiv2_auth_token-uri @@ -123,12 +129,6 @@ spec: value: {{ .Values.ozgcloud.osiv2.httpproxy.host }} - name: ozgcloud_osiv2_http-proxy_port value: {{ .Values.ozgcloud.osiv2.httpproxy.port }} - {{- if (and (.Values.ozgcloud.osiv2.httpproxy).username (.Values.ozgcloud.osiv2.httpproxy).password) }} - - name: ozgcloud_osiv2_http-proxy_username - value: {{ .Values.ozgcloud.osiv2.httpproxy.username }} - - name: ozgcloud_osiv2_http-proxy_password - value: {{ .Values.ozgcloud.osiv2.httpproxy.password }} - {{- end }} {{- end }} {{- end }} {{- if (.Values.rabbitmq).enabled }} diff --git a/src/main/helm/templates/osiv2_auth_secret.yaml b/src/main/helm/templates/osiv2_auth_secret.yaml new file mode 100644 index 000000000..a9c108853 --- /dev/null +++ b/src/main/helm/templates/osiv2_auth_secret.yaml @@ -0,0 +1,37 @@ +# +# Copyright (C) 2025 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. +# + +{{- if (.Values.ozgcloud.osiv2).auth }} +apiVersion: v1 +kind: Secret +metadata: + name: osiv2-auth + namespace: {{ include "app.namespace" . }} +type: Opaque +stringData: + client-id: {{ .Values.ozgcloud.osiv2.auth.client_id }} + client-secret: {{ .Values.ozgcloud.osiv2.auth.client_secret }} +data: + ozgcloud_osi_postfach_proxyapi_key: {{ (.Values.ozgcloudProxyApi).apikey | b64enc }} +{{- end }} \ No newline at end of file -- GitLab