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

add hostname-override for external aws cloud provider #177

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

kinarashah
Copy link
Member

@kinarashah kinarashah commented Oct 16, 2023

See rancher/rke#3413 for more details. RKE removes hostname-override for external-aws when useInstanceMetadataHostname is enabled so rke-tools sets it as the node name expected by cloud provider.

Original issue: rancher/rancher#43175

@kinarashah kinarashah marked this pull request as ready for review October 16, 2023 20:52
@kinarashah kinarashah requested review from a team as code owners October 16, 2023 20:52
if echo ${@} | grep -v "hostname-override"; then
hostname=$(curl "http://169.254.169.254/latest/meta-data/hostname")
if [ -z "$hostname" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

What is a possible reason for hostname to be empty? Should it not retry or log something? We didn't have this when it was only kube-proxy.

Copy link
Member Author

Choose a reason for hiding this comment

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

@superseb I haven't seen hostname empty yet, but saw this in rke2 so added it for consistency: https://github.com/rancher/rke2/blob/f8cb409287ac09608d3d2fbac364dddb05400a3e/pkg/rke2/rke2_linux.go#L82

@superseb superseb requested a review from a team October 17, 2023 10:18
entrypoint.sh Outdated Show resolved Hide resolved
Copy link
Member

@jiaqiluo jiaqiluo left a comment

Choose a reason for hiding this comment

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

LGTM

@kinarashah kinarashah merged commit 4091bdf into rancher:master Oct 18, 2023
1 check passed
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.

3 participants