Skip to content

Commit

Permalink
Try to fix k8s timing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrage committed Jul 15, 2016
1 parent 03c7761 commit bb189e7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion cdrage-atomicapp-ci/functional-tests/providers/kubernetes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ start_k8s() {
fi

# Use alpha for now since this contains the new hyperkube format going forward
K8S_VERSION=1.2.2
K8S_VERSION=1.3.0
docker run \
--volume=/:/rootfs:ro \
--volume=/sys:/sys:ro \
Expand Down Expand Up @@ -42,6 +42,25 @@ start_k8s() {
echo ...
sleep 1
done

# Remove any previously conflicting .kube/config. Ignore if it's already removed
rm -rf ~/.kube/config || true

# Hack due to possible issue with kubectl + 1.3 within a Docker container
wget https://storage.googleapis.com/kubernetes-release/release/v$K8S_VERSION/bin/linux/amd64/kubectl
sudo mv kubectl /usr/local/bin/
sudo chmod +x /usr/local/bin/kubectl

# Create a cluster configuration to use
kubectl config set-cluster dev --server=http://localhost:8080
kubectl config set-context dev --cluster=dev
kubectl config use-context dev

# Debug info:
cat ~/.kube/config

# Delay due to CI being a bit too slow when first starting k8s
sleep 5
}


Expand Down

0 comments on commit bb189e7

Please sign in to comment.