kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.5k stars 1.56k forks source link

RFC: Configure `provider` for invocation using CLI flag #2736

Open flouthoc opened 2 years ago

flouthoc commented 2 years ago

Hi Team,

Is there any way to override KIND_EXPERIMENTAL_PROVIDER or set provider using a CLI flag ? I think a global --provider flag would be helpful for such scenarios, especially when invoking kind via execve or something similar it feels more convenient to do it via CLI instead of populating env.

Please feel free to close this issue if any such feature is already there but I was unable to find that in docs.

Thank You

BenTheElder commented 2 years ago

KIND_EXPERIMENTAL* do not receive flags while still experimental and may be removed in the future.

podman support is not considered stable yet. We've had many struggles ... cc @aojea

BenTheElder commented 2 years ago

FWIW the choice of provider is also something I would argue is a property of the host environment (what is available and preferred by the user) and another tool calling via execve probably should be passing the host env rather than controlling it.

If you want extremely tight control in an external tool, the Go API is importable and can set anything directly.

flouthoc commented 2 years ago

@BenTheElder I was not looking for tight control but yeah i agree passing host env works or custom env list to execve also works. Just thought --provider would be nice UX instead of passing env so created an issue to track this. I don't think this issue should be high priority instead this can be marked as very-low-priority.

BenTheElder commented 2 years ago

I think exposing the provider further is blocked on having more than one stable provider. If/when we reach that point, a flag makes sense.

1778

At the moment if users have docker and podman installed I would strongly encourage using docker anyhow as support is better, and if they don't then there's no need to select between them.