Skip to content

Commit

Permalink
Make Kanister Kind (#6230)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Kislenko authored Aug 6, 2019
1 parent f3ef7e9 commit 206566f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ push-name:
version:
@echo $(VERSION)

.PHONY: deploy test codegen build-dirs run clean container-clean bin-clean vendor-clean docs
.PHONY: deploy test codegen build-dirs run clean container-clean bin-clean vendor-clean docs start-kind stop-kind

deploy: release-controller .deploy-$(DOTFILE_IMAGE)
.deploy-$(DOTFILE_IMAGE):
Expand Down Expand Up @@ -201,6 +201,7 @@ ifeq ($(DOCKER_BUILD),"true")
-v "$(PWD):/go/src/$(PKG)" \
-v "$(PWD)/bin/$(ARCH)/$$(go env GOOS)_$(ARCH):/go/bin" \
-v "$(PWD)/.go/std/$(ARCH):/usr/local/go/pkg/linux_$(ARCH)_static" \
-v /var/run/docker.sock:/var/run/docker.sock \
-w /go/src/$(PKG) \
$(BUILD_IMAGE) \
/bin/sh $(CMD)
Expand Down Expand Up @@ -235,3 +236,9 @@ release-helm:

release-kanctl:
@$(MAKE) run CMD='-c "./build/release_kanctl.sh"'

start-kind:
@$(MAKE) run CMD='-c "./build/local_kubernetes.sh start_localkube"'

stop-kind:
@$(MAKE) run CMD='-c "./build/local_kubernetes.sh stop_localkube"'
4 changes: 2 additions & 2 deletions build/local_kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export KUBECONFIG=$HOME/.kube/config
export KUBE_VERSION=${KUBE_VERSION:-"v1.13.7"}
export KIND_VERSION=${KIND_VERSION:-"v0.4.0"}
export LOCAL_CLUSTER_NAME=${LOCAL_CLUSTER_NAME:-"kanister"}
declare -a REQUIRED_BINS=( docker sudo jq go )
declare -a REQUIRED_BINS=( docker jq go )

if command -v apt-get
then
Expand Down Expand Up @@ -65,7 +65,6 @@ stop_localkube() {
}

get_localkube() {
check_or_get_dependencies
mkdir $HOME/.kube || true
touch $HOME/.kube/config
GO111MODULE="on" go get sigs.k8s.io/kind@${KIND_VERSION}
Expand Down Expand Up @@ -128,6 +127,7 @@ EOM
}

[ ${#@} -gt 0 ] || usage
check_or_get_dependencies
case "${1}" in
# Alphabetically sorted
get_localkube)
Expand Down

0 comments on commit 206566f

Please sign in to comment.