• Kubernetes Submit Queue's avatar
    Merge pull request #67739 from liggitt/hostname-override · a26e1dda
    Kubernetes Submit Queue authored
    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 <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Honor --hostname-override, report compatible hostname addresses with cloud provider
    
    xref #67714
    
    7828e5d0 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
    
    ```release-note
    NONE
    ```
    a26e1dda
Name
Last commit
Last update
..
apis Loading commit data...
cadvisor Loading commit data...
certificate Loading commit data...
checkpoint Loading commit data...
checkpointmanager Loading commit data...
client Loading commit data...
cloudresource Loading commit data...
cm Loading commit data...
config Loading commit data...
configmap Loading commit data...
container Loading commit data...
custommetrics Loading commit data...
dockershim Loading commit data...
envvars Loading commit data...
events Loading commit data...
eviction Loading commit data...
images Loading commit data...
kubeletconfig Loading commit data...
kuberuntime Loading commit data...
leaky Loading commit data...
lifecycle Loading commit data...
logs Loading commit data...
metrics Loading commit data...
mountpod Loading commit data...
network Loading commit data...
nodelease Loading commit data...
nodestatus Loading commit data...
pleg Loading commit data...
pod Loading commit data...
preemption Loading commit data...
prober Loading commit data...
qos Loading commit data...
remote Loading commit data...
secret Loading commit data...
server Loading commit data...
stats Loading commit data...
status Loading commit data...
sysctl Loading commit data...
token Loading commit data...
types Loading commit data...
util Loading commit data...
volumemanager Loading commit data...
winstats Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
active_deadline.go Loading commit data...
active_deadline_test.go Loading commit data...
doc.go Loading commit data...
kubelet.go Loading commit data...
kubelet_getters.go Loading commit data...
kubelet_getters_test.go Loading commit data...
kubelet_network.go Loading commit data...
kubelet_network_test.go Loading commit data...
kubelet_node_status.go Loading commit data...
kubelet_node_status_test.go Loading commit data...
kubelet_pods.go Loading commit data...
kubelet_pods_test.go Loading commit data...
kubelet_pods_windows_test.go Loading commit data...
kubelet_resources.go Loading commit data...
kubelet_resources_test.go Loading commit data...
kubelet_test.go Loading commit data...
kubelet_volumes.go Loading commit data...
kubelet_volumes_test.go Loading commit data...
oom_watcher.go Loading commit data...
oom_watcher_test.go Loading commit data...
pod_container_deletor.go Loading commit data...
pod_container_deletor_test.go Loading commit data...
pod_workers.go Loading commit data...
pod_workers_test.go Loading commit data...
reason_cache.go Loading commit data...
reason_cache_test.go Loading commit data...
runonce.go Loading commit data...
runonce_test.go Loading commit data...
runtime.go Loading commit data...
util.go Loading commit data...
volume_host.go Loading commit data...