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>
This PR is dependent of
https://github.com/kairos-io/kairos-sdk/pull/546, and it adds the
possibility to deploy k0s instead of k3s.
refactored `oneTimeBootstrap()` to handle k0s and k3s.
Added `K0s` type to bootstrap `config` package
added k0s to provider `package`` InteractiveInstall()` and check for
mutual exclusivity
CC: @mauromorales
---------
Signed-off-by: William Rizzo <william.rizzo@gmail.com>
Signed-off-by: Mauro Morales <contact@mauromorales.com>
Co-authored-by: Mauro Morales <contact@mauromorales.com>
Closes https://github.com/kairos-io/kairos/issues/1993
To use:
```
kubevip:
static_pod: true
```
I'm still getting my build environment set up so unfortunately I can't
test this functionality myself but the change should be straightforward.
Please review with this in mind, I definitely could have missed
something.
Signed-off-by: Tyler Hawkins <3319104+tyzbit@users.noreply.github.com>
to let the kairos-agent handle upgrades from now on. It used to be that
provider-kairos returned releases from the provider-kairos repository
but it's no longer the case. Everything is release in the
kairos-io/kairos repository and the new versioneer library of the
kairos-sdk (which is used in the kairos-agent) is capabable of handling
both "standard" and "core" images.
Part of: https://github.com/kairos-io/kairos/issues/1999
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
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>
Adds the following commands, since they were documented but the command
was still only available in the agent:
- create-config
- generate-token
Introduces the `validate` command so users can use kairosctl also for
validations
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
With the upgrade of the cli pkg, making flags required is very simple,
it just needs an attribute `required: true`
Fixes https://github.com/kairos-io/kairos/issues/375⚠️ breaking UX change
> In v2 flags must come before args. This is more POSIX-compliant. You
may need to update scripts, user documentation, etc.
This means that
```
provier-kairos command ARG FLAG
```
is no longer valid, but I still think the change is worth it because
like the documentation says, the CLI will be more POSIX-compliant
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: ci-robbot [bot] <105103991+ci-robbot@users.noreply.github.com>
Co-authored-by: mudler <mudler@users.noreply.github.com>