Skip to content

Commit 3e0137a

Browse files
committed
use env variable
1 parent 4cfe457 commit 3e0137a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ SHELL = /usr/bin/env bash -o pipefail
2727

2828
ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
2929
KIND_CLUSTER_CONFIG_DIR=$(shell pwd)/config/kind
30+
KUBECTL_CONFIG_BACKUP_DIR=$(shell pwd)/.kube
3031

3132
all: build
3233

@@ -52,7 +53,7 @@ ifeq (1, $(shell kind get clusters | grep ${KIND_CLUSTER_NAME} | wc -l | tr -d '
5253
else
5354
@echo "Creating Cluster"
5455
kind create cluster --name ${KIND_CLUSTER_NAME} --image=kindest/node:${K8S_NODE_IMAGE} --config ${KIND_CLUSTER_CONFIG_DIR}/cluster.yaml
55-
if [ "${IN_DEV_CONTAINER}" = "true" ]; then mkdir -p .kube && kind get kubeconfig --name ${KIND_CLUSTER_NAME} > .kube/kind-conifg.yaml; fi
56+
if [ "${IN_DEV_CONTAINER}" = "true" ]; then mkdir -p ${KUBECTL_CONFIG_BACKUP_DIR} && kind get kubeconfig --name ${KIND_CLUSTER_NAME} > ${KUBECTL_CONFIG_BACKUP_DIR}/kind-conifg.yaml; fi
5657
endif
5758

5859
##@ Development

0 commit comments

Comments
 (0)