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

Do not set --hostname-override on kubelet and kube-proxy if hostname matches #499

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

neoaggelos
Copy link
Contributor

Summary

When configuring kubelet and kube-proxy, only specify the --hostname-override flag if the node name does not match.

Changes

  • Add a snap.Snap.Hostname() string method, which returns os.Hostname() or falls back to "dev"
  • When configuring kubelet and kube-proxy, if the node name (coming from microcluster config) does not match the hostname (from snap.Hostname(), only then configure --hostname-override`

@neoaggelos neoaggelos requested a review from a team as a code owner June 17, 2024 06:44
Copy link
Member

@ktsakalozos ktsakalozos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@ktsakalozos ktsakalozos merged commit 94c7bdc into main Jun 17, 2024
17 checks passed
@ktsakalozos ktsakalozos deleted the KU-1010/hostname branch June 17, 2024 09:07
eaudetcobello pushed a commit that referenced this pull request Jun 17, 2024
…matches (#499)

* Only add --hostname-override flag if hostname does not match

* unit tests for kubelet and kube-proxy hostname override
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 this pull request may close these issues.

2 participants