From e9eb8278bc11ab73a0d1995f92024d21a9507bde Mon Sep 17 00:00:00 2001 From: Berkay Tekin Oz Date: Wed, 3 Apr 2024 11:06:30 +0300 Subject: [PATCH] Add cilium-dbg cleanup to snap removal hook --- k8s/lib.sh | 3 +++ snap/snapcraft.yaml | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/k8s/lib.sh b/k8s/lib.sh index fd1bdef90..69ae7e959 100755 --- a/k8s/lib.sh +++ b/k8s/lib.sh @@ -69,6 +69,9 @@ k8s::remove::network() { do tc filter del dev $default_interface ${d} || true done + + rm -rf /var/run/cilium/cilium.pid + "${SNAP}/usr/bin/cilium-dbg" cleanup --all-state --force } # [DANGER] Cleanup containers and runtime state. Note that the order of operations below is crucial. diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 196a7ae88..40c183bcc 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -154,6 +154,15 @@ parts: source: build-scripts override-build: ./build-component.sh runc + cilium-dbg: + after: [build-deps] + plugin: make + source-type: git + source: https://github.com/cilium/cilium.git + source-tag: v1.15.2 + source-depth: 1 + source-subdir: cilium-dbg + bash-utils: plugin: nil stage-packages: