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

k0sctl does not set node-ip to private address when using controller+worker #204

Closed
logan2211 opened this issue Sep 8, 2021 · 3 comments · Fixed by #205
Closed

k0sctl does not set node-ip to private address when using controller+worker #204

logan2211 opened this issue Sep 8, 2021 · 3 comments · Fixed by #205

Comments

@logan2211
Copy link

When using a configuration like

  - ssh:
      address: xxx.xxx.xxx.xxx
      user: admin
    role: controller+worker

The private interface and private address are detected when discovering facts from the node, but the node-ip is not set for the worker because #181 specifically excludes nodes marked as controllers from its config:

if !h.IsController() && h.PrivateAddress != "" {
// set worker's private address to --node-ip in --extra-kubelet-args
var extra Flags
if old := flags.GetValue("--kubelet-extra-args"); old != "" {
extra = Flags{unQE(old)}
}
extra.AddUnlessExist(fmt.Sprintf("--node-ip=%s", h.PrivateAddress))
flags.AddOrReplace(fmt.Sprintf("--kubelet-extra-args=%s", strconv.Quote(extra.Join())))
}

I think this exclusion needs to be adjusted so it can accommodate dual-role hosts that are marked as both controllers and workers.

@kke
Copy link
Contributor

kke commented Sep 8, 2021

I believe #205 should fix this.

@logan2211
Copy link
Author

logan2211 commented Sep 8, 2021

Built k0sctl with the fix and confirmed it works. I guess it will need some further adjustment once controller+worker is deprecated at some point in the future as discussed in #203, but it works well now in the interim! Thank you!

@kke kke closed this as completed in #205 Sep 9, 2021
@kke
Copy link
Contributor

kke commented Sep 9, 2021

Fixed in v0.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants