mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Merge pull request #116131 from SataQiu/fix-kubelet-20230228
kubelet: avoid duplicate printing the flag deprecation warnings during re-parsing
This commit is contained in:
commit
352665e290
@ -22,6 +22,7 @@ import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
"net"
|
||||
"net/http"
|
||||
@ -321,6 +322,8 @@ func kubeletConfigFlagPrecedence(kc *kubeletconfiginternal.KubeletConfiguration,
|
||||
options.AddKubeletConfigFlags(fs, kc)
|
||||
// Remember original feature gates, so we can merge with flag gates later
|
||||
original := kc.FeatureGates
|
||||
// avoid duplicate printing the flag deprecation warnings during re-parsing
|
||||
fs.SetOutput(io.Discard)
|
||||
// re-parse flags
|
||||
if err := fs.Parse(args); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user