mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 04:32:37 +00:00
Fix staticcheck failures for scheduler packages
Errors from staticcheck: cmd/kube-scheduler/app/server.go:297:27: prometheus.Handler is deprecated: Please note the issues described in the doc comment of InstrumentHandler. You might want to consider using promhttp.Handler instead. (SA1019) pkg/apis/scheduling/v1alpha1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000) pkg/apis/scheduling/v1beta1/defaults.go:27:6: func addDefaultingFuncs is unused (U1000) test/e2e/scheduling/predicates.go:757:6: func verifyReplicasResult is unused (U1000) test/e2e/scheduling/predicates.go:765:6: func getPodsByLabels is unused (U1000) test/e2e/scheduling/predicates.go:772:6: func runAndKeepPodWithLabelAndGetNodeName is unused (U1000) test/e2e/scheduling/limit_range.go:172:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:177:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:196:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:201:3: this value of pod is never used (SA4006) test/e2e/scheduling/limit_range.go:240:3: this value of pod is never used (SA4006) test/e2e/scheduling/taints.go:428:13: this value of err is never used (SA4006) test/e2e/scheduling/ubernetes_lite.go:219:2: this value of pods is never used (SA4006) test/integration/scheduler/extender_test.go:78:4: this value of resp is never used (SA4006) test/integration/volumescheduling/volume_binding_test.go:529:15: this result of append is never used, except maybe in other appends (SA4010) test/integration/volumescheduling/volume_binding_test.go:538:15: this result of append is never used, except maybe in other appends (SA4010)
This commit is contained in:
@@ -293,6 +293,7 @@ func buildHandlerChain(handler http.Handler, authn authenticator.Request, authz
|
||||
|
||||
func installMetricHandler(pathRecorderMux *mux.PathRecorderMux) {
|
||||
configz.InstallHandler(pathRecorderMux)
|
||||
//lint:ignore SA1019 See the Metrics Stability Migration KEP
|
||||
defaultMetricsHandler := legacyregistry.Handler().ServeHTTP
|
||||
pathRecorderMux.HandleFunc("/metrics", func(w http.ResponseWriter, req *http.Request) {
|
||||
if req.Method == "DELETE" {
|
||||
|
Reference in New Issue
Block a user