Adding docker-kind-load target for kind-voltha development
Change-Id: Ie3b6216375dac0745d7497af11d936aade2f93cd
diff --git a/Makefile b/Makefile
index fba9129..59fafcd 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@
DOCKER_REPOSITORY ?=
DOCKER_TAG ?= ${VERSION}$(shell [[ ${DOCKER_LABEL_VCS_DIRTY} == "true" ]] && echo "-dirty" || true)
PONSIMOLT_IMAGENAME := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}voltha-adapter-ponsim-olt
+TYPE ?= minimal
## Docker labels. Only set ref and commit date if committed
DOCKER_LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote))
@@ -116,6 +117,10 @@
docker-push:
docker push ${PONSIMOLT_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 ${PONSIMOLT_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)