Try to get secrets from kubernetes for nextcloud oauth

This commit is contained in:
Micke Nordin 2023-06-15 15:39:47 +02:00
parent 2f0109acf3
commit f4bdb686cf
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257
2 changed files with 14 additions and 3 deletions

View file

@ -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 }}
{{- end }}

View file

@ -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