Commit Graph

108 Commits

Author SHA1 Message Date
Mauro Morales
6bbaf0669d add role control-plane/single
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 22:11:54 +01:00
Mauro Morales
4d5727fbc0 role implemenetation for k0s
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:51:33 +01:00
Mauro Morales
b78f5bbf77 extend cli role column with
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:27:40 +01:00
Mauro Morales
e987847a7a Go back to having a k8sNode
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:24:26 +01:00
Mauro Morales
65e49b898b commit before using cursor
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:24 +01:00
Mauro Morales
bdd7909d05 foobar
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:24 +01:00
Mauro Morales
1a120b3e8d Add ip to role list command
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:24 +01:00
Mauro Morales
9aa609dd11 Change config
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:23 +01:00
Mauro Morales
b38dbd7855 Remove unnecessary struct
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:19:23 +01:00
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
3284d24ae2 Schedule
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2025-03-26 15:18:51 +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
Mauro Morales
d74f5c86b5 Fix passing arguments to k3s agent and k0s worker (#686)
Signed-off-by: Mauro Morales <contact@mauromorales.com>
2025-01-27 16:35:21 +01:00
Mauro Morales
2ec8886731 Run bootstrap if k0s config is present (#681)
And read args from both k3s or k0s

Signed-off-by: Mauro Morales <contact@mauromorales.com>
2025-01-24 16:18:27 +01:00
William Rizzo
5b9bdda87d Adding handling of k0s (#678)
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>
2025-01-14 17:13:17 +01:00
Ettore Di Giacinto
ee17f04079 feat(embedded registry): allow to enable embedded registry (#675)
This is a simple way to enable Spegel with k3s by following
https://docs.k3s.io/installation/registry-mirror?_highlight=spegel .

Part of https://github.com/kairos-io/kairos/issues/3100

Signed-off-by: mudler <mudler@localai.io>
2025-01-09 15:43:02 +01:00
Itxaka
bfb58a4de7 Use kairos logger (#637) 2024-09-18 10:57:35 +02:00
Dimitris Karakasilis
ac53ba99c7 Pass flags to edgevpn, not supervise_daemon (#636)
Fixes https://github.com/kairos-io/kairos/issues/2789

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-13 16:12:42 +03:00
Itxaka
498b7429a7 Bump deps (#601) 2024-07-15 11:26:04 +02:00
Itxaka
95e823aa15 Bump to go1.22 (#594) 2024-07-11 14:06:55 +02:00
Mauro Morales
ca56b8f4ab Refactor edgevpn integration (#549)
Just a cleanup left from last weeks work

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2024-04-29 12:03:22 +02:00
Mauro Morales
014050b39f Add all edgevpn config features to bridge command (#540)
Fixes kairos-io/kairos#2456

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2024-04-25 16:56:35 +02:00
tyzbit
40e8666450 feat(kubevip): static pod support (#520)
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>
2024-01-24 09:35:24 +01:00
Dimitris Karakasilis
05d3833dd9 Don't write an empty k3s service on disk (#519)
just use the one that was created by the k3s installer script

Fixes: https://github.com/kairos-io/kairos/issues/2125

Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
2024-01-10 17:11:36 +01:00
Mauro Morales
9128c99233 Keep original k3s init file for openrc (#514)
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

relates to kairos-io/kairos#2108

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2024-01-03 19:43:25 +01:00
Itxaka
fce2f59d75 Fix deps to avoid bringing unwanted libs on kairosctl binary (#502)
Signed-off-by: Itxaka <itxaka@kairos.io>
2023-12-13 11:45:48 +02:00
Ettore Di Giacinto
f71257ec74 fix: better error messages (#477)
related to: https://github.com/kairos-io/kairos/issues/1797

Signed-off-by: mudler <mudler@localai.io>
2023-12-12 12:51:29 +02:00
Dimitris Karakasilis
fdd0f02d3b Remove the bus.EventAvailableReleases implementation (#496)
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>
2023-12-08 14:04:27 +02:00
Itxaka
1b7876c513 Create empty k3s service file (#495) 2023-11-17 18:40:31 +01:00
Dimitris Karakasilis
43e7222cbc Cleanup (#487)
Remove left-overs from when we used this repo to release "standard"
images.

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-10-27 12:32:00 +03:00
Itxaka
c6177abb53 Set the proper yaml section for p2p (#483)
It was being set to kairos key but the proper key is p2p

Fixes: https://github.com/kairos-io/kairos/issues/1922

Signed-off-by: Itxaka <itxaka@kairos.io>
2023-10-18 17:16:41 +02:00
Itxaka
3b1a697180 Drop elemental calls (#478)
No longer used, move to kairos-agent

Also drop sha iso calculation as its done by the iso builder
automatically

Fixes https://github.com/kairos-io/kairos/issues/1798

Signed-off-by: Itxaka <itxaka@kairos.io>
2023-09-08 14:40:11 +02:00
Dimitris Karakasilis
086c92bf71 Add golang information to the --version output (#452)
so that we can call it to verify we built a fips version by greping for
"boringcrypto" in the output.

Part of: https://github.com/kairos-io/kairos/issues/1609

Will be used here: https://github.com/kairos-io/packages/pull/334

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-07-19 12:38:53 +03:00
Mauro Morales
9fa3d9f799 Bump kairos version (#446)
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>
2023-07-10 18:10:33 +02:00
Itxaka
441863b21f ⬆️ Drop yip direct dep (#434) 2023-07-04 14:53:57 +02:00
Mateusz Urbanek
72c01e2657 fix: bump go.mod path to v2 (#431)
The path in `go.mod` should be ended in `/v2` suffix, as per [go.mod
module version numbers](https://go.dev/doc/modules/version-numbers).

---------

Signed-off-by: Mateusz Urbanek <mateusz.urbanek.98@gmail.com>
2023-07-03 21:07:41 +02:00
Mauro Morales
9e75c50a6d Add missing commands to kairosctl (#393)
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>
2023-05-26 11:18:44 +00:00
Dimitris Karakasilis
c633dbd7fa Use re-usable linting workflow (#376)
as part of https://github.com/kairos-io/kairos/issues/1234

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-05-19 18:28:41 +03:00
Dimitris Karakasilis
99b8b7c53c 1233-Rework tests (#306)
Fixes [#1233](https://github.com/kairos-io/kairos/issues/1233)

---------

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-05-04 19:53:20 +03:00
Mauro Morales
d88983a906 Extract some commands into kairosctl (#310)
This PR extracts the registration command into a `kairos-register`
binary of its own. The old sub command is kept so users can see a
deprecation notice and adapt for a future release when it's removed. The
version number is shared between binaries.

⚠️ I'm not entirely sure about the gorelease, and would benefit
from a couple of extra 👀 on this, thanks!

relates to kairos-io/kairos#1211

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Mauro Morales <contact@mauromorales.com>
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: ci-robbot [bot] <105103991+ci-robbot@users.noreply.github.com>
Co-authored-by: mudler <mudler@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-21 11:04:15 +02:00
Ettore Di Giacinto
4740cd3e0e ⬆️ Bump rc (#320)
Signed-off-by: mudler <mudler@c3os.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-07 14:44:01 +02:00
Itxaka
f7d5d81013 ⬆️ Bump deps to use kairos-sdk (#299)
First time bumping the provider, be gentle

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-31 14:31:54 +02:00
Oz Tiram
70903fdec8 🌱 add version information directly from git (#175)
Partial fix for https://github.com/kairos-io/kairos/issues/643

Signed-off-by: Oz Tiram <oz@spectrocloud.com>
2023-01-17 10:19:43 +01:00
Dimitris Karakasilis
0d636d2b2c Exclude .img images from upgrades (#160)
and fix renamed Earthly ARG

Fixes https://github.com/kairos-io/kairos/issues/598

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-01-03 23:16:40 +01:00
mudler
f6a509c752 🌱 Drop deprecated configs
Signed-off-by: mudler <mudler@c3os.io>
2022-12-27 20:49:09 +01:00
Mauro Morales
1d074c4fda Upgrade urfave/cli and make register's config flag required (#146)
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>
2022-12-27 19:29:01 +00:00