• Davanum Srinivas's avatar
    Create fake /etc/hosts for conformance test · ba20e634
    Davanum Srinivas authored
    "KubeletManagedEtcHosts should test kubelet managed /etc/hosts file"
    conformance test fails in the CI's Docker-In-Docker environment.
    
    This test mounts a /etc/hosts file and checks if "# Kubernetes-managed
    hosts file." string is present or not under various conditions. The
    specific failure with DIND happens when the /etc/hosts picked up
    from the box where e2e test are running already has this string. This
    happens because our CI runs on kubernetes and the e2e tests are running
    in a container that was started on kubernetes (and hence already has
    that string)
    
    To avoid this situation, we create a new /etc/hosts file with known
    contents (and does not have the "# Kubernetes-managed hosts file."
    string)
    ba20e634
kubelet_etc_hosts.go 7.15 KB