From 4a020c5d3e6b15403cd7ebd65fbb2377f140ead5 Mon Sep 17 00:00:00 2001 From: Andrew McDermott Date: Tue, 27 Aug 2024 14:47:52 +0100 Subject: [PATCH 1/2] Revert "Makefile: ensure `run-on-kind` works without local images" This reverts commit c6cafcf79c3dd0d7c523428cc43aae464eba9ba5. Signed-off-by: Andrew McDermott --- Makefile | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 2f3b15cd5..54aba0303 100644 --- a/Makefile +++ b/Makefile @@ -353,30 +353,9 @@ push-images: ## Push bpfman-agent and bpfman-operator images. $(OCI_BIN) push ${BPFMAN_AGENT_IMG} $(OCI_BIN) push ${BPFMAN_IMG} -.PHONY: load-images-kind -# Function to check if an image exists locally using podman or docker. -image_exists = \ - if [ "$(OCI_BIN)" = "podman" ]; then \ - podman image exists $(1); \ - elif [ "$(OCI_BIN)" = "docker" ]; then \ - docker image inspect $(1) > /dev/null 2>&1; \ - else \ - echo "Unsupported OCI_BIN value: $(OCI_BIN). Use 'podman' or 'docker'."; \ - exit 1; \ - fi - .PHONY: load-images-kind load-images-kind: ## Load bpfman, bpfman-agent, and bpfman-operator images into the running local kind devel cluster. - @set -e; \ - images="$$BPFMAN_OPERATOR_IMG $$BPFMAN_AGENT_IMG $$BPFMAN_IMG"; \ - for img in $$images; do \ - if $(call image_exists,$$img); then \ - echo "Loading image $$img into kind cluster ${KIND_CLUSTER_NAME}"; \ - ./hack/kind-load-image.sh ${KIND_CLUSTER_NAME} $$img; \ - else \ - echo "Image $$img does not exist locally, skipping."; \ - fi; \ - done + ./hack/kind-load-image.sh ${KIND_CLUSTER_NAME} ${BPFMAN_OPERATOR_IMG} ${BPFMAN_AGENT_IMG} ${BPFMAN_IMG} .PHONY: bundle-build bundle-build: ## Build the bundle image. From 8650f28a30b0aec0ce785b898dd15e6207a694ea Mon Sep 17 00:00:00 2001 From: Andrew McDermott Date: Tue, 27 Aug 2024 14:47:56 +0100 Subject: [PATCH 2/2] Revert "Makefile: Ensure ${BPFMAN_IMG} is loaded into KIND cluster" This reverts commit 6729ecd7e0a9b8daec92731dda33aa858b493a75. Signed-off-by: Andrew McDermott --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 54aba0303..2ec6aa15b 100644 --- a/Makefile +++ b/Makefile @@ -354,8 +354,8 @@ push-images: ## Push bpfman-agent and bpfman-operator images. $(OCI_BIN) push ${BPFMAN_IMG} .PHONY: load-images-kind -load-images-kind: ## Load bpfman, bpfman-agent, and bpfman-operator images into the running local kind devel cluster. - ./hack/kind-load-image.sh ${KIND_CLUSTER_NAME} ${BPFMAN_OPERATOR_IMG} ${BPFMAN_AGENT_IMG} ${BPFMAN_IMG} +load-images-kind: ## Load bpfman-agent, and bpfman-operator images into the running local kind devel cluster. + ./hack/kind-load-image.sh ${KIND_CLUSTER_NAME} ${BPFMAN_OPERATOR_IMG} ${BPFMAN_AGENT_IMG} .PHONY: bundle-build bundle-build: ## Build the bundle image.