Adding docker-kind-load target for kind-voltha development
Change-Id: I4c67fc9e6b2f62b31e96118a72147193e1d173f3
diff --git a/Makefile b/Makefile
index f31de4d..ce333d4 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@
DOCKER_REPOSITORY ?=
DOCKER_TAG ?= ${VERSION}
ADAPTER_IMAGENAME := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}voltha-openolt-adapter:${DOCKER_TAG}
+TYPE ?= minimal
## Docker labels. Only set ref and commit date if committed
DOCKER_LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote))
@@ -103,6 +104,11 @@
docker-push:
docker push ${ADAPTER_IMAGENAME}
+docker-kind-load:
+ @if [ "`kind get clusters | grep voltha-$(TYPE)`" = '' ]; then echo "no voltha-$(TYPE) cluster found" && exit 1; fi
+ kind load docker-image ${ADAPTER_IMAGENAME} --name=voltha-$(TYPE) --nodes $(shell kubectl get nodes --template='{{range .items}}{{.metadata.name}},{{end}}' | sed 's/,$$//')
+
+
## lint and unit tests
lint-style: