Skip to content

Commit

Permalink
update leaderelection pkg logs
Browse files Browse the repository at this point in the history
update logs to use controller-runtime logs

Signed-off-by: adrianc <[email protected]>
  • Loading branch information
adrianchiris committed Oct 30, 2023
1 parent 7794d21 commit 572dc27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/leaderelection/leaderelection.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package leaderelection
import (
"time"

"github.com/golang/glog"
"k8s.io/client-go/tools/leaderelection"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"

"github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils"
)
Expand All @@ -29,7 +29,7 @@ func GetLeaderElectionConfig(c client.Client, enabled bool) (defaultConfig leade
if enabled {
isSingleNode, err := utils.IsSingleNodeCluster(c)
if err != nil {
glog.Warningf("unable to get cluster infrastructure status, using HA cluster values for leader election: %v", err)
log.Log.Error(err, "warning, unable to get cluster infrastructure status, using HA cluster values for leader election")
return
}
if isSingleNode {
Expand Down

0 comments on commit 572dc27

Please sign in to comment.