Adding docker-kind-load target for kind-voltha development
Change-Id: I31fd2ea3707e152f09ca342e36a5499af1230811
diff --git a/Makefile b/Makefile
index ec4ebd3..df58759 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@
DOCKER_REPOSITORY ?=
DOCKER_TAG ?= ${VERSION}$(shell [[ ${DOCKER_LABEL_VCS_DIRTY} == "true" ]] && echo "-dirty" || true)
SIMULATEDONU_IMAGENAME := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}voltha-adapter-simulated-onu
+TYPE ?= minimal
## Docker labels. Only set ref and commit date if committed
DOCKER_LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote))
@@ -108,6 +109,10 @@
docker-push:
docker push ${SIMULATEDONU_IMAGENAME}:${DOCKER_TAG}
+docker-kind-load:
+ @if [ "`kind get clusters | grep voltha-$(TYPE)`" = '' ]; then echo "no voltha-$(TYPE) cluster found" && exit 1; fi
+ kind load docker-image ${SIMULATEDONU_IMAGENAME}:${DOCKER_TAG} --name=voltha-$(TYPE) --nodes $(shell kubectl get nodes --template='{{range .items}}{{.metadata.name}},{{end}}' | sed 's/,$$//')
+
## lint and unit tests
PATH:=$(GOPATH)/bin:$(PATH)