From 8df75898402cdce3c6af00e877a6896e75961ed1 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Mon, 15 Jul 2024 12:51:10 +0000 Subject: [PATCH] Adds /host folder in the rocks The /install-cni.sh script requires this folder. It does mkdir it, but the bitnami helm chart creates the daemonsets with read-only filesystem, making it impossible to create the folder. --- 0.5.4/rockcraft.yaml | 7 +++++++ 0.6.1/rockcraft.yaml | 7 +++++++ 0.6.3/rockcraft.yaml | 7 +++++++ tests/sanity/test_whereabouts.py | 1 + 4 files changed, 22 insertions(+) diff --git a/0.5.4/rockcraft.yaml b/0.5.4/rockcraft.yaml index 2062f0a..5eb04ba 100644 --- a/0.5.4/rockcraft.yaml +++ b/0.5.4/rockcraft.yaml @@ -40,3 +40,10 @@ parts: bash -x "hack/build-go.sh" cp bin/* "${CRAFT_PART_INSTALL}/" cp script/install-cni.sh "${CRAFT_PART_INSTALL}/" + + bitnami-compatibility: + plugin: nil + override-build: | + # install-cni.sh requires this folder to exist. + mkdir -p "${CRAFT_PART_INSTALL}/bitnami/whereabouts/host" + ln -sf /bitnami/whereabouts/host "${CRAFT_PART_INSTALL}/host" diff --git a/0.6.1/rockcraft.yaml b/0.6.1/rockcraft.yaml index 6047674..53e7ca1 100644 --- a/0.6.1/rockcraft.yaml +++ b/0.6.1/rockcraft.yaml @@ -40,3 +40,10 @@ parts: bash -x "hack/build-go.sh" cp bin/* "${CRAFT_PART_INSTALL}/" cp script/install-cni.sh "${CRAFT_PART_INSTALL}/" + + bitnami-compatibility: + plugin: nil + override-build: | + # install-cni.sh requires this folder to exist. + mkdir -p "${CRAFT_PART_INSTALL}/bitnami/whereabouts/host" + ln -sf /bitnami/whereabouts/host "${CRAFT_PART_INSTALL}/host" diff --git a/0.6.3/rockcraft.yaml b/0.6.3/rockcraft.yaml index 9aa00b4..f9cf59d 100644 --- a/0.6.3/rockcraft.yaml +++ b/0.6.3/rockcraft.yaml @@ -41,3 +41,10 @@ parts: bash -x "hack/build-go.sh" cp bin/* "${CRAFT_PART_INSTALL}/" cp script/install-cni.sh "${CRAFT_PART_INSTALL}/" + + bitnami-compatibility: + plugin: nil + override-build: | + # install-cni.sh requires this folder to exist. + mkdir -p "${CRAFT_PART_INSTALL}/bitnami/whereabouts/host" + ln -sf /bitnami/whereabouts/host "${CRAFT_PART_INSTALL}/host" diff --git a/tests/sanity/test_whereabouts.py b/tests/sanity/test_whereabouts.py index 64f44c1..71b09f5 100644 --- a/tests/sanity/test_whereabouts.py +++ b/tests/sanity/test_whereabouts.py @@ -7,6 +7,7 @@ import pytest ROCK_EXPECTED_FILES = [ + "/host", "/install-cni.sh", "/ip-control-loop", "/whereabouts",