mirror of
https://ghproxy.com/https://github.com/truecharts/charts.git
synced 2026-07-18 09:50:24 +08:00
(fix) simplify and correct openvpn VPN_AUTH envvar generation
This commit is contained in:
@@ -15,4 +15,4 @@ maintainers:
|
||||
name: common
|
||||
sources: null
|
||||
type: library
|
||||
version: 8.0.12
|
||||
version: 8.0.13
|
||||
|
||||
@@ -49,7 +49,7 @@ env:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or .Values.addons.vpn.openvpn.auth }}
|
||||
{{- if or ( .Values.addons.vpn.openvpn.username ) ( .Values.addons.vpn.openvpn.password ) }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "common.names.fullname" . }}-openvpn
|
||||
|
||||
@@ -10,11 +10,5 @@ metadata:
|
||||
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 }}
|
||||
VPN_AUTH: {{ ( printf "%v;%v" .Values.addons.vpn.openvpn.username .Values.addons.vpn.openvpn.password ) | b64enc }}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user