nixos/k3s,rke2: clean up manifests via /etc on config changes#520433
nixos/k3s,rke2: clean up manifests via /etc on config changes#520433yajo wants to merge 1 commit into
Conversation
59ce69a to
799b1ad
Compare
rorosen
left a comment
There was a problem hiding this comment.
I like the idea, this is a good improvement. It should have been done like this from the beginning tbh. Unfortunately, k3s didn't follow symlinked manifest directories back then.
However, since previous symlinks will remain in the manifest directory, users could end up with conflicting manifest contents. There should be a migration guide on how to remove previous symlinks, e.g. in the release notes.
Please check also formatting
|
Hi there! Thanks for the reviews. Hold on while I attend the suggestions please.
Yes, the policy was merged some days after I opened the PR, I didn't know about that back then. |
799b1ad to
924e6b1
Compare
Manifests are now managed declaratively through a linkFarm in the Nix store: - Static symlink: manifests/nixos → linkFarm in Nix store - k3s/rke2 scan subdirectories recursively, pick up changes within 15s When manifests are removed from the config, the linkFarm derivation changes, the activation script updates the symlink, and the stale files disappear naturally — no dangling symlinks. @moduon MT-14138
924e6b1 to
24444a4
Compare
yajo
left a comment
There was a problem hiding this comment.
All comments attended.
- Formatting fixed.
- Test merged with
auto-deploy.nix - Release notes.
/etcintermediate symlink removed
|
IIUC CI failures are not related to my changes. |
Before, when a manifest was removed from NixOS configuration, its symlink
still remained inside
/var/lib/rancher/k3s/server/manifests.Manifests are now managed declaratively through a linkFarm in the Nix store:
manifests/nixos→ linkFarm in Nix storeWhen manifests are removed from the config, the linkFarm derivation
changes, the activation script updates the symlink, and the stale files
disappear naturally — no dangling symlinks.
@moduon MT-14138