mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Report KCM as unhealthy if leader election is wedged.
Feedback from lavalamp and deads2k. Changed Check() logic to be central to LeaderElector. Further changes, especially cleaning up the test code.
This commit is contained in:
@@ -17,11 +17,10 @@ limitations under the License.
|
||||
package app
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"net/http"
|
||||
goruntime "runtime"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
apiserverconfig "k8s.io/apiserver/pkg/apis/config"
|
||||
genericapifilters "k8s.io/apiserver/pkg/endpoints/filters"
|
||||
apirequest "k8s.io/apiserver/pkg/endpoints/request"
|
||||
@@ -53,9 +52,9 @@ func BuildHandlerChain(apiHandler http.Handler, authorizationInfo *apiserver.Aut
|
||||
}
|
||||
|
||||
// NewBaseHandler takes in CompletedConfig and returns a handler.
|
||||
func NewBaseHandler(c *apiserverconfig.DebuggingConfiguration) *mux.PathRecorderMux {
|
||||
func NewBaseHandler(c *apiserverconfig.DebuggingConfiguration, checks ...healthz.HealthzChecker) *mux.PathRecorderMux {
|
||||
mux := mux.NewPathRecorderMux("controller-manager")
|
||||
healthz.InstallHandler(mux)
|
||||
healthz.InstallHandler(mux, checks...)
|
||||
if c.EnableProfiling {
|
||||
routes.Profiling{}.Install(mux)
|
||||
if c.EnableContentionProfiling {
|
||||
|
||||
Reference in New Issue
Block a user