Skip to content

Honor --hostname-override, report compatible hostname addresses with cloud provider#67739

Merged
k8s-github-robot merged 1 commit intokubernetes:masterfrom
liggitt:hostname-override
Aug 28, 2018
Merged

Honor --hostname-override, report compatible hostname addresses with cloud provider#67739
k8s-github-robot merged 1 commit intokubernetes:masterfrom
liggitt:hostname-override

Conversation

@liggitt
Copy link
Copy Markdown
Member

@liggitt liggitt commented Aug 23, 2018

xref #67714

7828e5d made cloud providers authoritative for the addresses reported on Node objects, so that the addresses used by the node (and requested as SANs in serving certs) could be verified via cloud provider metadata.

This had the effect of no longer reporting addresses of type Hostname for Node objects for some cloud providers. Cloud providers that have the instance hostname available in metadata should add a type: Hostname address to node status. This is being tracked in #67714

This PR does a couple other things to ease the transition to authoritative cloud providers:

  • if --hostname-override is set on the kubelet, make the kubelet report that Hostname address. if it can't be verified via cloud-provider metadata (for cert approval, etc), the kubelet deployer is responsible for fixing the situation by adjusting the kubelet configuration (as they were in 1.11 and previously)
  • if --hostname-override is not set, and the cloud provider didn't report a Hostname address, and the auto-detected hostname matches one of the addresses the cloud provider did report, make the kubelet report that as a Hostname address. That lets the addresses remain verifiable via cloud provider metadata, while still including a Hostname address whenever possible.

/sig node
/sig cloud-provider

/cc @mikedanese

fyi @hh

NONE

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/kubelet release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 23, 2018
@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Aug 27, 2018

/milestone v1.12

@k8s-ci-robot k8s-ci-robot added this to the v1.12 milestone Aug 27, 2018
@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Aug 28, 2018

/cc @smarterclayton
follow-up to 7828e5d that honors --hostname-override to keep compatibility with deployments that pre-generated certs and pinned kubelet-reported hostnames, and keeps the cloud provider authoritative otherwise

Copy link
Copy Markdown
Member

@dixudx dixudx left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2018
@smarterclayton
Copy link
Copy Markdown
Contributor

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2018
@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Aug 28, 2018

/retest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

log a warning?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sure

@liggitt
Copy link
Copy Markdown
Member Author

liggitt commented Aug 28, 2018

added warning messages for the hostname-override case

@liggitt liggitt force-pushed the hostname-override branch from 92b6b9a to 2857de7 Compare August 28, 2018 15:27
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2018
@mikedanese
Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2018
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dixudx, liggitt, mikedanese, smarterclayton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@awly
Copy link
Copy Markdown
Contributor

awly commented Aug 28, 2018

@k8s-github-robot
Copy link
Copy Markdown

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue (batch tested with PRs 67739, 65222). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit a26e1dd into kubernetes:master Aug 28, 2018
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@liggitt: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-kubemark-e2e-gce-big 2857de7 link /test pull-kubernetes-kubemark-e2e-gce-big

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@liggitt liggitt deleted the hostname-override branch October 3, 2018 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants