-
Notifications
You must be signed in to change notification settings - Fork 77
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
Duplicate kubelet extra args produced by installFlags change detection #779
Comments
I see this:
I wonder if the This would explain the detected change but it doesn't explain where the duplication happens |
No, \x20 is only in the systemd unit file. k0s has them like: "Args": [
"/usr/local/bin/k0s",
"controller",
"--config=/etc/k0s/k0s.yaml",
"--data-dir=/var/lib/k0s",
"--kubelet-extra-args=--fail-swap-on=false --pod-infra-container-image=registry.aliyuncs.com/google_containers/pause:3.9"
], |
Re-apply without change gives me:
|
I think the problem is var flagParseRe = regexp.MustCompile(`--?([\w\-]+)(?:[=\s](\S+))?`) which fails to parse flags with spaces in values correctly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
k0sctl >=0.19.0
appears to duplicate generated extra kubelet arguments (specifically,--node-ip
and--hostname-override
) and reinstall k0s due to perceived changes ininstallFlags
.We have a cluster that has been stood up by
k0sctl 0.18.1
some time ago. Since thenk0sctl
has been updated to0.19.0
.Recently we've added several workers to this cluster's manifest and noticed that existing k0s controllers and workers were being reinstalled and restarted.
After some digging we've discovered that this has apparently happened due to a weird change in the
--kubelet-extra-args
flag value.This is a
spec.hosts
entry for a controller node. It had no changes since the cluster had been created.(just in case: we know the
--pod-infra-container-image
kubelet argument has long been deprecated, just haven't gotten around to removing it)The
/etc/systemd/system/k0scontroller.service
file generated for this host byk0sctl 0.18.1
:The
/etc/systemd/system/k0scontroller.service
file generated and reinstalled for this host byk0sctl 0.19.0
:Notice the duplicated
node-ip
andhostname-override
arguments nested in thekubelet-extra-args
flag.We've also then done a separate
k0sctl apply
dry run with the same cluster manifest and saw that it would reinstall everything again. So it seems that there might be some issue with theinstallFlags
change detection mechanism.Aside from the argument duplication and some unexpected restarts, everything works fine. Rolling back to k0sctl 0.18.1 solves this issue for us for now.
The text was updated successfully, but these errors were encountered: