• Davanum Srinivas's avatar
    Ensure /etc/hosts has a header always - Fix conformance test · 00998d0e
    Davanum Srinivas authored
    We have 2 scenarios where we copy /etc/hosts
    - with host network (we just copy the /etc/hosts from node)
    - without host network (create a fresh /etc/hosts from pod info)
    
    We are having trouble figuring out whether a /etc/hosts in a
    pod/container has been "fixed-up" or not. And whether we used
    host network or a fresh /etc/hosts in the various ways we start
    up the tests which are:
    
    - VM/box against a remote cluster
    - As a container inside the k8s cluster
    - DIND scenario in CI where test runs inside a managed container
    
    Please see previous mis-guided attempt to fix this problem at
    ba20e634 In this commit we revert
    the code from there as well.
    
    So we should make sure:
    - we always add a header if we touched the file
    - we add slightly different headers so we can figure out if we used the
      host network or not.
    
    Update the test case to inject /etc/hosts from node to another path
    (/etc/hosts-original) as well and use that to compare.
    00998d0e
Name
Last commit
Last update
..
BUILD Loading commit data...
apparmor.go Loading commit data...
autoscaling_utils.go Loading commit data...
configmap.go Loading commit data...
configmap_volume.go Loading commit data...
container_probe.go Loading commit data...
docker_containers.go Loading commit data...
downward_api.go Loading commit data...
downwardapi_volume.go Loading commit data...
empty_dir.go Loading commit data...
events.go Loading commit data...
expansion.go Loading commit data...
host_path.go Loading commit data...
init_container.go Loading commit data...
kubelet_etc_hosts.go Loading commit data...
networking.go Loading commit data...
pods.go Loading commit data...
privileged.go Loading commit data...
projected.go Loading commit data...
secrets.go Loading commit data...
secrets_volume.go Loading commit data...
sysctl.go Loading commit data...
util.go Loading commit data...
volumes.go Loading commit data...