Skip to content

Commit e381b18

Browse files
authored
Merge pull request kubernetes-sigs#441 from mengqiy/webhook_le
✨ webhook server doesn't use leader election by default
2 parents 96b67f2 + d850185 commit e381b18

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/webhook/server.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ func (s *Server) setDefaults() {
8989
}
9090
}
9191

92+
// NeedLeaderElection implements the LeaderElectionRunnable interface, which indicates
93+
// the webhook server doesn't need leader election.
94+
func (*Server) NeedLeaderElection() bool {
95+
return false
96+
}
97+
9298
// Register marks the given webhook as being served at the given path.
9399
// It panics if two hooks are registered on the same path.
94100
func (s *Server) Register(path string, hook http.Handler) {

0 commit comments

Comments
 (0)