From eadfe2d5fc8680c266115155bf3f2fe7cb00d640 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Thu, 25 Aug 2022 01:50:55 +0300 Subject: [PATCH] fix(vpn): don't do anything with config file if type is tailscale (#210) * fix(vpn): don't do anything with config file if type is tailscale * remove extra ) * remove extra ) --- charts/common/Chart.yaml | 2 +- charts/common/templates/addons/vpn/_vpn.tpl | 4 +++- charts/common/templates/lib/controller/_prepare.tpl | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index ad9c16ec..ce460462 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -15,4 +15,4 @@ maintainers: name: common sources: null type: library -version: 10.5.0 +version: 10.5.1 diff --git a/charts/common/templates/addons/vpn/_vpn.tpl b/charts/common/templates/addons/vpn/_vpn.tpl index d3d1e944..1ceeedac 100644 --- a/charts/common/templates/addons/vpn/_vpn.tpl +++ b/charts/common/templates/addons/vpn/_vpn.tpl @@ -16,7 +16,9 @@ It will include / inject the required templates based on the given values. {{- include "tc.common.addon.tailscale" . }} {{- end -}} - {{- $_ := set .Values.persistence "vpnconfig" .Values.addons.vpn.configFile -}} + {{- if ne "tailscale" .Values.addons.vpn.type -}} + {{- $_ := set .Values.persistence "vpnconfig" .Values.addons.vpn.configFile -}} + {{- end -}} {{- end -}} {{- end -}} diff --git a/charts/common/templates/lib/controller/_prepare.tpl b/charts/common/templates/lib/controller/_prepare.tpl index bf4c093f..24a2085e 100644 --- a/charts/common/templates/lib/controller/_prepare.tpl +++ b/charts/common/templates/lib/controller/_prepare.tpl @@ -86,7 +86,7 @@ before chart installation. - | /bin/bash <<'EOF' echo "Automatically correcting permissions..." - {{- if and ( .Values.addons.vpn.configFile.enabled ) ( not ( eq .Values.addons.vpn.type "disabled" )) }} + {{- if and ( .Values.addons.vpn.configFile.enabled ) ( ne .Values.addons.vpn.type "disabled" ) ( ne .Values.addons.vpn.type "tailscale" ) }} echo "Automatically correcting permissions for vpn config file..." if nfs4xdr_getfacl && nfs4xdr_getfacl | grep -qv "Failed to get NFSv4 ACL"; then echo "NFSv4 ACLs detected, using nfs4_setfacl to set permissions..." @@ -187,7 +187,7 @@ before chart installation. subPath: {{ $hpm.subPath }} {{- end }} {{- end }} - {{- if and ( .Values.addons.vpn.configFile.enabled ) ( not ( eq .Values.addons.vpn.type "disabled" )) }} + {{- if and ( .Values.addons.vpn.configFile.enabled ) ( ne .Values.addons.vpn.type "disabled" ) ( ne .Values.addons.vpn.type "tailsacale" ) }} - name: vpnconfig mountPath: /vpn/vpn.conf {{- end }}