Adding docker-kind-load target for kind-voltha development
Change-Id: I31fd2ea3707e152f09ca342e36a5499af1230811
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..7013397
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.opencord.org
+port=29418
+project=voltha-simonu-adapter.git
+defaultremote=origin
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)