kubernetes-sigs / kind

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

MacOS CI #1530

Open BenTheElder opened 4 years ago

BenTheElder commented 4 years ago

We should add CI for kind-on-macOS.

AFAICT so far we cannot get github actions to create linux containers on macOS. I'm not sure if we can do this on GCE, xref: https://github.com/kubernetes-sigs/kind/issues/1529

It would be nice to do this in a periodic job so we can check for breakage in a less manual way.

BenTheElder commented 4 years ago

NOTE: it is probably non-trivial to navigate kubernetes's CI to make this work. While we're looking for help, don't expect this to necessarily be an easy starter task!

We're looking for a full test of creating a cluster. We already verify cross compliation.

weisjohn commented 4 years ago

@BenTheElder as a data point that might be relevant, the kops project uses Travis specifically for OSX support: https://github.com/kubernetes/kops/blob/master/.travis.yml

BenTheElder commented 4 years ago

Can travis create docker containers on macOS hosts though? :thinking:

We can also get OSX support on Github Actions which is enabled everywhere without any fuss, but what we lack is being able to actually run kind :disappointed:

BenTheElder commented 4 years ago

As far as I can tell:

BenTheElder commented 3 years ago

Github actions's macOS doesn't allow nested virt / docker (same for windows)

This is not true now! (and may not have been before??) @AkihiroSuda has vagrant base cgroupsv2 CI now https://github.com/kubernetes-sigs/kind/blob/21c1d2e5b25e71234f3b30eceae97f03df98787a/.github/workflows/cgroup2.yaml#L12

Perhaps we can hack something up now to test that docker desktop + kind on macOS works cc @amwat

https://github.com/docker-practice/actions-setup-docker

BenTheElder commented 3 years ago

We actually have CI using macOS runners now ... to run kind inside a vagrant VM (in order to test cgroupsv2, it's currently the way to get nested virtualization in github actions, and prow does not intend to run VMs).

What we don't have is CI against docker desktop for mac. I don't think anyone has gotten that working in actions yet.