diff --git a/helm/open-build-service/charts/frontend/templates/deployment.yaml b/helm/open-build-service/charts/frontend/templates/deployment.yaml index 4564b1889ef63770a16667f5cc4fa02fa17d0e8f..2f1082a694beac3278ee157a0f595930e0c5ddc8 100644 --- a/helm/open-build-service/charts/frontend/templates/deployment.yaml +++ b/helm/open-build-service/charts/frontend/templates/deployment.yaml @@ -88,6 +88,16 @@ spec: mountPath: /tmp - name: frontend-logs mountPath: /obs/src/api/log + {{- if (or .Values.global.frontend.msmtprc .Values.global.frontend.msmtprcExistingSecret) }} + - name: frontend-email-secret + mountPath: /run/secrets/msmtprc + subPath: msmtprc + {{- end }} + {{- if (or .Values.global.frontend.ssoauth .Values.global.frontend.ssoauthExistingSecret) }} + - name: frontend-sso-secret + mountPath: /run/secrets/ssoauth + subPath: ssoauth + {{- end }} - name: {{ .Chart.Name }}-weblog image: busybox args: @@ -132,6 +142,16 @@ spec: emptyDir: {} - name: frontend-logs emptyDir: {} + {{- if (or .Values.global.frontend.msmtprc .Values.global.frontend.msmtprcExistingSecret) }} + - name: frontend-email-secret + secret: + secretName: {{ .Values.global.frontend.msmtprcExistingSecret | default (printf "%s-email" (include "frontend.fullname" .)) }} + {{- end }} + {{- if (or .Values.global.frontend.ssoauth .Values.global.frontend.ssoauthExistingSecret) }} + - name: frontend-sso-secret + secret: + secretName: {{ .Values.global.frontend.ssoauthExistingSecret | default (printf "%s-sso" (include "frontend.fullname" .)) }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/helm/open-build-service/charts/frontend/templates/email-secret.yaml b/helm/open-build-service/charts/frontend/templates/email-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cf81096220d603571e9449fd4b8022d518ee10d3 --- /dev/null +++ b/helm/open-build-service/charts/frontend/templates/email-secret.yaml @@ -0,0 +1,11 @@ +{{- if (and .Values.global.frontend.msmtprc (not .Values.global.frontend.msmtprcExistingSecret)) -}} +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ include "frontend.fullname" . }}-email + labels: + {{- include "frontend.labels" . | nindent 4 }} +data: + msmtprc: {{ default "" .Values.global.frontend.msmtprc | b64enc | quote }} +{{- end }} diff --git a/helm/open-build-service/charts/frontend/templates/sso-secret.yaml b/helm/open-build-service/charts/frontend/templates/sso-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0f6b39cffefc269f056d5c0bd90b23e076b9421f --- /dev/null +++ b/helm/open-build-service/charts/frontend/templates/sso-secret.yaml @@ -0,0 +1,11 @@ +{{- if (and .Values.global.frontend.ssoauth (not .Values.global.frontend.ssoauthExistingSecret)) -}} +apiVersion: v1 +kind: Secret +type: Opaque +metadata: + name: {{ include "frontend.fullname" . }}-sso + labels: + {{- include "frontend.labels" . | nindent 4 }} +data: + ssoauth: {{ default "" .Values.global.frontend.ssoauth | toYaml | b64enc | quote }} +{{- end }} diff --git a/helm/open-build-service/values.yaml b/helm/open-build-service/values.yaml index e8c1f8e7f082d4ee1e7a3c8514e4bd9f9ce2a182..593e362c54f2c96ff09941141534de6dd02a4298 100644 --- a/helm/open-build-service/values.yaml +++ b/helm/open-build-service/values.yaml @@ -24,6 +24,17 @@ global: frontend: workers: 4 # host: frontend + # msmtprc: | + # ... + # ssoauth: + # fdo-gitlab: + # strategy: gitlab + # description: Freedesktop.org GitLab + # scope: read_user openid profile email + # client_id: hexhexhexhex + # client_secret: hexhexhexhex + # client_options: + # site: https://gitlab.freedesktop.org/api/v4 backend: {} # host: backend # extraConfig: |