Last active
July 31, 2017 15:43
-
-
Save bzub/43dde99cd04fbd1cc820eff3497d1be5 to your computer and use it in GitHub Desktop.
Bootkube e2e tests with kube-router + kube-metal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
set -e | |
[ -z "${KUBECONFIG}" ] && KUBECONFIG="${PWD}/assets/auth/kubeconfig" | |
SUDO="sudo UNIFIED_CGROUP_HIERARCHY=0" | |
${SUDO} rkt --insecure-options=image run \ | |
--interactive \ | |
--net=host \ | |
--dns=host \ | |
--hosts-entry=host \ | |
--volume "kubeconfig,kind=host,source=${KUBECONFIG}" \ | |
--mount "volume=kubeconfig,target=/kubeconfig" \ | |
--volume "pwd,kind=host,source=${PWD}" \ | |
--mount "volume=pwd,target=/pwd" \ | |
--volume "ssh,kind=host,source=$HOME/.ssh" \ | |
--mount "volume=ssh,target=/ssh" \ | |
docker://golang:alpine \ | |
-- \ | |
-c ' | |
set -e | |
apk add -U git | |
go get -d github.com/bzub/bootkube || "Got bootkube repo" | |
mkdir -p $GOPATH/src/github.com/kubernetes-incubator | |
mv $GOPATH/src/github.com/bzub/bootkube $GOPATH/src/github.com/kubernetes-incubator | |
cd $GOPATH/src/github.com/kubernetes-incubator/bootkube | |
git checkout kube-router | |
mkdir -p /pwd/logs | |
go test -v ./e2e/ --kubeconfig=/kubeconfig --log-output-dir=/pwd/logs --keypath=/pwd/assets/auth/id_rsa | |
sh | |
' | |
# go test -v e2e/log.go e2e/main_test.go e2e/network_test.go e2e/required_imports.go e2e/ssh_client.go --kubeconfig=/kubeconfig --log-output-dir=/pwd/logs --keypath=/pwd/assets/auth/id_rsa |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment