Skip to content

Commit

Permalink
Make sure kind is lower-case in leader election id
Browse files Browse the repository at this point in the history
  • Loading branch information
trevex committed Oct 20, 2024
1 parent d8dbf61 commit 8a540ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"os"
"strings"

sync "github.com/gravitational/sync-controller/controller"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -101,7 +102,7 @@ func main() {
Scheme: scheme,
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: fmt.Sprintf("%s.%s.%s", kind, version, group),
LeaderElectionID: fmt.Sprintf("%s.%s.%s", strings.ToLower(kind), version, group),
})
if err != nil {
setupLog.Error(err, "unable to start manager")
Expand Down

0 comments on commit 8a540ed

Please sign in to comment.