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

Explicitly set kind version when running tests in CI #1864

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

swiatekm
Copy link
Contributor

@swiatekm swiatekm commented Jun 22, 2023

Up until now we depended on the kind version shipped by Github, which opened us up to unexpected breakage whenever they upgraded. This has happened recently with an upgrade from 0.19.0 to 0.20.0.

This change:

  • explicitly sets the kind version in CI
  • updates Node images for kind 0.20.0
  • uses kind 0.17.0 to run tests for K8s <1.21, which kind 0.20.0 doesn't support out of the box
  • updates kuttl to the latest released version

@swiatekm swiatekm changed the title Upgrade kuttl to 0.15.0 Try to fix the CI Jun 22, 2023
kind-1.19.yaml Show resolved Hide resolved
kind-1.20.yaml Show resolved Hide resolved
@swiatekm swiatekm force-pushed the chore/upgrade-kuttl branch 2 times, most recently from 8590a63 to 551f3af Compare June 23, 2023 14:44
@swiatekm swiatekm changed the title Try to fix the CI Explicitly set kind version when running tests in CI Jun 23, 2023
@swiatekm swiatekm marked this pull request as ready for review June 23, 2023 15:05
@swiatekm swiatekm requested review from a team and pavolloffay June 23, 2023 15:05
@TylerHelmuth TylerHelmuth added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jun 23, 2023
@TylerHelmuth TylerHelmuth added the ready-to-merge Code review completed; ready to merge by maintainers label Jun 23, 2023
Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

Just one thought on how to make this a bit cleaner without env vars.

Comment on lines +13 to +16
env:
CURRENT_KIND_VERSION: 0.20.0
LEGACY_KIND_VERSION: 0.17.0 # for K8s versions latest kind doesn't support anymore

Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of adding these to the environment like this, we could use the matrix.include functionality of github actions. https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations

This would let us specify exactly KIND version each kube version should be using.

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 considered doing that, but given that:

  1. There would only ever be two kind versions
  2. There's less duplication this way, you only change the kind version in one place if you want to upgrade

I decided to do it this way. I don't have a strong opinion on it though, the matrix approach is fine.

Copy link
Member

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

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

Nice fix for the CI 🥳

LGTM, but @jaronoff97 has a good comment :)

@pavolloffay
Copy link
Member

@swiatekm-sumo should be a similar fix applied to a local setup of kind?

@swiatekm
Copy link
Contributor Author

@swiatekm-sumo should be a similar fix applied to a local setup of kind?

I think so, but I didn't want to hold this PR up with even more changes. We should treat kind (and kuttl as well) the same way as we treat other local tools - have a make target that installs them to LOCALBIN, and use that binary throughout the Makefile.

@TylerHelmuth
Copy link
Member

I view this PR as a temporary solution until we drop 1.19 (and other old versions) entirely. I'm in favor of getting this merged to unblock other work and then quickly bumping our min k8s version.

@pavolloffay pavolloffay merged commit a865360 into open-telemetry:main Jun 26, 2023
@pavolloffay
Copy link
Member

I am merging this to fix the CI, additional fixes can be submitted in follow up PRs

@pavolloffay
Copy link
Member

I view this PR as a temporary solution until we drop 1.19 (and other old versions) entirely

@TylerHelmuth why do you see this as a temporary solution?

@swiatekm swiatekm deleted the chore/upgrade-kuttl branch June 26, 2023 09:04
@TylerHelmuth
Copy link
Member

@pavolloffay I see the permanent solution to be bumping our minimum supported k8s version which I expect to correlate with being able to use a single kind version.

ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
…1864)

* Upgrade kuttl to 0.15.0

* Update kind images for kind 0.20.0

* Use older kind version for older k8s versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Code review completed; ready to merge by maintainers Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants