remove unused code in kubelet

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2022-04-10 17:57:40 +08:00
parent dbb6c77de4
commit 7a5af811e7

View File

@ -22,14 +22,12 @@ limitations under the License.
package main
import (
"math/rand"
"os"
"time"
"github.com/spf13/cobra"
"k8s.io/component-base/cli"
cliflag "k8s.io/component-base/cli/flag"
"k8s.io/component-base/logs"
_ "k8s.io/component-base/logs/json/register" // for JSON log format registration
_ "k8s.io/component-base/metrics/prometheus/restclient"
_ "k8s.io/component-base/metrics/prometheus/version" // for version metric registration
@ -48,12 +46,6 @@ func main() {
}
func run(command *cobra.Command) int {
defer logs.FlushLogs()
rand.Seed(time.Now().UnixNano())
command.SetGlobalNormalizationFunc(cliflag.WordSepNormalizeFunc)
if err := command.Execute(); err != nil {
return 1
}
return 0
return cli.Run(command)
}