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

🌱 Improve Kind Integration: Ensure Custom Kind Binary is Used in E2E Tests #4618

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kersten
Copy link
Contributor

@kersten kersten commented Mar 19, 2025

Description

This PR refines the existing Kind integration by ensuring that the KIND environment variable is consistently used across e2e test utilities. While PR #4615 made the Kind binary configurable in the Makefile, some test scripts and utilities still relied on the default "kind" binary directly. This change ensures that all test components respect the KIND variable.

Motivation

  • Consistency: The Makefile already supports a configurable Kind binary, but test utilities did not.
  • Flexibility: Users running Kind from a custom location (or via a wrapper script) can now ensure it is used everywhere.
  • CI/CD Compatibility: Some environments may not have kind globally available in $PATH.

Changes

  • Updated test utilities (test/utils/utils.go) to check for a KIND environment variable before defaulting to "kind".
  • Modified Makefile test commands to explicitly pass KIND=$(KIND) to go test.
  • Applied changes across multiple test setups, including the cronjob tutorial, multiversion tutorial, and project scaffolds.
  • Ensured that Kind cluster name configurability introduced earlier remains functional.

Notes

  • Maintains full backward compatibility (defaults to kind if KIND is not set).
  • No breaking changes.
  • Further improves Kind integration by making both cluster names and binary paths configurable across all test components.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 19, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @kersten. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 19, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kersten
Once this PR has been reviewed and has the lgtm label, please assign varshaprasad96 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kersten kersten force-pushed the feat/use-custom-kind-in-e2e-test branch from 675981c to 7be37d9 Compare March 19, 2025 11:21
@kersten kersten marked this pull request as draft March 19, 2025 11:22
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2025
add support for using a custom kind binary by reading from the
KIND environment variable. This allows flexibility in testing
environments where a different kind binary might be needed.

The default behavior remains unchanged, using "kind" if no
environment variable is set.
@kersten kersten force-pushed the feat/use-custom-kind-in-e2e-test branch from 7be37d9 to 51fe16f Compare March 19, 2025 15:57
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 19, 2025
@kersten kersten marked this pull request as ready for review March 19, 2025 16:14
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants