• Kubernetes Submit Queue's avatar
    Merge pull request #62670 from Random-Liu/fix-kubelet-flags · 9dd81555
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. 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>.
    
    Fix kubelet flags.
    
    pflag now sets golang flag `Parsed` before parsing flags https://github.com/spf13/pflag/commit/1ce0cc6db4029d97571db82f85092fccedb572ce. With that, all kubelet flags setting will be skipped.
    
    We initially added `flag.Parsed` check to work around a issue that flags are parsed twice, thus kubelet flags are appended twice.
    
    However, it doesn't seem to be the case now. I removed the `Parsed` check, and kubelet flags are only appended once.
    ```
    /tmp/node-e2e-20180416T200912/kubelet --kubeconfig /tmp/node-e2e-20180416T200912/kubeconfig --root-dir /var/lib/kubelet --v 4 --logtostderr --allow-privileged true --network-plugin=kubenet --cni-bin-dir /tmp/node-e2e-20180416T200912/cni/bin --cni-conf-dir /tmp/node-e2e-20180416T200912/cni/net.d --hostname-override test-cos-beta-66-10452-53-0 --container-runtime docker --container-runtime-endpoint unix:///var/run/dockershim.sock --config /tmp/node-e2e-20180416T200912/kubelet-config --experimental-mounter-path=/tmp/node-e2e-20180416T200912/mounter --experimental-kernel-memcg-notification=true --runtime-cgroups=/system.slice/docker.service
    ```
    
    This PR removes the unnecessary `Parsed` check to fix the test. @mtaufen 
    
    /cc @kubernetes/sig-node-pr-reviews 
    Signed-off-by: 's avatarLantao Liu <lantaol@google.com>
    
    **Release note**:
    
    ```release-note
    none
    ```
    9dd81555
Name
Last commit
Last update
..
conformance Loading commit data...
e2e Loading commit data...
e2e_node Loading commit data...
fixtures Loading commit data...
images Loading commit data...
integration Loading commit data...
kubemark Loading commit data...
list Loading commit data...
soak Loading commit data...
typecheck Loading commit data...
utils Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
test_owners.csv Loading commit data...
test_owners.json Loading commit data...