Skip to content

Commit

Permalink
Use enhanced PV support in Kind 0.7.0 (#685)
Browse files Browse the repository at this point in the history
Use enhanced PV support in Kind 0.7.0
  • Loading branch information
Vlatombe authored Jan 16, 2020
2 parents 34d0848 + 4ce55f5 commit 7b13ff7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euxo pipefail
export PATH=$WSTMP:$PATH
if [ \! -f $WSTMP/kind ]
then
curl -Lo $WSTMP/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.5.1/kind-$(uname)-amd64
curl -Lo $WSTMP/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64
chmod +x $WSTMP/kind
fi
if [ \! -f $WSTMP/kubectl ]
Expand All @@ -15,20 +15,15 @@ fi

# TODO use kind load to take better advantage of images cached in the host VM
export cluster=ci$RANDOM
export KUBECONFIG=$WSTMP/kubeconfig-$cluster
kind create cluster --name $cluster --wait 5m
function cleanup() {
kind export logs --name $cluster $WSTMP/kindlogs || :
kind delete cluster --name $cluster || :
}
trap cleanup EXIT
export KUBECONFIG="$(kind get kubeconfig-path --name $cluster)"
kubectl cluster-info

# https://github.com/kubernetes-sigs/kind/issues/118#issuecomment-475134086
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/205a80824bc6ea6095602458c15651f58146eae4/deploy/local-path-storage.yaml
kubectl annotate storageclass local-path storageclass.beta.kubernetes.io/is-default-class=true
kubectl delete storageclass standard

bash test-in-k8s.sh
rm -rf $WSTMP/surefire-reports
kubectl cp jenkins:/checkout/target/surefire-reports $WSTMP/surefire-reports

0 comments on commit 7b13ff7

Please sign in to comment.