2023-11-05 18:33:34 +01:00
|
|
|
{{- $clientID := include "authentik-application.staticValue" (dict "root" $ "name" "clientID" "default" (randAlphaNum 32) "overwrite" .Values.blueprint.provider.oidc.clientID) }}
|
|
|
|
{{- $clientSecret := include "authentik-application.staticValue" (dict "root" $ "name" "clientSecret" "default" (randAlphaNum 32) "overwrite" .Values.blueprint.provider.oidc.clientSecret) }}
|
|
|
|
{{- $bindPolicyID := include "authentik-application.staticValue" (dict "root" $ "name" "bindPolicyID" "default" (uuidv4) "overwrite" .Values.blueprint.application.bindPolicyID) }}
|
2023-09-03 14:58:07 +02:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
2023-11-05 18:33:34 +01:00
|
|
|
name: {{ include "authentik-application.fullname" . }}
|
2023-09-03 14:58:07 +02:00
|
|
|
labels:
|
|
|
|
{{- include "authentik-application.labels" . | nindent 4 }}
|
|
|
|
{{- with .Values.secret.labels }}
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
stringData:
|
2023-09-06 00:40:34 +02:00
|
|
|
bindPolicyID: {{ $bindPolicyID | quote }}
|
|
|
|
|
|
|
|
{{- if .Values.blueprint.provider.enabled }}
|
2023-09-03 14:58:07 +02:00
|
|
|
issuerURL: {{ print .Values.blueprint.authentik.domain "/application/o/" .Values.blueprint.application.slug "/" }}
|
2023-09-06 00:40:34 +02:00
|
|
|
|
2023-09-06 22:02:27 +02:00
|
|
|
{{- with .Values.blueprint.provider.oidc }}
|
2023-09-03 14:58:07 +02:00
|
|
|
clientID: {{ $clientID | quote }}
|
|
|
|
clientSecret: {{ $clientSecret | quote }}
|
2023-09-06 00:40:34 +02:00
|
|
|
|
2023-09-06 22:02:27 +02:00
|
|
|
redirectURL: {{ .redirectURL }}
|
2023-09-06 00:40:34 +02:00
|
|
|
|
2023-09-06 22:02:27 +02:00
|
|
|
{{- with .tokenDuration }}
|
2023-09-03 14:58:07 +02:00
|
|
|
tokenDuration: {{ . | quote }}
|
|
|
|
{{- end }}
|
2023-09-06 00:40:34 +02:00
|
|
|
|
2023-09-06 22:02:27 +02:00
|
|
|
{{- with .scopes }}
|
2023-09-03 14:58:07 +02:00
|
|
|
customScopes: {{ . | join "," | quote }}
|
|
|
|
{{- end }}
|
2023-09-06 00:40:34 +02:00
|
|
|
|
2023-09-06 22:02:27 +02:00
|
|
|
{{- with .claimUsername }}
|
2023-09-03 14:58:07 +02:00
|
|
|
claimUsername: {{ . | quote }}
|
|
|
|
{{- end }}
|
2023-09-06 00:40:34 +02:00
|
|
|
|
2023-09-06 22:02:27 +02:00
|
|
|
{{- with .claimGroups }}
|
2023-09-03 14:58:07 +02:00
|
|
|
claimGroups: {{ . | quote }}
|
|
|
|
{{- end }}
|
2023-11-05 18:33:34 +01:00
|
|
|
{{- end }}{{/* end with oidc */}}
|
|
|
|
{{- end }}{{/* end if provider */}}
|
2023-09-03 14:58:07 +02:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: {{ include "authentik-application.fullname" . }}-blueprint
|
|
|
|
labels:
|
|
|
|
{{- include "authentik-application.labels" . | nindent 4 }}
|
|
|
|
{{- with .Values.blueprint.labels }}
|
|
|
|
{{- toYaml . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
stringData:
|
|
|
|
blueprint.yaml: |-
|
|
|
|
version: 1
|
|
|
|
metadata:
|
|
|
|
name: {{ include "authentik-application.fullname" . }}
|
|
|
|
entries:
|
2023-11-05 18:33:34 +01:00
|
|
|
{{- $tplValues := (dict "root" $ "Template" .Template "bindPolicyID" $bindPolicyID "clientID" $clientID "clientSecret" $clientSecret) }}
|
2023-09-06 00:40:34 +02:00
|
|
|
{{- if .Values.blueprint.provider.enabled }}
|
2023-11-05 18:33:34 +01:00
|
|
|
{{- tpl (.Files.Get (printf "files/provider/%s.yaml.gotmpl" .Values.blueprint.provider.type)) $tplValues | nindent 6 }}
|
2023-09-03 14:58:07 +02:00
|
|
|
{{- end }}
|
2023-09-06 00:40:34 +02:00
|
|
|
|
2023-11-05 18:33:34 +01:00
|
|
|
{{- tpl (.Files.Get "files/application.yaml.gotmpl") $tplValues | nindent 6 }}
|
|
|
|
{{- tpl (.Files.Get "files/groups.yaml.gotmpl") $tplValues | nindent 6 }}
|