Skip to content

Commit 1bab145

Browse files
committed
disable printing warnings
1 parent 3bfade5 commit 1bab145

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/kubectl-tree/rootcmd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
http://www.apache.org/licenses/LICENSE-2.0
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
@@ -28,6 +28,7 @@ import (
2828
"k8s.io/cli-runtime/pkg/genericclioptions"
2929
"k8s.io/client-go/dynamic"
3030
_ "k8s.io/client-go/plugin/pkg/client/auth" // combined authprovider import
31+
"k8s.io/client-go/rest"
3132
"k8s.io/klog"
3233
)
3334

@@ -73,6 +74,7 @@ func run(command *cobra.Command, args []string) error {
7374
if err != nil {
7475
return err
7576
}
77+
restConfig.WarningHandler = rest.NoWarnings{}
7678
restConfig.QPS = 1000
7779
restConfig.Burst = 1000
7880
dyn, err := dynamic.NewForConfig(restConfig)

0 commit comments

Comments
 (0)