Skip to content

Commit

Permalink
chore(config): add a log line when writing leader configuration (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlevesy authored Sep 26, 2024
1 parent 2674fe7 commit b3a4bb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"github.com/imdario/mergo"
"github.com/jlevesy/prometheus-elector/election"
"k8s.io/klog/v2"
)

type Reconciler struct {
Expand Down Expand Up @@ -34,6 +35,7 @@ func (r *Reconciler) Reconcile(ctx context.Context) error {
targetCfg := cfg.Follower

if cfg.Leader != nil && r.leaderChecker != nil && r.leaderChecker.IsLeader() {
klog.Info("Writing leader configuration")
if err := mergo.Merge(
&targetCfg,
cfg.Leader,
Expand Down

0 comments on commit b3a4bb0

Please sign in to comment.