Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: document merging mechanism for cloud configs #2737

Open
mauromorales opened this issue Jul 17, 2024 · 3 comments
Open

feat: document merging mechanism for cloud configs #2737

mauromorales opened this issue Jul 17, 2024 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@mauromorales
Copy link
Member

relates to #2735 but also include all other cases for merging so it is clear for the user what will happen

@mauromorales mauromorales added enhancement New feature or request triage Add this label to issues that should be triaged and prioretized in the next planning call labels Jul 17, 2024
@jimmykarily
Copy link
Contributor

One solution would be to allow the users to run a kairos-agent command and see how multiple files are combined in one. Maybe this is already possible. Let's check.

@jimmykarily jimmykarily added documentation Improvements or additions to documentation and removed triage Add this label to issues that should be triaged and prioretized in the next planning call labels Sep 16, 2024
@jimmykarily jimmykarily self-assigned this Sep 19, 2024
@jimmykarily
Copy link
Contributor

There is already this: kairos-agent config which prints out the merged configs.

One "strange" thing, in my test it had a top level key:

name: RPI configs

which comes from here and it probably just happens to be the last one that was merged (?)(thought the order of file indicates that others should have taken precedence). In any case, it's weird that we set the same top level key in all our cloud init files.

@jimmykarily
Copy link
Contributor

kairos-agent config skips most of the overlay files because of missing header:

warning: skipping /system/oem/00_datasource.yaml because it has no valid header
warning: skipping /system/oem/00_home_dir_owner_fix.yaml because it has no valid header
warning: skipping /system/oem/00_rootfs.yaml because it has no valid header
warning: skipping /system/oem/00_rootfs_uki.yaml because it has no valid header
warning: skipping /system/oem/02_agent.yaml because it has no valid header
warning: skipping /system/oem/02_notify.yaml because it has no valid header
warning: skipping /system/oem/03-setupcon.yaml because it has no valid header
warning: skipping /system/oem/05_network.yaml because it has no valid header
warning: skipping /system/oem/08_grub.yaml because it has no valid header
warning: skipping /system/oem/09_openrc_services.yaml because it has no valid header
warning: skipping /system/oem/09_systemd_services.yaml because it has no valid header
warning: skipping /system/oem/10_accounting.yaml because it has no valid header
warning: skipping /system/oem/12_nvidia.yaml because it has no valid header
warning: skipping /system/oem/21_kcrypt.yaml because it has no valid header
warning: skipping /system/oem/23_c3os.yaml because it has no valid header
warning: skipping /system/oem/25_autologin.yaml because it has no valid header
warning: skipping /system/oem/26_selinux.yaml because it has no valid header
warning: skipping /system/oem/26_vm.yaml because it has no valid header
warning: skipping /system/oem/29_blacklist.yaml because it has no valid header
warning: skipping /system/oem/30_ulimit.yaml because it has no valid header
warning: skipping /system/oem/31_hosts.yaml because it has no valid header
warning: skipping /system/oem/32_profile.yaml because it has no valid header
warning: skipping /system/oem/50_recovery.yaml because it has no valid header
warning: skipping /system/oem/51_reset.yaml because it has no valid header
warning: skipping /system/oem/52_installer.yaml because it has no valid header
warning: skipping /system/oem/99_sysext.yaml because it has no valid header

We just don't see it because we pass o.NoLogs

I'm trying to add some code to keep track of what files have been merged and somehow show it in this command. They come with a filepath and a name: field which can be very useful to maybe create a tree of things that have been merged into the final config.

jimmykarily added a commit to kairos-io/kairos-agent that referenced this issue Sep 19, 2024
and remove directory which is only meant to be used by yip configs (not
user configs read by the kairos-agent).

This needs to be explained in the release notes.

Needs this: kairos-io/kairos-sdk#501

Part of: kairos-io/kairos#2737

Signed-off-by: Dimitris Karakasilis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: In Progress 🏃
Development

No branches or pull requests

2 participants