Skip to content

Commit

Permalink
Update kind version
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLike committed Mar 21, 2019
1 parent 40ed6c0 commit add8560
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ jobs:
- echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
- sudo apt-get update
- sudo apt-get install -y kubectl
# Download and build kind
- go get sigs.k8s.io/kind
# Download kind binary (0.2.0)
- curl -o /usr/local/bin/kind -L https://github.com/kubernetes-sigs/kind/releases/download/0.2.0/kind-linux-amd64
- chmod +x /usr/local/bin/kind
script:
- make cli
- make docker
Expand Down
2 changes: 1 addition & 1 deletion hack/e2e-kind-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ nodes:
# the three workers
- role: worker
# replicas specifies the number of nodes to create with this configuration
replicas: 3
replicas: 3
20 changes: 11 additions & 9 deletions hack/run-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ export VK_BIN=${VK_ROOT}/_output/bin
export LOG_LEVEL=3
export SHOW_VOLCANO_LOGS=${SHOW_VOLCANO_LOGS:-1}

if [ "${CLUSTER_NAME}xxx" != "xxx" ];then
if [[ "${CLUSTER_NAME}xxx" != "xxx" ]];then
export CLUSTER_CONTEXT="--name ${CLUSTER_NAME}"
else
export CLUSTER_CONTEXT="--name integration"
fi

export KIND_OPT=${KIND_OPT:=" --config ${VK_ROOT}/hack/e2e-kind-config.yaml"}
Expand All @@ -15,15 +17,15 @@ export KIND_OPT=${KIND_OPT:=" --config ${VK_ROOT}/hack/e2e-kind-config.yaml"}
function check-prerequisites {
echo "checking prerequisites"
which kind >/dev/null 2>&1
if [ $? -ne 0 ]; then
if [[ $? -ne 0 ]]; then
echo "kind not installed, exiting."
exit 1
else
echo -n "found kind, version: " && kind version
fi

which kubectl >/dev/null 2>&1
if [ $? -ne 0 ]; then
if [[ $? -ne 0 ]]; then
echo "kubectl not installed, exiting."
exit 1
else
Expand All @@ -50,9 +52,9 @@ function install-volcano {
helm init --service-account tiller --kubeconfig ${KUBECONFIG} --wait

echo "Loading docker images into kind cluster"
kind load docker-image ${IMAGE}-controllers:${TAG}
kind load docker-image ${IMAGE}-scheduler:${TAG}
kind load docker-image ${IMAGE}-admission:${TAG}
kind load docker-image ${IMAGE}-controllers:${TAG} ${CLUSTER_CONTEXT}
kind load docker-image ${IMAGE}-scheduler:${TAG} ${CLUSTER_CONTEXT}
kind load docker-image ${IMAGE}-admission:${TAG} ${CLUSTER_CONTEXT}

echo "Install volcano plugin into cluster...."
helm plugin install --kubeconfig ${KUBECONFIG} installer/chart/volcano/plugins/gen-admission-secret
Expand All @@ -73,17 +75,17 @@ function cleanup {
echo "Running kind: [kind delete cluster ${CLUSTER_CONTEXT}]"
kind delete cluster ${CLUSTER_CONTEXT}

if [ ${SHOW_VOLCANO_LOGS} -eq 1 ]; then
if [[ ${SHOW_VOLCANO_LOGS} -eq 1 ]]; then
#TODO: Add volcano logs support in future.
echo "Volcano logs are currently not supported."
fi
}

echo $* | grep -E -q "\-\-help|\-h"
if [ $? -eq 0 ]; then
if [[ $? -eq 0 ]]; then
echo "Customize the kind-cluster name:
export CLUSTER_NAME=<custom cluster name>
export CLUSTER_NAME=<custom cluster name> # default: integration
Customize kind options other than --name:
Expand Down

0 comments on commit add8560

Please sign in to comment.