Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run acceptance tests with multiple versions of kubernetes #2563

Merged
merged 5 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/acceptance_tests_kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
kindVersion:
description: The kind version
default: 0.20.0 # Kubernetes version: 1.27.X
default: 0.20.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great stuff in your comments! We would love to take in your fixes involving the test failures in old k8s versions.

Only question I have in this PR is leaving it at 0.20. Was their a specific reason for not moving it up to the latest in order to test with 1.30 as well?

We are planning to include 1.30 in order to include some new fields in a few resources. Would upgrading the kind version result in more failing tests? Not sure if you tried this already or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll go ahead and get the issues written up and start on PRs for the fixes 👍

On updating kind, I ran against kind 0.23 locally just fine so I don't expect any real issues, I was mostly trying to keep the scope of this change down since kind is used in a couple other workflows as well and I assume we'd want to keep those in sync. It requires bumping the version of kind and updating the Kubernetes versions since the node images are specific to a version of kind. I'm happy to tackle that as another PR or as part of this, it definitely makes sense to me to upgrade.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another note would be that kind v0.23.0 does not support as old of versions of k8s as the test currently run against. It has supported node images going back to 1.25, but not 1.23. Kubernetes 1.23 is almost 3 years old though so maybe dropping it from the tests makes sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep let's treat that as another PR. We can perform the kind bump once the PR of bumping kubernetes to v1.30.3 gets merged: #2561

This will also give us a chance to address the issues you discovered prior to bumping to v1.30.3 😄

runTests:
description: The regex passed to the -run option of `go test`
default: "^TestAcc"
Expand Down Expand Up @@ -34,6 +34,19 @@ jobs:
acceptance_tests_kind:
if: ${{ github.repository_owner == 'hashicorp' }}
runs-on: custom-linux-medium
strategy:
# Don't cancel all in-progress and queued jobs in the matrix if any job in the matrix fails.
# That will be helpful to catch any issues related to a particular Kubernetes version.
fail-fast: false
matrix:
kubernetes_version:
# kind images: https://github.com/kubernetes-sigs/kind/releases (note the images are kind release specific)
- v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570
- v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31
- v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
- v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
- v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
Expand All @@ -51,6 +64,7 @@ jobs:
with:
wait: 2m
version: v${{ env.KIND_VERSION }}
node_image: kindest/node:${{ matrix.kubernetes_version }}
config: .github/config/acceptance_tests_kind_config.yaml
- name: Run Acceptance Test Suite
env:
Expand Down
Loading