• Kubernetes Submit Queue's avatar
    Merge pull request #49140 from rickypai/rpai/hostnetwork_etc_hosts · b161831b
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 50094, 48966, 49478, 50593, 49140)
    
    Kubelet manage hosts file for HostNetwork Pods instead of Docker
    
    **What this PR does / why we need it**: Currently, Docker manages the hosts file for containers inside Pods using hostNetwork. It creates discrepancy between how we treat hostNetwork and non-hostNetwork Pods. Kubelet should manage the file regardless of the network setup.
    
    **Which issue this PR fixes**: fixes #48397 more context in https://github.com/kubernetes/kubernetes/issues/43632#issuecomment-304376441
    
    **Special notes for your reviewer**: Because the new logic relies on reading the node filesystem, I'm not sure how to write a proper unit test. I was thinking about using a node e2e test to cover the case, but suggestions are greatly welcomed.
    
    **Release note**:
    ```release-note
    Kubelet now manages `/etc/hosts` file for both hostNetwork Pods and non-hostNetwork Pods.
    ```
    
    /kind feature
    /sig node
    
    @yujuhong @hongchaodeng @thockin
    @kubernetes/sig-network-feature-requests @kubernetes/sig-node-feature-requests
    b161831b
Name
Last commit
Last update
..
api Loading commit data...
apimachinery/tests Loading commit data...
apis Loading commit data...
auth Loading commit data...
bootstrap/api Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
conversion Loading commit data...
credentialprovider Loading commit data...
features Loading commit data...
fieldpath Loading commit data...
fields Loading commit data...
generated Loading commit data...
hyperkube Loading commit data...
kubeapiserver Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
labels Loading commit data...
master Loading commit data...
printers Loading commit data...
probe Loading commit data...
proxy Loading commit data...
quota Loading commit data...
registry Loading commit data...
routes Loading commit data...
runtime Loading commit data...
security Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
ssh Loading commit data...
types Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...