From 5ee07f7bffa60804f2c8817ad56fb4e5fa31fba9 Mon Sep 17 00:00:00 2001 From: Tayler Geiger Date: Mon, 29 Apr 2024 13:34:22 -0500 Subject: [PATCH] Use temporary file for kind-load target This simplified logic should work on both podman and docker, removing our need to have distinct ways of handling the image loading. --- Makefile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index e5de9b442..1abe66789 100644 --- a/Makefile +++ b/Makefile @@ -154,15 +154,10 @@ e2e-coverage: .PHONY: kind-load kind-load: $(KIND) #EXHELP Loads the currently constructed image onto the cluster. -ifeq ($(CONTAINER_RUNTIME),podman) - @echo "Using Podman" - podman save $(IMG) -o $(IMG).tar - $(KIND) load image-archive $(IMG).tar --name $(KIND_CLUSTER_NAME) - rm $(IMG).tar -else - @echo "Using Docker" - $(KIND) load docker-image $(IMG) --name $(KIND_CLUSTER_NAME) -endif + TMP_FILE=$(shell mktemp -t operator-controller-image-archive-XXXX.tar) ;\ + $(CONTAINER_RUNTIME) save $(IMG) -o $$TMP_FILE ;\ + $(KIND) load image-archive $$TMP_FILE --name $(KIND_CLUSTER_NAME) ;\ + rm $$TMP_FILE kind-deploy: export MANIFEST="./operator-controller.yaml" kind-deploy: manifests $(KUSTOMIZE) #EXHELP Install controller and dependencies onto the kind cluster.