mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Merge pull request #58320 from hzxuzhonghu/cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. move prometheus register to pkg/endpoints/metrics/metrics.go **What this PR does / why we need it**: delete k8s.io/apiserver/pkg/endpoints/apiserver.go move prometheus init from k8s.io/apiserver/pkg/endpoints/apiserver.go to k8s.io/apiserver/pkg/endpoints/metrics/metrics.go Since k8s.io/apiserver/pkg/endpoints/apiserver.go only has a metrics init func, which should be in metrics pkg. **Release note**: ```release-note NONE ``` /assign @sttts @liggitt
This commit is contained in:
commit
a6710f3b87
@ -60,7 +60,6 @@ go_test(
|
|||||||
go_library(
|
go_library(
|
||||||
name = "go_default_library",
|
name = "go_default_library",
|
||||||
srcs = [
|
srcs = [
|
||||||
"apiserver.go",
|
|
||||||
"doc.go",
|
"doc.go",
|
||||||
"groupversion.go",
|
"groupversion.go",
|
||||||
"installer.go",
|
"installer.go",
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2014 The Kubernetes Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package endpoints
|
|
||||||
|
|
||||||
import (
|
|
||||||
"k8s.io/apiserver/pkg/endpoints/metrics"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
metrics.Register()
|
|
||||||
}
|
|
@ -81,8 +81,8 @@ var (
|
|||||||
kubectlExeRegexp = regexp.MustCompile(`^.*((?i:kubectl\.exe))`)
|
kubectlExeRegexp = regexp.MustCompile(`^.*((?i:kubectl\.exe))`)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Register all metrics.
|
func init() {
|
||||||
func Register() {
|
// Register all metrics.
|
||||||
prometheus.MustRegister(requestCounter)
|
prometheus.MustRegister(requestCounter)
|
||||||
prometheus.MustRegister(longRunningRequestGauge)
|
prometheus.MustRegister(longRunningRequestGauge)
|
||||||
prometheus.MustRegister(requestLatencies)
|
prometheus.MustRegister(requestLatencies)
|
||||||
|
Loading…
Reference in New Issue
Block a user