mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Merge pull request #109407 from yxxhero/remove_unused_code_in_kubelet
Clean up unused code in kubelet
This commit is contained in:
commit
c7eb5a49ba
@ -22,14 +22,12 @@ limitations under the License.
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math/rand"
|
|
||||||
"os"
|
"os"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"k8s.io/component-base/cli"
|
||||||
cliflag "k8s.io/component-base/cli/flag"
|
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/logs/json/register" // for JSON log format registration
|
||||||
_ "k8s.io/component-base/metrics/prometheus/restclient"
|
_ "k8s.io/component-base/metrics/prometheus/restclient"
|
||||||
_ "k8s.io/component-base/metrics/prometheus/version" // for version metric registration
|
_ "k8s.io/component-base/metrics/prometheus/version" // for version metric registration
|
||||||
@ -48,12 +46,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func run(command *cobra.Command) int {
|
func run(command *cobra.Command) int {
|
||||||
defer logs.FlushLogs()
|
|
||||||
rand.Seed(time.Now().UnixNano())
|
|
||||||
|
|
||||||
command.SetGlobalNormalizationFunc(cliflag.WordSepNormalizeFunc)
|
command.SetGlobalNormalizationFunc(cliflag.WordSepNormalizeFunc)
|
||||||
if err := command.Execute(); err != nil {
|
return cli.Run(command)
|
||||||
return 1
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user