Itxaka
6000742887
Try to print more info about the boott mode when loading the config ( #243 )
2024-03-07 12:46:55 +01:00
Itxaka
2e0af77fbc
Use new logger facilities ( #236 )
2024-03-01 12:27:26 +01:00
Dimitris Karakasilis
ca84f82faa
Mount EFI partition as RW, to rotate recovery -> active on reset
...
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-02-20 18:16:57 +02:00
Dimitris Karakasilis
88454bdda4
Implement uki "kairos-agent upgrade --recovery"
...
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-02-20 13:30:52 +02:00
Dimitris Karakasilis
d981656715
Install efi files in uki mode using naming convention
...
replace "artifact" with "active" in conf files and in filenames
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-02-13 16:12:20 +02:00
Itxaka
5f6bb7884f
Adapt uki install to new rootfsbase ( #228 )
2024-02-12 10:35:36 +01:00
Itxaka
33c8e8f29c
Add reset for uki ( #221 )
2024-02-02 13:20:06 +01:00
Itxaka
3b5ae90dfe
Set proper partition size based on the source ( #214 )
2024-01-30 10:35:10 +01:00
Itxaka
f6f113128d
Remove entries on install ( #213 )
2024-01-26 17:41:23 +01:00
Itxaka
e8dbe2f011
Fix device auto flag on uki ( #207 )
2024-01-24 10:44:19 +01:00
Itxaka
e80a435c53
Fix --source flag ( #205 )
2024-01-23 17:05:54 +01:00
Itxaka
751e299532
Restore partitions config from cloudconfig ( #204 )
2024-01-19 12:25:45 +01:00
Itxaka
b8232ae985
UKI improvements ( #186 )
2023-12-18 16:09:55 +01:00
Itxaka
3254b8a36e
Uki upgrade ( #182 )
2023-12-18 11:38:26 +01:00
Mauro Morales
3df7742a67
add tests
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-12-06 17:06:36 +01:00
Mauro Morales
7e9b814949
Same permissions when using WriteInstallState
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-12-06 14:46:39 +01:00
Mauro Morales
bfe67ac643
Improve name of helper function
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-10-23 16:35:23 +02:00
Mauro Morales
d99d384886
Performance optimization
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-10-23 16:35:04 +02:00
Mauro Morales
531486d0b8
Update pkg/config/spec.go
...
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-10-23 12:55:54 +02:00
Mauro Morales
6d052581f2
Fix size calculation
...
test didn't check that the size was ever added (which it didn't)
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
2023-10-20 12:49:35 +03:00
Mauro Morales
baf496263f
Rename helper function and add a comment
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-10-19 22:26:04 +02:00
Mauro Morales
fdc7f49d1f
Keep track of visited files for size calculation
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-10-19 22:11:13 +02:00
Itxaka
1b967cccd8
[uki] Lyfecycle ( #148 )
2023-10-03 11:15:17 +02:00
Dimitris Karakasilis
e0dfc79ed5
Unmarshal yaml after auto size calculation and fix tests
...
because we want the user's preferences to be applied last, thus
overriding whatever calculations we may do automatically.
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-10-02 12:28:33 +03:00
Dimitris Karakasilis
80f83ba676
Run sanitization outside the spec building functions
...
To limit responsibility or those functions and to keep the tests passing
(because they assumed no sanitization)
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-10-02 10:57:11 +03:00
Dimitris Karakasilis
d1e84c186c
Fix minor syntax and linting issues
...
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-10-02 10:43:18 +03:00
Dimitris Karakasilis
85196fbc59
Calculate sources sizes after unmarshalling the full spec
...
otherwise sources defined in the kairos config won't be there when we
calculate the size
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 15:57:01 +03:00
Dimitris Karakasilis
f477776b57
Bring back the size calculation in Upgrade
...
it was removed by mistake
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:46:00 +03:00
Dimitris Karakasilis
a2d4df589b
Remove comments
...
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:46:00 +03:00
Dimitris Karakasilis
f2ec19d53d
Fix syntax and don't hide error
...
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
c58efaa623
Add test and remove debugging logs
...
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
8dd7577148
WIP
...
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
3482e88aa3
[WIP] Try to pass command line options for upgrade as kairos config
...
because it's actually configuration and it's better than using viper to
pass things around.
The `upgrade:` block seems to be ignored early in the process so even if
the user specifies an image there, the latest release will be looked up.
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:58 +03:00
Mauro Morales
5fab99f5b7
Take symlinks into account for partition size
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-09-27 16:25:38 +02:00
Itxaka
ca4cf5059d
Fix recovery image calculation ( #132 )
2023-08-21 16:42:57 +02:00
Itxaka
28dd23c4f4
Adjust size to take into account upgrades ( #130 )
2023-08-18 12:18:10 +02:00
Itxaka
dffef50ca0
Several improvements for size calculation ( #129 )
2023-08-17 13:53:45 +02:00
Itxaka
1cf9813f43
Fix space calculation on recovery ( #128 )
2023-08-16 22:59:50 +02:00
Itxaka
4108aa929e
Auto calculate image size on actions ( #122 )
2023-08-08 10:44:42 +02:00
Itxaka
48095b619f
Auto calculate partiton size on install ( #121 )
2023-08-07 14:35:15 +02:00
Itxaka
fbcf26fdca
Workaround for "auto" device propagating to spec properly
...
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-07-26 00:22:14 +02:00
Itxaka
beb04baa75
Fix wrong spec loaded for upgrade
...
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-07-25 22:15:46 +02:00
Itxaka
3c2697a6ad
Fix config loading, install device and call sanitize ( #103 )
...
* Fix config loading, install device and call sanitize
Syncs the cfg.install.device to the installspec.target
As on manual-install the device can actually come from a flag and its
not on the cloud-config, we need to initialize the InstallSpec with the
value of the cfg.Install.Device as by that time we already have the
final value of the install target.
Also calls sanitize on config and specs and warns if anything goes wrong
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Fix platform override and tests
The sanitize method for Config was never called so we never noticed that
its overriding the platform, even if we pass the WithPLatform option.
This patch fixes it by only overriding platform by default on sanitize
if the platform is empty, otherwise leave the platform on it values.
Also fixes the tests to use test facilities and a small fix to not try
to load the platform values form yaml
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Init the Install in the Config init
Just in case something tries to access it so they dont find a nil
Also adjusts some more tests
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
---------
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-07-25 19:36:01 +02:00
Itxaka
f7bdba2dda
Merge elemental config into agent config ( #102 )
2023-07-25 15:21:34 +02:00
Itxaka
9c5731baa2
Rename go module kairos-agent ( #81 )
2023-07-10 14:39:48 +02:00
Itxaka
ed372395d2
Drop collector package and use sdk for it ( #59 )
2023-06-14 14:44:22 +02:00
Mauro Morales
ed66da8775
Don't rely on slices.Index implementation
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-06-13 17:52:45 +02:00
Dimitris Karakasilis
a113147f8a
1225 config collector elemental ( #32 )
...
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
2023-06-07 11:28:37 +02:00
Mauro Morales
e23346ae44
Extract schema validation to SDK
...
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-05-26 12:38:54 +02:00
Itxaka
8e456ec8b6
Run the user in initramfs if we dont need network ( #33 )
2023-05-26 09:48:11 +02:00