Files
truecharts/charts/library/common/templates/addons/vpn/openvpn/_secret.tpl
T
Kjeld Schouten-LebbingandGitHub 2db56c1e42 Fix remaining VPN addon issues (#1029)
* Fix remaining VPN addon issues

* fix minor common-test issue
2021-09-25 14:40:14 +02:00

21 lines
582 B
Smarty

{{/*
The OpenVPN credentials secrets to be included.
*/}}
{{- define "common.addon.openvpn.secret" -}}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" $ }}-openvpn
labels:
{{- include "common.labels" $ | nindent 4 }}
data:
{{- $vpnauth := "" }}
{{- if .Values.addons.vpn.openvpn.username }}
{{- $vpnauth = ( printf "%v;%v" .Values.addons.vpn.openvpn.username .Values.addons.vpn.openvpn.password ) }}
{{- else }}
{{- $vpnauth = .Values.addons.vpn.openvpn.password }}
{{- end }}
VPN_AUTH: {{ $vpnauth | b64enc }}
{{- end -}}