Skip to content

Commit 0969433

Browse files
authored
Merge pull request #1457 from mrueg/e2e-multiple-versions
e2e: Test against multiple versions of k8s at the same time
2 parents 5a07009 + 5711402 commit 0969433

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ jobs:
192192
ci-e2e-tests:
193193
name: ci-e2e-tests
194194
runs-on: ubuntu-latest
195+
strategy:
196+
matrix:
197+
cluster_version:
198+
- 'v1.18.0'
199+
- 'v1.19.0'
200+
- 'v1.20.0'
201+
- 'v1.21.0'
195202
steps:
196203
- name: Set up Go 1.x
197204
uses: actions/setup-go@v2
@@ -208,5 +215,7 @@ jobs:
208215
make install-tools
209216
210217
- name: End-to-end tests
218+
env:
219+
KUBERNETES_VERSION: ${{cluster_version}}
211220
run: |
212221
make e2e

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ All additional compatibility is only best effort, or happens to still/already be
6565

6666
At most, 5 kube-state-metrics and 5 [kubernetes releases](https://github.com/kubernetes/kubernetes/releases) will be recorded below.
6767

68-
| kube-state-metrics | **Kubernetes 1.16** | **Kubernetes 1.17** | **Kubernetes 1.18** | **Kubernetes 1.19** | **Kubernetes 1.20** |
69-
|--------------------|---------------------|---------------------|----------------------|----------------------|-----------------------|
68+
| kube-state-metrics | **Kubernetes 1.17** | **Kubernetes 1.18** | **Kubernetes 1.19** | **Kubernetes 1.20** | **Kubernetes 1.21** |
69+
|--------------------|---------------------|----------------------|----------------------|----------------------|----------------------|
7070
| **v1.8.0** | - | - | - | - | - |
71-
| **v1.9.8** | | - | - | - | - |
72-
| **v2.0.0** | - | -/✓ | -/|| |
73-
| **master** | - | -/✓ | -/✓ |||
71+
| **v1.9.8** | - | - | - | - | - |
72+
| **v2.0.0** | -/✓ | -/✓ | || -/✓ |
73+
| **master** | -/✓ | -/✓ | |||
7474
- `` Fully supported version range.
7575
- `-` The Kubernetes cluster has features the client-go library can't use (additional API objects, deprecated APIs, etc).
7676

tests/e2e.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ case $(uname -m) in
2424
esac
2525

2626
NODE_IMAGE_NAME="docker.io/kindest/node"
27-
KUBERNETES_VERSION=v1.20.0
27+
KUBERNETES_VERSION=${KUBERNETES_VERSION:-"v1.20.0"}
2828
KUBE_STATE_METRICS_LOG_DIR=./log
2929
KUBE_STATE_METRICS_CURRENT_IMAGE_NAME="k8s.gcr.io/kube-state-metrics/kube-state-metrics"
3030
KUBE_STATE_METRICS_IMAGE_NAME="k8s.gcr.io/kube-state-metrics/kube-state-metrics-${ARCH}"
@@ -69,7 +69,7 @@ touch "${HOME}"/.kube/config
6969

7070
export KUBECONFIG=$HOME/.kube/config
7171

72-
kind create cluster --image=${NODE_IMAGE_NAME}:${KUBERNETES_VERSION}
72+
kind create cluster --image="${NODE_IMAGE_NAME}:${KUBERNETES_VERSION}"
7373

7474
kind export kubeconfig
7575

0 commit comments

Comments
 (0)