Skip to content

Commit

Permalink
Enable tests for K8s 1.11 (#1013)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Jan 8, 2020
1 parent e1069c9 commit 50071f7
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
k8s: [v1.11.10, v1.12.10, v1.14.6, v1.16.3, v1.17.0]
steps:

- name: Set up Go 1.13
Expand Down Expand Up @@ -50,13 +47,31 @@ jobs:
docker login --username ${USERNAME} --password ${DOCKER_TOKEN}
make push
- name: Create Kubernetes ${{ matrix.k8s }} cluster
kubernetes:
name: Kubernetes
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
cluster:
- {"version": "v1.11.10", "config": "kind-1.11.yaml"}
- {"version": "v1.12.10", "config": "kind.yaml"}
- {"version": "v1.14.6", "config": "kind.yaml"}
- {"version": "v1.16.3", "config": "kind.yaml"}
- {"version": "v1.17.0", "config": "kind.yaml"}

steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Create Kubernetes ${{ matrix.cluster.version }} cluster
id: kind
uses: engineerd/[email protected]
with:
version: v0.6.0
config: hack/kubernetes/kind.yaml
image: kindest/node:${{ matrix.k8s }}
version: v0.6.1
config: hack/kubernetes/${{ matrix.cluster.config }}
image: kindest/node:${{ matrix.cluster.version }}

- name: Prepare cluster for testing
id: local-path
Expand All @@ -71,7 +86,7 @@ jobs:
echo
echo "installing local-path provisioner ..."
kubectl delete storageclass --all
kubectl apply -f https://github.com/rancher/local-path-provisioner/raw/v0.0.11/deploy/local-path-storage.yaml
kubectl apply -f https://github.com/kmodules/local-path-provisioner/raw/k-1.11/deploy/local-path-storage.yaml
kubectl wait --for=condition=Ready pods -n local-path-storage --all --timeout=5m
kubectl apply -f hack/kubernetes/storageclass/standard.yaml
echo
Expand All @@ -80,16 +95,17 @@ jobs:
echo
echo "create docker-registry secret"
kubectl create secret docker-registry ${REGISTRY_SECRET} --namespace=kube-system --docker-server=https://index.docker.io/v1/ --docker-username=${USERNAME} --docker-password=${DOCKER_TOKEN}
- name: Install NFS server dependencies
run: |
export KUBECONFIG="$(kind get kubeconfig-path)"
nodes=$(kubectl get nodes -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{end}')
for i in $nodes
do
echo "Installing NFS server dependencies in node: $i ...."
docker exec $i apt-get update
docker exec $i apt-get install -y nfs-kernel-server
done
- name: Check out installer
run: |
cd ..
Expand Down

0 comments on commit 50071f7

Please sign in to comment.