Move cluster init to prerequisites

This commit is contained in:
stefanprodan
2019-02-24 02:24:23 +02:00
parent 5b43d3d314
commit 87b9fa8ca7
4 changed files with 21 additions and 22 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ spec:
containers:
- name: flagger
image: quay.io/stefanprodan/flagger:0.5.1
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8080
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang
FROM golang:1.11
RUN go get -u sigs.k8s.io/kind
-7
View File
@@ -6,16 +6,9 @@ ISTIO_VER="1.1.0-rc.0"
REPO_ROOT=$(git rev-parse --show-toplevel)
echo ">>> Starting e2e testing using Istio ${ISTIO_VER}"
kind create cluster --wait 5m
export KUBECONFIG="$(kind get kubeconfig-path)"
kubectl version
echo '>>> Installing Tiller'
kubectl --namespace kube-system create sa tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --upgrade --wait
helm repo add istio.io https://storage.googleapis.com/istio-release/releases/${ISTIO_VER}/charts
echo '>>> Installing Istio CRDs'
+19 -13
View File
@@ -2,20 +2,26 @@
REPO_ROOT=$(git rev-parse --show-toplevel)
echo ">>> Building sigs.k8s.io/kind with docker"
docker build -t kind:src . -f ${REPO_ROOT}/test/Dockerfile
docker create -ti --name dummy kind:src sh
docker cp dummy:/go/bin/kind ./kind
docker rm -f dummy
echo ">>> Installing kind"
chmod +x kind && \
sudo mv kind /usr/local/bin/
echo ">>> Installing helm"
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
echo ">>> Installing kubectl"
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
chmod +x kubectl && \
sudo mv kubectl /usr/local/bin/
echo ">>> Building sigs.k8s.io/kind"
docker build -t kind:src . -f ${REPO_ROOT}/test/Dockerfile.kind
docker create -ti --name dummy kind:src sh
docker cp dummy:/go/bin/kind ./kind
docker rm -f dummy
echo ">>> Installing kind"
chmod +x kind
sudo mv kind /usr/local/bin/
kind create cluster --wait 5m
echo ">>> Installing helm"
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
echo '>>> Installing tiller'
kubectl --namespace kube-system create sa tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --upgrade --wait