Skip to content

Commit

Permalink
remove unused code in kubelet
Browse files Browse the repository at this point in the history
Signed-off-by: yxxhero <aiopsclub@163.com>
  • Loading branch information
yxxhero committed Jun 18, 2022
1 parent dbb6c77 commit 7a5af81
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions cmd/kubelet/kubelet.go
Expand Up @@ -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
Expand All @@ -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)
}

0 comments on commit 7a5af81

Please sign in to comment.