Change the variables in /etc/os-release in Kairos images #2035
Replies: 2 comments 2 replies
-
My suggestion is to create and use "namespaces" for each major source of variables. One strategy would be to distinguish core vs variant parameters:
I'd duplicate the variables already exposed directly under shorter names but deprecate the shorter ones. |
Beta Was this translation helpful? Give feedback.
-
After some discussion with Mauro we decided to go with this: https://github.com/kairos-io/kairos-sdk/pull/59/files#diff-9e00afaf725d4b10bb8f4df47f123b1f6a042d2b4a98b085f049ed94a009db8eR13-R27 The only "problematic" variable was the KAIROS_VERSION which was already set to a combination of Kairos version and k3s version and for that reason we just introduced "KAIROS_RELEASE" which is just the Kairos version. We tried to keep It's only the first step so we can make improvements in the future. |
Beta Was this translation helpful? Give feedback.
-
We recently introduced changes on how Kairos images are built. You can read the details on the v2.4.2 release notes: https://kairos.io/blog/2023/11/14/kairos-release-v2.4.2
Our efforts to simplify the generation of derivative images continue (#1897) and we are also trying to solve some existing bugs: #1999
When one wants to upgrade a Kairos images, it would be nice if the
kairos-agent list-releases
command would present releases that match the currently running OS in some ways. E.g. if the current OS iskairos-opensuse-leap-15.5-standard-amd64-generic-v2.4.2-k3sv1.26.9+k3s1
, the user probably doesn't want to see thekairos-ubuntu-*
images or images forrpi4
andarm64
.For this to happen, we have to be able to tell, what the various "fields" were, when the image was built.
Some of them have their own variable in
/etc/os-release
, some others are combined in one and some other missing completely. E.g.Model (generic) -> only exists as part of
KAIROS_ARTIFACT
but can't be easily extracted from thereFlavor release (leap-15.5) -> it's combined with Flavor in KAIROS_NAME
Variant (standard) -> has it's own variable (KAIROS_VARIANT)
It would be nice if every value used to build the image (
kairos/.github/flavors.json
Lines 3 to 10 in 631b7c7
/etc/os-release
under a variable of a matching name.It would also be nice to separate the Kairos version from the k3s version. This means some variables would have to change (e.g. KAIROS_VERSION)
Another option would be to leave the existing ones be and introduce new ones for those that are in confict. E.g. KAIROS_VERSION stays as it is and we introduce
KAIROS_RELEASE
for the Kairos version.This is ugly because the names won't match the rest of our repositories but it is backwards compatible in case someone was relying on the values of the existing variables.
On the other hand, if we change the variables, the changes needed to adapt would be minimal. One could still construct every value by combining the various (new) variables.
Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions