Files
truecharts/library/common/templates/custom/classes/_appAuthForward.tpl
T
kjeld Schouten-Lebbing 50d1f93e12 Add Initial BETA Test release of the Common Chart and testing environment
Co-authored-by: Troy Prelog <tprelog@users.noreply.github.com>
Signed-off-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
2021-02-05 21:17:06 +01:00

32 lines
874 B
Smarty

{{/*
Renders the additioanl authForward objects from appAuthForward
*/}}
{{- define "custom.classes.appAuthForward" -}}
{{- /* Generate TrueNAS SCALE app services as required v1 */ -}}
{{- $values := .Values.appIngress -}}
{{- if hasKey . "ObjectValues" -}}
{{- with .ObjectValues.appIngress -}}
{{- $values = . -}}
{{- end -}}
{{ end -}}
{{- $authForwardName := include "common.names.fullname" . -}}
{{- if hasKey $values "nameSuffix" -}}
{{- $authForwardName = printf "%v-%v" $authForwardName $values.nameSuffix -}}
{{ end -}}
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ $authForwardName }}
spec:
forwardAuth:
address: {{ $values.authForwardURL }}
tls:
insecureSkipVerify: true
rustForwardHeader: true
authResponseHeaders:
- Remote-User
- Remote-Groups
- Remote-Name
- Remote-Email
{{- end }}