-
Notifications
You must be signed in to change notification settings - Fork 13
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
Don't write an empty k3s service on disk #519
Conversation
just use the one that was created by the k3s installer script Fixes: kairos-io/kairos#2125 Signed-off-by: Dimitris Karakasilis <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
========================================
+ Coverage 7.93% 8.11% +0.17%
========================================
Files 15 15
Lines 958 937 -21
========================================
Hits 76 76
+ Misses 866 845 -21
Partials 16 16 ☔ View full report in Codecov by Sentry. |
svc, err = openrc.NewService( | ||
openrc.WithName(svcName), | ||
openrc.WithUnitContent(string(content)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this likely will break alpine - in the original openrc service file there is no way to override environment variables (which are actually used to set K3S_*
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are not over-writing the init file any longer since we remove the WriteService line. So the original installation unit will be present and reading from the env location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep right, what I'm saying is that we used to write to a custom location, the env file is not read by the original k3s unit, it is kairos-specific (at least at the time of writing the provider)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mudler gotcha, let me validate alpine then, meanwhile, I decided to merge because at least is better to have systemd systems working even if OpenRC ones (alpine) would break
We built an image with this for fedora and it works. |
did you tried with a master/agent or just single-node? #519 (comment) would probably get unnoticed until you try specifically to customize how you start k3s or k3s-agent |
@mudler validated it and it's working correctly on alpine too. This is because the installer from k3s creates a unit file which ends with:
and we write to
|
just use the one that was created by the k3s installer script
Fixes: kairos-io/kairos#2125