Honor --hostname-override, report compatible hostname addresses with cloud provider#67739
Conversation
|
/milestone v1.12 |
|
/cc @smarterclayton |
|
/approve |
|
/retest |
pkg/kubelet/nodestatus/setters.go
Outdated
|
added warning messages for the hostname-override case |
92b6b9a to
2857de7
Compare
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Nit for future PRs: https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
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. |
|
@liggitt: The following test failed, say
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. DetailsInstructions 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. |
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: Hostnameaddress to node status. This is being tracked in #67714This PR does a couple other things to ease the transition to authoritative cloud providers:
--hostname-overrideis set on the kubelet, make the kubelet report thatHostnameaddress. 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)--hostname-overrideis 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 aHostnameaddress whenever possible./sig node
/sig cloud-provider
/cc @mikedanese
fyi @hh