remove wg0 on scale down

This commit is contained in:
Stavros kois committed 2022-11-15 23:52:21 +02:00
1 parent 118b063c36
commit c5abad592a
1 file changed
+7
@@ -106,6 +106,13 @@ spec:
ip route del {{ $ip }}/$netmask || echo "Route deletion failed..."
fi
echo "Routes deleted..."
interface=$(ip a | grep wg0)
if [ ! "$interface" == "" ]; then
echo "Removing wg0 interface..."
ip link delete wg0
echo "Removed wg0 interface..."
fi
{{ include "common.networking.dnsConfiguration" .Values | nindent 6 }}
volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}