@@ -6,7 +6,14 @@ KIND_NAME ?= dev-pipelines-api
6
6
CERT_MANAGER_VERSION ?= v1.16.2
7
7
8
8
# Container Build Params
9
- CONTAINER_ENGINE ?= docker
9
+ CONTAINER_ENGINE ?= $(shell \
10
+ if command -v docker >/dev/null 2>&1; then \
11
+ echo docker; \
12
+ elif command -v podman >/dev/null 2>&1; then \
13
+ echo podman; \
14
+ fi \
15
+ )
16
+
10
17
# IMG_REGISTRY can be used to automatically prepend registry details. e.g. "quay.io/kubeflow/"
11
18
IMG_REGISTRY ?=
12
19
IMG_TAG_APISERVER ?= apiserver
@@ -78,7 +85,11 @@ dev-kind-cluster:
78
85
-kind create cluster --name $(KIND_NAME ) --config $(CURDIR ) /../tools/kind/kind-config.yaml
79
86
kubectl config use-context kind-$(KIND_NAME )
80
87
kind get kubeconfig --name $(KIND_NAME ) > $(CURDIR ) /../kubeconfig_$(KIND_NAME )
81
- kind --name $(KIND_NAME ) load docker-image ${IMG_TAG_WEBHOOK_PROXY}
88
+ @if [ " ${CONTAINER_ENGINE} " = " docker" ]; then \
89
+ kind --name ${KIND_NAME} load docker-image ${IMG_TAG_WEBHOOK_PROXY} ; \
90
+ else \
91
+ bash -c " kind load --name ${KIND_NAME} image-archive <( ${CONTAINER_ENGINE} save ${IMG_TAG_WEBHOOK_PROXY} )" ; \
92
+ fi
82
93
$(MAKE ) install-cert-manager
83
94
kubectl apply -k $(CURDIR ) /../manifests/kustomize/cluster-scoped-resources
84
95
kubectl wait --for condition=established --timeout=1m crd/applications.app.k8s.io
@@ -89,7 +100,11 @@ dev-kind-cluster:
89
100
90
101
.PHONY : kind-load-driver-debug
91
102
kind-load-driver-debug :
92
- kind --name $(KIND_NAME ) load docker-image ${IMG_TAG_DRIVER} :debug
103
+ @if [ " ${CONTAINER_ENGINE} " = " docker" ]; then \
104
+ kind --name ${KIND_NAME} load docker-image ${IMG_TAG_DRIVER} :debug
105
+ else \
106
+ bash -c " kind load --name ${KIND_NAME} image-archive <( ${CONTAINER_ENGINE} save ${IMG_TAG_DRIVER} )" ; \
107
+ fi
93
108
94
109
.PHONY : kind-build-and-load-driver-debug
95
110
kind-build-and-load-driver-debug : image_driver_debug kind-load-driver-debug
0 commit comments