Skip to content

feat(#38): add support for windows and mac os runners - #159

Merged
cpanato merged 2 commits into
helm:mainfrom
Jeff-Tian:main
Oct 12, 2026
Merged

cpanato merged 2 commits into
helm:mainfrom
Jeff-Tian:main

Conversation

@Jeff-Tian

Copy link
Copy Markdown
Contributor

Thanks for this great action!

I've been using it with ubuntu-latest GitHub-hosted runners, but recently I needed to run this action with my self-hosted Windows runners, turned out it doesn't support it. I've made some changes to this action, and it's working well now. I hope these changes help others.

You can also verify it first by using:

      - name: Create kind cluster
        uses: Jeff-Tian/kind-action@main
        with:
          cluster_name: your-test

@cpanato cpanato closed this Jun 8, 2026
@cpanato cpanato reopened this Jun 8, 2026

@cpanato cpanato left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the contribution, @Jeff-Tian! The approach is reasonable and Linux behavior is preserved, but a few things need to be addressed before this can merge.

Blocking

  1. Rebase / conflicts. The PR conflicts with main. install_kind and install_kubectl now use the call_curl helper instead of raw curl, so please keep that when resolving.

  2. DCO. The DCO check is blocked; please sign off the commit (git commit -s --amend).

  3. No coverage for the new paths. CI is green only on ubuntu-latest, so nothing exercises the Windows/macOS code. Please add workflow jobs on macos-* / windows-* runners. Hosted macOS/Windows runners lack Docker (Linux containers), so these would likely need install_only: true and just verify kind version / kubectl version --client.

  4. Linux-only paths remain unguarded. These still assume Linux and will fail or misbehave elsewhere:

    • install_cloud_provider (downloads linux_amd64, uses sudo + /usr/local/bin)
    • create_config_with_registry (sudo + /etc/kind-registry)
    • registry.sh (sudo tee -a /etc/hosts)
    • cleanup.sh (/tmp)

    Please either fail early with a clear error when registry/cloud_provider are used on a non-Linux OS, or document them as unsupported.

  5. Windows needs verification. RUNNER_TOOL_CACHE is a backslash path on Windows; please confirm the -x checks and the entries written to GITHUB_PATH behave correctly under Git Bash.

  6. Architecture mapping. The uname -m mapping is unchanged. Please confirm that arm64 (Apple Silicon) and AMD64 (Windows) resolve to the right release asset names (arm64 / amd64).

Suggestions

  • The checksum logic is duplicated between kind and kubectl and is weaker than before (sha256sum -c also validated the filename in the checksum file). Consider a small verify_sha256 <file> <expected> helper, keeping the shasum -a 256 fallback for macOS.
  • Clean up trailing whitespace and the redundant local url_os="${os}".
  • Add a short README note on supported OSes and the Docker caveat (kind can only create clusters where Docker is available; hosted macOS/Windows runners don't have it).

…ind installation

Signed-off-by: Jeff Tian <jeff.tian@outlook.com>
@Jeff-Tian

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review, @cpanato ! All items are addressed in the latest commit:

Blocking items

  1. Rebase / conflicts — Rebased onto main. Both install_kind and install_kubectl now use the call_curl helper as requested.
  2. DCO — The commit is now signed off.
  3. Coverage for the new paths — Added two CI jobs: test-install-only-macos (macos-latest) and test-install-only-windows (windows-latest), both with install_only: true and verifying kind version / kubectl version --client. One note: kind stopped publishing Windows binaries from v0.33.0 onwards (v0.31/v0.32 shipped kind-windows-amd64), so the Windows job pins version: v0.32.0 with a comment explaining why.
  4. Linux-only paths — Added fail-early guards with clear errors:
    • create_kind_cluster in kind.sh errors out when registry / cloud_provider are enabled on a non-Linux OS (this covers install_cloud_provider and create_config_with_registry).
    • registry.sh exits early on non-Linux (covers the /etc/hosts write).
    • cleanup.sh only touches /tmp and cloud-provider files on Linux.
      Also documented as unsupported in the README.
  5. Windows verification — RUNNER_TOOL_CACHE backslash paths, the -x checks on kind.exe / kubectl.exe, and the entries written to GITHUB_PATH all work under Git Bash. The new windows-latest CI job will confirm this in practice.
  6. Architecture mapping — Extended the uname -m mapping: AMD64 / amd64 / x86_64 → amd64 (Windows), arm64 / AARCH64 / aarch64 / arm → arm64 (Apple Silicon), plus a clear error message for unsupported architectures.

Suggestions

  • Added a verify_sha256 <file> <expected> helper (keeping the shasum -a 256 fallback for macOS), used by both install_kind and install_kubectl. For kind, the expected sum is still extracted by grepping the filename from the .sha256sum file, so filename validation is preserved.
  • Removed the redundant local url_os and cleaned up trailing whitespace.
  • Added a "Supported Operating Systems" section to the README covering the Docker caveat and the install_only: true requirement on hosted macOS/Windows runners.

One extra fix found while testing: the post step (cleanup.sh) would fail on runners without Docker, since kind delete cluster / docker rm error out and fail the job. Registry removal is now gated on Linux, and cluster deletion only runs when both kind and docker are available. Verified locally on macOS (darwin/arm64): install, checksum verification, and post-cleanup all pass end-to-end.

@Jeff-Tian
Jeff-Tian requested a review from cpanato October 10, 2026 14:03
@Jeff-Tian

Copy link
Copy Markdown
Contributor Author

Also verified on GitHub Actions (of my own fork) that all checks are green: https://github.com/Jeff-Tian/kind-action/actions/runs/38105508017

@cpanato

cpanato commented Oct 11, 2026

Copy link
Copy Markdown
Member

The Windows install-only test pins version: v0.32.0, but the action defaults to v0.33.0 (action.yml). The installer builds the Windows artifact URL from the selected version; as noted above, kind no longer publishes Windows binaries starting with v0.33.0. Therefore, Windows users following the README guidance without setting a version will fail to install. Please either choose a Windows-compatible default/version on Windows or make the required version explicit in the docs, and add coverage for the documented default path.

@cpanato cpanato left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Blocking: Windows installation fails when users follow the documented install-only path without specifying a version. The action defaults to kind v0.33.0, but Windows binaries are not published for v0.33.0 or later; the Windows CI job masks this by pinning v0.32.0. Please ensure the default Windows path selects a supported version (or explicitly require/document one) and add coverage for that path.

…ind version

Remove pinned kind version to test default path on Windows
Exercise documented default for kind installation
Update workflow to reflect current kind version handling

Signed-off-by: Jeff Tian <jeff.tian@outlook.com>
@Jeff-Tian

Jeff-Tian commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Correction to my earlier note: I re-checked the kind release assets and v0.33.0 does shipkind-windows-amd64 (+ sha256sum) — my claim that Windows binaries were dropped in v0.33.0 was wrong, and it wrongly led to pinning the Windows CI job to v0.32.0.

Apologies for the confusion. The pin is now removed: thewindows-latest job runs with the default version (v0.33.0), which both closes the default-path coverage gap you pointed out and simplifies things. Verified the asset is downloadable and its sha256sum matches.

Updated the test workflow, and verified all checks passed: https://github.com/Jeff-Tian/kind-action/actions/runs/38139034523

@Jeff-Tian
Jeff-Tian requested a review from cpanato October 11, 2026 12:26

@cpanato cpanato left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks!

@cpanato
cpanato merged commit 4852af4 into helm:main Oct 12, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants