Merge pull request #45384 from caesarxuchao/copy-metrics-interanl
Automatic merge from submit-queue (batch tested with PRs 45382, 45384, 44781, 45333, 45543) Copy internal types to metrics Supersedes #45306. #45306 removed the internal types and suggested whoever needs the internal types should define their own copy, and use the code-gen tools to generated the conversion functions. Per offline discussion with @DirectXMan12, we wanted to go that direction but it's not clear where to put the internal types yet. Hence, as a temporary solution, we decided copy the referred client-go/pkg/api types into metrics api to avoid the dependency. The commit "remove need of registry from custom_metrics/client.go" is similar to what I did to the fake client in an earlier PR. Let me know if you want to put the commit in another PR.
This commit is contained in:
@@ -109,8 +109,6 @@ go_library(
|
||||
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
|
||||
"//vendor/k8s.io/client-go/tools/record:go_default_library",
|
||||
"//vendor/k8s.io/client-go/util/cert:go_default_library",
|
||||
"//vendor/k8s.io/metrics/pkg/apis/custom_metrics/install:go_default_library",
|
||||
"//vendor/k8s.io/metrics/pkg/apis/metrics/install:go_default_library",
|
||||
"//vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1:go_default_library",
|
||||
"//vendor/k8s.io/metrics/pkg/client/custom_metrics:go_default_library",
|
||||
],
|
||||
|
||||
@@ -26,10 +26,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/controller/podautoscaler/metrics"
|
||||
resourceclient "k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1"
|
||||
"k8s.io/metrics/pkg/client/custom_metrics"
|
||||
|
||||
// install the APIs so that they're registered with the scheme for the clients
|
||||
_ "k8s.io/metrics/pkg/apis/custom_metrics/install"
|
||||
_ "k8s.io/metrics/pkg/apis/metrics/install"
|
||||
)
|
||||
|
||||
func startHPAController(ctx ControllerContext) (bool, error) {
|
||||
|
||||
Reference in New Issue
Block a user