Update main.go
This commit is contained in:
parent
e34caf9f16
commit
d43caec39e
|
|
@ -691,6 +691,9 @@ func run(healthCheck *metrics.HealthCheck, debuggingSnapshotter debuggingsnapsho
|
|||
func main() {
|
||||
klog.InitFlags(nil)
|
||||
|
||||
leaderElection := leaderElectionConfiguration()
|
||||
componentopts.BindLeaderElectionFlags(&leaderElection, pflag.CommandLine)
|
||||
|
||||
featureGate := utilfeature.DefaultMutableFeatureGate
|
||||
loggingConfig := logsapi.NewLoggingConfiguration()
|
||||
|
||||
|
|
@ -711,9 +714,6 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
leaderElection := leaderElectionConfiguration()
|
||||
componentopts.BindLeaderElectionFlags(&leaderElection, pflag.CommandLine)
|
||||
|
||||
logs.InitLogs()
|
||||
if err := logsapi.ValidateAndApply(loggingConfig, featureGate); err != nil {
|
||||
klog.Fatalf("Failed to validate and apply logging configuration: %v", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue