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 (
3535 "k8s.io/component-base/config"
3636 "k8s.io/component-base/config/options"
3737 "k8s.io/klog/v2"
38- "k8s.io/klog/v2/textlogger"
3938 ctrl "sigs.k8s.io/controller-runtime"
4039 "sigs.k8s.io/controller-runtime/pkg/cache"
4140 "sigs.k8s.io/controller-runtime/pkg/healthz"
@@ -77,8 +76,7 @@ func init() {
7776}
7877
7978func main () {
80- textLoggerCfg := textlogger .NewConfig ()
81- textLoggerCfg .AddFlags (flag .CommandLine )
79+ klog .InitFlags (flag .CommandLine )
8280
8381 metricsAddr := flag .String (
8482 "metrics-bind-address" ,
@@ -109,7 +107,7 @@ func main() {
109107 options .BindLeaderElectionFlags (& leaderElectionConfig , pflag .CommandLine )
110108 pflag .Parse ()
111109
112- ctrl .SetLogger (textlogger . NewLogger ( textLoggerCfg ).WithName ("CCMOperator" ))
110+ ctrl .SetLogger (klog . NewKlogr ( ).WithName ("CCMOperator" ))
113111
114112 restConfig := ctrl .GetConfigOrDie ()
115113 le := util .GetLeaderElectionDefaults (restConfig , configv1.LeaderElection {
You can’t perform that action at this time.
0 commit comments