Commit Graph

6 Commits

Author SHA1 Message Date
Mauro Morales
0d18f69c1c HA working with k0s too
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:22 +01:00
Mauro Morales
b2a3963a5e Move common
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:22 +01:00
Mauro Morales
1a74cddf69 Fix bug with HA setup
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:20 +01:00
Mauro Morales
adc755a455 Rename master to control plane
This follows kubernetes components terminology [1]

[1]: https://kubernetes.io/docs/concepts/overview/components/

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:18:50 +01:00
Mauro Morales
26d9f1e4c6 Fixes issue detecting cluster init (#703) 2025-03-21 08:57:29 +01:00
Mauro Morales
c5c4badc1d Extend p2p functionality to k0s (#691)
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>
2025-03-12 11:33:37 +01:00