mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Merge pull request #114358 from SataQiu/using-v2-20221208
Autoscaling: advance v2 as the preferred API version over v1
This commit is contained in:
commit
074f3f5aca
@ -40,6 +40,5 @@ func Install(scheme *runtime.Scheme) {
|
||||
utilruntime.Must(v2.AddToScheme(scheme))
|
||||
utilruntime.Must(v2beta1.AddToScheme(scheme))
|
||||
utilruntime.Must(v1.AddToScheme(scheme))
|
||||
// TODO: move v2 to the front of the list in 1.24
|
||||
utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v2.SchemeGroupVersion, v2beta1.SchemeGroupVersion, v2beta2.SchemeGroupVersion))
|
||||
utilruntime.Must(scheme.SetVersionPriority(v2.SchemeGroupVersion, v1.SchemeGroupVersion, v2beta1.SchemeGroupVersion, v2beta2.SchemeGroupVersion))
|
||||
}
|
||||
|
@ -51,8 +51,8 @@ var GVRToStorageVersionHash = map[string]string{
|
||||
"v1/secrets": "S6u1pOWzb84=",
|
||||
"v1/serviceaccounts": "pbx9ZvyFpBE=",
|
||||
"v1/services": "0/CO1lhkEBI=",
|
||||
"autoscaling/v1/horizontalpodautoscalers": "oQlkt7f5j/A=",
|
||||
"autoscaling/v2/horizontalpodautoscalers": "oQlkt7f5j/A=",
|
||||
"autoscaling/v1/horizontalpodautoscalers": "qwQve8ut294=",
|
||||
"autoscaling/v2/horizontalpodautoscalers": "qwQve8ut294=",
|
||||
"batch/v1/jobs": "mudhfqk/qZY=",
|
||||
"batch/v1/cronjobs": "sd5LIXh4Fjs=",
|
||||
"certificates.k8s.io/v1/certificatesigningrequests": "95fRKMXA+00=",
|
||||
|
@ -128,6 +128,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("autoscaling", "v1", "horizontalpodautoscalers"): {
|
||||
Stub: `{"metadata": {"name": "hpa2"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`,
|
||||
ExpectedEtcdPath: "/registry/horizontalpodautoscalers/" + namespace + "/hpa2",
|
||||
ExpectedGVK: gvkP("autoscaling", "v2", "HorizontalPodAutoscaler"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -135,7 +136,6 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("autoscaling", "v2", "horizontalpodautoscalers"): {
|
||||
Stub: `{"metadata": {"name": "hpa4"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`,
|
||||
ExpectedEtcdPath: "/registry/horizontalpodautoscalers/" + namespace + "/hpa4",
|
||||
ExpectedGVK: gvkP("autoscaling", "v1", "HorizontalPodAutoscaler"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -143,7 +143,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("autoscaling", "v2beta1", "horizontalpodautoscalers"): {
|
||||
Stub: `{"metadata": {"name": "hpa1"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`,
|
||||
ExpectedEtcdPath: "/registry/horizontalpodautoscalers/" + namespace + "/hpa1",
|
||||
ExpectedGVK: gvkP("autoscaling", "v1", "HorizontalPodAutoscaler"),
|
||||
ExpectedGVK: gvkP("autoscaling", "v2", "HorizontalPodAutoscaler"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -151,7 +151,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("autoscaling", "v2beta2", "horizontalpodautoscalers"): {
|
||||
Stub: `{"metadata": {"name": "hpa3"}, "spec": {"maxReplicas": 3, "scaleTargetRef": {"kind": "something", "name": "cross"}}}`,
|
||||
ExpectedEtcdPath: "/registry/horizontalpodautoscalers/" + namespace + "/hpa3",
|
||||
ExpectedGVK: gvkP("autoscaling", "v1", "HorizontalPodAutoscaler"),
|
||||
ExpectedGVK: gvkP("autoscaling", "v2", "HorizontalPodAutoscaler"),
|
||||
},
|
||||
// --
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user