Adds support for mesh network with k0s distro. The detection of the
distro is done by either having explicit config or by the binary
installed. By default, it uses k3s, for backwards compatibility.
Additionally, I refactored to split responsibilities. `master.go` will
have generic logic on how the steps to setup a master node, and
`worker.go` a worker node. It does so by interacting with the `K8sNode`
interface, and the detailed logic on how to do it for each distribution
has been moved to `k3s.go` and `k0s.go` respectively. This should make
it much simpler to debug or add new distributions.
Tests:
- [x] k3s single
- [x] k3s multi manual
- [x] k3s p2p auto
- [x] k0s single
- [x] k0s multi manual
- [x] k0s p2p auto
Covered:
- https://kairos.io/docs/examples/multi-node-p2p/
- https://kairos.io/docs/examples/multi-node/
- https://kairos.io/docs/examples/single-node/
---------
Signed-off-by: Mauro Morales <contact@mauromorales.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Tests are green and did a manual QA and it's working properly. I do have
two questions which I put as comments
---------
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
In this way, the p2p API will just run the co-ordination to setup KubeVIP automatically
to the new cluster.
Signed-off-by: Ettore Di Giacinto <mudler@mocaccino.org>