mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #114492 from SataQiu/update-prefered-storageversion-20221215
apiserver: update serialization version priority for flowcontrol API
This commit is contained in:
commit
e51fe4a61c
@ -40,9 +40,6 @@ func Install(scheme *runtime.Scheme) {
|
||||
utilruntime.Must(flowcontrolv1beta1.AddToScheme(scheme))
|
||||
utilruntime.Must(flowcontrolv1beta2.AddToScheme(scheme))
|
||||
utilruntime.Must(flowcontrolv1beta3.AddToScheme(scheme))
|
||||
// TODO(#112512): This controls serialization order, for 1.26, we can
|
||||
// set the serialization version to v1beta2 because vN-1 understands that
|
||||
// level. In 1.27, we should set the serialization version to v1beta3.
|
||||
utilruntime.Must(scheme.SetVersionPriority(flowcontrolv1beta2.SchemeGroupVersion, flowcontrolv1beta3.SchemeGroupVersion,
|
||||
utilruntime.Must(scheme.SetVersionPriority(flowcontrolv1beta3.SchemeGroupVersion, flowcontrolv1beta2.SchemeGroupVersion,
|
||||
flowcontrolv1beta1.SchemeGroupVersion, flowcontrolv1alpha1.SchemeGroupVersion))
|
||||
}
|
||||
|
@ -82,8 +82,8 @@ var GVRToStorageVersionHash = map[string]string{
|
||||
"admissionregistration.k8s.io/v1/mutatingwebhookconfigurations": "Sqi0GUgDaX0=",
|
||||
"admissionregistration.k8s.io/v1/validatingwebhookconfigurations": "B0wHjQmsGNk=",
|
||||
"events.k8s.io/v1/events": "r2yiGXH7wu8=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3/flowschemas": "G+8IkrqFuJw=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations": "wltM4WMeeXs=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/flowschemas": "G+8IkrqFuJw=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations": "wltM4WMeeXs=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3/flowschemas": "9NnFrw7ZEmA=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta3/prioritylevelconfigurations": "+CwSrEWTDhc=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/flowschemas": "9NnFrw7ZEmA=",
|
||||
"flowcontrol.apiserver.k8s.io/v1beta2/prioritylevelconfigurations": "+CwSrEWTDhc=",
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1alpha1", "flowschemas"): {
|
||||
Stub: `{"metadata": {"name": "va1"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
|
||||
ExpectedEtcdPath: "/registry/flowschemas/va1",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "FlowSchema"),
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -276,7 +276,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1alpha1", "prioritylevelconfigurations"): {
|
||||
Stub: `{"metadata": {"name": "conf1"}, "spec": {"type": "Limited", "limited": {"assuredConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
|
||||
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf1",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "PriorityLevelConfiguration"),
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -284,7 +284,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta1", "flowschemas"): {
|
||||
Stub: `{"metadata": {"name": "va2"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
|
||||
ExpectedEtcdPath: "/registry/flowschemas/va2",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "FlowSchema"),
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -292,7 +292,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta1", "prioritylevelconfigurations"): {
|
||||
Stub: `{"metadata": {"name": "conf2"}, "spec": {"type": "Limited", "limited": {"assuredConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
|
||||
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf2",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "PriorityLevelConfiguration"),
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -300,6 +300,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta2", "flowschemas"): {
|
||||
Stub: `{"metadata": {"name": "fs-1"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
|
||||
ExpectedEtcdPath: "/registry/flowschemas/fs-1",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -307,6 +308,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta2", "prioritylevelconfigurations"): {
|
||||
Stub: `{"metadata": {"name": "conf3"}, "spec": {"type": "Limited", "limited": {"assuredConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
|
||||
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf3",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta3", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -314,7 +316,6 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "flowschemas"): {
|
||||
Stub: `{"metadata": {"name": "fs-2"}, "spec": {"priorityLevelConfiguration": {"name": "name1"}}}`,
|
||||
ExpectedEtcdPath: "/registry/flowschemas/fs-2",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "FlowSchema"),
|
||||
},
|
||||
// --
|
||||
|
||||
@ -322,7 +323,6 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
|
||||
gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "prioritylevelconfigurations"): {
|
||||
Stub: `{"metadata": {"name": "conf4"}, "spec": {"type": "Limited", "limited": {"nominalConcurrencyShares":3, "limitResponse": {"type": "Reject"}}}}`,
|
||||
ExpectedEtcdPath: "/registry/prioritylevelconfigurations/conf4",
|
||||
ExpectedGVK: gvkP("flowcontrol.apiserver.k8s.io", "v1beta2", "PriorityLevelConfiguration"),
|
||||
},
|
||||
// --
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user