From f4bdb686cf2a4f02869892ba48a5ff451dc04d17 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Thu, 15 Jun 2023 15:39:47 +0200 Subject: [PATCH] Try to get secrets from kubernetes for nextcloud oauth --- .../layer1-port-owncloud/templates/configmap.yaml | 6 +++--- .../layer1-port-owncloud/templates/deployment.yaml | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/rds/base/charts/all/charts/layer1-port-owncloud/templates/configmap.yaml b/rds/base/charts/all/charts/layer1-port-owncloud/templates/configmap.yaml index 4abd49f..ae141d8 100644 --- a/rds/base/charts/all/charts/layer1-port-owncloud/templates/configmap.yaml +++ b/rds/base/charts/all/charts/layer1-port-owncloud/templates/configmap.yaml @@ -18,8 +18,8 @@ metadata: name: portowncloudconfig-{{ .name | replace "." "-" | replace ":" "-" }} namespace: {{ $.Values.global.namespace.name | default $.Release.Namespace }} data: - OWNCLOUD_OAUTH_CLIENT_ID: {{ .OAUTH_CLIENT_ID | quote }} + OWNCLOUD_OAUTH_CLIENT_ID: {{ .Values.environment.OAUTH_CLIENT_SECRET | quote }} OWNCLOUD_INSTALLATION_URL: {{ .ADDRESS | quote }} - OWNCLOUD_OAUTH_CLIENT_SECRET: {{ .OAUTH_CLIENT_SECRET | quote }} + OWNCLOUD_OAUTH_CLIENT_SECRET: {{ .Values.environment.OAUTH_CLIENT_ID | quote }} SERVICENAME: {{ .name | replace "." "-" | replace ":" "-" }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/rds/base/charts/all/charts/layer1-port-owncloud/templates/deployment.yaml b/rds/base/charts/all/charts/layer1-port-owncloud/templates/deployment.yaml index f49c3de..feff60d 100644 --- a/rds/base/charts/all/charts/layer1-port-owncloud/templates/deployment.yaml +++ b/rds/base/charts/all/charts/layer1-port-owncloud/templates/deployment.yaml @@ -37,6 +37,17 @@ spec: - name: {{ $.Chart.Name }} image: {{ template "layer1_port_owncloud.image" $ }} imagePullPolicy: {{ $.Values.image.pullPolicy }} + env: + - name: OAUTH_CLIENT_ID + valueFrom: + secretKeyRef: + name: {{ $.Chart.Name }} + key: "oauth-client-id" + - name: OAUTH_CLIENT_SECRET + valueFrom: + secretKeyRef: + name: {{ $.Chart.Name }} + key: "oauth-client-secret" envFrom: - configMapRef: name: mservice