Commit Graph

63 Commits

Author SHA1 Message Date
Itxaka
9d63bae2ae Really resolve the link, not just get a relative link (#558)
Signed-off-by: Itxaka <itxaka@kairos.io>
2024-09-24 19:09:06 +02:00
Itxaka
60af8246ad Accept more paths to devices for install (#552) 2024-09-23 17:13:07 +02:00
Itxaka
3e99d75331 Move to use our ghw clone (#535) 2024-09-17 15:27:31 +02:00
Itxaka
690c7e7acd Fix skipping paths under kubernetes
Signed-off-by: Itxaka <itxaka@kairos.io>
(cherry picked from commit c549aeb086)
2024-09-16 10:17:55 +02:00
Itxaka
a6bf3541c5 Do not skip /run when counting the size (#538) 2024-09-13 17:31:40 +02:00
Itxaka
7c6c195bd5 Fix upgrade size calculation inside k8s (#537)
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-13 13:07:17 +02:00
Itxaka
d02bc50747 Improve get partitions and reset spec (#530)
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-12 17:24:35 +02:00
Dimitris Karakasilis
8bf8fd8e6e Remove unecessary changes
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-03 16:14:40 +03:00
Dimitris Karakasilis
88c1e93d71 Remove unecessary handling of config
As described here:
https://github.com/kairos-io/kairos-agent/pull/499/files#r1735245329

the `unmarshallFullSpec` will take care of the `upgrade.entry`
config so no need to handle it twice.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-03 16:11:53 +03:00
Dimitris Karakasilis
ee14575627 Rename method
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-03 15:18:33 +03:00
Dimitris Karakasilis
3c9ba426e6 Fix test
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-03 15:16:57 +03:00
Dimitris Karakasilis
2570a1848b Extract login into a method
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-03 13:52:12 +03:00
Dimitris Karakasilis
773b1e7d59 Add test for image size calculation and respect --recovery flag
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-09-03 13:38:47 +03:00
Itxaka
4401cedb80 Fix image size calculation on upgrade (#508) 2024-09-03 11:59:33 +02:00
Dimitris Karakasilis
332d516467 Respect upgrade.recovery when set through the config file
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-08-26 16:33:46 +03:00
Dimitris Karakasilis
257d0a1c38 Unify --recover and --boot-entry upgrade options in code
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-08-26 16:33:44 +03:00
Dimitris Karakasilis
d3bf4ebedb Bump yip and propagate NoFormat to the install spec
We need this from yip:

4ebbc7582e

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-04-10 12:44:44 +03:00
Dimitris Karakasilis
571f10d900 Remove unecessary assignments and add NoFormat to UKI
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-04-09 12:53:06 +03:00
Dimitris Karakasilis
d8df60c315 Remove development debug output
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-04-09 12:53:06 +03:00
Dimitris Karakasilis
0a3b0c0482 Fix linting error
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-04-09 12:53:05 +03:00
Dimitris Karakasilis
9df8781d23 Detect the preconfigured device when no-format is true
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-04-09 12:53:05 +03:00
Dimitris Karakasilis
804462e272 WIP
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-04-09 12:53:04 +03:00
Dimitris Karakasilis
7d9accccd7 [WIP] Try to see which code breaks it
Fixes https://github.com/kairos-io/kairos/issues/2281

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-04-09 12:52:12 +03: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
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
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