Skip to content

Commit

Permalink
Run e2e tests with Kubernetes version matrix
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Salway <[email protected]>
  • Loading branch information
jacobsalway committed Oct 22, 2024
1 parent 1509b34 commit c1789d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ jobs:
e2e-test:
runs-on: ubuntu-latest
strategy:
matrix:
k8s_version: [v1.28.13, v1.29.8, v1.30.4, v1.31.1]
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand All @@ -221,7 +224,7 @@ jobs:
go-version-file: go.mod

- name: Create a Kind cluster
run: make kind-create-cluster
run: make kind-create-cluster KIND_K8S_VERSION=${{ matrix.k8s_version }}

- name: Build and load image to Kind cluster
run: |
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ LOCALBIN ?= $(shell pwd)/bin
KUSTOMIZE_VERSION ?= v5.4.1
CONTROLLER_TOOLS_VERSION ?= v0.15.0
KIND_VERSION ?= v0.23.0
KIND_K8S_VERSION ?= v1.29.3
ENVTEST_VERSION ?= release-0.18
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION ?= 1.29.3
Expand Down Expand Up @@ -249,7 +250,12 @@ endif
.PHONY: kind-create-cluster
kind-create-cluster: kind ## Create a kind cluster for integration tests.
if ! $(KIND) get clusters 2>/dev/null | grep -q "^$(KIND_CLUSTER_NAME)$$"; then \
$(KIND) create cluster --name $(KIND_CLUSTER_NAME) --config $(KIND_CONFIG_FILE) --kubeconfig $(KIND_KUBE_CONFIG) --wait=1m; \
$(KIND) create cluster \
--name $(KIND_CLUSTER_NAME) \
--config $(KIND_CONFIG_FILE) \
--image kindest/node:$(KIND_K8S_VERSION) \
--kubeconfig $(KIND_KUBE_CONFIG) \
--wait=1m; \
fi

.PHONY: kind-load-image
Expand Down
2 changes: 0 additions & 2 deletions charts/spark-operator-chart/ci/kind-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.29.2
- role: worker
image: kindest/node:v1.29.2

0 comments on commit c1789d4

Please sign in to comment.