mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Optimize Cobra parameters of Controller Manager
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
parent
0cef26182c
commit
feaa78380c
@ -119,12 +119,11 @@ state of the cluster through the apiserver and makes changes attempting to move
|
||||
current state towards the desired state. Examples of controllers that ship with
|
||||
Kubernetes today are the replication controller, endpoints controller, namespace
|
||||
controller, and serviceaccounts controller.`,
|
||||
PersistentPreRunE: func(*cobra.Command, []string) error {
|
||||
PersistentPreRun: func(*cobra.Command, []string) {
|
||||
// silence client-go warnings.
|
||||
// kube-controller-manager generically watches APIs (including deprecated ones),
|
||||
// and CI ensures it works properly against matching kube-apiserver versions.
|
||||
restclient.SetDefaultWarningHandler(restclient.NoWarnings{})
|
||||
return nil
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
verflag.PrintAndExitIfRequested()
|
||||
|
Loading…
Reference in New Issue
Block a user