mirror of
https://github.com/truenas/charts.git
synced 2024-04-21 15:21:45 +00:00
simplify validation
This commit is contained in:
Binary file not shown.
@@ -20,7 +20,7 @@ configmap:
|
||||
{{- include "gluetun.configs.wireguard.env" $ | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Include provider specific configuration */}}
|
||||
{{/* Include provider specific validation */}}
|
||||
{{- include (printf "gluetun.%v.%v.validation" .Values.gluetunConfig.provider .Values.gluetunConfig.type) $ | nindent 6 }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -63,5 +63,5 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.certkey.required.error" -}}
|
||||
{{- fail (printf "Gluetun - Provider [%v] requires [Key and Certificate] either from [File or Content] method on type [openvpn]." .Values.gluetunConfig.provider) -}}
|
||||
{{- fail (printf "Gluetun - Provider [%v] requires [Key and/or Certificate] either from [File or Content] method on type [openvpn]." .Values.gluetunConfig.provider) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,26 +1,19 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/AirVPN */}}
|
||||
{{- define "gluetun.airvpn.openvpn.validation" -}}
|
||||
{{/* Cert and Key Required */}}
|
||||
{{- $req := list -}}
|
||||
|
||||
{{- if eq .Values.gluetunConfig.openvpnCertKeyMethod "file" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCertHostPath"
|
||||
"openvpnKeyHostPath")) -}}
|
||||
{{- $req = (list "openvpnCertHostPath" "openvpnKeyHostPath") -}}
|
||||
{{- else if eq .Values.gluetunConfig.openvpnCertKeyMethod "content" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCert"
|
||||
"openvpnKey")) -}}
|
||||
{{- $req = (list "openvpnCert" "openvpnKey") -}}
|
||||
{{- else -}}
|
||||
{{- include "gluetun.certkey.required.error" $ -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.airvpn.wireguard.validation" -}}
|
||||
{{/* Required */}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"wireguardPrivateKey"
|
||||
"wireguardPresharedKey"
|
||||
"wireguardAddresses")) -}}
|
||||
{{- $req := (list "wireguardPrivateKey" "wireguardPresharedKey" "wireguardAddresses") -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,30 +1,21 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Cyberghost */}}
|
||||
{{- define "gluetun.cyberghost.openvpn.validation" -}}
|
||||
{{/* Cert and Key Required */}}
|
||||
{{- $req := list -}}
|
||||
|
||||
{{- if eq .Values.gluetunConfig.openvpnCertKeyMethod "file" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCertHostPath"
|
||||
"openvpnKeyHostPath")) -}}
|
||||
{{- $req = (list "openvpnCertHostPath" "openvpnKeyHostPath") -}}
|
||||
{{- else if eq .Values.gluetunConfig.openvpnCertKeyMethod "content" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCert"
|
||||
"openvpnKey")) -}}
|
||||
{{- $req = (list "openvpnCert" "openvpnKey") -}}
|
||||
{{- else -}}
|
||||
{{- include "gluetun.certkey.required.error" $ -}}
|
||||
{{- end -}}
|
||||
{{/* Required */}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{/* Unsupported */}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverCities"
|
||||
"serverNames")) -}}
|
||||
|
||||
{{- $req = concat $req (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverCities" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.cyberghost.wireguard.validation" -}}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/ExpressVPN */}}
|
||||
{{- define "gluetun.expressvpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.expressvpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/FastestVPN */}}
|
||||
{{- define "gluetun.fastestvpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverCities"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverCities" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.fastestvpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Hidemyass */}}
|
||||
{{- define "gluetun.hidemyass.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.hidemyass.wireguard.validation" -}}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/IPVanish */}}
|
||||
{{- define "gluetun.ipvanish.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.ipvanish.wireguard.validation" -}}
|
||||
|
||||
@@ -1,25 +1,18 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/IVPN */}}
|
||||
{{- define "gluetun.ivpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.ivpn.wireguard.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"wireguardPrivateKey"
|
||||
"wireguardAddresses")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "wireguardPrivateKey" "wireguardAddresses") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,25 +1,18 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Mullvad */}}
|
||||
{{- define "gluetun.mullvad.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.mullvad.wireguard.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"wireguardPrivateKey"
|
||||
"wireguardAddresses")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "wireguardPrivateKey" "wireguardAddresses") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/NordVPN */}}
|
||||
{{- define "gluetun.nordvpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverCountries"
|
||||
"serverCities"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverCountries" "serverCities" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.nordvpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Perfect-privacy */}}
|
||||
{{- define "gluetun.perfect privacy.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverCountries"
|
||||
"serverRegions"
|
||||
"serverHostnames"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverCountries" "serverHostnames" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.perfect privacy.wireguard.validation" -}}
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Privado */}}
|
||||
{{- define "gluetun.privado.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.privado.wireguard.validation" -}}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Private-internet-access */}}
|
||||
{{- define "gluetun.private internet access.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverCities"
|
||||
"serverCountries")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverCities" "serverCountries") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.private internet access.wireguard.validation" -}}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/PrivateVPN */}}
|
||||
{{- define "gluetun.privatevpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverHostnames"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverHostnames" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.privatevpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/ProtonVPN */}}
|
||||
{{- define "gluetun.protonvpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.protonvpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/PureVPN */}}
|
||||
{{- define "gluetun.purevpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.purevpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/SlickVPN */}}
|
||||
{{- define "gluetun.slickvpn.openvpn.validation" -}}
|
||||
{{/* Cert and Key Required */}}
|
||||
{{- $req := list -}}
|
||||
|
||||
{{- if eq .Values.gluetunConfig.openvpnCertKeyMethod "file" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCertHostPath"
|
||||
"openvpnKeyHostPath")) -}}
|
||||
{{- $req = (list "openvpnCertHostPath" "openvpnKeyHostPath") -}}
|
||||
{{- else if eq .Values.gluetunConfig.openvpnCertKeyMethod "content" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCert"
|
||||
"openvpnKey")) -}}
|
||||
{{- $req = (list "openvpnCert" "openvpnKey") -}}
|
||||
{{- else -}}
|
||||
{{- include "gluetun.certkey.required.error" $ -}}
|
||||
{{- end -}}
|
||||
{{/* Required */}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{/* Unsupported */}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
|
||||
{{- $req = concat $req (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.slickvpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Surfshark */}}
|
||||
{{- define "gluetun.surfshark.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.surfshark.wireguard.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"wireguardPrivateKey"
|
||||
"wireguardAddresses")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "wireguardPrivateKey" "wireguardAddresses") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Torguard */}}
|
||||
{{- define "gluetun.torguard.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.torguard.wireguard.validation" -}}
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/VPN-Secure */}}
|
||||
{{- define "gluetun.vpnsecure.openvpn.validation" -}}
|
||||
{{/* Cert and Key Required */}}
|
||||
{{- $req := list -}}
|
||||
|
||||
{{- if eq .Values.gluetunConfig.openvpnCertKeyMethod "file" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCertHostPath"
|
||||
"openvpnKeyHostPath")) -}}
|
||||
{{- $req = (list "openvpnCertHostPath" "openvpnKeyHostPath") -}}
|
||||
{{- else if eq .Values.gluetunConfig.openvpnCertKeyMethod "content" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCert"
|
||||
"openvpnKey")) -}}
|
||||
{{- $req = (list "openvpnCert" "openvpnKey") -}}
|
||||
{{- else -}}
|
||||
{{- include "gluetun.certkey.required.error" $ -}}
|
||||
{{- end -}}
|
||||
{{/* Required */}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnKeyPassphrase")) -}}
|
||||
{{/* Unsupported */}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"serverCountries"
|
||||
"serverNames")) -}}
|
||||
|
||||
{{- $req = concat $req (list "openvpnKeyPassphrase") -}}
|
||||
|
||||
{{- $unsup := (list "serverCountries" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.vpnsecure.wireguard.validation" -}}
|
||||
|
||||
@@ -1,28 +1,21 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/VPN-Unlimited */}}
|
||||
{{- define "gluetun.vpn unlimited.openvpn.validation" -}}
|
||||
{{/* Cert and Key Required */}}
|
||||
{{- $req := list -}}
|
||||
|
||||
{{- if eq .Values.gluetunConfig.openvpnCertKeyMethod "file" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCertHostPath"
|
||||
"openvpnKeyHostPath")) -}}
|
||||
{{- $req = (list "openvpnCertHostPath" "openvpnKeyHostPath") -}}
|
||||
{{- else if eq .Values.gluetunConfig.openvpnCertKeyMethod "content" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnCert"
|
||||
"openvpnKey")) -}}
|
||||
{{- $req = (list "openvpnCert" "openvpnKey") -}}
|
||||
{{- else -}}
|
||||
{{- include "gluetun.certkey.required.error" $ -}}
|
||||
{{- end -}}
|
||||
{{/* Required */}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{/* Unsupported */}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"serverNames")) -}}
|
||||
|
||||
{{- $req = concat $req (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.vpn unlimited.wireguard.validation" -}}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/VyprVPN */}}
|
||||
{{- define "gluetun.vyprvpn.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverCountries"
|
||||
"serverCities"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverCountries" "serverCities" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.vyprvpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,27 +1,21 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/WeVPN */}}
|
||||
{{- define "gluetun.wevpn.openvpn.validation" -}}
|
||||
{{/* Cert and Key Required */}}
|
||||
{{- $req := list -}}
|
||||
|
||||
{{- if eq .Values.gluetunConfig.openvpnCertKeyMethod "file" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list "openvpnKeyHostPath")) -}}
|
||||
{{- $req = (list "openvpnKeyHostPath") -}}
|
||||
{{- else if eq .Values.gluetunConfig.openvpnCertKeyMethod "content" -}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list "openvpnKey")) -}}
|
||||
{{- $req = (list "openvpnKey") -}}
|
||||
{{- else -}}
|
||||
{{- include "gluetun.certkey.required.error" $ -}}
|
||||
{{- end -}}
|
||||
{{/* Required */}}
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
|
||||
{{/* Unsupported */}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $
|
||||
"options" (list
|
||||
"serverCountries"
|
||||
"serverRegions"
|
||||
"serverNames")) -}}
|
||||
{{- $req = concat $req (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverRegions" "serverCountries" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.wevpn.wireguard.validation" -}}
|
||||
|
||||
@@ -1,26 +1,18 @@
|
||||
{{/* https://github.com/qdm12/gluetun/wiki/Windscribe */}}
|
||||
{{- define "gluetun.windscribe.openvpn.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"openvpnUser"
|
||||
"openvpnPassword")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverCountries"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "openvpnUser" "openvpnPassword") -}}
|
||||
|
||||
{{- $unsup := (list "serverCountries" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "gluetun.windscribe.wireguard.validation" -}}
|
||||
{{- include "gluetun.options.required" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"wireguardPrivateKey"
|
||||
"wireguardAddresses")) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict
|
||||
"rootCtx" $
|
||||
"options" (list
|
||||
"serverCountries"
|
||||
"serverNames")) -}}
|
||||
{{- $req := (list "wireguardPrivateKey" "wireguardAddresses") -}}
|
||||
|
||||
{{- $unsup := (list "serverCountries" "serverNames") -}}
|
||||
|
||||
{{- include "gluetun.options.required" (dict "rootCtx" $ "options" $req) -}}
|
||||
{{- include "gluetun.unsupported.server.options" (dict "rootCtx" $ "options" $unsup) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -56,3 +56,6 @@ gluetunConfig:
|
||||
serverNames: []
|
||||
|
||||
additionalEnvs: []
|
||||
|
||||
# TODO: custom provider test
|
||||
# TODO: openvpn file test
|
||||
|
||||
Reference in New Issue
Block a user