mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +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
|
current state towards the desired state. Examples of controllers that ship with
|
||||||
Kubernetes today are the replication controller, endpoints controller, namespace
|
Kubernetes today are the replication controller, endpoints controller, namespace
|
||||||
controller, and serviceaccounts controller.`,
|
controller, and serviceaccounts controller.`,
|
||||||
PersistentPreRunE: func(*cobra.Command, []string) error {
|
PersistentPreRun: func(*cobra.Command, []string) {
|
||||||
// silence client-go warnings.
|
// silence client-go warnings.
|
||||||
// kube-controller-manager generically watches APIs (including deprecated ones),
|
// kube-controller-manager generically watches APIs (including deprecated ones),
|
||||||
// and CI ensures it works properly against matching kube-apiserver versions.
|
// and CI ensures it works properly against matching kube-apiserver versions.
|
||||||
restclient.SetDefaultWarningHandler(restclient.NoWarnings{})
|
restclient.SetDefaultWarningHandler(restclient.NoWarnings{})
|
||||||
return nil
|
|
||||||
},
|
},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
verflag.PrintAndExitIfRequested()
|
verflag.PrintAndExitIfRequested()
|
||||||
|
Loading…
Reference in New Issue
Block a user