Skip to content

Commit

Permalink
removing glog references - using klog
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheu committed May 23, 2024
1 parent 13d55b2 commit 0a1cc51
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ require (
github.com/avast/retry-go/v4 v4.6.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/euank/go-kmsg-parser v2.0.0+incompatible
github.com/golang/glog v1.2.0
github.com/hpcloud/tail v1.0.0
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.53.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,6 @@ github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzw
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down
16 changes: 7 additions & 9 deletions pkg/exporters/k8sexporter/condition/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import (
v1 "k8s.io/api/core/v1"
"k8s.io/utils/clock"

"github.com/golang/glog"

"k8s.io/klog/v2"
)

Expand Down Expand Up @@ -174,7 +172,7 @@ func (c *conditionManager) sync(ctx context.Context) {

node, err := c.client.GetNode(ctx)
if err != nil {
glog.Errorf("failed to get node: %v", err)
klog.Errorf("failed to get node: %v", err)
continue
}

Expand All @@ -187,30 +185,30 @@ func (c *conditionManager) sync(ctx context.Context) {
continue
}

glog.Infof("for condition %s, tainting is enabled and status is True, tainting with %s",
klog.Infof("for condition %s, tainting is enabled and status is True, tainting with %s",
condition.Type, taintStr)

if err := c.client.TaintNode(ctx, node, condition); err != nil {
glog.Errorf("failed to add taint %v: %v", taintStr, err)
klog.Errorf("failed to add taint %v: %v", taintStr, err)
continue
}

glog.Infof("successfully tainted node with %s", taintStr)
klog.Infof("successfully tainted node with %s", taintStr)
case types.False:
if !taintExists {
// we are skipping here since node is not tainted with our TaintConfig
continue
}

glog.Infof("for condition %s, tainting is enabled and condition status is False, removing taint %s",
klog.Infof("for condition %s, tainting is enabled and condition status is False, removing taint %s",
condition.Type, taintStr)

if err := c.client.UntaintNode(ctx, node, condition); err != nil {
glog.Errorf("failed to remove taint %v: %v", taintStr, err)
klog.Errorf("failed to remove taint %v: %v", taintStr, err)
continue
}

glog.Infof("successfully removed taint %s from node", taintStr)
klog.Infof("successfully removed taint %s from node", taintStr)
}
}
if err := c.client.SetConditions(ctx, conditions); err != nil {
Expand Down

0 comments on commit 0a1cc51

Please sign in to comment.