mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
remove unused code in kubelet
Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
parent
dbb6c77de4
commit
7a5af811e7
@ -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