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

Add support for selecting kind cluster node provider #591

Open
ndimiduk opened this issue Dec 5, 2024 · 3 comments
Open

Add support for selecting kind cluster node provider #591

ndimiduk opened this issue Dec 5, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ndimiduk
Copy link

ndimiduk commented Dec 5, 2024

What would you like to be added:

I would like for kuttl to manage spinning up and tearing down a kind cluster. I am on macOS using podman (machine) in rootless mode. After following these instructions, I am able to create a new kind cluster using

> KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster

However kuttl fails to do so, even when I've provided the same environment variable.

% env KIND_EXPERIMENTAL_PROVIDER=podman k kuttl test
=== RUN   kuttl
    harness.go:463: starting setup
    harness.go:252: running tests with KIND.
    harness.go:176: temp folder created /var/folders/91/ns87pdzn6c145ps1x_bfr9gc0000gq/T/kuttl2683441861
    harness.go:158: Starting KIND cluster
    harness.go:514: cleaning up
    harness.go:523: collecting cluster logs to kind-logs-1733397185
    harness.go:571: removing temp folder: "/var/folders/91/ns87pdzn6c145ps1x_bfr9gc0000gq/T/kuttl2683441861"
    harness.go:577: tearing down kind cluster
    harness.go:596: fatal error getting client: running kind with rootless provider requires setting systemd property "Delegate=yes", see https://kind.sigs.k8s.io/docs/user/rootless/
--- FAIL: kuttl (0.49s)
FAIL

Why is this needed:
Oh. Maybe this should be filed as a bug instead?

% kubectl-kuttl --version
kubectl-kuttl version 0.20.0
% podman --version
podman version 5.3.1
@porridge
Copy link
Member

porridge commented Dec 5, 2024

Here is how kind creates a cluster provider (uses this code which checks the env var you mentioned).

Here is how kuttl does it.

Shouldn't be hard to add support for podman, but I'm not sure if using an env var with KIND and EXPERIMENTAL would be appropriate 🤔
WDYT @ndimiduk ?

@ndimiduk
Copy link
Author

ndimiduk commented Dec 5, 2024

I hoped this was a simple issue of not passing the env through. I guess kuttl replicates more of what kind cli does than I expected.

As for whether or not to support another project's experimental feature, I cannot say.

@porridge
Copy link
Member

porridge commented Dec 9, 2024

Looking some more, the API for explicitly choosing the provider is public and not marked experimental. So I think we should just add a kindClusterNodeProvider option to TestSuite that defaults to empty (unset).

I probably won't have time to do this anytime soon, but will be happy to review a PR!

@porridge porridge added the enhancement New feature or request label Dec 9, 2024
@porridge porridge changed the title Add support for managing the kind cluster on MacOS with podman, rootless Add support for selecting kind cluster node provider Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants