From c5abad592a59807b767ac28b9f823b25e8e8387d Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Tue, 15 Nov 2022 23:52:21 +0200 Subject: [PATCH] remove wg0 on scale down --- test/wg-easy/1.0.0/templates/deployment.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/wg-easy/1.0.0/templates/deployment.yaml b/test/wg-easy/1.0.0/templates/deployment.yaml index 51a600f550..c264d270e3 100644 --- a/test/wg-easy/1.0.0/templates/deployment.yaml +++ b/test/wg-easy/1.0.0/templates/deployment.yaml @@ -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 }}