Skip to content

Commit

Permalink
Merge pull request #441 from mengqiy/webhook_le
Browse files Browse the repository at this point in the history
✨ webhook server doesn't use leader election by default
  • Loading branch information
k8s-ci-robot committed May 24, 2019
2 parents 96b67f2 + d850185 commit e381b18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/webhook/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ func (s *Server) setDefaults() {
}
}

// NeedLeaderElection implements the LeaderElectionRunnable interface, which indicates
// the webhook server doesn't need leader election.
func (*Server) NeedLeaderElection() bool {
return false
}

// Register marks the given webhook as being served at the given path.
// It panics if two hooks are registered on the same path.
func (s *Server) Register(path string, hook http.Handler) {
Expand Down

0 comments on commit e381b18

Please sign in to comment.