@@ -292,6 +292,25 @@ func testEtcd3StoragePath(t g.GinkgoTInterface, oc *exutil.CLI, etcdClient3Fn fu
292292 // Added etcd data.
293293 // TODO: When rebase has started, add etcd storage data has been added to
294294 // k8s.io/kubernetes/test/integration/etcd/data.go in the 1.35 release.
295+ gvr ("certificates.k8s.io" , "v1beta1" , "podcertificaterequests" ): {
296+ Stub : `{"metadata": {"name": "req-1"}, "spec": {"signerName":"example.com/signer", "podName":"pod-1", "podUID":"pod-uid-1", "serviceAccountName":"sa-1", "serviceAccountUID":"sa-uid-1", "nodeName":"node-1", "nodeUID":"node-uid-1", "maxExpirationSeconds":86400, "pkixPublicKey":"MCowBQYDK2VwAyEA5g+rk9q/hjojtc2nwHJ660RdX5w1f4AK0/kP391QyLY=", "proofOfPossession":"SuGHX7SMyPHuN5cD5wjKLXGNbhdlCYUnTH65JkTx17iWlLynQ/g9GiTYObftSHNzqRh0ofdgAGqK6a379O7RBw=="}, "userConfig": {"test/foo":"bar"}}` ,
297+ ExpectedEtcdPath : "/registry/podcertificaterequests/" + oc .Namespace () + "/req-1" ,
298+ ExpectedGVK : gvkP ("certificates.k8s.io" , "v1beta1" , "PodCertificateRequest" ),
299+ IntroducedVersion : "1.35" ,
300+ RemovedVersion : "1.39" ,
301+ },
302+ gvr ("storagemigration.k8s.io" , "v1beta1" , "storageversionmigrations" ): {
303+ Stub : `{"metadata": {"name": "test-migration"}, "spec":{"resource": {"group": "test-group", "resource": "test-resource"}}}` ,
304+ ExpectedEtcdPath : "/registry/storageversionmigrations/test-migration" ,
305+ IntroducedVersion : "1.35" ,
306+ RemovedVersion : "1.41" ,
307+ },
308+ gvr ("scheduling.k8s.io" , "v1alpha1" , "workloads" ): {
309+ Stub : `{"metadata": {"name": "w1"}, "spec": {"podGroups": [{"name": "group1", "policy": {"basic": {}}}]}}` ,
310+ ExpectedEtcdPath : "/registry/workloads/" + oc .Namespace () + "/w1" ,
311+ IntroducedVersion : "1.35" ,
312+ RemovedVersion : "1.41" ,
313+ },
295314 } {
296315 if _ , preexisting := etcdStorageData [k ]; preexisting {
297316 t .Errorf ("upstream etcd storage data already has data for %v. Update current and rebase version diff to next rebase version" , k )
@@ -302,11 +321,128 @@ func testEtcd3StoragePath(t g.GinkgoTInterface, oc *exutil.CLI, etcdClient3Fn fu
302321 // Modified etcd data.
303322 // TODO: When rebase has started, fixup etcd storage data that has been modified
304323 // in k8s.io/kubernetes/test/integration/etcd/data.go in the 1.35 release.
324+ etcdStorageData [gvr ("certificates.k8s.io" , "v1alpha1" , "podcertificaterequests" )] = etcddata.StorageData {
325+ ExpectedEtcdPath : "/registry/podcertificaterequests/" + oc .Namespace () + "/req-1" ,
326+ ExpectedGVK : gvkP ("certificates.k8s.io" , "v1alpha1" , "PodCertificateRequest" ),
327+ IntroducedVersion : "1.34" ,
328+ RemovedVersion : "1.35" ,
329+ }
330+ etcdStorageData [gvr ("admissionregistration.k8s.io" , "v1beta1" , "mutatingadmissionpolicies" )] = etcddata.StorageData {
331+ Stub : `{"metadata":{"name":"map1b1"},"spec":{"paramKind":{"apiVersion":"test.example.com/v1","kind":"Example"},"matchConstraints":{"resourceRules": [{"resourceNames": ["fakeName"], "apiGroups":["apps"],"apiVersions":["v1"],"operations":["CREATE", "UPDATE"], "resources":["deployments"]}]},"reinvocationPolicy": "IfNeeded","mutations":[{"applyConfiguration": {"expression":"Object{metadata: Object.metadata{labels: {'example':'true'}}}"}, "patchType":"ApplyConfiguration"}]}}` ,
332+ ExpectedEtcdPath : "/registry/mutatingadmissionpolicies/map1b1" ,
333+ IntroducedVersion : "1.34" ,
334+ RemovedVersion : "1.40" ,
335+ }
336+ etcdStorageData [gvr ("admissionregistration.k8s.io" , "v1beta1" , "mutatingadmissionpolicybindings" )] = etcddata.StorageData {
337+ Stub : `{"metadata":{"name":"mpb1b1"},"spec":{"policyName":"replicalimit-policy.example.com","paramRef":{"name":"replica-limit-test.example.com", "parameterNotFoundAction": "Allow"}}}` ,
338+ ExpectedEtcdPath : "/registry/mutatingadmissionpolicybindings/mpb1b1" ,
339+ IntroducedVersion : "1.34" ,
340+ RemovedVersion : "1.40" ,
341+ }
342+ etcdStorageData [gvr ("admissionregistration.k8s.io" , "v1alpha1" , "mutatingadmissionpolicies" )] = etcddata.StorageData {
343+ Stub : `{"metadata":{"name":"map1"},"spec":{"paramKind":{"apiVersion":"test.example.com/v1","kind":"Example"},"matchConstraints":{"resourceRules": [{"resourceNames": ["fakeName"], "apiGroups":["apps"],"apiVersions":["v1"],"operations":["CREATE", "UPDATE"], "resources":["deployments"]}]},"reinvocationPolicy": "IfNeeded","mutations":[{"applyConfiguration": {"expression":"Object{metadata: Object.metadata{labels: {'example':'true'}}}"}, "patchType":"ApplyConfiguration"}]}}` ,
344+ ExpectedEtcdPath : "/registry/mutatingadmissionpolicies/map1" ,
345+ ExpectedGVK : gvkP ("admissionregistration.k8s.io" , "v1beta1" , "MutatingAdmissionPolicy" ),
346+ IntroducedVersion : "1.32" ,
347+ RemovedVersion : "1.38" ,
348+ }
349+ etcdStorageData [gvr ("admissionregistration.k8s.io" , "v1alpha1" , "mutatingadmissionpolicybindings" )] = etcddata.StorageData {
350+ Stub : `{"metadata":{"name":"mpb1"},"spec":{"policyName":"replicalimit-policy.example.com","paramRef":{"name":"replica-limit-test.example.com", "parameterNotFoundAction": "Allow"}}}` ,
351+ ExpectedEtcdPath : "/registry/mutatingadmissionpolicybindings/mpb1" ,
352+ ExpectedGVK : gvkP ("admissionregistration.k8s.io" , "v1beta1" , "MutatingAdmissionPolicyBinding" ),
353+ IntroducedVersion : "1.32" ,
354+ RemovedVersion : "1.38" ,
355+ }
356+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta1" , "deviceclasses" )] = etcddata.StorageData {
357+ Stub : `{"metadata": {"name": "class2name"}}` ,
358+ ExpectedEtcdPath : "/registry/deviceclasses/class2name" ,
359+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "DeviceClass" ),
360+ IntroducedVersion : "1.32" ,
361+ RemovedVersion : "1.38" ,
362+ }
363+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta1" , "resourceclaims" )] = etcddata.StorageData {
364+ Stub : `{"metadata": {"name": "claim2name"}, "spec": {"devices": {"requests": [{"name": "req-0", "deviceClassName": "example-class", "allocationMode": "ExactCount", "count": 1}]}}}` ,
365+ ExpectedEtcdPath : "/registry/resourceclaims/" + oc .Namespace () + "/claim2name" ,
366+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceClaim" ),
367+ IntroducedVersion : "1.32" ,
368+ RemovedVersion : "1.38" ,
369+ }
370+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta1" , "resourceclaimtemplates" )] = etcddata.StorageData {
371+ Stub : `{"metadata": {"name": "claimtemplate2name"}, "spec": {"spec": {"devices": {"requests": [{"name": "req-0", "deviceClassName": "example-class", "allocationMode": "ExactCount", "count": 1}]}}}}` ,
372+ ExpectedEtcdPath : "/registry/resourceclaimtemplates/" + oc .Namespace () + "/claimtemplate2name" ,
373+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceClaimTemplate" ),
374+ IntroducedVersion : "1.32" ,
375+ RemovedVersion : "1.38" ,
376+ }
377+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta1" , "resourceslices" )] = etcddata.StorageData {
378+ Stub : `{"metadata": {"name": "node2slice"}, "spec": {"nodeName": "worker1", "driver": "dra.example.com", "pool": {"name": "worker1", "resourceSliceCount": 1}}}` ,
379+ ExpectedEtcdPath : "/registry/resourceslices/node2slice" ,
380+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceSlice" ),
381+ IntroducedVersion : "1.32" ,
382+ RemovedVersion : "1.38" ,
383+ }
384+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta2" , "deviceclasses" )] = etcddata.StorageData {
385+ Stub : `{"metadata": {"name": "class3name"}}` ,
386+ ExpectedEtcdPath : "/registry/deviceclasses/class3name" ,
387+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "DeviceClass" ),
388+ IntroducedVersion : "1.33" ,
389+ RemovedVersion : "1.39" ,
390+ }
391+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta2" , "resourceclaims" )] = etcddata.StorageData {
392+ Stub : `{"metadata": {"name": "claim3name"}, "spec": {"devices": {"requests": [{"name": "req-0", "exactly": {"deviceClassName": "example-class", "allocationMode": "ExactCount", "count": 1}}]}}}` ,
393+ ExpectedEtcdPath : "/registry/resourceclaims/" + oc .Namespace () + "/claim3name" ,
394+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceClaim" ),
395+ IntroducedVersion : "1.33" ,
396+ RemovedVersion : "1.39" ,
397+ }
398+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta2" , "resourceclaimtemplates" )] = etcddata.StorageData {
399+ Stub : `{"metadata": {"name": "claimtemplate3name"}, "spec": {"spec": {"devices": {"requests": [{"name": "req-0", "exactly": {"deviceClassName": "example-class", "allocationMode": "ExactCount", "count": 1}}]}}}}` ,
400+ ExpectedEtcdPath : "/registry/resourceclaimtemplates/" + oc .Namespace () + "/claimtemplate3name" ,
401+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceClaimTemplate" ),
402+ IntroducedVersion : "1.33" ,
403+ RemovedVersion : "1.39" ,
404+ }
405+ etcdStorageData [gvr ("resource.k8s.io" , "v1beta2" , "resourceslices" )] = etcddata.StorageData {
406+ Stub : `{"metadata": {"name": "node3slice"}, "spec": {"nodeName": "worker1", "driver": "dra.example.com", "pool": {"name": "worker1", "resourceSliceCount": 1}}}` ,
407+ ExpectedEtcdPath : "/registry/resourceslices/node3slice" ,
408+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceSlice" ),
409+ IntroducedVersion : "1.33" ,
410+ RemovedVersion : "1.39" ,
411+ }
412+ etcdStorageData [gvr ("resource.k8s.io" , "v1" , "deviceclasses" )] = etcddata.StorageData {
413+ Stub : `{"metadata": {"name": "class4name"}}` ,
414+ ExpectedEtcdPath : "/registry/deviceclasses/class4name" ,
415+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "DeviceClass" ),
416+ IntroducedVersion : "1.34" ,
417+ }
418+ etcdStorageData [gvr ("resource.k8s.io" , "v1" , "resourceclaims" )] = etcddata.StorageData {
419+ Stub : `{"metadata": {"name": "claim4name"}, "spec": {"devices": {"requests": [{"name": "req-0", "exactly": {"deviceClassName": "example-class", "allocationMode": "ExactCount", "count": 1}}]}}}` ,
420+ ExpectedEtcdPath : "/registry/resourceclaims/" + oc .Namespace () + "/claim4name" ,
421+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceClaim" ),
422+ IntroducedVersion : "1.34" ,
423+ }
424+ etcdStorageData [gvr ("resource.k8s.io" , "v1" , "resourceclaimtemplates" )] = etcddata.StorageData {
425+ Stub : `{"metadata": {"name": "claimtemplate4name"}, "spec": {"spec": {"devices": {"requests": [{"name": "req-0", "exactly": {"deviceClassName": "example-class", "allocationMode": "ExactCount", "count": 1}}]}}}}` ,
426+ ExpectedEtcdPath : "/registry/resourceclaimtemplates/" + oc .Namespace () + "/claimtemplate4name" ,
427+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceClaimTemplate" ),
428+ IntroducedVersion : "1.34" ,
429+ }
430+ etcdStorageData [gvr ("resource.k8s.io" , "v1" , "resourceslices" )] = etcddata.StorageData {
431+ Stub : `{"metadata": {"name": "node4slice"}, "spec": {"nodeName": "worker1", "driver": "dra.example.com", "pool": {"name": "worker1", "resourceSliceCount": 1}}}` ,
432+ ExpectedEtcdPath : "/registry/resourceslices/node4slice" ,
433+ ExpectedGVK : gvkP ("resource.k8s.io" , "v1" , "ResourceSlice" ),
434+ IntroducedVersion : "1.34" ,
435+ }
305436
306437 // Removed etcd data.
307438 // TODO: When rebase has started, remove etcd storage data that has been removed
308439 // from k8s.io/kubernetes/test/integration/etcd/data.go in the 1.35 release.
309- removeStorageData (t , etcdStorageData )
440+ removeStorageData (t , etcdStorageData ,
441+ gvr ("storagemigration.k8s.io" , "v1alpha1" , "storageversionmigrations" ),
442+ // gvr("flowcontrol.apiserver.k8s.io", "v1beta3", "flowschemas"), // This was removed from 1.34->1.35, but throws "attempt to remove unknown resource" if we try to remove it here...
443+ gvr ("flowcontrol.apiserver.k8s.io" , "v1beta3" , "prioritylevelconfigurations" ),
444+ gvr ("storage.k8s.io" , "v1alpha1" , "volumeattributesclasses" ),
445+ )
310446 }
311447
312448 // we use a different default path prefix for kube resources
0 commit comments