mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #115193 from SataQiu/update-storage-api-20230119
apiserver: update serialization version priority for policy API
This commit is contained in:
		@@ -36,6 +36,5 @@ func Install(scheme *runtime.Scheme) {
 | 
				
			|||||||
	utilruntime.Must(policy.AddToScheme(scheme))
 | 
						utilruntime.Must(policy.AddToScheme(scheme))
 | 
				
			||||||
	utilruntime.Must(v1beta1.AddToScheme(scheme))
 | 
						utilruntime.Must(v1beta1.AddToScheme(scheme))
 | 
				
			||||||
	utilruntime.Must(v1.AddToScheme(scheme))
 | 
						utilruntime.Must(v1.AddToScheme(scheme))
 | 
				
			||||||
	// TODO (mortent): priority should change after 1.21. See https://github.com/kubernetes/kubernetes/pull/95718#discussion_r520969477
 | 
						utilruntime.Must(scheme.SetVersionPriority(v1.SchemeGroupVersion, v1beta1.SchemeGroupVersion))
 | 
				
			||||||
	utilruntime.Must(scheme.SetVersionPriority(v1beta1.SchemeGroupVersion, v1.SchemeGroupVersion))
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -62,7 +62,7 @@ var GVRToStorageVersionHash = map[string]string{
 | 
				
			|||||||
	"networking.k8s.io/v1/ingresses":                                   "39NQlfNR+bo=",
 | 
						"networking.k8s.io/v1/ingresses":                                   "39NQlfNR+bo=",
 | 
				
			||||||
	"networking.k8s.io/v1/ingressclasses":                              "l/iqIbDgFyQ=",
 | 
						"networking.k8s.io/v1/ingressclasses":                              "l/iqIbDgFyQ=",
 | 
				
			||||||
	"node.k8s.io/v1/runtimeclasses":                                    "WQTu1GL3T2Q=",
 | 
						"node.k8s.io/v1/runtimeclasses":                                    "WQTu1GL3T2Q=",
 | 
				
			||||||
	"policy/v1/poddisruptionbudgets":                                   "6BGBu0kpHtk=",
 | 
						"policy/v1/poddisruptionbudgets":                                   "EVWiDmWqyJw=",
 | 
				
			||||||
	"rbac.authorization.k8s.io/v1/clusterrolebindings":                 "48tpQ8gZHFc=",
 | 
						"rbac.authorization.k8s.io/v1/clusterrolebindings":                 "48tpQ8gZHFc=",
 | 
				
			||||||
	"rbac.authorization.k8s.io/v1/clusterroles":                        "bYE5ZWDrJ44=",
 | 
						"rbac.authorization.k8s.io/v1/clusterroles":                        "bYE5ZWDrJ44=",
 | 
				
			||||||
	"rbac.authorization.k8s.io/v1/rolebindings":                        "eGsCzGH6b1g=",
 | 
						"rbac.authorization.k8s.io/v1/rolebindings":                        "eGsCzGH6b1g=",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -245,7 +245,6 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
 | 
				
			|||||||
		gvr("policy", "v1", "poddisruptionbudgets"): {
 | 
							gvr("policy", "v1", "poddisruptionbudgets"): {
 | 
				
			||||||
			Stub:             `{"metadata": {"name": "pdbv1"}, "spec": {"selector": {"matchLabels": {"anokkey": "anokvalue"}}}}`,
 | 
								Stub:             `{"metadata": {"name": "pdbv1"}, "spec": {"selector": {"matchLabels": {"anokkey": "anokvalue"}}}}`,
 | 
				
			||||||
			ExpectedEtcdPath: "/registry/poddisruptionbudgets/" + namespace + "/pdbv1",
 | 
								ExpectedEtcdPath: "/registry/poddisruptionbudgets/" + namespace + "/pdbv1",
 | 
				
			||||||
			ExpectedGVK:      gvkP("policy", "v1beta1", "PodDisruptionBudget"),
 | 
					 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		// --
 | 
							// --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -253,6 +252,7 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes
 | 
				
			|||||||
		gvr("policy", "v1beta1", "poddisruptionbudgets"): {
 | 
							gvr("policy", "v1beta1", "poddisruptionbudgets"): {
 | 
				
			||||||
			Stub:             `{"metadata": {"name": "pdb1"}, "spec": {"selector": {"matchLabels": {"anokkey": "anokvalue"}}}}`,
 | 
								Stub:             `{"metadata": {"name": "pdb1"}, "spec": {"selector": {"matchLabels": {"anokkey": "anokvalue"}}}}`,
 | 
				
			||||||
			ExpectedEtcdPath: "/registry/poddisruptionbudgets/" + namespace + "/pdb1",
 | 
								ExpectedEtcdPath: "/registry/poddisruptionbudgets/" + namespace + "/pdb1",
 | 
				
			||||||
 | 
								ExpectedGVK:      gvkP("policy", "v1", "PodDisruptionBudget"),
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		// --
 | 
							// --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user