Skip to content

Commit

Permalink
fix stack trace for leader election
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Blaschke <[email protected]>
  • Loading branch information
mblaschke committed Sep 14, 2024
1 parent 5f6d1f6 commit c196b3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.23
require (
github.com/KimMachineGun/automemlimit v0.6.1
github.com/dustin/go-humanize v1.0.1
github.com/go-logr/zapr v1.3.0
github.com/jessevdk/go-flags v1.6.1
github.com/operator-framework/operator-lib v0.15.0
github.com/prometheus/client_golang v1.20.3
Expand All @@ -14,6 +15,7 @@ require (
k8s.io/api v0.31.1
k8s.io/apimachinery v0.31.1
k8s.io/client-go v0.31.1
sigs.k8s.io/controller-runtime v0.19.0
)

require (
Expand Down Expand Up @@ -69,7 +71,6 @@ require (
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
sigs.k8s.io/controller-runtime v0.19.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
5 changes: 5 additions & 0 deletions manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"

"github.com/go-logr/zapr"
"sigs.k8s.io/controller-runtime/pkg/log"

"github.com/webdevops/kube-pool-manager/config"
"github.com/webdevops/kube-pool-manager/k8s"
)
Expand Down Expand Up @@ -89,6 +92,8 @@ func (r *KubePoolManager) initK8s() {
if err != nil {
panic(err.Error())
}

log.SetLogger(zapr.NewLogger(r.Logger.Desugar()))
}

func (m *KubePoolManager) Start() {
Expand Down

0 comments on commit c196b3b

Please sign in to comment.