• Michael Taufen's avatar
    Improve dynamic kubelet config e2e node test and fix bugs · a846ba19
    Michael Taufen authored
    Rather than just changing the config once to see if dynamic kubelet
    config at-least-sort-of-works, this extends the test to check that the
    Kubelet reports the expected Node condition and the expected configuration
    values after several possible state transitions.
    
    Additionally, this adds a stress test that changes the configuration 100
    times. It is possible for resource leaks across Kubelet restarts to
    eventually prevent the Kubelet from restarting. For example, this test
    revealed that cAdvisor's leaking journalctl processes (see:
    https://github.com/google/cadvisor/issues/1725) could break dynamic
    kubelet config. This test will help reveal these problems earlier.
    
    This commit also makes better use of const strings and fixes a few bugs
    that the new testing turned up.
    
    Related issue: #50217
    a846ba19
dynamic_kubelet_config_test.go 16.7 KB