File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
cmd/cluster-cloud-controller-manager-operator Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ import (
35
35
"k8s.io/component-base/config"
36
36
"k8s.io/component-base/config/options"
37
37
"k8s.io/klog/v2"
38
- "k8s.io/klog/v2/textlogger"
39
38
ctrl "sigs.k8s.io/controller-runtime"
40
39
"sigs.k8s.io/controller-runtime/pkg/cache"
41
40
"sigs.k8s.io/controller-runtime/pkg/healthz"
@@ -77,8 +76,7 @@ func init() {
77
76
}
78
77
79
78
func main () {
80
- textLoggerCfg := textlogger .NewConfig ()
81
- textLoggerCfg .AddFlags (flag .CommandLine )
79
+ klog .InitFlags (flag .CommandLine )
82
80
83
81
metricsAddr := flag .String (
84
82
"metrics-bind-address" ,
@@ -109,7 +107,7 @@ func main() {
109
107
options .BindLeaderElectionFlags (& leaderElectionConfig , pflag .CommandLine )
110
108
pflag .Parse ()
111
109
112
- ctrl .SetLogger (textlogger . NewLogger ( textLoggerCfg ).WithName ("CCMOperator" ))
110
+ ctrl .SetLogger (klog . NewKlogr ( ).WithName ("CCMOperator" ))
113
111
114
112
restConfig := ctrl .GetConfigOrDie ()
115
113
le := util .GetLeaderElectionDefaults (restConfig , configv1.LeaderElection {
You can’t perform that action at this time.
0 commit comments