DRA: bump API v1alpha2 -> v1alpha3

This is in preparation for revamping the resource.k8s.io completely. Because
there will be no support for transitioning from v1alpha2 to v1alpha3, the
roundtrip test data for that API in 1.29 and 1.30 gets removed.

Repeating the version in the import name of the API packages is not really
required. It was done for a while to support simpler grepping for usage of
alpha APIs, but there are better ways for that now. So during this transition,
"resourceapi" gets used instead of "resourcev1alpha3" and the version gets
dropped from informer and lister imports. The advantage is that the next bump
to v1beta1 will affect fewer source code lines.

Only source code where the version really matters (like API registration)
retains the versioned import.
This commit is contained in:
Patrick Ohly 2024-06-14 12:40:48 +02:00
parent 815efa2baa
commit b51d68bb87
269 changed files with 5226 additions and 6934 deletions

View File

@ -52,13 +52,13 @@ API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,CephFS
API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,StorageOS API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,StorageOS
API rule violation: names_match,k8s.io/api/networking/v1alpha1,ServiceCIDRSpec,CIDRs API rule violation: names_match,k8s.io/api/networking/v1alpha1,ServiceCIDRSpec,CIDRs
API rule violation: names_match,k8s.io/api/networking/v1beta1,ServiceCIDRSpec,CIDRs API rule violation: names_match,k8s.io/api/networking/v1beta1,ServiceCIDRSpec,CIDRs
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,BoolValue API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,BoolValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,IntSliceValue API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,IntSliceValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,IntValue API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,IntValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,QuantityValue API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,QuantityValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,StringSliceValue API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,StringSliceValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,StringValue API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,StringValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,VersionValue API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,VersionValue
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Ref API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Ref
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Schema API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Schema
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XEmbeddedResource API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XEmbeddedResource

View File

@ -2062,7 +2062,7 @@
] ]
} }
], ],
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },

View File

@ -2062,7 +2062,7 @@
] ]
} }
], ],
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },

View File

@ -300,13 +300,13 @@
{ {
"name": "resource.k8s.io", "name": "resource.k8s.io",
"preferredVersion": { "preferredVersion": {
"groupVersion": "resource.k8s.io/v1alpha2", "groupVersion": "resource.k8s.io/v1alpha3",
"version": "v1alpha2" "version": "v1alpha3"
}, },
"versions": [ "versions": [
{ {
"groupVersion": "resource.k8s.io/v1alpha2", "groupVersion": "resource.k8s.io/v1alpha3",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },

View File

@ -3,13 +3,13 @@
"kind": "APIGroup", "kind": "APIGroup",
"name": "resource.k8s.io", "name": "resource.k8s.io",
"preferredVersion": { "preferredVersion": {
"groupVersion": "resource.k8s.io/v1alpha2", "groupVersion": "resource.k8s.io/v1alpha3",
"version": "v1alpha2" "version": "v1alpha3"
}, },
"versions": [ "versions": [
{ {
"groupVersion": "resource.k8s.io/v1alpha2", "groupVersion": "resource.k8s.io/v1alpha3",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
} }

View File

@ -1,6 +1,6 @@
{ {
"apiVersion": "v1", "apiVersion": "v1",
"groupVersion": "resource.k8s.io/v1alpha2", "groupVersion": "resource.k8s.io/v1alpha3",
"kind": "APIResourceList", "kind": "APIResourceList",
"resources": [ "resources": [
{ {
@ -8,7 +8,7 @@
"name": "podschedulingcontexts", "name": "podschedulingcontexts",
"namespaced": true, "namespaced": true,
"singularName": "podschedulingcontext", "singularName": "podschedulingcontext",
"storageVersionHash": "qtdNX2rnDEA=", "storageVersionHash": "SkSsa067T7g=",
"verbs": [ "verbs": [
"create", "create",
"delete", "delete",
@ -36,7 +36,7 @@
"name": "resourceclaimparameters", "name": "resourceclaimparameters",
"namespaced": true, "namespaced": true,
"singularName": "resourceclaimparameters", "singularName": "resourceclaimparameters",
"storageVersionHash": "DWM408h+ZHE=", "storageVersionHash": "42WVd9cucrU=",
"verbs": [ "verbs": [
"create", "create",
"delete", "delete",
@ -53,7 +53,7 @@
"name": "resourceclaims", "name": "resourceclaims",
"namespaced": true, "namespaced": true,
"singularName": "resourceclaim", "singularName": "resourceclaim",
"storageVersionHash": "sMQbgChfibk=", "storageVersionHash": "ozQSw6/HyJ4=",
"verbs": [ "verbs": [
"create", "create",
"delete", "delete",
@ -81,7 +81,7 @@
"name": "resourceclaimtemplates", "name": "resourceclaimtemplates",
"namespaced": true, "namespaced": true,
"singularName": "resourceclaimtemplate", "singularName": "resourceclaimtemplate",
"storageVersionHash": "1o2b66bFoGM=", "storageVersionHash": "lbw3G0J+kqQ=",
"verbs": [ "verbs": [
"create", "create",
"delete", "delete",
@ -98,7 +98,7 @@
"name": "resourceclasses", "name": "resourceclasses",
"namespaced": false, "namespaced": false,
"singularName": "resourceclass", "singularName": "resourceclass",
"storageVersionHash": "wkt0Tpte++U=", "storageVersionHash": "gv35DluSP3c=",
"verbs": [ "verbs": [
"create", "create",
"delete", "delete",
@ -115,7 +115,7 @@
"name": "resourceclassparameters", "name": "resourceclassparameters",
"namespaced": true, "namespaced": true,
"singularName": "resourceclassparameters", "singularName": "resourceclassparameters",
"storageVersionHash": "MDq5XoTnXWQ=", "storageVersionHash": "369PrU9Yi/E=",
"verbs": [ "verbs": [
"create", "create",
"delete", "delete",
@ -132,7 +132,7 @@
"name": "resourceslices", "name": "resourceslices",
"namespaced": false, "namespaced": false,
"singularName": "resourceslice", "singularName": "resourceslice",
"storageVersionHash": "IECvOcO76kw=", "storageVersionHash": "8Uqm6frD4H0=",
"verbs": [ "verbs": [
"create", "create",
"delete", "delete",

File diff suppressed because it is too large Load Diff

View File

@ -9012,7 +9012,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -9411,7 +9411,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -9758,7 +9758,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1561,7 +1561,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1955,7 +1955,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -2302,7 +2302,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1073,7 +1073,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1467,7 +1467,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1814,7 +1814,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1075,7 +1075,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1469,7 +1469,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1816,7 +1816,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1284,7 +1284,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1621,7 +1621,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1968,7 +1968,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -417,7 +417,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -754,7 +754,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1101,7 +1101,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -5777,7 +5777,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -6171,7 +6171,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -6518,7 +6518,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -610,7 +610,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -947,7 +947,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1294,7 +1294,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1262,7 +1262,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1656,7 +1656,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -2003,7 +2003,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -4981,7 +4981,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -5375,7 +5375,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -5722,7 +5722,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -646,7 +646,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -983,7 +983,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1330,7 +1330,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -522,7 +522,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -859,7 +859,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1206,7 +1206,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -537,7 +537,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -879,7 +879,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1226,7 +1226,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -700,7 +700,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1037,7 +1037,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1384,7 +1384,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -655,7 +655,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -997,7 +997,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1344,7 +1344,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1146,7 +1146,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1483,7 +1483,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1830,7 +1830,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1147,7 +1147,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1484,7 +1484,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1831,7 +1831,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -636,7 +636,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -973,7 +973,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1320,7 +1320,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1218,7 +1218,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1612,7 +1612,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1959,7 +1959,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -722,7 +722,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1059,7 +1059,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1406,7 +1406,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -595,7 +595,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -932,7 +932,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1279,7 +1279,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -657,7 +657,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1051,7 +1051,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1398,7 +1398,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -930,7 +930,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1324,7 +1324,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1671,7 +1671,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -513,7 +513,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -850,7 +850,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1197,7 +1197,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -2375,7 +2375,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -2769,7 +2769,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -3116,7 +3116,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -508,7 +508,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -845,7 +845,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1192,7 +1192,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -620,7 +620,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -957,7 +957,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha2" "version": "v1alpha3"
} }
] ]
}, },
@ -1304,7 +1304,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha2" "version": "v1alpha3"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -467,9 +467,9 @@ func startResourceClaimController(ctx context.Context, controllerContext Control
klog.FromContext(ctx), klog.FromContext(ctx),
controllerContext.ClientBuilder.ClientOrDie("resource-claim-controller"), controllerContext.ClientBuilder.ClientOrDie("resource-claim-controller"),
controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Pods(),
controllerContext.InformerFactory.Resource().V1alpha2().PodSchedulingContexts(), controllerContext.InformerFactory.Resource().V1alpha3().PodSchedulingContexts(),
controllerContext.InformerFactory.Resource().V1alpha2().ResourceClaims(), controllerContext.InformerFactory.Resource().V1alpha3().ResourceClaims(),
controllerContext.InformerFactory.Resource().V1alpha2().ResourceClaimTemplates()) controllerContext.InformerFactory.Resource().V1alpha3().ResourceClaimTemplates())
if err != nil { if err != nil {
return nil, true, fmt.Errorf("failed to start resource claim controller: %v", err) return nil, true, fmt.Errorf("failed to start resource claim controller: %v", err)
} }

View File

@ -93,7 +93,7 @@ coordination.k8s.io/v1beta1 \
coordination.k8s.io/v1 \ coordination.k8s.io/v1 \
discovery.k8s.io/v1 \ discovery.k8s.io/v1 \
discovery.k8s.io/v1beta1 \ discovery.k8s.io/v1beta1 \
resource.k8s.io/v1alpha2 \ resource.k8s.io/v1alpha3 \
extensions/v1beta1 \ extensions/v1beta1 \
events.k8s.io/v1 \ events.k8s.io/v1 \
events.k8s.io/v1beta1 \ events.k8s.io/v1beta1 \

View File

@ -135,10 +135,10 @@ func TestDefaulting(t *testing.T) {
{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBindingList"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBindingList"}: {},
{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"}: {},
{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBindingList"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBindingList"}: {},
{Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaim"}: {}, {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaim"}: {},
{Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimList"}: {}, {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaimList"}: {},
{Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimTemplate"}: {}, {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaimTemplate"}: {},
{Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimTemplateList"}: {}, {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaimTemplateList"}: {},
{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicy"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicy"}: {},
{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyList"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyList"}: {},
{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyBinding"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyBinding"}: {},

View File

@ -23,7 +23,7 @@ import (
utilruntime "k8s.io/apimachinery/pkg/util/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/apis/resource" "k8s.io/kubernetes/pkg/apis/resource"
"k8s.io/kubernetes/pkg/apis/resource/v1alpha2" "k8s.io/kubernetes/pkg/apis/resource/v1alpha3"
) )
func init() { func init() {
@ -33,6 +33,6 @@ func init() {
// Install registers the API group and adds types to a scheme // Install registers the API group and adds types to a scheme
func Install(scheme *runtime.Scheme) { func Install(scheme *runtime.Scheme) {
utilruntime.Must(resource.AddToScheme(scheme)) utilruntime.Must(resource.AddToScheme(scheme))
utilruntime.Must(v1alpha2.AddToScheme(scheme)) utilruntime.Must(v1alpha3.AddToScheme(scheme))
utilruntime.Must(scheme.SetVersionPriority(v1alpha2.SchemeGroupVersion)) utilruntime.Must(scheme.SetVersionPriority(v1alpha3.SchemeGroupVersion))
} }

View File

@ -51,7 +51,7 @@ func TestResourceVersioner(t *testing.T) {
func TestCodec(t *testing.T) { func TestCodec(t *testing.T) {
claim := internal.ResourceClaim{} claim := internal.ResourceClaim{}
data, err := runtime.Encode(legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: "resource.k8s.io", Version: "v1alpha2"}), &claim) data, err := runtime.Encode(legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: "resource.k8s.io", Version: "v1alpha3"}), &claim)
if err != nil { if err != nil {
t.Fatalf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
} }
@ -59,7 +59,7 @@ func TestCodec(t *testing.T) {
if err := json.Unmarshal(data, &other); err != nil { if err := json.Unmarshal(data, &other); err != nil {
t.Fatalf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
} }
if other.APIVersion != "resource.k8s.io/v1alpha2" || other.Kind != "ResourceClaim" { if other.APIVersion != "resource.k8s.io/v1alpha3" || other.Kind != "ResourceClaim" {
t.Errorf("unexpected unmarshalled object %#v", other) t.Errorf("unexpected unmarshalled object %#v", other)
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2 package v1alpha3
import ( import (
"fmt" "fmt"

View File

@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2 package v1alpha3
import ( import (
"k8s.io/api/resource/v1alpha2" "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
) )
@ -25,8 +25,8 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
return RegisterDefaults(scheme) return RegisterDefaults(scheme)
} }
func SetDefaults_ResourceClaimSpec(obj *v1alpha2.ResourceClaimSpec) { func SetDefaults_ResourceClaimSpec(obj *v1alpha3.ResourceClaimSpec) {
if obj.AllocationMode == "" { if obj.AllocationMode == "" {
obj.AllocationMode = v1alpha2.AllocationModeWaitForFirstConsumer obj.AllocationMode = v1alpha3.AllocationModeWaitForFirstConsumer
} }
} }

View File

@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2_test package v1alpha3_test
import ( import (
"reflect" "reflect"
"testing" "testing"
v1alpha2 "k8s.io/api/resource/v1alpha2" v1alpha3 "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
// ensure types are installed // ensure types are installed
@ -29,32 +29,32 @@ import (
) )
func TestSetDefaultAllocationMode(t *testing.T) { func TestSetDefaultAllocationMode(t *testing.T) {
claim := &v1alpha2.ResourceClaim{} claim := &v1alpha3.ResourceClaim{}
// field should be defaulted // field should be defaulted
defaultMode := v1alpha2.AllocationModeWaitForFirstConsumer defaultMode := v1alpha3.AllocationModeWaitForFirstConsumer
output := roundTrip(t, runtime.Object(claim)).(*v1alpha2.ResourceClaim) output := roundTrip(t, runtime.Object(claim)).(*v1alpha3.ResourceClaim)
outMode := output.Spec.AllocationMode outMode := output.Spec.AllocationMode
if outMode != defaultMode { if outMode != defaultMode {
t.Errorf("Expected AllocationMode to be defaulted to: %+v, got: %+v", defaultMode, outMode) t.Errorf("Expected AllocationMode to be defaulted to: %+v, got: %+v", defaultMode, outMode)
} }
// field should not change // field should not change
nonDefaultMode := v1alpha2.AllocationModeImmediate nonDefaultMode := v1alpha3.AllocationModeImmediate
claim = &v1alpha2.ResourceClaim{ claim = &v1alpha3.ResourceClaim{
Spec: v1alpha2.ResourceClaimSpec{ Spec: v1alpha3.ResourceClaimSpec{
AllocationMode: nonDefaultMode, AllocationMode: nonDefaultMode,
}, },
} }
output = roundTrip(t, runtime.Object(claim)).(*v1alpha2.ResourceClaim) output = roundTrip(t, runtime.Object(claim)).(*v1alpha3.ResourceClaim)
outMode = output.Spec.AllocationMode outMode = output.Spec.AllocationMode
if outMode != v1alpha2.AllocationModeImmediate { if outMode != v1alpha3.AllocationModeImmediate {
t.Errorf("Expected AllocationMode to remain %+v, got: %+v", nonDefaultMode, outMode) t.Errorf("Expected AllocationMode to remain %+v, got: %+v", nonDefaultMode, outMode)
} }
} }
func roundTrip(t *testing.T, obj runtime.Object) runtime.Object { func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
codec := legacyscheme.Codecs.LegacyCodec(v1alpha2.SchemeGroupVersion) codec := legacyscheme.Codecs.LegacyCodec(v1alpha3.SchemeGroupVersion)
data, err := runtime.Encode(codec, obj) data, err := runtime.Encode(codec, obj)
if err != nil { if err != nil {
t.Errorf("%v\n %#v", err, obj) t.Errorf("%v\n %#v", err, obj)

View File

@ -15,9 +15,9 @@ limitations under the License.
*/ */
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/resource // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/resource
// +k8s:conversion-gen-external-types=k8s.io/api/resource/v1alpha2 // +k8s:conversion-gen-external-types=k8s.io/api/resource/v1alpha3
// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=k8s.io/api/resource/v1alpha2 // +k8s:defaulter-gen-input=k8s.io/api/resource/v1alpha3
// Package v1alpha2 is the v1alpha2 version of the resource API. // Package v1alpha3 is the v1alpha3 version of the resource API.
package v1alpha2 // import "k8s.io/kubernetes/pkg/apis/resource/v1alpha2" package v1alpha3 // import "k8s.io/kubernetes/pkg/apis/resource/v1alpha3"

View File

@ -14,15 +14,15 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2 package v1alpha3
import ( import (
"k8s.io/api/resource/v1alpha2" "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
) )
var ( var (
localSchemeBuilder = &v1alpha2.SchemeBuilder localSchemeBuilder = &v1alpha3.SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme AddToScheme = localSchemeBuilder.AddToScheme
) )
@ -38,7 +38,7 @@ func init() {
const GroupName = "resource.k8s.io" const GroupName = "resource.k8s.io"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource // Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource { func Resource(resource string) schema.GroupResource {

File diff suppressed because it is too large Load Diff

View File

@ -19,10 +19,10 @@ limitations under the License.
// Code generated by defaulter-gen. DO NOT EDIT. // Code generated by defaulter-gen. DO NOT EDIT.
package v1alpha2 package v1alpha3
import ( import (
v1alpha2 "k8s.io/api/resource/v1alpha2" v1alpha3 "k8s.io/api/resource/v1alpha3"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
@ -30,31 +30,31 @@ import (
// Public to allow building arbitrary schemes. // Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters. // All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error { func RegisterDefaults(scheme *runtime.Scheme) error {
scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*v1alpha2.ResourceClaim)) }) scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*v1alpha3.ResourceClaim)) })
scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*v1alpha2.ResourceClaimList)) }) scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*v1alpha3.ResourceClaimList)) })
scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimTemplate{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimTemplate(obj.(*v1alpha2.ResourceClaimTemplate)) }) scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaimTemplate{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimTemplate(obj.(*v1alpha3.ResourceClaimTemplate)) })
scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimTemplateList{}, func(obj interface{}) { scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaimTemplateList{}, func(obj interface{}) {
SetObjectDefaults_ResourceClaimTemplateList(obj.(*v1alpha2.ResourceClaimTemplateList)) SetObjectDefaults_ResourceClaimTemplateList(obj.(*v1alpha3.ResourceClaimTemplateList))
}) })
return nil return nil
} }
func SetObjectDefaults_ResourceClaim(in *v1alpha2.ResourceClaim) { func SetObjectDefaults_ResourceClaim(in *v1alpha3.ResourceClaim) {
SetDefaults_ResourceClaimSpec(&in.Spec) SetDefaults_ResourceClaimSpec(&in.Spec)
} }
func SetObjectDefaults_ResourceClaimList(in *v1alpha2.ResourceClaimList) { func SetObjectDefaults_ResourceClaimList(in *v1alpha3.ResourceClaimList) {
for i := range in.Items { for i := range in.Items {
a := &in.Items[i] a := &in.Items[i]
SetObjectDefaults_ResourceClaim(a) SetObjectDefaults_ResourceClaim(a)
} }
} }
func SetObjectDefaults_ResourceClaimTemplate(in *v1alpha2.ResourceClaimTemplate) { func SetObjectDefaults_ResourceClaimTemplate(in *v1alpha3.ResourceClaimTemplate) {
SetDefaults_ResourceClaimSpec(&in.Spec.Spec) SetDefaults_ResourceClaimSpec(&in.Spec.Spec)
} }
func SetObjectDefaults_ResourceClaimTemplateList(in *v1alpha2.ResourceClaimTemplateList) { func SetObjectDefaults_ResourceClaimTemplateList(in *v1alpha3.ResourceClaimTemplateList) {
for i := range in.Items { for i := range in.Items {
a := &in.Items[i] a := &in.Items[i]
SetObjectDefaults_ResourceClaimTemplate(a) SetObjectDefaults_ResourceClaimTemplate(a)

View File

@ -25,7 +25,7 @@ import (
"time" "time"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
@ -33,12 +33,12 @@ import (
"k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/util/wait"
corev1apply "k8s.io/client-go/applyconfigurations/core/v1" corev1apply "k8s.io/client-go/applyconfigurations/core/v1"
v1informers "k8s.io/client-go/informers/core/v1" v1informers "k8s.io/client-go/informers/core/v1"
resourcev1alpha2informers "k8s.io/client-go/informers/resource/v1alpha2" resourceinformers "k8s.io/client-go/informers/resource/v1alpha3"
clientset "k8s.io/client-go/kubernetes" clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/kubernetes/scheme"
v1core "k8s.io/client-go/kubernetes/typed/core/v1" v1core "k8s.io/client-go/kubernetes/typed/core/v1"
v1listers "k8s.io/client-go/listers/core/v1" v1listers "k8s.io/client-go/listers/core/v1"
resourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2" resourcelisters "k8s.io/client-go/listers/resource/v1alpha3"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record" "k8s.io/client-go/tools/record"
"k8s.io/client-go/util/workqueue" "k8s.io/client-go/util/workqueue"
@ -78,7 +78,7 @@ type Controller struct {
// claimLister is the shared ResourceClaim lister used to fetch and store ResourceClaim // claimLister is the shared ResourceClaim lister used to fetch and store ResourceClaim
// objects from the API server. It is shared with other controllers and // objects from the API server. It is shared with other controllers and
// therefore the ResourceClaim objects in its store should be treated as immutable. // therefore the ResourceClaim objects in its store should be treated as immutable.
claimLister resourcev1alpha2listers.ResourceClaimLister claimLister resourcelisters.ResourceClaimLister
claimsSynced cache.InformerSynced claimsSynced cache.InformerSynced
claimCache cache.MutationCache claimCache cache.MutationCache
@ -92,14 +92,14 @@ type Controller struct {
// fetch scheduling objects from the API server. It is shared with other // fetch scheduling objects from the API server. It is shared with other
// controllers and therefore the objects in its store should be treated // controllers and therefore the objects in its store should be treated
// as immutable. // as immutable.
podSchedulingLister resourcev1alpha2listers.PodSchedulingContextLister podSchedulingLister resourcelisters.PodSchedulingContextLister
podSchedulingSynced cache.InformerSynced podSchedulingSynced cache.InformerSynced
// templateLister is the shared ResourceClaimTemplate lister used to // templateLister is the shared ResourceClaimTemplate lister used to
// fetch template objects from the API server. It is shared with other // fetch template objects from the API server. It is shared with other
// controllers and therefore the objects in its store should be treated // controllers and therefore the objects in its store should be treated
// as immutable. // as immutable.
templateLister resourcev1alpha2listers.ResourceClaimTemplateLister templateLister resourcelisters.ResourceClaimTemplateLister
templatesSynced cache.InformerSynced templatesSynced cache.InformerSynced
// podIndexer has the common PodResourceClaim indexer installed To // podIndexer has the common PodResourceClaim indexer installed To
@ -127,9 +127,9 @@ func NewController(
logger klog.Logger, logger klog.Logger,
kubeClient clientset.Interface, kubeClient clientset.Interface,
podInformer v1informers.PodInformer, podInformer v1informers.PodInformer,
podSchedulingInformer resourcev1alpha2informers.PodSchedulingContextInformer, podSchedulingInformer resourceinformers.PodSchedulingContextInformer,
claimInformer resourcev1alpha2informers.ResourceClaimInformer, claimInformer resourceinformers.ResourceClaimInformer,
templateInformer resourcev1alpha2informers.ResourceClaimTemplateInformer) (*Controller, error) { templateInformer resourceinformers.ResourceClaimTemplateInformer) (*Controller, error) {
ec := &Controller{ ec := &Controller{
kubeClient: kubeClient, kubeClient: kubeClient,
@ -329,7 +329,7 @@ func (ec *Controller) podNeedsWork(pod *v1.Pod) (bool, string) {
// - a user created a pod with spec.nodeName set, perhaps for testing // - a user created a pod with spec.nodeName set, perhaps for testing
// - some scheduler was used which is unaware of DRA // - some scheduler was used which is unaware of DRA
// - DRA was not enabled in kube-scheduler (version skew, configuration) // - DRA was not enabled in kube-scheduler (version skew, configuration)
if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer && if claim.Spec.AllocationMode == resourceapi.AllocationModeWaitForFirstConsumer &&
claim.Status.Allocation == nil { claim.Status.Allocation == nil {
scheduling, err := ec.podSchedulingLister.PodSchedulingContexts(pod.Namespace).Get(pod.Name) scheduling, err := ec.podSchedulingLister.PodSchedulingContexts(pod.Namespace).Get(pod.Name)
if apierrors.IsNotFound(err) { if apierrors.IsNotFound(err) {
@ -359,7 +359,7 @@ func (ec *Controller) enqueueResourceClaim(logger klog.Logger, obj interface{},
if d, ok := obj.(cache.DeletedFinalStateUnknown); ok { if d, ok := obj.(cache.DeletedFinalStateUnknown); ok {
obj = d.Obj obj = d.Obj
} }
claim, ok := obj.(*resourcev1alpha2.ResourceClaim) claim, ok := obj.(*resourceapi.ResourceClaim)
if !ok { if !ok {
return return
} }
@ -533,7 +533,7 @@ func (ec *Controller) syncPod(ctx context.Context, namespace, name string) error
return err return err
} }
} }
if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer && if claim.Spec.AllocationMode == resourceapi.AllocationModeWaitForFirstConsumer &&
claim.Status.Allocation == nil { claim.Status.Allocation == nil {
logger.V(5).Info("create PodSchedulingContext because claim needs to be allocated", "resourceClaim", klog.KObj(claim)) logger.V(5).Info("create PodSchedulingContext because claim needs to be allocated", "resourceClaim", klog.KObj(claim))
return ec.ensurePodSchedulingContext(ctx, pod) return ec.ensurePodSchedulingContext(ctx, pod)
@ -633,7 +633,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1.
"-" + "-" +
podClaim.Name[0:len(podClaim.Name)*maxBaseLen/len(generateName)] podClaim.Name[0:len(podClaim.Name)*maxBaseLen/len(generateName)]
} }
claim = &resourcev1alpha2.ResourceClaim{ claim = &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
GenerateName: generateName, GenerateName: generateName,
OwnerReferences: []metav1.OwnerReference{ OwnerReferences: []metav1.OwnerReference{
@ -653,7 +653,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1.
} }
metrics.ResourceClaimCreateAttempts.Inc() metrics.ResourceClaimCreateAttempts.Inc()
claimName := claim.Name claimName := claim.Name
claim, err = ec.kubeClient.ResourceV1alpha2().ResourceClaims(pod.Namespace).Create(ctx, claim, metav1.CreateOptions{}) claim, err = ec.kubeClient.ResourceV1alpha3().ResourceClaims(pod.Namespace).Create(ctx, claim, metav1.CreateOptions{})
if err != nil { if err != nil {
metrics.ResourceClaimCreateFailures.Inc() metrics.ResourceClaimCreateFailures.Inc()
return fmt.Errorf("create ResourceClaim %s: %v", claimName, err) return fmt.Errorf("create ResourceClaim %s: %v", claimName, err)
@ -674,7 +674,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1.
// findPodResourceClaim looks for an existing ResourceClaim with the right // findPodResourceClaim looks for an existing ResourceClaim with the right
// annotation (ties it to the pod claim) and the right ownership (ties it to // annotation (ties it to the pod claim) and the right ownership (ties it to
// the pod). // the pod).
func (ec *Controller) findPodResourceClaim(pod *v1.Pod, podClaim v1.PodResourceClaim) (*resourcev1alpha2.ResourceClaim, error) { func (ec *Controller) findPodResourceClaim(pod *v1.Pod, podClaim v1.PodResourceClaim) (*resourceapi.ResourceClaim, error) {
// Only claims owned by the pod will get returned here. // Only claims owned by the pod will get returned here.
claims, err := ec.claimCache.ByIndex(claimPodOwnerIndex, string(pod.UID)) claims, err := ec.claimCache.ByIndex(claimPodOwnerIndex, string(pod.UID))
if err != nil { if err != nil {
@ -682,7 +682,7 @@ func (ec *Controller) findPodResourceClaim(pod *v1.Pod, podClaim v1.PodResourceC
} }
deterministicName := pod.Name + "-" + podClaim.Name // Kubernetes <= 1.27 behavior. deterministicName := pod.Name + "-" + podClaim.Name // Kubernetes <= 1.27 behavior.
for _, claimObj := range claims { for _, claimObj := range claims {
claim, ok := claimObj.(*resourcev1alpha2.ResourceClaim) claim, ok := claimObj.(*resourceapi.ResourceClaim)
if !ok { if !ok {
return nil, fmt.Errorf("unexpected object of type %T returned by claim cache", claimObj) return nil, fmt.Errorf("unexpected object of type %T returned by claim cache", claimObj)
} }
@ -714,7 +714,7 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po
return fmt.Errorf("retrieve PodSchedulingContext: %v", err) return fmt.Errorf("retrieve PodSchedulingContext: %v", err)
} }
if scheduling == nil { if scheduling == nil {
scheduling = &resourcev1alpha2.PodSchedulingContext{ scheduling = &resourceapi.PodSchedulingContext{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: pod.Name, Name: pod.Name,
Namespace: pod.Namespace, Namespace: pod.Namespace,
@ -728,14 +728,14 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po
}, },
}, },
}, },
Spec: resourcev1alpha2.PodSchedulingContextSpec{ Spec: resourceapi.PodSchedulingContextSpec{
SelectedNode: pod.Spec.NodeName, SelectedNode: pod.Spec.NodeName,
// There is no need for negotiation about // There is no need for negotiation about
// potential and suitable nodes anymore, so // potential and suitable nodes anymore, so
// PotentialNodes can be left empty. // PotentialNodes can be left empty.
}, },
} }
if _, err := ec.kubeClient.ResourceV1alpha2().PodSchedulingContexts(pod.Namespace).Create(ctx, scheduling, metav1.CreateOptions{}); err != nil { if _, err := ec.kubeClient.ResourceV1alpha3().PodSchedulingContexts(pod.Namespace).Create(ctx, scheduling, metav1.CreateOptions{}); err != nil {
return fmt.Errorf("create PodSchedulingContext %s: %w", klog.KObj(scheduling), err) return fmt.Errorf("create PodSchedulingContext %s: %w", klog.KObj(scheduling), err)
} }
return nil return nil
@ -744,7 +744,7 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po
if scheduling.Spec.SelectedNode != pod.Spec.NodeName { if scheduling.Spec.SelectedNode != pod.Spec.NodeName {
scheduling := scheduling.DeepCopy() scheduling := scheduling.DeepCopy()
scheduling.Spec.SelectedNode = pod.Spec.NodeName scheduling.Spec.SelectedNode = pod.Spec.NodeName
if _, err := ec.kubeClient.ResourceV1alpha2().PodSchedulingContexts(pod.Namespace).Update(ctx, scheduling, metav1.UpdateOptions{}); err != nil { if _, err := ec.kubeClient.ResourceV1alpha3().PodSchedulingContexts(pod.Namespace).Update(ctx, scheduling, metav1.UpdateOptions{}); err != nil {
return fmt.Errorf("update spec.selectedNode in PodSchedulingContext %s: %w", klog.KObj(scheduling), err) return fmt.Errorf("update spec.selectedNode in PodSchedulingContext %s: %w", klog.KObj(scheduling), err)
} }
} }
@ -752,15 +752,15 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po
return nil return nil
} }
func (ec *Controller) reserveForPod(ctx context.Context, pod *v1.Pod, claim *resourcev1alpha2.ResourceClaim) error { func (ec *Controller) reserveForPod(ctx context.Context, pod *v1.Pod, claim *resourceapi.ResourceClaim) error {
claim = claim.DeepCopy() claim = claim.DeepCopy()
claim.Status.ReservedFor = append(claim.Status.ReservedFor, claim.Status.ReservedFor = append(claim.Status.ReservedFor,
resourcev1alpha2.ResourceClaimConsumerReference{ resourceapi.ResourceClaimConsumerReference{
Resource: "pods", Resource: "pods",
Name: pod.Name, Name: pod.Name,
UID: pod.UID, UID: pod.UID,
}) })
if _, err := ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}); err != nil { if _, err := ec.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}); err != nil {
return fmt.Errorf("reserve claim %s for pod: %w", klog.KObj(claim), err) return fmt.Errorf("reserve claim %s for pod: %w", klog.KObj(claim), err)
} }
return nil return nil
@ -779,7 +779,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
} }
// Check if the ReservedFor entries are all still valid. // Check if the ReservedFor entries are all still valid.
valid := make([]resourcev1alpha2.ResourceClaimConsumerReference, 0, len(claim.Status.ReservedFor)) valid := make([]resourceapi.ResourceClaimConsumerReference, 0, len(claim.Status.ReservedFor))
for _, reservedFor := range claim.Status.ReservedFor { for _, reservedFor := range claim.Status.ReservedFor {
if reservedFor.APIGroup == "" && if reservedFor.APIGroup == "" &&
reservedFor.Resource == "pods" { reservedFor.Resource == "pods" {
@ -838,7 +838,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
return fmt.Errorf("unsupported ReservedFor entry: %v", reservedFor) return fmt.Errorf("unsupported ReservedFor entry: %v", reservedFor)
} }
builtinControllerFinalizer := slices.Index(claim.Finalizers, resourcev1alpha2.Finalizer) builtinControllerFinalizer := slices.Index(claim.Finalizers, resourceapi.Finalizer)
logger.V(5).Info("claim reserved for counts", "currentCount", len(claim.Status.ReservedFor), "claim", klog.KRef(namespace, name), "updatedCount", len(valid), "builtinController", builtinControllerFinalizer >= 0) logger.V(5).Info("claim reserved for counts", "currentCount", len(claim.Status.ReservedFor), "claim", klog.KRef(namespace, name), "updatedCount", len(valid), "builtinController", builtinControllerFinalizer >= 0)
if len(valid) < len(claim.Status.ReservedFor) { if len(valid) < len(claim.Status.ReservedFor) {
// This is not using a patch because we want the update to fail if anything // This is not using a patch because we want the update to fail if anything
@ -864,13 +864,13 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
// for such claims and not checking for them keeps this code simpler. // for such claims and not checking for them keeps this code simpler.
if len(valid) == 0 { if len(valid) == 0 {
if builtinControllerFinalizer >= 0 { if builtinControllerFinalizer >= 0 {
if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer || if claim.Spec.AllocationMode == resourceapi.AllocationModeWaitForFirstConsumer ||
claim.DeletionTimestamp != nil { claim.DeletionTimestamp != nil {
// Allocated by scheduler with structured parameters. We can "deallocate" // Allocated by scheduler with structured parameters. We can "deallocate"
// by clearing the allocation. // by clearing the allocation.
claim.Status.Allocation = nil claim.Status.Allocation = nil
} }
} else if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer { } else if claim.Spec.AllocationMode == resourceapi.AllocationModeWaitForFirstConsumer {
// DRA driver controller in the control plane // DRA driver controller in the control plane
// needs to do the deallocation. // needs to do the deallocation.
claim.Status.DeallocationRequested = true claim.Status.DeallocationRequested = true
@ -879,17 +879,17 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
// with a control plane controller. // with a control plane controller.
} }
claim, err := ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) claim, err := ec.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{})
if err != nil { if err != nil {
return err return err
} }
// Now also remove the finalizer if it is not needed anymore. // Now also remove the finalizer if it is not needed anymore.
// Note that the index may have changed as a result of the UpdateStatus call. // Note that the index may have changed as a result of the UpdateStatus call.
builtinControllerFinalizer := slices.Index(claim.Finalizers, resourcev1alpha2.Finalizer) builtinControllerFinalizer := slices.Index(claim.Finalizers, resourceapi.Finalizer)
if builtinControllerFinalizer >= 0 && claim.Status.Allocation == nil { if builtinControllerFinalizer >= 0 && claim.Status.Allocation == nil {
claim.Finalizers = slices.Delete(claim.Finalizers, builtinControllerFinalizer, builtinControllerFinalizer+1) claim.Finalizers = slices.Delete(claim.Finalizers, builtinControllerFinalizer, builtinControllerFinalizer+1)
if _, err := ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}); err != nil { if _, err := ec.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}); err != nil {
return err return err
} }
} }
@ -901,14 +901,14 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
// deleted. As above we then need to clear the allocation. // deleted. As above we then need to clear the allocation.
claim.Status.Allocation = nil claim.Status.Allocation = nil
var err error var err error
claim, err = ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) claim, err = ec.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{})
if err != nil { if err != nil {
return err return err
} }
} }
// Whether it was allocated or not, remove the finalizer to unblock removal. // Whether it was allocated or not, remove the finalizer to unblock removal.
claim.Finalizers = slices.Delete(claim.Finalizers, builtinControllerFinalizer, builtinControllerFinalizer+1) claim.Finalizers = slices.Delete(claim.Finalizers, builtinControllerFinalizer, builtinControllerFinalizer+1)
_, err := ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) _, err := ec.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{})
if err != nil { if err != nil {
return err return err
} }
@ -929,7 +929,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
// We are certain that the owning pod is not going to need // We are certain that the owning pod is not going to need
// the claim and therefore remove the claim. // the claim and therefore remove the claim.
logger.V(5).Info("deleting unused generated claim", "claim", klog.KObj(claim), "pod", klog.KObj(pod)) logger.V(5).Info("deleting unused generated claim", "claim", klog.KObj(claim), "pod", klog.KObj(pod))
err := ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).Delete(ctx, claim.Name, metav1.DeleteOptions{}) err := ec.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).Delete(ctx, claim.Name, metav1.DeleteOptions{})
if err != nil { if err != nil {
return fmt.Errorf("delete claim %s: %w", klog.KObj(claim), err) return fmt.Errorf("delete claim %s: %w", klog.KObj(claim), err)
} }
@ -951,7 +951,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
return nil return nil
} }
func owningPod(claim *resourcev1alpha2.ResourceClaim) (string, types.UID) { func owningPod(claim *resourceapi.ResourceClaim) (string, types.UID) {
for _, owner := range claim.OwnerReferences { for _, owner := range claim.OwnerReferences {
if ptr.Deref(owner.Controller, false) && if ptr.Deref(owner.Controller, false) &&
owner.APIVersion == "v1" && owner.APIVersion == "v1" &&
@ -993,7 +993,7 @@ func isPodDone(pod *v1.Pod) bool {
// claimPodOwnerIndexFunc is an index function that returns the pod UIDs of // claimPodOwnerIndexFunc is an index function that returns the pod UIDs of
// all pods which own the resource claim. Should only be one, though. // all pods which own the resource claim. Should only be one, though.
func claimPodOwnerIndexFunc(obj interface{}) ([]string, error) { func claimPodOwnerIndexFunc(obj interface{}) ([]string, error) {
claim, ok := obj.(*resourcev1alpha2.ResourceClaim) claim, ok := obj.(*resourceapi.ResourceClaim)
if !ok { if !ok {
return nil, nil return nil, nil
} }

View File

@ -27,7 +27,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
@ -79,7 +79,7 @@ var (
return pod return pod
}() }()
podSchedulingContext = resourcev1alpha2.PodSchedulingContext{ podSchedulingContext = resourceapi.PodSchedulingContext{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: testPodName, Name: testPodName,
Namespace: testNamespace, Namespace: testNamespace,
@ -93,7 +93,7 @@ var (
}, },
}, },
}, },
Spec: resourcev1alpha2.PodSchedulingContextSpec{ Spec: resourceapi.PodSchedulingContextSpec{
SelectedNode: nodeName, SelectedNode: nodeName,
}, },
} }
@ -107,13 +107,13 @@ func TestSyncHandler(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
key string key string
claims []*resourcev1alpha2.ResourceClaim claims []*resourceapi.ResourceClaim
claimsInCache []*resourcev1alpha2.ResourceClaim claimsInCache []*resourceapi.ResourceClaim
pods []*v1.Pod pods []*v1.Pod
podsLater []*v1.Pod podsLater []*v1.Pod
templates []*resourcev1alpha2.ResourceClaimTemplate templates []*resourceapi.ResourceClaimTemplate
expectedClaims []resourcev1alpha2.ResourceClaim expectedClaims []resourceapi.ResourceClaim
expectedPodSchedulingContexts []resourcev1alpha2.PodSchedulingContext expectedPodSchedulingContexts []resourceapi.PodSchedulingContext
expectedStatuses map[string][]v1.PodResourceClaimStatus expectedStatuses map[string][]v1.PodResourceClaimStatus
expectedError bool expectedError bool
expectedMetrics expectedMetrics expectedMetrics expectedMetrics
@ -121,9 +121,9 @@ func TestSyncHandler(t *testing.T) {
{ {
name: "create", name: "create",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, templates: []*resourceapi.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithResource.Name: { testPodWithResource.Name: {
{Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
@ -140,10 +140,10 @@ func TestSyncHandler(t *testing.T) {
} }
return pod return pod
}()}, }()},
templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, templates: []*resourceapi.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, claims: []*resourceapi.ResourceClaim{generatedTestClaim},
expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithResource.Name: { testPodWithResource.Name: {
{Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
@ -160,9 +160,9 @@ func TestSyncHandler(t *testing.T) {
} }
return pod return pod
}()}, }()},
templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, templates: []*resourceapi.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithResource.Name: { testPodWithResource.Name: {
{Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
@ -181,8 +181,8 @@ func TestSyncHandler(t *testing.T) {
name: "find-existing-claim-by-label", name: "find-existing-claim-by-label",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, claims: []*resourceapi.ResourceClaim{generatedTestClaim},
expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithResource.Name: { testPodWithResource.Name: {
{Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
@ -194,8 +194,8 @@ func TestSyncHandler(t *testing.T) {
name: "find-existing-claim-by-name", name: "find-existing-claim-by-name",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha2.ResourceClaim{testClaim}, claims: []*resourceapi.ResourceClaim{testClaim},
expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaim}, expectedClaims: []resourceapi.ResourceClaim{*testClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithResource.Name: { testPodWithResource.Name: {
{Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &testClaim.Name}, {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &testClaim.Name},
@ -207,7 +207,7 @@ func TestSyncHandler(t *testing.T) {
name: "find-created-claim-in-cache", name: "find-created-claim-in-cache",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claimsInCache: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, claimsInCache: []*resourceapi.ResourceClaim{generatedTestClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithResource.Name: { testPodWithResource.Name: {
{Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
@ -237,10 +237,10 @@ func TestSyncHandler(t *testing.T) {
{ {
name: "create-with-other-claim", name: "create-with-other-claim",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, templates: []*resourceapi.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha2.ResourceClaim{otherNamespaceClaim}, claims: []*resourceapi.ResourceClaim{otherNamespaceClaim},
expectedClaims: []resourcev1alpha2.ResourceClaim{*otherNamespaceClaim, *generatedTestClaim}, expectedClaims: []resourceapi.ResourceClaim{*otherNamespaceClaim, *generatedTestClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithResource.Name: { testPodWithResource.Name: {
{Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
@ -252,14 +252,14 @@ func TestSyncHandler(t *testing.T) {
name: "wrong-claim-owner", name: "wrong-claim-owner",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha2.ResourceClaim{conflictingClaim}, claims: []*resourceapi.ResourceClaim{conflictingClaim},
expectedClaims: []resourcev1alpha2.ResourceClaim{*conflictingClaim}, expectedClaims: []resourceapi.ResourceClaim{*conflictingClaim},
expectedError: true, expectedError: true,
}, },
{ {
name: "create-conflict", name: "create-conflict",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, templates: []*resourceapi.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
expectedMetrics: expectedMetrics{1, 1}, expectedMetrics: expectedMetrics{1, 1},
expectedError: true, expectedError: true,
@ -268,27 +268,27 @@ func TestSyncHandler(t *testing.T) {
name: "stay-reserved-seen", name: "stay-reserved-seen",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, claims: []*resourceapi.ResourceClaim{testClaimReserved},
expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved}, expectedClaims: []resourceapi.ResourceClaim{*testClaimReserved},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
name: "stay-reserved-not-seen", name: "stay-reserved-not-seen",
podsLater: []*v1.Pod{testPodWithResource}, podsLater: []*v1.Pod{testPodWithResource},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, claims: []*resourceapi.ResourceClaim{testClaimReserved},
expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved}, expectedClaims: []resourceapi.ResourceClaim{*testClaimReserved},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
name: "clear-reserved-delayed-allocation", name: "clear-reserved-delayed-allocation",
pods: []*v1.Pod{}, pods: []*v1.Pod{},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, claims: []*resourceapi.ResourceClaim{testClaimReserved},
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claim := testClaimAllocated.DeepCopy() claim := testClaimAllocated.DeepCopy()
claim.Status.DeallocationRequested = true claim.Status.DeallocationRequested = true
return []resourcev1alpha2.ResourceClaim{*claim} return []resourceapi.ResourceClaim{*claim}
}(), }(),
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
@ -296,12 +296,12 @@ func TestSyncHandler(t *testing.T) {
name: "clear-reserved-delayed-allocation-structured", name: "clear-reserved-delayed-allocation-structured",
pods: []*v1.Pod{}, pods: []*v1.Pod{},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha2.ResourceClaim{structuredParameters(testClaimReserved)}, claims: []*resourceapi.ResourceClaim{structuredParameters(testClaimReserved)},
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claim := testClaimAllocated.DeepCopy() claim := testClaimAllocated.DeepCopy()
claim.Finalizers = []string{} claim.Finalizers = []string{}
claim.Status.Allocation = nil claim.Status.Allocation = nil
return []resourcev1alpha2.ResourceClaim{*claim} return []resourceapi.ResourceClaim{*claim}
}(), }(),
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
@ -309,27 +309,27 @@ func TestSyncHandler(t *testing.T) {
name: "dont-clear-reserved-delayed-allocation-structured", name: "dont-clear-reserved-delayed-allocation-structured",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: func() []*resourcev1alpha2.ResourceClaim { claims: func() []*resourceapi.ResourceClaim {
claim := structuredParameters(testClaimReserved) claim := structuredParameters(testClaimReserved)
claim = reserveClaim(claim, otherTestPod) claim = reserveClaim(claim, otherTestPod)
return []*resourcev1alpha2.ResourceClaim{claim} return []*resourceapi.ResourceClaim{claim}
}(), }(),
expectedClaims: []resourcev1alpha2.ResourceClaim{*structuredParameters(testClaimReserved)}, expectedClaims: []resourceapi.ResourceClaim{*structuredParameters(testClaimReserved)},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
name: "clear-reserved-immediate-allocation", name: "clear-reserved-immediate-allocation",
pods: []*v1.Pod{}, pods: []*v1.Pod{},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: func() []*resourcev1alpha2.ResourceClaim { claims: func() []*resourceapi.ResourceClaim {
claim := testClaimReserved.DeepCopy() claim := testClaimReserved.DeepCopy()
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
return []*resourcev1alpha2.ResourceClaim{claim} return []*resourceapi.ResourceClaim{claim}
}(), }(),
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claim := testClaimAllocated.DeepCopy() claim := testClaimAllocated.DeepCopy()
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
return []resourcev1alpha2.ResourceClaim{*claim} return []resourceapi.ResourceClaim{*claim}
}(), }(),
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
@ -337,15 +337,15 @@ func TestSyncHandler(t *testing.T) {
name: "clear-reserved-immediate-allocation-structured", name: "clear-reserved-immediate-allocation-structured",
pods: []*v1.Pod{}, pods: []*v1.Pod{},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: func() []*resourcev1alpha2.ResourceClaim { claims: func() []*resourceapi.ResourceClaim {
claim := structuredParameters(testClaimReserved.DeepCopy()) claim := structuredParameters(testClaimReserved.DeepCopy())
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
return []*resourcev1alpha2.ResourceClaim{claim} return []*resourceapi.ResourceClaim{claim}
}(), }(),
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claim := structuredParameters(testClaimAllocated.DeepCopy()) claim := structuredParameters(testClaimAllocated.DeepCopy())
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
return []resourcev1alpha2.ResourceClaim{*claim} return []resourceapi.ResourceClaim{*claim}
}(), }(),
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
@ -353,19 +353,19 @@ func TestSyncHandler(t *testing.T) {
name: "clear-reserved-immediate-allocation-structured-deleted", name: "clear-reserved-immediate-allocation-structured-deleted",
pods: []*v1.Pod{}, pods: []*v1.Pod{},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: func() []*resourcev1alpha2.ResourceClaim { claims: func() []*resourceapi.ResourceClaim {
claim := structuredParameters(testClaimReserved.DeepCopy()) claim := structuredParameters(testClaimReserved.DeepCopy())
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
claim.DeletionTimestamp = &metav1.Time{} claim.DeletionTimestamp = &metav1.Time{}
return []*resourcev1alpha2.ResourceClaim{claim} return []*resourceapi.ResourceClaim{claim}
}(), }(),
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claim := structuredParameters(testClaimAllocated.DeepCopy()) claim := structuredParameters(testClaimAllocated.DeepCopy())
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
claim.DeletionTimestamp = &metav1.Time{} claim.DeletionTimestamp = &metav1.Time{}
claim.Finalizers = []string{} claim.Finalizers = []string{}
claim.Status.Allocation = nil claim.Status.Allocation = nil
return []resourcev1alpha2.ResourceClaim{*claim} return []resourceapi.ResourceClaim{*claim}
}(), }(),
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
@ -373,19 +373,19 @@ func TestSyncHandler(t *testing.T) {
name: "immediate-allocation-structured-deleted", name: "immediate-allocation-structured-deleted",
pods: []*v1.Pod{}, pods: []*v1.Pod{},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: func() []*resourcev1alpha2.ResourceClaim { claims: func() []*resourceapi.ResourceClaim {
claim := structuredParameters(testClaimAllocated.DeepCopy()) claim := structuredParameters(testClaimAllocated.DeepCopy())
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
claim.DeletionTimestamp = &metav1.Time{} claim.DeletionTimestamp = &metav1.Time{}
return []*resourcev1alpha2.ResourceClaim{claim} return []*resourceapi.ResourceClaim{claim}
}(), }(),
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claim := structuredParameters(testClaimAllocated.DeepCopy()) claim := structuredParameters(testClaimAllocated.DeepCopy())
claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.Spec.AllocationMode = resourceapi.AllocationModeImmediate
claim.DeletionTimestamp = &metav1.Time{} claim.DeletionTimestamp = &metav1.Time{}
claim.Finalizers = []string{} claim.Finalizers = []string{}
claim.Status.Allocation = nil claim.Status.Allocation = nil
return []resourcev1alpha2.ResourceClaim{*claim} return []resourceapi.ResourceClaim{*claim}
}(), }(),
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
@ -397,13 +397,13 @@ func TestSyncHandler(t *testing.T) {
return pods return pods
}(), }(),
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: func() []*resourcev1alpha2.ResourceClaim { claims: func() []*resourceapi.ResourceClaim {
claims := []*resourcev1alpha2.ResourceClaim{testClaimReserved.DeepCopy()} claims := []*resourceapi.ResourceClaim{testClaimReserved.DeepCopy()}
claims[0].OwnerReferences = nil claims[0].OwnerReferences = nil
return claims return claims
}(), }(),
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claims := []resourcev1alpha2.ResourceClaim{*testClaimAllocated.DeepCopy()} claims := []resourceapi.ResourceClaim{*testClaimAllocated.DeepCopy()}
claims[0].OwnerReferences = nil claims[0].OwnerReferences = nil
claims[0].Status.DeallocationRequested = true claims[0].Status.DeallocationRequested = true
return claims return claims
@ -418,16 +418,16 @@ func TestSyncHandler(t *testing.T) {
return pods return pods
}(), }(),
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: func() []*resourcev1alpha2.ResourceClaim { claims: func() []*resourceapi.ResourceClaim {
claims := []*resourcev1alpha2.ResourceClaim{testClaimReserved.DeepCopy()} claims := []*resourceapi.ResourceClaim{testClaimReserved.DeepCopy()}
claims[0].OwnerReferences = nil claims[0].OwnerReferences = nil
claims[0].Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claims[0].Spec.AllocationMode = resourceapi.AllocationModeImmediate
return claims return claims
}(), }(),
expectedClaims: func() []resourcev1alpha2.ResourceClaim { expectedClaims: func() []resourceapi.ResourceClaim {
claims := []resourcev1alpha2.ResourceClaim{*testClaimAllocated.DeepCopy()} claims := []resourceapi.ResourceClaim{*testClaimAllocated.DeepCopy()}
claims[0].OwnerReferences = nil claims[0].OwnerReferences = nil
claims[0].Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claims[0].Spec.AllocationMode = resourceapi.AllocationModeImmediate
return claims return claims
}(), }(),
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
@ -436,8 +436,8 @@ func TestSyncHandler(t *testing.T) {
name: "remove-reserved", name: "remove-reserved",
pods: []*v1.Pod{testPod}, pods: []*v1.Pod{testPod},
key: claimKey(testClaimReservedTwice), key: claimKey(testClaimReservedTwice),
claims: []*resourcev1alpha2.ResourceClaim{testClaimReservedTwice}, claims: []*resourceapi.ResourceClaim{testClaimReservedTwice},
expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved}, expectedClaims: []resourceapi.ResourceClaim{*testClaimReserved},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
@ -448,7 +448,7 @@ func TestSyncHandler(t *testing.T) {
return pods return pods
}(), }(),
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, claims: []*resourceapi.ResourceClaim{testClaimReserved},
expectedClaims: nil, expectedClaims: nil,
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
@ -456,24 +456,24 @@ func TestSyncHandler(t *testing.T) {
name: "trigger-allocation", name: "trigger-allocation",
pods: []*v1.Pod{testPodWithNodeName}, pods: []*v1.Pod{testPodWithNodeName},
key: podKey(testPodWithNodeName), key: podKey(testPodWithNodeName),
templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, templates: []*resourceapi.ResourceClaimTemplate{template},
claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, claims: []*resourceapi.ResourceClaim{generatedTestClaim},
expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithNodeName.Name: { testPodWithNodeName.Name: {
{Name: testPodWithNodeName.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithNodeName.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
}, },
}, },
expectedPodSchedulingContexts: []resourcev1alpha2.PodSchedulingContext{podSchedulingContext}, expectedPodSchedulingContexts: []resourceapi.PodSchedulingContext{podSchedulingContext},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
name: "add-reserved", name: "add-reserved",
pods: []*v1.Pod{testPodWithNodeName}, pods: []*v1.Pod{testPodWithNodeName},
key: podKey(testPodWithNodeName), key: podKey(testPodWithNodeName),
templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, templates: []*resourceapi.ResourceClaimTemplate{template},
claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaimAllocated}, claims: []*resourceapi.ResourceClaim{generatedTestClaimAllocated},
expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaimReserved}, expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaimReserved},
expectedStatuses: map[string][]v1.PodResourceClaimStatus{ expectedStatuses: map[string][]v1.PodResourceClaimStatus{
testPodWithNodeName.Name: { testPodWithNodeName.Name: {
{Name: testPodWithNodeName.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, {Name: testPodWithNodeName.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name},
@ -509,9 +509,9 @@ func TestSyncHandler(t *testing.T) {
setupMetrics() setupMetrics()
informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, controller.NoResyncPeriodFunc()) informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, controller.NoResyncPeriodFunc())
podInformer := informerFactory.Core().V1().Pods() podInformer := informerFactory.Core().V1().Pods()
podSchedulingInformer := informerFactory.Resource().V1alpha2().PodSchedulingContexts() podSchedulingInformer := informerFactory.Resource().V1alpha3().PodSchedulingContexts()
claimInformer := informerFactory.Resource().V1alpha2().ResourceClaims() claimInformer := informerFactory.Resource().V1alpha3().ResourceClaims()
templateInformer := informerFactory.Resource().V1alpha2().ResourceClaimTemplates() templateInformer := informerFactory.Resource().V1alpha3().ResourceClaimTemplates()
ec, err := NewController(klog.FromContext(ctx), fakeKubeClient, podInformer, podSchedulingInformer, claimInformer, templateInformer) ec, err := NewController(klog.FromContext(ctx), fakeKubeClient, podInformer, podSchedulingInformer, claimInformer, templateInformer)
if err != nil { if err != nil {
@ -549,7 +549,7 @@ func TestSyncHandler(t *testing.T) {
t.Fatalf("unexpected success") t.Fatalf("unexpected success")
} }
claims, err := fakeKubeClient.ResourceV1alpha2().ResourceClaims("").List(ctx, metav1.ListOptions{}) claims, err := fakeKubeClient.ResourceV1alpha3().ResourceClaims("").List(ctx, metav1.ListOptions{})
if err != nil { if err != nil {
t.Fatalf("unexpected error while listing claims: %v", err) t.Fatalf("unexpected error while listing claims: %v", err)
} }
@ -571,7 +571,7 @@ func TestSyncHandler(t *testing.T) {
} }
assert.Equal(t, tc.expectedStatuses, actualStatuses, "pod resource claim statuses") assert.Equal(t, tc.expectedStatuses, actualStatuses, "pod resource claim statuses")
scheduling, err := fakeKubeClient.ResourceV1alpha2().PodSchedulingContexts("").List(ctx, metav1.ListOptions{}) scheduling, err := fakeKubeClient.ResourceV1alpha3().PodSchedulingContexts("").List(ctx, metav1.ListOptions{})
if err != nil { if err != nil {
t.Fatalf("unexpected error while listing claims: %v", err) t.Fatalf("unexpected error while listing claims: %v", err)
} }
@ -582,12 +582,12 @@ func TestSyncHandler(t *testing.T) {
} }
} }
func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourcev1alpha2.ResourceClaim { func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourceapi.ResourceClaim {
claim := &resourcev1alpha2.ResourceClaim{ claim := &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: classname, ResourceClassName: classname,
AllocationMode: resourcev1alpha2.AllocationModeWaitForFirstConsumer, AllocationMode: resourceapi.AllocationModeWaitForFirstConsumer,
}, },
} }
if owner != nil { if owner != nil {
@ -597,17 +597,17 @@ func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference)
return claim return claim
} }
func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, createCounter int, owner *metav1.OwnerReference) *resourcev1alpha2.ResourceClaim { func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, createCounter int, owner *metav1.OwnerReference) *resourceapi.ResourceClaim {
claim := &resourcev1alpha2.ResourceClaim{ claim := &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("%s-%d", generateName, createCounter), Name: fmt.Sprintf("%s-%d", generateName, createCounter),
GenerateName: generateName, GenerateName: generateName,
Namespace: namespace, Namespace: namespace,
Annotations: map[string]string{"resource.kubernetes.io/pod-claim-name": podClaimName}, Annotations: map[string]string{"resource.kubernetes.io/pod-claim-name": podClaimName},
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: classname, ResourceClassName: classname,
AllocationMode: resourcev1alpha2.AllocationModeWaitForFirstConsumer, AllocationMode: resourceapi.AllocationModeWaitForFirstConsumer,
}, },
} }
if owner != nil { if owner != nil {
@ -617,26 +617,26 @@ func makeGeneratedClaim(podClaimName, generateName, namespace, classname string,
return claim return claim
} }
func allocateClaim(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { func allocateClaim(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim {
claim = claim.DeepCopy() claim = claim.DeepCopy()
claim.Status.Allocation = &resourcev1alpha2.AllocationResult{ claim.Status.Allocation = &resourceapi.AllocationResult{
Shareable: true, Shareable: true,
} }
return claim return claim
} }
func structuredParameters(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { func structuredParameters(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim {
claim = claim.DeepCopy() claim = claim.DeepCopy()
// As far the controller is concerned, a claim was allocated by us if it has // As far the controller is concerned, a claim was allocated by us if it has
// this finalizer. For testing we don't need to update the allocation result. // this finalizer. For testing we don't need to update the allocation result.
claim.Finalizers = append(claim.Finalizers, resourcev1alpha2.Finalizer) claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer)
return claim return claim
} }
func reserveClaim(claim *resourcev1alpha2.ResourceClaim, pod *v1.Pod) *resourcev1alpha2.ResourceClaim { func reserveClaim(claim *resourceapi.ResourceClaim, pod *v1.Pod) *resourceapi.ResourceClaim {
claim = claim.DeepCopy() claim = claim.DeepCopy()
claim.Status.ReservedFor = append(claim.Status.ReservedFor, claim.Status.ReservedFor = append(claim.Status.ReservedFor,
resourcev1alpha2.ResourceClaimConsumerReference{ resourceapi.ResourceClaimConsumerReference{
Resource: "pods", Resource: "pods",
Name: pod.Name, Name: pod.Name,
UID: pod.UID, UID: pod.UID,
@ -663,11 +663,11 @@ func makePod(name, namespace string, uid types.UID, podClaims ...v1.PodResourceC
return pod return pod
} }
func makeTemplate(name, namespace, classname string) *resourcev1alpha2.ResourceClaimTemplate { func makeTemplate(name, namespace, classname string) *resourceapi.ResourceClaimTemplate {
template := &resourcev1alpha2.ResourceClaimTemplate{ template := &resourceapi.ResourceClaimTemplate{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
Spec: resourcev1alpha2.ResourceClaimTemplateSpec{ Spec: resourceapi.ResourceClaimTemplateSpec{
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: classname, ResourceClassName: classname,
}, },
}, },
@ -679,7 +679,7 @@ func podKey(pod *v1.Pod) string {
return podKeyPrefix + pod.Namespace + "/" + pod.Name return podKeyPrefix + pod.Namespace + "/" + pod.Name
} }
func claimKey(claim *resourcev1alpha2.ResourceClaim) string { func claimKey(claim *resourceapi.ResourceClaim) string {
return claimKeyPrefix + claim.Namespace + "/" + claim.Name return claimKeyPrefix + claim.Namespace + "/" + claim.Name
} }
@ -695,7 +695,7 @@ func makeOwnerReference(pod *v1.Pod, isController bool) *metav1.OwnerReference {
} }
} }
func normalizeClaims(claims []resourcev1alpha2.ResourceClaim) []resourcev1alpha2.ResourceClaim { func normalizeClaims(claims []resourceapi.ResourceClaim) []resourceapi.ResourceClaim {
sort.Slice(claims, func(i, j int) bool { sort.Slice(claims, func(i, j int) bool {
if claims[i].Namespace < claims[j].Namespace { if claims[i].Namespace < claims[j].Namespace {
return true return true
@ -711,13 +711,13 @@ func normalizeClaims(claims []resourcev1alpha2.ResourceClaim) []resourcev1alpha2
} }
if claims[i].Spec.AllocationMode == "" { if claims[i].Spec.AllocationMode == "" {
// This emulates defaulting. // This emulates defaulting.
claims[i].Spec.AllocationMode = resourcev1alpha2.AllocationModeWaitForFirstConsumer claims[i].Spec.AllocationMode = resourceapi.AllocationModeWaitForFirstConsumer
} }
} }
return claims return claims
} }
func normalizeScheduling(scheduling []resourcev1alpha2.PodSchedulingContext) []resourcev1alpha2.PodSchedulingContext { func normalizeScheduling(scheduling []resourceapi.PodSchedulingContext) []resourceapi.PodSchedulingContext {
sort.Slice(scheduling, func(i, j int) bool { sort.Slice(scheduling, func(i, j int) bool {
return scheduling[i].Namespace < scheduling[j].Namespace || return scheduling[i].Namespace < scheduling[j].Namespace ||
scheduling[i].Name < scheduling[j].Name scheduling[i].Name < scheduling[j].Name
@ -739,7 +739,7 @@ func createResourceClaimReactor() func(action k8stesting.Action) (handled bool,
return func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { return func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
mutex.Lock() mutex.Lock()
defer mutex.Unlock() defer mutex.Unlock()
claim := action.(k8stesting.CreateAction).GetObject().(*resourcev1alpha2.ResourceClaim) claim := action.(k8stesting.CreateAction).GetObject().(*resourceapi.ResourceClaim)
if claim.Name == "" && claim.GenerateName != "" { if claim.Name == "" && claim.GenerateName != "" {
claim.Name = fmt.Sprintf("%s-%d", claim.GenerateName, nameCounter) claim.Name = fmt.Sprintf("%s-%d", claim.GenerateName, nameCounter)
} }

View File

@ -292,7 +292,7 @@ func DefaultGenericAPIServicePriorities() map[schema.GroupVersion]APIServicePrio
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {Group: 16100, Version: 12}, {Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {Group: 16100, Version: 12},
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {Group: 16100, Version: 9}, {Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {Group: 16100, Version: 9},
{Group: "internal.apiserver.k8s.io", Version: "v1alpha1"}: {Group: 16000, Version: 9}, {Group: "internal.apiserver.k8s.io", Version: "v1alpha1"}: {Group: 16000, Version: 9},
{Group: "resource.k8s.io", Version: "v1alpha2"}: {Group: 15900, Version: 9}, {Group: "resource.k8s.io", Version: "v1alpha3"}: {Group: 15900, Version: 9},
{Group: "storagemigration.k8s.io", Version: "v1alpha1"}: {Group: 15800, Version: 9}, {Group: "storagemigration.k8s.io", Version: "v1alpha1"}: {Group: 15800, Version: 9},
// Append a new group to the end of the list if unsure. // Append a new group to the end of the list if unsure.
// You can use min(existing group)-100 as the initial value for a group. // You can use min(existing group)-100 as the initial value for a group.

View File

@ -47,7 +47,7 @@ import (
nodev1 "k8s.io/api/node/v1" nodev1 "k8s.io/api/node/v1"
policyapiv1 "k8s.io/api/policy/v1" policyapiv1 "k8s.io/api/policy/v1"
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
schedulingapiv1 "k8s.io/api/scheduling/v1" schedulingapiv1 "k8s.io/api/scheduling/v1"
storageapiv1 "k8s.io/api/storage/v1" storageapiv1 "k8s.io/api/storage/v1"
storageapiv1alpha1 "k8s.io/api/storage/v1alpha1" storageapiv1alpha1 "k8s.io/api/storage/v1alpha1"
@ -475,7 +475,7 @@ var (
admissionregistrationv1alpha1.SchemeGroupVersion, admissionregistrationv1alpha1.SchemeGroupVersion,
apiserverinternalv1alpha1.SchemeGroupVersion, apiserverinternalv1alpha1.SchemeGroupVersion,
authenticationv1alpha1.SchemeGroupVersion, authenticationv1alpha1.SchemeGroupVersion,
resourcev1alpha2.SchemeGroupVersion, resourceapi.SchemeGroupVersion,
certificatesv1alpha1.SchemeGroupVersion, certificatesv1alpha1.SchemeGroupVersion,
networkingapiv1alpha1.SchemeGroupVersion, networkingapiv1alpha1.SchemeGroupVersion,
storageapiv1alpha1.SchemeGroupVersion, storageapiv1alpha1.SchemeGroupVersion,

View File

@ -886,50 +886,50 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref), "k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref),
"k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), "k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref),
"k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref), "k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref),
"k8s.io/api/resource/v1alpha2.AllocationResult": schema_k8sio_api_resource_v1alpha2_AllocationResult(ref), "k8s.io/api/resource/v1alpha3.AllocationResult": schema_k8sio_api_resource_v1alpha3_AllocationResult(ref),
"k8s.io/api/resource/v1alpha2.AllocationResultModel": schema_k8sio_api_resource_v1alpha2_AllocationResultModel(ref), "k8s.io/api/resource/v1alpha3.AllocationResultModel": schema_k8sio_api_resource_v1alpha3_AllocationResultModel(ref),
"k8s.io/api/resource/v1alpha2.DriverAllocationResult": schema_k8sio_api_resource_v1alpha2_DriverAllocationResult(ref), "k8s.io/api/resource/v1alpha3.DriverAllocationResult": schema_k8sio_api_resource_v1alpha3_DriverAllocationResult(ref),
"k8s.io/api/resource/v1alpha2.DriverRequests": schema_k8sio_api_resource_v1alpha2_DriverRequests(ref), "k8s.io/api/resource/v1alpha3.DriverRequests": schema_k8sio_api_resource_v1alpha3_DriverRequests(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesAllocationResult": schema_k8sio_api_resource_v1alpha2_NamedResourcesAllocationResult(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult": schema_k8sio_api_resource_v1alpha3_NamedResourcesAllocationResult(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesAttribute": schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesAttribute": schema_k8sio_api_resource_v1alpha3_NamedResourcesAttribute(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesAttributeValue": schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesAttributeValue": schema_k8sio_api_resource_v1alpha3_NamedResourcesAttributeValue(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesFilter": schema_k8sio_api_resource_v1alpha2_NamedResourcesFilter(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesFilter": schema_k8sio_api_resource_v1alpha3_NamedResourcesFilter(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesInstance": schema_k8sio_api_resource_v1alpha2_NamedResourcesInstance(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesInstance": schema_k8sio_api_resource_v1alpha3_NamedResourcesInstance(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesIntSlice": schema_k8sio_api_resource_v1alpha2_NamedResourcesIntSlice(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice": schema_k8sio_api_resource_v1alpha3_NamedResourcesIntSlice(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesRequest": schema_k8sio_api_resource_v1alpha2_NamedResourcesRequest(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesRequest": schema_k8sio_api_resource_v1alpha3_NamedResourcesRequest(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesResources": schema_k8sio_api_resource_v1alpha2_NamedResourcesResources(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesResources": schema_k8sio_api_resource_v1alpha3_NamedResourcesResources(ref),
"k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice": schema_k8sio_api_resource_v1alpha2_NamedResourcesStringSlice(ref), "k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice": schema_k8sio_api_resource_v1alpha3_NamedResourcesStringSlice(ref),
"k8s.io/api/resource/v1alpha2.PodSchedulingContext": schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref), "k8s.io/api/resource/v1alpha3.PodSchedulingContext": schema_k8sio_api_resource_v1alpha3_PodSchedulingContext(ref),
"k8s.io/api/resource/v1alpha2.PodSchedulingContextList": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref), "k8s.io/api/resource/v1alpha3.PodSchedulingContextList": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref),
"k8s.io/api/resource/v1alpha2.PodSchedulingContextSpec": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextSpec(ref), "k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextSpec(ref),
"k8s.io/api/resource/v1alpha2.PodSchedulingContextStatus": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextStatus(ref), "k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextStatus(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaim": schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref), "k8s.io/api/resource/v1alpha3.ResourceClaim": schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimConsumerReference(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha3_ResourceClaimConsumerReference(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimList": schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimList": schema_k8sio_api_resource_v1alpha3_ResourceClaimList(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimParameters": schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimParameters": schema_k8sio_api_resource_v1alpha3_ResourceClaimParameters(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimParametersList": schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimParametersList": schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersList(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersReference(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha2_ResourceClaimSchedulingStatus(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha3_ResourceClaimSchedulingStatus(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha3_ResourceClaimSpec(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimStatus": schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimStatus": schema_k8sio_api_resource_v1alpha3_ResourceClaimStatus(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimTemplate": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimTemplate": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplate(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimTemplateList": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateList": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateList(ref),
"k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateSpec(ref),
"k8s.io/api/resource/v1alpha2.ResourceClass": schema_k8sio_api_resource_v1alpha2_ResourceClass(ref), "k8s.io/api/resource/v1alpha3.ResourceClass": schema_k8sio_api_resource_v1alpha3_ResourceClass(ref),
"k8s.io/api/resource/v1alpha2.ResourceClassList": schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref), "k8s.io/api/resource/v1alpha3.ResourceClassList": schema_k8sio_api_resource_v1alpha3_ResourceClassList(ref),
"k8s.io/api/resource/v1alpha2.ResourceClassParameters": schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref), "k8s.io/api/resource/v1alpha3.ResourceClassParameters": schema_k8sio_api_resource_v1alpha3_ResourceClassParameters(ref),
"k8s.io/api/resource/v1alpha2.ResourceClassParametersList": schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref), "k8s.io/api/resource/v1alpha3.ResourceClassParametersList": schema_k8sio_api_resource_v1alpha3_ResourceClassParametersList(ref),
"k8s.io/api/resource/v1alpha2.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref), "k8s.io/api/resource/v1alpha3.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha3_ResourceClassParametersReference(ref),
"k8s.io/api/resource/v1alpha2.ResourceFilter": schema_k8sio_api_resource_v1alpha2_ResourceFilter(ref), "k8s.io/api/resource/v1alpha3.ResourceFilter": schema_k8sio_api_resource_v1alpha3_ResourceFilter(ref),
"k8s.io/api/resource/v1alpha2.ResourceFilterModel": schema_k8sio_api_resource_v1alpha2_ResourceFilterModel(ref), "k8s.io/api/resource/v1alpha3.ResourceFilterModel": schema_k8sio_api_resource_v1alpha3_ResourceFilterModel(ref),
"k8s.io/api/resource/v1alpha2.ResourceHandle": schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref), "k8s.io/api/resource/v1alpha3.ResourceHandle": schema_k8sio_api_resource_v1alpha3_ResourceHandle(ref),
"k8s.io/api/resource/v1alpha2.ResourceModel": schema_k8sio_api_resource_v1alpha2_ResourceModel(ref), "k8s.io/api/resource/v1alpha3.ResourceModel": schema_k8sio_api_resource_v1alpha3_ResourceModel(ref),
"k8s.io/api/resource/v1alpha2.ResourceRequest": schema_k8sio_api_resource_v1alpha2_ResourceRequest(ref), "k8s.io/api/resource/v1alpha3.ResourceRequest": schema_k8sio_api_resource_v1alpha3_ResourceRequest(ref),
"k8s.io/api/resource/v1alpha2.ResourceRequestModel": schema_k8sio_api_resource_v1alpha2_ResourceRequestModel(ref), "k8s.io/api/resource/v1alpha3.ResourceRequestModel": schema_k8sio_api_resource_v1alpha3_ResourceRequestModel(ref),
"k8s.io/api/resource/v1alpha2.ResourceSlice": schema_k8sio_api_resource_v1alpha2_ResourceSlice(ref), "k8s.io/api/resource/v1alpha3.ResourceSlice": schema_k8sio_api_resource_v1alpha3_ResourceSlice(ref),
"k8s.io/api/resource/v1alpha2.ResourceSliceList": schema_k8sio_api_resource_v1alpha2_ResourceSliceList(ref), "k8s.io/api/resource/v1alpha3.ResourceSliceList": schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref),
"k8s.io/api/resource/v1alpha2.StructuredResourceHandle": schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref), "k8s.io/api/resource/v1alpha3.StructuredResourceHandle": schema_k8sio_api_resource_v1alpha3_StructuredResourceHandle(ref),
"k8s.io/api/resource/v1alpha2.VendorParameters": schema_k8sio_api_resource_v1alpha2_VendorParameters(ref), "k8s.io/api/resource/v1alpha3.VendorParameters": schema_k8sio_api_resource_v1alpha3_VendorParameters(ref),
"k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref), "k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref),
"k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), "k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref),
"k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref),
@ -45544,7 +45544,7 @@ func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.
} }
} }
func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_AllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45564,7 +45564,7 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCal
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceHandle"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceHandle"),
}, },
}, },
}, },
@ -45587,11 +45587,11 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCal
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha2.ResourceHandle"}, "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha3.ResourceHandle"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_AllocationResultModel(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_AllocationResultModel(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45601,18 +45601,18 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResultModel(ref common.Referen
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes the allocation result when using the named resources model.", Description: "NamedResources describes the allocation result when using the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesAllocationResult"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesAllocationResult"}, "k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_DriverAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_DriverAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45628,18 +45628,18 @@ func schema_k8sio_api_resource_v1alpha2_DriverAllocationResult(ref common.Refere
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes the allocation result when using the named resources model.", Description: "NamedResources describes the allocation result when using the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesAllocationResult"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesAllocationResult", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, "k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_DriverRequests(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_DriverRequests(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45672,7 +45672,7 @@ func schema_k8sio_api_resource_v1alpha2_DriverRequests(ref common.ReferenceCallb
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceRequest"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceRequest"),
}, },
}, },
}, },
@ -45682,11 +45682,11 @@ func schema_k8sio_api_resource_v1alpha2_DriverRequests(ref common.ReferenceCallb
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceRequest", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, "k8s.io/api/resource/v1alpha3.ResourceRequest", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45708,7 +45708,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAllocationResult(ref commo
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesAttribute(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45746,7 +45746,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref common.Refer
"intSlice": { "intSlice": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "IntSliceValue is an array of 64-bit integers.", Description: "IntSliceValue is an array of 64-bit integers.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesIntSlice"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice"),
}, },
}, },
"string": { "string": {
@ -45759,7 +45759,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref common.Refer
"stringSlice": { "stringSlice": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "StringSliceValue is an array of strings.", Description: "StringSliceValue is an array of strings.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice"),
}, },
}, },
"version": { "version": {
@ -45774,11 +45774,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref common.Refer
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesIntSlice", "k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, "k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice", "k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice", "k8s.io/apimachinery/pkg/api/resource.Quantity"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesAttributeValue(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45808,7 +45808,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref common.
"intSlice": { "intSlice": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "IntSliceValue is an array of 64-bit integers.", Description: "IntSliceValue is an array of 64-bit integers.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesIntSlice"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice"),
}, },
}, },
"string": { "string": {
@ -45821,7 +45821,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref common.
"stringSlice": { "stringSlice": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "StringSliceValue is an array of strings.", Description: "StringSliceValue is an array of strings.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice"),
}, },
}, },
"version": { "version": {
@ -45835,11 +45835,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref common.
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesIntSlice", "k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, "k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice", "k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice", "k8s.io/apimachinery/pkg/api/resource.Quantity"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesFilter(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45861,7 +45861,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesFilter(ref common.Referenc
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesInstance(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesInstance(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45889,7 +45889,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesInstance(ref common.Refere
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesAttribute"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesAttribute"),
}, },
}, },
}, },
@ -45900,11 +45900,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesInstance(ref common.Refere
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesAttribute"}, "k8s.io/api/resource/v1alpha3.NamedResourcesAttribute"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesIntSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesIntSlice(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45938,7 +45938,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesIntSlice(ref common.Refere
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45960,7 +45960,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesRequest(ref common.Referen
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesResources(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesResources(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -45980,7 +45980,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesResources(ref common.Refer
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesInstance"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesInstance"),
}, },
}, },
}, },
@ -45991,11 +45991,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesResources(ref common.Refer
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesInstance"}, "k8s.io/api/resource/v1alpha3.NamedResourcesInstance"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_NamedResourcesStringSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_NamedResourcesStringSlice(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46029,7 +46029,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesStringSlice(ref common.Ref
} }
} }
func schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_PodSchedulingContext(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46061,14 +46061,14 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref common.Referenc
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Spec describes where resources for the Pod are needed.", Description: "Spec describes where resources for the Pod are needed.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingContextSpec"), Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec"),
}, },
}, },
"status": { "status": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Status describes where resources for the Pod can be allocated.", Description: "Status describes where resources for the Pod can be allocated.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingContextStatus"), Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus"),
}, },
}, },
}, },
@ -46076,11 +46076,11 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref common.Referenc
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.PodSchedulingContextSpec", "k8s.io/api/resource/v1alpha2.PodSchedulingContextStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec", "k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46116,7 +46116,7 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref common.Refe
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingContext"), Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContext"),
}, },
}, },
}, },
@ -46127,11 +46127,11 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref common.Refe
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.PodSchedulingContext", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha3.PodSchedulingContext", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46171,7 +46171,7 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextSpec(ref common.Refe
} }
} }
func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46194,7 +46194,7 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextStatus(ref common.Re
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus"),
}, },
}, },
}, },
@ -46204,11 +46204,11 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextStatus(ref common.Re
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus"}, "k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46240,14 +46240,14 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref common.ReferenceCallba
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim.", Description: "Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSpec"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"),
}, },
}, },
"status": { "status": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Status describes whether the resource is available and with which attributes.", Description: "Status describes whether the resource is available and with which attributes.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimStatus"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimStatus"),
}, },
}, },
}, },
@ -46255,11 +46255,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref common.ReferenceCallba
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaimSpec", "k8s.io/api/resource/v1alpha2.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClaimSpec", "k8s.io/api/resource/v1alpha3.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimConsumerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimConsumerReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46304,7 +46304,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimConsumerReference(ref commo
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46340,7 +46340,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref common.ReferenceCa
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaim"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaim"),
}, },
}, },
}, },
@ -46351,11 +46351,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimParameters(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46386,7 +46386,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.Refer
"generatedFrom": { "generatedFrom": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type.", Description: "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the claim parameters when the parameter reference of the claim refers to some unknown type.",
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"),
}, },
}, },
"shareable": { "shareable": {
@ -46409,7 +46409,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.Refer
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.DriverRequests"), Ref: ref("k8s.io/api/resource/v1alpha3.DriverRequests"),
}, },
}, },
}, },
@ -46419,11 +46419,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.Refer
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.DriverRequests", "k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha3.DriverRequests", "k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46459,7 +46459,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref common.R
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParameters"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParameters"),
}, },
}, },
}, },
@ -46470,11 +46470,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref common.R
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaimParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClaimParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46511,7 +46511,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref com
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46551,7 +46551,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimSchedulingStatus(ref common
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46569,7 +46569,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref common.ReferenceCa
"parametersRef": { "parametersRef": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.\n\nThe object must be in the same namespace as the ResourceClaim.", Description: "ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.\n\nThe object must be in the same namespace as the ResourceClaim.",
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"),
}, },
}, },
"allocationMode": { "allocationMode": {
@ -46584,11 +46584,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"}, "k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46605,7 +46605,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.Reference
"allocation": { "allocation": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.", Description: "Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.",
Ref: ref("k8s.io/api/resource/v1alpha2.AllocationResult"), Ref: ref("k8s.io/api/resource/v1alpha3.AllocationResult"),
}, },
}, },
"reservedFor": { "reservedFor": {
@ -46626,7 +46626,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.Reference
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"),
}, },
}, },
}, },
@ -46643,11 +46643,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.Reference
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.AllocationResult", "k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference"}, "k8s.io/api/resource/v1alpha3.AllocationResult", "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46679,7 +46679,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref common.Referen
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.", Description: "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec"),
}, },
}, },
}, },
@ -46687,11 +46687,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref common.Referen
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46727,7 +46727,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref common.Ref
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimTemplate"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplate"),
}, },
}, },
}, },
@ -46738,11 +46738,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref common.Ref
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46760,7 +46760,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref common.Ref
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.", Description: "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSpec"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"),
}, },
}, },
}, },
@ -46768,11 +46768,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref common.Ref
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClass(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46811,7 +46811,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClass(ref common.ReferenceCallba
"parametersRef": { "parametersRef": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", Description: "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.",
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParametersReference"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParametersReference"),
}, },
}, },
"suitableNodes": { "suitableNodes": {
@ -46832,11 +46832,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClass(ref common.ReferenceCallba
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha2.ResourceClassParametersReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha3.ResourceClassParametersReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClassList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46872,7 +46872,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref common.ReferenceCa
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClass"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClass"),
}, },
}, },
}, },
@ -46883,11 +46883,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClassParameters(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -46918,7 +46918,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer
"generatedFrom": { "generatedFrom": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type.", Description: "If this object was created from some other resource, then this links back to that resource. This field is used to find the in-tree representation of the class parameters when the parameter reference of the class refers to some unknown type.",
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParametersReference"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParametersReference"),
}, },
}, },
"vendorParameters": { "vendorParameters": {
@ -46934,7 +46934,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.VendorParameters"), Ref: ref("k8s.io/api/resource/v1alpha3.VendorParameters"),
}, },
}, },
}, },
@ -46953,7 +46953,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceFilter"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceFilter"),
}, },
}, },
}, },
@ -46963,11 +46963,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClassParametersReference", "k8s.io/api/resource/v1alpha2.ResourceFilter", "k8s.io/api/resource/v1alpha2.VendorParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClassParametersReference", "k8s.io/api/resource/v1alpha3.ResourceFilter", "k8s.io/api/resource/v1alpha3.VendorParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClassParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47003,7 +47003,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref common.R
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParameters"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParameters"),
}, },
}, },
}, },
@ -47014,11 +47014,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref common.R
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceClassParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha3.ResourceClassParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47062,7 +47062,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref com
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceFilter(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47079,18 +47079,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceFilter(ref common.ReferenceCallb
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes a resource filter using the named resources model.", Description: "NamedResources describes a resource filter using the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesFilter"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesFilter"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesFilter"}, "k8s.io/api/resource/v1alpha3.NamedResourcesFilter"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceFilterModel(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceFilterModel(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47100,18 +47100,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceFilterModel(ref common.Reference
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes a resource filter using the named resources model.", Description: "NamedResources describes a resource filter using the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesFilter"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesFilter"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesFilter"}, "k8s.io/api/resource/v1alpha3.NamedResourcesFilter"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47136,7 +47136,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallb
"structuredData": { "structuredData": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "If StructuredData is set, then it needs to be used instead of Data.", Description: "If StructuredData is set, then it needs to be used instead of Data.",
Ref: ref("k8s.io/api/resource/v1alpha2.StructuredResourceHandle"), Ref: ref("k8s.io/api/resource/v1alpha3.StructuredResourceHandle"),
}, },
}, },
}, },
@ -47144,11 +47144,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallb
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.StructuredResourceHandle"}, "k8s.io/api/resource/v1alpha3.StructuredResourceHandle"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceModel(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceModel(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47158,18 +47158,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceModel(ref common.ReferenceCallba
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes available resources using the named resources model.", Description: "NamedResources describes available resources using the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesResources"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesResources"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesResources"}, "k8s.io/api/resource/v1alpha3.NamedResourcesResources"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceRequest(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47185,18 +47185,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceRequest(ref common.ReferenceCall
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes a request for resources with the named resources model.", Description: "NamedResources describes a request for resources with the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesRequest"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesRequest"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesRequest", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, "k8s.io/api/resource/v1alpha3.NamedResourcesRequest", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceRequestModel(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceRequestModel(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47206,18 +47206,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceRequestModel(ref common.Referenc
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes a request for resources with the named resources model.", Description: "NamedResources describes a request for resources with the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesRequest"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesRequest"),
}, },
}, },
}, },
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesRequest"}, "k8s.io/api/resource/v1alpha3.NamedResourcesRequest"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceSlice(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47263,7 +47263,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSlice(ref common.ReferenceCallba
"namedResources": { "namedResources": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "NamedResources describes available resources using the named resources model.", Description: "NamedResources describes available resources using the named resources model.",
Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesResources"), Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesResources"),
}, },
}, },
}, },
@ -47271,11 +47271,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSlice(ref common.ReferenceCallba
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.NamedResourcesResources", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha3.NamedResourcesResources", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_ResourceSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47311,7 +47311,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSliceList(ref common.ReferenceCa
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.ResourceSlice"), Ref: ref("k8s.io/api/resource/v1alpha3.ResourceSlice"),
}, },
}, },
}, },
@ -47322,11 +47322,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSliceList(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.ResourceSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha3.ResourceSlice", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_StructuredResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -47365,7 +47365,7 @@ func schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref common.Refe
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha2.DriverAllocationResult"), Ref: ref("k8s.io/api/resource/v1alpha3.DriverAllocationResult"),
}, },
}, },
}, },
@ -47376,11 +47376,11 @@ func schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref common.Refe
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha2.DriverAllocationResult", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, "k8s.io/api/resource/v1alpha3.DriverAllocationResult", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
} }
} }
func schema_k8sio_api_resource_v1alpha2_VendorParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha3_VendorParameters(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{

View File

@ -33,7 +33,7 @@ import (
"k8s.io/apiserver/pkg/authorization/authorizer" "k8s.io/apiserver/pkg/authorization/authorizer"
utilfeature "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature"
versionedinformers "k8s.io/client-go/informers" versionedinformers "k8s.io/client-go/informers"
resourcev1alpha2informers "k8s.io/client-go/informers/resource/v1alpha2" resourceinformers "k8s.io/client-go/informers/resource/v1alpha3"
"k8s.io/kubernetes/pkg/auth/authorizer/abac" "k8s.io/kubernetes/pkg/auth/authorizer/abac"
"k8s.io/kubernetes/pkg/auth/nodeidentifier" "k8s.io/kubernetes/pkg/auth/nodeidentifier"
"k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/features"
@ -93,9 +93,9 @@ func (config Config) New(ctx context.Context, serverID string) (authorizer.Autho
// Keep cases in sync with constant list in k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes/modes.go. // Keep cases in sync with constant list in k8s.io/kubernetes/pkg/kubeapiserver/authorizer/modes/modes.go.
switch configuredAuthorizer.Type { switch configuredAuthorizer.Type {
case authzconfig.AuthorizerType(modes.ModeNode): case authzconfig.AuthorizerType(modes.ModeNode):
var slices resourcev1alpha2informers.ResourceSliceInformer var slices resourceinformers.ResourceSliceInformer
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
slices = config.VersionedInformerFactory.Resource().V1alpha2().ResourceSlices() slices = config.VersionedInformerFactory.Resource().V1alpha3().ResourceSlices()
} }
node.RegisterMetrics() node.RegisterMetrics()
graph := node.NewGraph() graph := node.NewGraph()

View File

@ -80,7 +80,7 @@ rules:
- k8s.io/kubernetes/pkg/apis/rbac/v1beta1 - k8s.io/kubernetes/pkg/apis/rbac/v1beta1
- k8s.io/kubernetes/pkg/apis/resource - k8s.io/kubernetes/pkg/apis/resource
- k8s.io/kubernetes/pkg/apis/resource/install - k8s.io/kubernetes/pkg/apis/resource/install
- k8s.io/kubernetes/pkg/apis/resource/v1alpha2 - k8s.io/kubernetes/pkg/apis/resource/v1alpha3
- k8s.io/kubernetes/pkg/apis/scheduling - k8s.io/kubernetes/pkg/apis/scheduling
- k8s.io/kubernetes/pkg/apis/scheduling/install - k8s.io/kubernetes/pkg/apis/scheduling/install
- k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1 - k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1

View File

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"sync" "sync"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/kubelet/cm/dra/state" "k8s.io/kubernetes/pkg/kubelet/cm/dra/state"
@ -47,14 +47,14 @@ type claimInfoCache struct {
} }
// newClaimInfoFromClaim creates a new claim info from a resource claim. // newClaimInfoFromClaim creates a new claim info from a resource claim.
func newClaimInfoFromClaim(claim *resourcev1alpha2.ResourceClaim) *ClaimInfo { func newClaimInfoFromClaim(claim *resourceapi.ResourceClaim) *ClaimInfo {
// Grab the allocation.resourceHandles. If there are no // Grab the allocation.resourceHandles. If there are no
// allocation.resourceHandles, create a single resourceHandle with no // allocation.resourceHandles, create a single resourceHandle with no
// content. This will trigger processing of this claim by a single // content. This will trigger processing of this claim by a single
// kubelet plugin whose name matches resourceClaim.Status.DriverName. // kubelet plugin whose name matches resourceClaim.Status.DriverName.
resourceHandles := claim.Status.Allocation.ResourceHandles resourceHandles := claim.Status.Allocation.ResourceHandles
if len(resourceHandles) == 0 { if len(resourceHandles) == 0 {
resourceHandles = make([]resourcev1alpha2.ResourceHandle, 1) resourceHandles = make([]resourceapi.ResourceHandle, 1)
} }
claimInfoState := state.ClaimInfoState{ claimInfoState := state.ClaimInfoState{
DriverName: claim.Status.DriverName, DriverName: claim.Status.DriverName,

View File

@ -25,7 +25,7 @@ import (
"testing" "testing"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
@ -44,24 +44,24 @@ func TestNewClaimInfoFromClaim(t *testing.T) {
for _, test := range []struct { for _, test := range []struct {
description string description string
claim *resourcev1alpha2.ResourceClaim claim *resourceapi.ResourceClaim
expectedResult *ClaimInfo expectedResult *ClaimInfo
}{ }{
{ {
description: "successfully created object", description: "successfully created object",
claim: &resourcev1alpha2.ResourceClaim{ claim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
UID: claimUID, UID: claimUID,
Name: claimName, Name: claimName,
Namespace: namespace, Namespace: namespace,
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{}, ResourceHandles: []resourceapi.ResourceHandle{},
}, },
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: className, ResourceClassName: className,
}, },
}, },
@ -73,7 +73,7 @@ func TestNewClaimInfoFromClaim(t *testing.T) {
ClaimName: claimName, ClaimName: claimName,
Namespace: claimName, Namespace: claimName,
PodUIDs: sets.New[string](), PodUIDs: sets.New[string](),
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{}, {},
}, },
CDIDevices: make(map[string][]string), CDIDevices: make(map[string][]string),
@ -82,17 +82,17 @@ func TestNewClaimInfoFromClaim(t *testing.T) {
}, },
{ {
description: "successfully created object with empty allocation", description: "successfully created object with empty allocation",
claim: &resourcev1alpha2.ResourceClaim{ claim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
UID: claimUID, UID: claimUID,
Name: claimName, Name: claimName,
Namespace: namespace, Namespace: namespace,
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{}, Allocation: &resourceapi.AllocationResult{},
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: className, ResourceClassName: className,
}, },
}, },
@ -104,7 +104,7 @@ func TestNewClaimInfoFromClaim(t *testing.T) {
ClaimName: claimName, ClaimName: claimName,
Namespace: claimName, Namespace: claimName,
PodUIDs: sets.New[string](), PodUIDs: sets.New[string](),
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{}, {},
}, },
CDIDevices: make(map[string][]string), CDIDevices: make(map[string][]string),
@ -136,7 +136,7 @@ func TestNewClaimInfoFromState(t *testing.T) {
ClaimName: "test-claim", ClaimName: "test-claim",
Namespace: "test-namespace", Namespace: "test-namespace",
PodUIDs: sets.New[string]("test-pod-uid"), PodUIDs: sets.New[string]("test-pod-uid"),
ResourceHandles: []resourcev1alpha2.ResourceHandle{}, ResourceHandles: []resourceapi.ResourceHandle{},
CDIDevices: map[string][]string{}, CDIDevices: map[string][]string{},
}, },
}, },

View File

@ -22,7 +22,7 @@ import (
"time" "time"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourceapi "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
@ -165,7 +165,7 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error {
continue continue
} }
// Query claim object from the API server // Query claim object from the API server
resourceClaim, err := m.kubeClient.ResourceV1alpha2().ResourceClaims(pod.Namespace).Get( resourceClaim, err := m.kubeClient.ResourceV1alpha3().ResourceClaims(pod.Namespace).Get(
context.TODO(), context.TODO(),
*claimName, *claimName,
metav1.GetOptions{}) metav1.GetOptions{})

View File

@ -30,7 +30,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"google.golang.org/grpc" "google.golang.org/grpc"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
@ -344,7 +344,7 @@ func TestPrepareResources(t *testing.T) {
driverName string driverName string
pod *v1.Pod pod *v1.Pod
claimInfo *ClaimInfo claimInfo *ClaimInfo
resourceClaim *resourcev1alpha2.ResourceClaim resourceClaim *resourceapi.ResourceClaim
resp *drapb.NodePrepareResourcesResponse resp *drapb.NodePrepareResourcesResponse
wantErr bool wantErr bool
wantTimeout bool wantTimeout bool
@ -408,23 +408,23 @@ func TestPrepareResources(t *testing.T) {
}, },
}, },
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-1", Name: "test-pod-claim-1",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -463,23 +463,23 @@ func TestPrepareResources(t *testing.T) {
}, },
}, },
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-nil", Name: "test-pod-claim-nil",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -520,23 +520,23 @@ func TestPrepareResources(t *testing.T) {
}, },
}, },
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-empty", Name: "test-pod-claim-empty",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -566,19 +566,19 @@ func TestPrepareResources(t *testing.T) {
}, },
}, },
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-2", Name: "test-pod-claim-2",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
@ -607,23 +607,23 @@ func TestPrepareResources(t *testing.T) {
}, },
}, },
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-3", Name: "test-pod-claim-3",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -671,23 +671,23 @@ func TestPrepareResources(t *testing.T) {
}, },
prepared: true, prepared: true,
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-4", Name: "test-pod-claim-4",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -727,23 +727,23 @@ func TestPrepareResources(t *testing.T) {
}, },
}, },
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-5", Name: "test-pod-claim-5",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -789,23 +789,23 @@ func TestPrepareResources(t *testing.T) {
}, },
}, },
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim-6", Name: "test-pod-claim-6",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -858,28 +858,28 @@ func TestPrepareResources(t *testing.T) {
ClaimUID: "test-reserved", ClaimUID: "test-reserved",
Namespace: "test-namespace", Namespace: "test-namespace",
PodUIDs: sets.Set[string]{"test-reserved": sets.Empty{}}, PodUIDs: sets.Set[string]{"test-reserved": sets.Empty{}},
ResourceHandles: []resourcev1alpha2.ResourceHandle{{Data: "test-data", DriverName: driverName}}, ResourceHandles: []resourceapi.ResourceHandle{{Data: "test-data", DriverName: driverName}},
}, },
annotations: make(map[string][]kubecontainer.Annotation), annotations: make(map[string][]kubecontainer.Annotation),
prepared: false, prepared: false,
}, },
resourceClaim: &resourcev1alpha2.ResourceClaim{ resourceClaim: &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "test-pod-claim", Name: "test-pod-claim",
Namespace: "test-namespace", Namespace: "test-namespace",
UID: "test-reserved", UID: "test-reserved",
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: "test-reserved"}, {UID: "test-reserved"},
}, },
}, },
@ -905,7 +905,7 @@ func TestPrepareResources(t *testing.T) {
} }
if test.resourceClaim != nil { if test.resourceClaim != nil {
if _, err := fakeKubeClient.ResourceV1alpha2().ResourceClaims(test.pod.Namespace).Create(context.Background(), test.resourceClaim, metav1.CreateOptions{}); err != nil { if _, err := fakeKubeClient.ResourceV1alpha3().ResourceClaims(test.pod.Namespace).Create(context.Background(), test.resourceClaim, metav1.CreateOptions{}); err != nil {
t.Fatalf("failed to create ResourceClaim %s: %+v", test.resourceClaim.Name, err) t.Fatalf("failed to create ResourceClaim %s: %+v", test.resourceClaim.Name, err)
} }
} }
@ -1020,7 +1020,7 @@ func TestUnprepareResources(t *testing.T) {
DriverName: driverName, DriverName: driverName,
ClaimName: "another-claim-test", ClaimName: "another-claim-test",
Namespace: "test-namespace", Namespace: "test-namespace",
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: driverName, DriverName: driverName,
Data: "test data", Data: "test data",
@ -1109,7 +1109,7 @@ func TestUnprepareResources(t *testing.T) {
DriverName: driverName, DriverName: driverName,
ClaimName: "test-pod-claim-2", ClaimName: "test-pod-claim-2",
Namespace: "test-namespace", Namespace: "test-namespace",
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: driverName, DriverName: driverName,
Data: "test data", Data: "test data",
@ -1159,7 +1159,7 @@ func TestUnprepareResources(t *testing.T) {
DriverName: driverName, DriverName: driverName,
ClaimName: "test-pod-claim-3", ClaimName: "test-pod-claim-3",
Namespace: "test-namespace", Namespace: "test-namespace",
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: driverName, DriverName: driverName,
Data: "test data", Data: "test data",
@ -1208,7 +1208,7 @@ func TestUnprepareResources(t *testing.T) {
DriverName: driverName, DriverName: driverName,
ClaimName: "test-pod-claim", ClaimName: "test-pod-claim",
Namespace: "test-namespace", Namespace: "test-namespace",
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: driverName, DriverName: driverName,
Data: "test data", Data: "test data",
@ -1258,7 +1258,7 @@ func TestUnprepareResources(t *testing.T) {
ClaimName: "test-pod-claim-nil", ClaimName: "test-pod-claim-nil",
Namespace: "test-namespace", Namespace: "test-namespace",
ClaimUID: "test-reserved", ClaimUID: "test-reserved",
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: driverName, DriverName: driverName,
Data: "test data", Data: "test data",
@ -1508,29 +1508,29 @@ func TestParallelPrepareUnprepareResources(t *testing.T) {
}, },
}, },
} }
resourceClaim := &resourcev1alpha2.ResourceClaim{ resourceClaim := &resourceapi.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: claimName, Name: claimName,
Namespace: nameSpace, Namespace: nameSpace,
UID: types.UID(fmt.Sprintf("claim-%d", goRoutineNum)), UID: types.UID(fmt.Sprintf("claim-%d", goRoutineNum)),
}, },
Spec: resourcev1alpha2.ResourceClaimSpec{ Spec: resourceapi.ResourceClaimSpec{
ResourceClassName: "test-class", ResourceClassName: "test-class",
}, },
Status: resourcev1alpha2.ResourceClaimStatus{ Status: resourceapi.ResourceClaimStatus{
DriverName: driverName, DriverName: driverName,
Allocation: &resourcev1alpha2.AllocationResult{ Allocation: &resourceapi.AllocationResult{
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{Data: "test-data", DriverName: driverName}, {Data: "test-data", DriverName: driverName},
}, },
}, },
ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ ReservedFor: []resourceapi.ResourceClaimConsumerReference{
{UID: podUID}, {UID: podUID},
}, },
}, },
} }
if _, err = fakeKubeClient.ResourceV1alpha2().ResourceClaims(pod.Namespace).Create(context.Background(), resourceClaim, metav1.CreateOptions{}); err != nil { if _, err = fakeKubeClient.ResourceV1alpha3().ResourceClaims(pod.Namespace).Create(context.Background(), resourceClaim, metav1.CreateOptions{}); err != nil {
t.Errorf("failed to create ResourceClaim %s: %+v", resourceClaim.Name, err) t.Errorf("failed to create ResourceClaim %s: %+v", resourceClaim.Name, err)
return return
} }

View File

@ -102,7 +102,7 @@ func (h *RegistrationHandler) wipeResourceSlices(pluginName string) {
fieldSelector["driverName"] = pluginName fieldSelector["driverName"] = pluginName
} }
err = h.kubeClient.ResourceV1alpha2().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: fieldSelector.String()}) err = h.kubeClient.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: fieldSelector.String()})
switch { switch {
case err == nil: case err == nil:
logger.V(3).Info("Deleted ResourceSlices", "fieldSelector", fieldSelector) logger.V(3).Info("Deleted ResourceSlices", "fieldSelector", fieldSelector)

View File

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"sync" "sync"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager"
@ -57,7 +57,7 @@ type ClaimInfoState struct {
PodUIDs sets.Set[string] PodUIDs sets.Set[string]
// ResourceHandles is a list of opaque resource data for processing by a specific kubelet plugin // ResourceHandles is a list of opaque resource data for processing by a specific kubelet plugin
ResourceHandles []resourcev1alpha2.ResourceHandle ResourceHandles []resourceapi.ResourceHandle
// CDIDevices is a map of DriverName --> CDI devices returned by the // CDIDevices is a map of DriverName --> CDI devices returned by the
// GRPC API call NodePrepareResource // GRPC API call NodePrepareResource

View File

@ -26,7 +26,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager"
cmerrors "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors" cmerrors "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors"
@ -42,7 +42,7 @@ func assertStateEqual(t *testing.T, restoredState, expectedState ClaimInfoStateL
// TODO (https://github.com/kubernetes/kubernetes/issues/123552): reconsider what data gets stored in checkpoints and whether that is really necessary. // TODO (https://github.com/kubernetes/kubernetes/issues/123552): reconsider what data gets stored in checkpoints and whether that is really necessary.
// //
// As it stands now, a "v1" checkpoint contains data for types like the resourcev1alpha2.ResourceHandle // As it stands now, a "v1" checkpoint contains data for types like the resourceapi.ResourceHandle
// which may change over time as new fields get added in a backward-compatible way (not unusual // which may change over time as new fields get added in a backward-compatible way (not unusual
// for API types). That breaks checksuming with pkg/util/hash because it is based on spew output. // for API types). That breaks checksuming with pkg/util/hash because it is based on spew output.
// That output includes those new fields. // That output includes those new fields.
@ -72,7 +72,7 @@ func TestCheckpointGetOrCreate(t *testing.T) {
ClaimName: "example", ClaimName: "example",
Namespace: "default", Namespace: "default",
PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"),
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: "test-driver.cdi.k8s.io", DriverName: "test-driver.cdi.k8s.io",
Data: `{"a": "b"}`, Data: `{"a": "b"}`,
@ -96,7 +96,7 @@ func TestCheckpointGetOrCreate(t *testing.T) {
ClaimName: "example", ClaimName: "example",
Namespace: "default", Namespace: "default",
PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"),
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: "test-driver-1.cdi.k8s.io", DriverName: "test-driver-1.cdi.k8s.io",
Data: `{"a": "b"}`, Data: `{"a": "b"}`,
@ -125,7 +125,7 @@ func TestCheckpointGetOrCreate(t *testing.T) {
ClaimName: "example-1", ClaimName: "example-1",
Namespace: "default", Namespace: "default",
PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"),
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: "test-driver.cdi.k8s.io", DriverName: "test-driver.cdi.k8s.io",
Data: `{"a": "b"}`, Data: `{"a": "b"}`,
@ -142,7 +142,7 @@ func TestCheckpointGetOrCreate(t *testing.T) {
ClaimName: "example-2", ClaimName: "example-2",
Namespace: "default", Namespace: "default",
PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"),
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: "test-driver.cdi.k8s.io", DriverName: "test-driver.cdi.k8s.io",
Data: `{"c": "d"}`, Data: `{"c": "d"}`,
@ -217,7 +217,7 @@ func TestCheckpointStateStore(t *testing.T) {
ClaimName: "example", ClaimName: "example",
Namespace: "default", Namespace: "default",
PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"),
ResourceHandles: []resourcev1alpha2.ResourceHandle{ ResourceHandles: []resourceapi.ResourceHandle{
{ {
DriverName: "test-driver.cdi.k8s.io", DriverName: "test-driver.cdi.k8s.io",
Data: `{"a": "b"}`, Data: `{"a": "b"}`,

View File

@ -22,7 +22,7 @@ limitations under the License.
package state package state
import ( import (
v1alpha2 "k8s.io/api/resource/v1alpha2" v1alpha3 "k8s.io/api/resource/v1alpha3"
sets "k8s.io/apimachinery/pkg/util/sets" sets "k8s.io/apimachinery/pkg/util/sets"
) )
@ -38,7 +38,7 @@ func (in *ClaimInfoState) DeepCopyInto(out *ClaimInfoState) {
} }
if in.ResourceHandles != nil { if in.ResourceHandles != nil {
in, out := &in.ResourceHandles, &out.ResourceHandles in, out := &in.ResourceHandles, &out.ResourceHandles
*out = make([]v1alpha2.ResourceHandle, len(*in)) *out = make([]v1alpha3.ResourceHandle, len(*in))
for i := range *in { for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i]) (*in)[i].DeepCopyInto(&(*out)[i])
} }

View File

@ -40,7 +40,7 @@ import (
flowcontrolv1 "k8s.io/api/flowcontrol/v1" flowcontrolv1 "k8s.io/api/flowcontrol/v1"
networkingv1beta1 "k8s.io/api/networking/v1beta1" networkingv1beta1 "k8s.io/api/networking/v1beta1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
storagev1 "k8s.io/api/storage/v1" storagev1 "k8s.io/api/storage/v1"
storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1alpha1 "k8s.io/api/storage/v1alpha1"
@ -625,7 +625,7 @@ func AddHandlers(h printers.PrintHandler) {
resourceClassColumnDefinitions := []metav1.TableColumnDefinition{ resourceClassColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "DriverName", Type: "string", Description: resourcev1alpha2.ResourceClass{}.SwaggerDoc()["driverName"]}, {Name: "DriverName", Type: "string", Description: resourceapi.ResourceClass{}.SwaggerDoc()["driverName"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(resourceClassColumnDefinitions, printResourceClass) _ = h.TableHandler(resourceClassColumnDefinitions, printResourceClass)
@ -633,8 +633,8 @@ func AddHandlers(h printers.PrintHandler) {
resourceClaimColumnDefinitions := []metav1.TableColumnDefinition{ resourceClaimColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "ResourceClassName", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, {Name: "ResourceClassName", Type: "string", Description: resourceapi.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]},
{Name: "AllocationMode", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]}, {Name: "AllocationMode", Type: "string", Description: resourceapi.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]},
{Name: "State", Type: "string", Description: "A summary of the current state (allocated, pending, reserved, etc.)."}, {Name: "State", Type: "string", Description: "A summary of the current state (allocated, pending, reserved, etc.)."},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
@ -643,8 +643,8 @@ func AddHandlers(h printers.PrintHandler) {
resourceClaimTemplateColumnDefinitions := []metav1.TableColumnDefinition{ resourceClaimTemplateColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "ResourceClassName", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, {Name: "ResourceClassName", Type: "string", Description: resourceapi.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]},
{Name: "AllocationMode", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]}, {Name: "AllocationMode", Type: "string", Description: resourceapi.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(resourceClaimTemplateColumnDefinitions, printResourceClaimTemplate) _ = h.TableHandler(resourceClaimTemplateColumnDefinitions, printResourceClaimTemplate)
@ -652,7 +652,7 @@ func AddHandlers(h printers.PrintHandler) {
podSchedulingCtxColumnDefinitions := []metav1.TableColumnDefinition{ podSchedulingCtxColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "SelectedNode", Type: "string", Description: resourcev1alpha2.PodSchedulingContextSpec{}.SwaggerDoc()["selectedNode"]}, {Name: "SelectedNode", Type: "string", Description: resourceapi.PodSchedulingContextSpec{}.SwaggerDoc()["selectedNode"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(podSchedulingCtxColumnDefinitions, printPodSchedulingContext) _ = h.TableHandler(podSchedulingCtxColumnDefinitions, printPodSchedulingContext)
@ -660,7 +660,7 @@ func AddHandlers(h printers.PrintHandler) {
resourceClaimParametersColumnDefinitions := []metav1.TableColumnDefinition{ resourceClaimParametersColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "GeneratedFrom", Type: "string", Description: resourcev1alpha2.ResourceClaimParameters{}.SwaggerDoc()["generatedFrom"]}, {Name: "GeneratedFrom", Type: "string", Description: resourceapi.ResourceClaimParameters{}.SwaggerDoc()["generatedFrom"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(resourceClaimParametersColumnDefinitions, printResourceClaimParameters) _ = h.TableHandler(resourceClaimParametersColumnDefinitions, printResourceClaimParameters)
@ -668,7 +668,7 @@ func AddHandlers(h printers.PrintHandler) {
resourceClassParametersColumnDefinitions := []metav1.TableColumnDefinition{ resourceClassParametersColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "GeneratedFrom", Type: "string", Description: resourcev1alpha2.ResourceClassParameters{}.SwaggerDoc()["generatedFrom"]}, {Name: "GeneratedFrom", Type: "string", Description: resourceapi.ResourceClassParameters{}.SwaggerDoc()["generatedFrom"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(resourceClassParametersColumnDefinitions, printResourceClassParameters) _ = h.TableHandler(resourceClassParametersColumnDefinitions, printResourceClassParameters)
@ -676,8 +676,8 @@ func AddHandlers(h printers.PrintHandler) {
nodeResourceCapacityColumnDefinitions := []metav1.TableColumnDefinition{ nodeResourceCapacityColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "Node", Type: "string", Description: resourcev1alpha2.ResourceSlice{}.SwaggerDoc()["nodeName"]}, {Name: "Node", Type: "string", Description: resourceapi.ResourceSlice{}.SwaggerDoc()["nodeName"]},
{Name: "Driver", Type: "string", Description: resourcev1alpha2.ResourceSlice{}.SwaggerDoc()["driverName"]}, {Name: "Driver", Type: "string", Description: resourceapi.ResourceSlice{}.SwaggerDoc()["driverName"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(nodeResourceCapacityColumnDefinitions, printResourceSlice) _ = h.TableHandler(nodeResourceCapacityColumnDefinitions, printResourceSlice)

View File

@ -53,7 +53,7 @@ func (podSchedulingStrategy) NamespaceScoped() bool {
// status. // status.
func (podSchedulingStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (podSchedulingStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha2": fieldpath.NewSet( "resource.k8s.io/v1alpha3": fieldpath.NewSet(
fieldpath.MakePathOrDie("status"), fieldpath.MakePathOrDie("status"),
), ),
} }
@ -114,7 +114,7 @@ var StatusStrategy = podSchedulingStatusStrategy{Strategy}
// should not be modified by the user. For a status update that is the spec. // should not be modified by the user. For a status update that is the spec.
func (podSchedulingStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (podSchedulingStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha2": fieldpath.NewSet( "resource.k8s.io/v1alpha3": fieldpath.NewSet(
fieldpath.MakePathOrDie("spec"), fieldpath.MakePathOrDie("spec"),
), ),
} }

View File

@ -53,7 +53,7 @@ func (resourceclaimStrategy) NamespaceScoped() bool {
// status. // status.
func (resourceclaimStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (resourceclaimStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha2": fieldpath.NewSet( "resource.k8s.io/v1alpha3": fieldpath.NewSet(
fieldpath.MakePathOrDie("status"), fieldpath.MakePathOrDie("status"),
), ),
} }
@ -114,7 +114,7 @@ var StatusStrategy = resourceclaimStatusStrategy{Strategy}
// should not be modified by the user. For a status update that is the spec. // should not be modified by the user. For a status update that is the spec.
func (resourceclaimStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (resourceclaimStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha2": fieldpath.NewSet( "resource.k8s.io/v1alpha3": fieldpath.NewSet(
fieldpath.MakePathOrDie("spec"), fieldpath.MakePathOrDie("spec"),
), ),
} }

View File

@ -17,7 +17,7 @@ limitations under the License.
package rest package rest
import ( import (
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourcev1alpha3 "k8s.io/api/resource/v1alpha3"
"k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/registry/rest"
genericapiserver "k8s.io/apiserver/pkg/server" genericapiserver "k8s.io/apiserver/pkg/server"
@ -40,19 +40,19 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
// If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities. // If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities.
// TODO refactor the plumbing to provide the information in the APIGroupInfo // TODO refactor the plumbing to provide the information in the APIGroupInfo
if storageMap, err := p.v1alpha2Storage(apiResourceConfigSource, restOptionsGetter); err != nil { if storageMap, err := p.v1alpha3Storage(apiResourceConfigSource, restOptionsGetter); err != nil {
return genericapiserver.APIGroupInfo{}, err return genericapiserver.APIGroupInfo{}, err
} else if len(storageMap) > 0 { } else if len(storageMap) > 0 {
apiGroupInfo.VersionedResourcesStorageMap[resourcev1alpha2.SchemeGroupVersion.Version] = storageMap apiGroupInfo.VersionedResourcesStorageMap[resourcev1alpha3.SchemeGroupVersion.Version] = storageMap
} }
return apiGroupInfo, nil return apiGroupInfo, nil
} }
func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { func (p RESTStorageProvider) v1alpha3Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) {
storage := map[string]rest.Storage{} storage := map[string]rest.Storage{}
if resource := "resourceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) {
resourceClassStorage, err := resourceclassstore.NewREST(restOptionsGetter) resourceClassStorage, err := resourceclassstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -60,7 +60,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora
storage[resource] = resourceClassStorage storage[resource] = resourceClassStorage
} }
if resource := "resourceclaims"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclaims"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) {
resourceClaimStorage, resourceClaimStatusStorage, err := resourceclaimstore.NewREST(restOptionsGetter) resourceClaimStorage, resourceClaimStatusStorage, err := resourceclaimstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -69,7 +69,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora
storage[resource+"/status"] = resourceClaimStatusStorage storage[resource+"/status"] = resourceClaimStatusStorage
} }
if resource := "resourceclaimtemplates"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclaimtemplates"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) {
resourceClaimTemplateStorage, err := resourceclaimtemplatestore.NewREST(restOptionsGetter) resourceClaimTemplateStorage, err := resourceclaimtemplatestore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -77,7 +77,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora
storage[resource] = resourceClaimTemplateStorage storage[resource] = resourceClaimTemplateStorage
} }
if resource := "podschedulingcontexts"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { if resource := "podschedulingcontexts"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) {
podSchedulingStorage, podSchedulingStatusStorage, err := podschedulingcontextsstore.NewREST(restOptionsGetter) podSchedulingStorage, podSchedulingStatusStorage, err := podschedulingcontextsstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -86,7 +86,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora
storage[resource+"/status"] = podSchedulingStatusStorage storage[resource+"/status"] = podSchedulingStatusStorage
} }
if resource := "resourceclaimparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclaimparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) {
resourceClaimParametersStorage, err := resourceclaimparametersstore.NewREST(restOptionsGetter) resourceClaimParametersStorage, err := resourceclaimparametersstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -94,7 +94,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora
storage[resource] = resourceClaimParametersStorage storage[resource] = resourceClaimParametersStorage
} }
if resource := "resourceclassparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclassparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) {
resourceClassParametersStorage, err := resourceclassparametersstore.NewREST(restOptionsGetter) resourceClassParametersStorage, err := resourceclassparametersstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -102,7 +102,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora
storage[resource] = resourceClassParametersStorage storage[resource] = resourceClassParametersStorage
} }
if resource := "resourceslices"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceslices"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) {
resourceSliceStorage, err := resourceslicestore.NewREST(restOptionsGetter) resourceSliceStorage, err := resourceslicestore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -518,7 +518,7 @@ func addAllEventHandlers(
handlers = append(handlers, handlerRegistration) handlers = append(handlers, handlerRegistration)
case framework.PodSchedulingContext: case framework.PodSchedulingContext:
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
if handlerRegistration, err = informerFactory.Resource().V1alpha2().PodSchedulingContexts().Informer().AddEventHandler( if handlerRegistration, err = informerFactory.Resource().V1alpha3().PodSchedulingContexts().Informer().AddEventHandler(
buildEvtResHandler(at, framework.PodSchedulingContext, "PodSchedulingContext"), buildEvtResHandler(at, framework.PodSchedulingContext, "PodSchedulingContext"),
); err != nil { ); err != nil {
return err return err
@ -534,7 +534,7 @@ func addAllEventHandlers(
} }
case framework.ResourceClass: case framework.ResourceClass:
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
if handlerRegistration, err = informerFactory.Resource().V1alpha2().ResourceClasses().Informer().AddEventHandler( if handlerRegistration, err = informerFactory.Resource().V1alpha3().ResourceClasses().Informer().AddEventHandler(
buildEvtResHandler(at, framework.ResourceClass, "ResourceClass"), buildEvtResHandler(at, framework.ResourceClass, "ResourceClass"),
); err != nil { ); err != nil {
return err return err
@ -543,7 +543,7 @@ func addAllEventHandlers(
} }
case framework.ResourceClaimParameters: case framework.ResourceClaimParameters:
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
if handlerRegistration, err = informerFactory.Resource().V1alpha2().ResourceClaimParameters().Informer().AddEventHandler( if handlerRegistration, err = informerFactory.Resource().V1alpha3().ResourceClaimParameters().Informer().AddEventHandler(
buildEvtResHandler(at, framework.ResourceClaimParameters, "ResourceClaimParameters"), buildEvtResHandler(at, framework.ResourceClaimParameters, "ResourceClaimParameters"),
); err != nil { ); err != nil {
return err return err
@ -552,7 +552,7 @@ func addAllEventHandlers(
} }
case framework.ResourceClassParameters: case framework.ResourceClassParameters:
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
if handlerRegistration, err = informerFactory.Resource().V1alpha2().ResourceClassParameters().Informer().AddEventHandler( if handlerRegistration, err = informerFactory.Resource().V1alpha3().ResourceClassParameters().Informer().AddEventHandler(
buildEvtResHandler(at, framework.ResourceClassParameters, "ResourceClassParameters"), buildEvtResHandler(at, framework.ResourceClassParameters, "ResourceClassParameters"),
); err != nil { ); err != nil {
return err return err

View File

@ -26,7 +26,7 @@ import (
appsv1 "k8s.io/api/apps/v1" appsv1 "k8s.io/api/apps/v1"
batchv1 "k8s.io/api/batch/v1" batchv1 "k8s.io/api/batch/v1"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
storagev1 "k8s.io/api/storage/v1" storagev1 "k8s.io/api/storage/v1"
"k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/api/resource"
utilfeature "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature"
@ -259,11 +259,11 @@ func TestAddAllEventHandlers(t *testing.T) {
reflect.TypeOf(&v1.Pod{}): true, reflect.TypeOf(&v1.Pod{}): true,
reflect.TypeOf(&v1.Node{}): true, reflect.TypeOf(&v1.Node{}): true,
reflect.TypeOf(&v1.Namespace{}): true, reflect.TypeOf(&v1.Namespace{}): true,
reflect.TypeOf(&resourcev1alpha2.PodSchedulingContext{}): true, reflect.TypeOf(&resourceapi.PodSchedulingContext{}): true,
reflect.TypeOf(&resourcev1alpha2.ResourceClaim{}): true, reflect.TypeOf(&resourceapi.ResourceClaim{}): true,
reflect.TypeOf(&resourcev1alpha2.ResourceClaimParameters{}): true, reflect.TypeOf(&resourceapi.ResourceClaimParameters{}): true,
reflect.TypeOf(&resourcev1alpha2.ResourceClass{}): true, reflect.TypeOf(&resourceapi.ResourceClass{}): true,
reflect.TypeOf(&resourcev1alpha2.ResourceClassParameters{}): true, reflect.TypeOf(&resourceapi.ResourceClassParameters{}): true,
}, },
expectDynamicInformers: map[schema.GroupVersionResource]bool{}, expectDynamicInformers: map[schema.GroupVersionResource]bool{},
}, },
@ -342,7 +342,7 @@ func TestAddAllEventHandlers(t *testing.T) {
dynInformerFactory := dynamicinformer.NewDynamicSharedInformerFactory(dynclient, 0) dynInformerFactory := dynamicinformer.NewDynamicSharedInformerFactory(dynclient, 0)
var resourceClaimCache *assumecache.AssumeCache var resourceClaimCache *assumecache.AssumeCache
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
resourceClaimInformer := informerFactory.Resource().V1alpha2().ResourceClaims().Informer() resourceClaimInformer := informerFactory.Resource().V1alpha3().ResourceClaims().Informer()
resourceClaimCache = assumecache.NewAssumeCache(logger, resourceClaimInformer, "ResourceClaim", "", nil) resourceClaimCache = assumecache.NewAssumeCache(logger, resourceClaimInformer, "ResourceClaim", "", nil)
} }

View File

@ -27,7 +27,7 @@ import (
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
apiequality "k8s.io/apimachinery/pkg/api/equality" apiequality "k8s.io/apimachinery/pkg/api/equality"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -35,9 +35,9 @@ import (
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
resourcev1alpha2apply "k8s.io/client-go/applyconfigurations/resource/v1alpha2" resourceapiapply "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
"k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes"
resourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2" resourcelisters "k8s.io/client-go/listers/resource/v1alpha3"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/retry" "k8s.io/client-go/util/retry"
"k8s.io/component-helpers/scheduling/corev1/nodeaffinity" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity"
@ -76,7 +76,7 @@ type stateData struct {
// the plugin itself successfully does an Update. // the plugin itself successfully does an Update.
// //
// Empty if the Pod has no claims. // Empty if the Pod has no claims.
claims []*resourcev1alpha2.ResourceClaim claims []*resourceapi.ResourceClaim
// podSchedulingState keeps track of the PodSchedulingContext // podSchedulingState keeps track of the PodSchedulingContext
// (if one exists) and the changes made to it. // (if one exists) and the changes made to it.
@ -114,7 +114,7 @@ type informationForClaim struct {
// The status of the claim got from the // The status of the claim got from the
// schedulingCtx by PreFilter for repeated // schedulingCtx by PreFilter for repeated
// evaluation in Filter. Nil for claim which don't have it. // evaluation in Filter. Nil for claim which don't have it.
status *resourcev1alpha2.ResourceClaimSchedulingStatus status *resourceapi.ResourceClaimSchedulingStatus
// structuredParameters is true if the claim is handled via the builtin // structuredParameters is true if the claim is handled via the builtin
// controller. // controller.
@ -122,7 +122,7 @@ type informationForClaim struct {
controller *claimController controller *claimController
// Set by Reserved, published by PreBind. // Set by Reserved, published by PreBind.
allocation *resourcev1alpha2.AllocationResult allocation *resourceapi.AllocationResult
allocationDriverName string allocationDriverName string
} }
@ -134,7 +134,7 @@ type podSchedulingState struct {
// where it might get shared by different plugins. But in practice, // where it might get shared by different plugins. But in practice,
// it is currently only used by dynamic provisioning and thus // it is currently only used by dynamic provisioning and thus
// managed entirely here. // managed entirely here.
schedulingCtx *resourcev1alpha2.PodSchedulingContext schedulingCtx *resourceapi.PodSchedulingContext
// selectedNode is set if (and only if) a node has been selected. // selectedNode is set if (and only if) a node has been selected.
selectedNode *string selectedNode *string
@ -151,7 +151,7 @@ func (p *podSchedulingState) isDirty() bool {
// init checks whether there is already a PodSchedulingContext object. // init checks whether there is already a PodSchedulingContext object.
// Must not be called concurrently, // Must not be called concurrently,
func (p *podSchedulingState) init(ctx context.Context, pod *v1.Pod, podSchedulingContextLister resourcev1alpha2listers.PodSchedulingContextLister) error { func (p *podSchedulingState) init(ctx context.Context, pod *v1.Pod, podSchedulingContextLister resourcelisters.PodSchedulingContextLister) error {
schedulingCtx, err := podSchedulingContextLister.PodSchedulingContexts(pod.Namespace).Get(pod.Name) schedulingCtx, err := podSchedulingContextLister.PodSchedulingContexts(pod.Namespace).Get(pod.Name)
switch { switch {
case apierrors.IsNotFound(err): case apierrors.IsNotFound(err):
@ -192,7 +192,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset
} else { } else {
logger.V(5).Info("Updating PodSchedulingContext", "podSchedulingCtx", klog.KObj(schedulingCtx)) logger.V(5).Info("Updating PodSchedulingContext", "podSchedulingCtx", klog.KObj(schedulingCtx))
} }
_, err = clientset.ResourceV1alpha2().PodSchedulingContexts(schedulingCtx.Namespace).Update(ctx, schedulingCtx, metav1.UpdateOptions{}) _, err = clientset.ResourceV1alpha3().PodSchedulingContexts(schedulingCtx.Namespace).Update(ctx, schedulingCtx, metav1.UpdateOptions{})
if apierrors.IsConflict(err) { if apierrors.IsConflict(err) {
// We don't use SSA by default for performance reasons // We don't use SSA by default for performance reasons
// (https://github.com/kubernetes/kubernetes/issues/113700#issuecomment-1698563918) // (https://github.com/kubernetes/kubernetes/issues/113700#issuecomment-1698563918)
@ -207,7 +207,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset
// Using SSA instead of Get+Update has the advantage that // Using SSA instead of Get+Update has the advantage that
// there is no delay for the Get. SSA is safe because only // there is no delay for the Get. SSA is safe because only
// the scheduler updates these fields. // the scheduler updates these fields.
spec := resourcev1alpha2apply.PodSchedulingContextSpec() spec := resourceapiapply.PodSchedulingContextSpec()
spec.SelectedNode = p.selectedNode spec.SelectedNode = p.selectedNode
if p.potentialNodes != nil { if p.potentialNodes != nil {
spec.PotentialNodes = *p.potentialNodes spec.PotentialNodes = *p.potentialNodes
@ -217,7 +217,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset
// the list would clear it. // the list would clear it.
spec.PotentialNodes = p.schedulingCtx.Spec.PotentialNodes spec.PotentialNodes = p.schedulingCtx.Spec.PotentialNodes
} }
schedulingCtxApply := resourcev1alpha2apply.PodSchedulingContext(pod.Name, pod.Namespace).WithSpec(spec) schedulingCtxApply := resourceapiapply.PodSchedulingContext(pod.Name, pod.Namespace).WithSpec(spec)
if loggerV := logger.V(6); loggerV.Enabled() { if loggerV := logger.V(6); loggerV.Enabled() {
// At a high enough log level, dump the entire object. // At a high enough log level, dump the entire object.
@ -225,12 +225,12 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset
} else { } else {
logger.V(5).Info("Patching PodSchedulingContext", "podSchedulingCtx", klog.KObj(pod)) logger.V(5).Info("Patching PodSchedulingContext", "podSchedulingCtx", klog.KObj(pod))
} }
_, err = clientset.ResourceV1alpha2().PodSchedulingContexts(pod.Namespace).Apply(ctx, schedulingCtxApply, metav1.ApplyOptions{FieldManager: "kube-scheduler", Force: true}) _, err = clientset.ResourceV1alpha3().PodSchedulingContexts(pod.Namespace).Apply(ctx, schedulingCtxApply, metav1.ApplyOptions{FieldManager: "kube-scheduler", Force: true})
} }
} else { } else {
// Create it. // Create it.
schedulingCtx := &resourcev1alpha2.PodSchedulingContext{ schedulingCtx := &resourceapi.PodSchedulingContext{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: pod.Name, Name: pod.Name,
Namespace: pod.Namespace, Namespace: pod.Namespace,
@ -249,7 +249,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset
} else { } else {
logger.V(5).Info("Creating PodSchedulingContext", "podSchedulingCtx", klog.KObj(schedulingCtx)) logger.V(5).Info("Creating PodSchedulingContext", "podSchedulingCtx", klog.KObj(schedulingCtx))
} }
_, err = clientset.ResourceV1alpha2().PodSchedulingContexts(schedulingCtx.Namespace).Create(ctx, schedulingCtx, metav1.CreateOptions{}) _, err = clientset.ResourceV1alpha3().PodSchedulingContexts(schedulingCtx.Namespace).Create(ctx, schedulingCtx, metav1.CreateOptions{})
} }
if err != nil { if err != nil {
return err return err
@ -259,7 +259,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset
return nil return nil
} }
func statusForClaim(schedulingCtx *resourcev1alpha2.PodSchedulingContext, podClaimName string) *resourcev1alpha2.ResourceClaimSchedulingStatus { func statusForClaim(schedulingCtx *resourceapi.PodSchedulingContext, podClaimName string) *resourceapi.ResourceClaimSchedulingStatus {
if schedulingCtx == nil { if schedulingCtx == nil {
return nil return nil
} }
@ -276,11 +276,11 @@ type dynamicResources struct {
enabled bool enabled bool
fh framework.Handle fh framework.Handle
clientset kubernetes.Interface clientset kubernetes.Interface
classLister resourcev1alpha2listers.ResourceClassLister classLister resourcelisters.ResourceClassLister
podSchedulingContextLister resourcev1alpha2listers.PodSchedulingContextLister podSchedulingContextLister resourcelisters.PodSchedulingContextLister
claimParametersLister resourcev1alpha2listers.ResourceClaimParametersLister claimParametersLister resourcelisters.ResourceClaimParametersLister
classParametersLister resourcev1alpha2listers.ResourceClassParametersLister classParametersLister resourcelisters.ResourceClassParametersLister
resourceSliceLister resourcev1alpha2listers.ResourceSliceLister resourceSliceLister resourcelisters.ResourceSliceLister
claimNameLookup *resourceclaim.Lookup claimNameLookup *resourceclaim.Lookup
// claimParametersIndexer has the common claimParametersGeneratedFrom indexer installed to // claimParametersIndexer has the common claimParametersGeneratedFrom indexer installed to
@ -357,13 +357,13 @@ func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts fe
enabled: true, enabled: true,
fh: fh, fh: fh,
clientset: fh.ClientSet(), clientset: fh.ClientSet(),
classLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClasses().Lister(), classLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClasses().Lister(),
podSchedulingContextLister: fh.SharedInformerFactory().Resource().V1alpha2().PodSchedulingContexts().Lister(), podSchedulingContextLister: fh.SharedInformerFactory().Resource().V1alpha3().PodSchedulingContexts().Lister(),
claimParametersLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClaimParameters().Lister(), claimParametersLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClaimParameters().Lister(),
claimParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClaimParameters().Informer().GetIndexer(), claimParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClaimParameters().Informer().GetIndexer(),
classParametersLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClassParameters().Lister(), classParametersLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClassParameters().Lister(),
classParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClassParameters().Informer().GetIndexer(), classParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClassParameters().Informer().GetIndexer(),
resourceSliceLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceSlices().Lister(), resourceSliceLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceSlices().Lister(),
claimNameLookup: resourceclaim.NewNameLookup(fh.ClientSet()), claimNameLookup: resourceclaim.NewNameLookup(fh.ClientSet()),
claimAssumeCache: fh.ResourceClaimCache(), claimAssumeCache: fh.ResourceClaimCache(),
} }
@ -378,14 +378,14 @@ func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts fe
return pl, nil return pl, nil
} }
func claimParametersReferenceKeyFunc(namespace string, ref *resourcev1alpha2.ResourceClaimParametersReference) string { func claimParametersReferenceKeyFunc(namespace string, ref *resourceapi.ResourceClaimParametersReference) string {
return ref.APIGroup + "/" + ref.Kind + "/" + namespace + "/" + ref.Name return ref.APIGroup + "/" + ref.Kind + "/" + namespace + "/" + ref.Name
} }
// claimParametersGeneratedFromIndexFunc is an index function that returns other resource keys // claimParametersGeneratedFromIndexFunc is an index function that returns other resource keys
// (= apiGroup/kind/namespace/name) for ResourceClaimParametersReference in a given claim parameters. // (= apiGroup/kind/namespace/name) for ResourceClaimParametersReference in a given claim parameters.
func claimParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) { func claimParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) {
parameters, ok := obj.(*resourcev1alpha2.ResourceClaimParameters) parameters, ok := obj.(*resourceapi.ResourceClaimParameters)
if !ok { if !ok {
return nil, nil return nil, nil
} }
@ -395,14 +395,14 @@ func claimParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) {
return []string{claimParametersReferenceKeyFunc(parameters.Namespace, parameters.GeneratedFrom)}, nil return []string{claimParametersReferenceKeyFunc(parameters.Namespace, parameters.GeneratedFrom)}, nil
} }
func classParametersReferenceKeyFunc(ref *resourcev1alpha2.ResourceClassParametersReference) string { func classParametersReferenceKeyFunc(ref *resourceapi.ResourceClassParametersReference) string {
return ref.APIGroup + "/" + ref.Kind + "/" + ref.Namespace + "/" + ref.Name return ref.APIGroup + "/" + ref.Kind + "/" + ref.Namespace + "/" + ref.Name
} }
// classParametersGeneratedFromIndexFunc is an index function that returns other resource keys // classParametersGeneratedFromIndexFunc is an index function that returns other resource keys
// (= apiGroup/kind/namespace/name) for ResourceClassParametersReference in a given class parameters. // (= apiGroup/kind/namespace/name) for ResourceClassParametersReference in a given class parameters.
func classParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) { func classParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) {
parameters, ok := obj.(*resourcev1alpha2.ResourceClassParameters) parameters, ok := obj.(*resourceapi.ResourceClassParameters)
if !ok { if !ok {
return nil, nil return nil, nil
} }
@ -478,21 +478,21 @@ func (pl *dynamicResources) PreEnqueue(ctx context.Context, pod *v1.Pod) (status
// pod schedulable. It errs on the side of letting a pod scheduling attempt // pod schedulable. It errs on the side of letting a pod scheduling attempt
// happen. The delete claim event will not invoke it, so newObj will never be nil. // happen. The delete claim event will not invoke it, so newObj will never be nil.
func (pl *dynamicResources) isSchedulableAfterClaimParametersChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { func (pl *dynamicResources) isSchedulableAfterClaimParametersChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) {
originalParameters, modifiedParameters, err := schedutil.As[*resourcev1alpha2.ResourceClaimParameters](oldObj, newObj) originalParameters, modifiedParameters, err := schedutil.As[*resourceapi.ResourceClaimParameters](oldObj, newObj)
if err != nil { if err != nil {
// Shouldn't happen. // Shouldn't happen.
return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClaimParametersChange: %w", err) return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClaimParametersChange: %w", err)
} }
usesParameters := false usesParameters := false
if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourcev1alpha2.ResourceClaim) { if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourceapi.ResourceClaim) {
ref := claim.Spec.ParametersRef ref := claim.Spec.ParametersRef
if ref == nil { if ref == nil {
return return
} }
// Using in-tree parameters directly? // Using in-tree parameters directly?
if ref.APIGroup == resourcev1alpha2.SchemeGroupVersion.Group && if ref.APIGroup == resourceapi.SchemeGroupVersion.Group &&
ref.Kind == "ResourceClaimParameters" { ref.Kind == "ResourceClaimParameters" {
if modifiedParameters.Name == ref.Name { if modifiedParameters.Name == ref.Name {
usesParameters = true usesParameters = true
@ -546,14 +546,14 @@ func (pl *dynamicResources) isSchedulableAfterClaimParametersChange(logger klog.
// pod schedulable. It errs on the side of letting a pod scheduling attempt // pod schedulable. It errs on the side of letting a pod scheduling attempt
// happen. The delete class event will not invoke it, so newObj will never be nil. // happen. The delete class event will not invoke it, so newObj will never be nil.
func (pl *dynamicResources) isSchedulableAfterClassParametersChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { func (pl *dynamicResources) isSchedulableAfterClassParametersChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) {
originalParameters, modifiedParameters, err := schedutil.As[*resourcev1alpha2.ResourceClassParameters](oldObj, newObj) originalParameters, modifiedParameters, err := schedutil.As[*resourceapi.ResourceClassParameters](oldObj, newObj)
if err != nil { if err != nil {
// Shouldn't happen. // Shouldn't happen.
return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClassParametersChange: %w", err) return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClassParametersChange: %w", err)
} }
usesParameters := false usesParameters := false
if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourcev1alpha2.ResourceClaim) { if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourceapi.ResourceClaim) {
class, err := pl.classLister.Get(claim.Spec.ResourceClassName) class, err := pl.classLister.Get(claim.Spec.ResourceClassName)
if err != nil { if err != nil {
if !apierrors.IsNotFound(err) { if !apierrors.IsNotFound(err) {
@ -567,7 +567,7 @@ func (pl *dynamicResources) isSchedulableAfterClassParametersChange(logger klog.
} }
// Using in-tree parameters directly? // Using in-tree parameters directly?
if ref.APIGroup == resourcev1alpha2.SchemeGroupVersion.Group && if ref.APIGroup == resourceapi.SchemeGroupVersion.Group &&
ref.Kind == "ResourceClassParameters" { ref.Kind == "ResourceClassParameters" {
if modifiedParameters.Name == ref.Name { if modifiedParameters.Name == ref.Name {
usesParameters = true usesParameters = true
@ -621,14 +621,14 @@ func (pl *dynamicResources) isSchedulableAfterClassParametersChange(logger klog.
// pod schedulable. It errs on the side of letting a pod scheduling attempt // pod schedulable. It errs on the side of letting a pod scheduling attempt
// happen. The delete claim event will not invoke it, so newObj will never be nil. // happen. The delete claim event will not invoke it, so newObj will never be nil.
func (pl *dynamicResources) isSchedulableAfterClaimChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { func (pl *dynamicResources) isSchedulableAfterClaimChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) {
originalClaim, modifiedClaim, err := schedutil.As[*resourcev1alpha2.ResourceClaim](oldObj, newObj) originalClaim, modifiedClaim, err := schedutil.As[*resourceapi.ResourceClaim](oldObj, newObj)
if err != nil { if err != nil {
// Shouldn't happen. // Shouldn't happen.
return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClaimChange: %w", err) return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClaimChange: %w", err)
} }
usesClaim := false usesClaim := false
if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourcev1alpha2.ResourceClaim) { if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourceapi.ResourceClaim) {
if claim.UID == modifiedClaim.UID { if claim.UID == modifiedClaim.UID {
usesClaim = true usesClaim = true
} }
@ -694,7 +694,7 @@ func (pl *dynamicResources) isSchedulableAfterPodSchedulingContextChange(logger
return framework.QueueSkip, nil return framework.QueueSkip, nil
} }
oldPodScheduling, newPodScheduling, err := schedutil.As[*resourcev1alpha2.PodSchedulingContext](oldObj, newObj) oldPodScheduling, newPodScheduling, err := schedutil.As[*resourceapi.PodSchedulingContext](oldObj, newObj)
if err != nil { if err != nil {
// Shouldn't happen. // Shouldn't happen.
return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterPodSchedulingContextChange: %w", err) return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterPodSchedulingContextChange: %w", err)
@ -712,8 +712,8 @@ func (pl *dynamicResources) isSchedulableAfterPodSchedulingContextChange(logger
// immediately if this occurred for the first time, otherwise // immediately if this occurred for the first time, otherwise
// we allow backoff. // we allow backoff.
pendingDelayedClaims := 0 pendingDelayedClaims := 0
if err := pl.foreachPodResourceClaim(pod, func(podResourceName string, claim *resourcev1alpha2.ResourceClaim) { if err := pl.foreachPodResourceClaim(pod, func(podResourceName string, claim *resourceapi.ResourceClaim) {
if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer && if claim.Spec.AllocationMode == resourceapi.AllocationModeWaitForFirstConsumer &&
claim.Status.Allocation == nil && claim.Status.Allocation == nil &&
!podSchedulingHasClaimInfo(podScheduling, podResourceName) { !podSchedulingHasClaimInfo(podScheduling, podResourceName) {
pendingDelayedClaims++ pendingDelayedClaims++
@ -796,7 +796,7 @@ func (pl *dynamicResources) isSchedulableAfterPodSchedulingContextChange(logger
} }
func podSchedulingHasClaimInfo(podScheduling *resourcev1alpha2.PodSchedulingContext, podResourceName string) bool { func podSchedulingHasClaimInfo(podScheduling *resourceapi.PodSchedulingContext, podResourceName string) bool {
for _, claimStatus := range podScheduling.Status.ResourceClaims { for _, claimStatus := range podScheduling.Status.ResourceClaims {
if claimStatus.Name == podResourceName { if claimStatus.Name == podResourceName {
return true return true
@ -806,9 +806,9 @@ func podSchedulingHasClaimInfo(podScheduling *resourcev1alpha2.PodSchedulingCont
} }
// podResourceClaims returns the ResourceClaims for all pod.Spec.PodResourceClaims. // podResourceClaims returns the ResourceClaims for all pod.Spec.PodResourceClaims.
func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourcev1alpha2.ResourceClaim, error) { func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourceapi.ResourceClaim, error) {
claims := make([]*resourcev1alpha2.ResourceClaim, 0, len(pod.Spec.ResourceClaims)) claims := make([]*resourceapi.ResourceClaim, 0, len(pod.Spec.ResourceClaims))
if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourcev1alpha2.ResourceClaim) { if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourceapi.ResourceClaim) {
// We store the pointer as returned by the lister. The // We store the pointer as returned by the lister. The
// assumption is that if a claim gets modified while our code // assumption is that if a claim gets modified while our code
// runs, the cache will store a new pointer, not mutate the // runs, the cache will store a new pointer, not mutate the
@ -822,7 +822,7 @@ func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourcev1alpha2.
// foreachPodResourceClaim checks that each ResourceClaim for the pod exists. // foreachPodResourceClaim checks that each ResourceClaim for the pod exists.
// It calls an optional handler for those claims that it finds. // It calls an optional handler for those claims that it finds.
func (pl *dynamicResources) foreachPodResourceClaim(pod *v1.Pod, cb func(podResourceName string, claim *resourcev1alpha2.ResourceClaim)) error { func (pl *dynamicResources) foreachPodResourceClaim(pod *v1.Pod, cb func(podResourceName string, claim *resourceapi.ResourceClaim)) error {
for _, resource := range pod.Spec.ResourceClaims { for _, resource := range pod.Spec.ResourceClaims {
claimName, mustCheckOwner, err := pl.claimNameLookup.Name(pod, &resource) claimName, mustCheckOwner, err := pl.claimNameLookup.Name(pod, &resource)
if err != nil { if err != nil {
@ -839,7 +839,7 @@ func (pl *dynamicResources) foreachPodResourceClaim(pod *v1.Pod, cb func(podReso
return err return err
} }
claim, ok := obj.(*resourcev1alpha2.ResourceClaim) claim, ok := obj.(*resourceapi.ResourceClaim)
if !ok { if !ok {
return fmt.Errorf("unexpected object type %T for assumed object %s/%s", obj, pod.Namespace, *claimName) return fmt.Errorf("unexpected object type %T for assumed object %s/%s", obj, pod.Namespace, *claimName)
} }
@ -918,7 +918,7 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl
// The claim was allocated by the scheduler if it has the finalizer that is // The claim was allocated by the scheduler if it has the finalizer that is
// reserved for Kubernetes. // reserved for Kubernetes.
s.informationsForClaim[index].structuredParameters = slices.Contains(claim.Finalizers, resourcev1alpha2.Finalizer) s.informationsForClaim[index].structuredParameters = slices.Contains(claim.Finalizers, resourceapi.Finalizer)
} else { } else {
// The ResourceClass might have a node filter. This is // The ResourceClass might have a node filter. This is
// useful for trimming the initial set of potential // useful for trimming the initial set of potential
@ -970,7 +970,7 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl
} }
s.informationsForClaim[index].controller = controller s.informationsForClaim[index].controller = controller
needResourceInformation = true needResourceInformation = true
} else if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeImmediate { } else if claim.Spec.AllocationMode == resourceapi.AllocationModeImmediate {
// This will get resolved by the resource driver. // This will get resolved by the resource driver.
return nil, statusUnschedulable(logger, "unallocated immediate resourceclaim", "pod", klog.KObj(pod), "resourceclaim", klog.KObj(claim)) return nil, statusUnschedulable(logger, "unallocated immediate resourceclaim", "pod", klog.KObj(pod), "resourceclaim", klog.KObj(claim))
} }
@ -999,7 +999,7 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl
return nil, nil return nil, nil
} }
func (pl *dynamicResources) lookupParameters(logger klog.Logger, class *resourcev1alpha2.ResourceClass, claim *resourcev1alpha2.ResourceClaim) (classParameters *resourcev1alpha2.ResourceClassParameters, claimParameters *resourcev1alpha2.ResourceClaimParameters, status *framework.Status) { func (pl *dynamicResources) lookupParameters(logger klog.Logger, class *resourceapi.ResourceClass, claim *resourceapi.ResourceClaim) (classParameters *resourceapi.ResourceClassParameters, claimParameters *resourceapi.ResourceClaimParameters, status *framework.Status) {
classParameters, status = pl.lookupClassParameters(logger, class) classParameters, status = pl.lookupClassParameters(logger, class)
if status != nil { if status != nil {
return return
@ -1008,14 +1008,14 @@ func (pl *dynamicResources) lookupParameters(logger klog.Logger, class *resource
return return
} }
func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *resourcev1alpha2.ResourceClass) (*resourcev1alpha2.ResourceClassParameters, *framework.Status) { func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *resourceapi.ResourceClass) (*resourceapi.ResourceClassParameters, *framework.Status) {
defaultClassParameters := resourcev1alpha2.ResourceClassParameters{} defaultClassParameters := resourceapi.ResourceClassParameters{}
if class.ParametersRef == nil { if class.ParametersRef == nil {
return &defaultClassParameters, nil return &defaultClassParameters, nil
} }
if class.ParametersRef.APIGroup == resourcev1alpha2.SchemeGroupVersion.Group && if class.ParametersRef.APIGroup == resourceapi.SchemeGroupVersion.Group &&
class.ParametersRef.Kind == "ResourceClassParameters" { class.ParametersRef.Kind == "ResourceClassParameters" {
// Use the parameters which were referenced directly. // Use the parameters which were referenced directly.
parameters, err := pl.classParametersLister.ResourceClassParameters(class.ParametersRef.Namespace).Get(class.ParametersRef.Name) parameters, err := pl.classParametersLister.ResourceClassParameters(class.ParametersRef.Namespace).Get(class.ParametersRef.Name)
@ -1036,14 +1036,14 @@ func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *res
case 0: case 0:
return nil, statusUnschedulable(logger, fmt.Sprintf("generated class parameters for %s.%s %s not found", class.ParametersRef.Kind, class.ParametersRef.APIGroup, klog.KRef(class.ParametersRef.Namespace, class.ParametersRef.Name))) return nil, statusUnschedulable(logger, fmt.Sprintf("generated class parameters for %s.%s %s not found", class.ParametersRef.Kind, class.ParametersRef.APIGroup, klog.KRef(class.ParametersRef.Namespace, class.ParametersRef.Name)))
case 1: case 1:
parameters, ok := objs[0].(*resourcev1alpha2.ResourceClassParameters) parameters, ok := objs[0].(*resourceapi.ResourceClassParameters)
if !ok { if !ok {
return nil, statusError(logger, fmt.Errorf("unexpected object in class parameters index: %T", objs[0])) return nil, statusError(logger, fmt.Errorf("unexpected object in class parameters index: %T", objs[0]))
} }
return parameters, nil return parameters, nil
default: default:
sort.Slice(objs, func(i, j int) bool { sort.Slice(objs, func(i, j int) bool {
obj1, obj2 := objs[i].(*resourcev1alpha2.ResourceClassParameters), objs[j].(*resourcev1alpha2.ResourceClassParameters) obj1, obj2 := objs[i].(*resourceapi.ResourceClassParameters), objs[j].(*resourceapi.ResourceClassParameters)
if obj1 == nil || obj2 == nil { if obj1 == nil || obj2 == nil {
return false return false
} }
@ -1053,20 +1053,20 @@ func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *res
} }
} }
func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *resourcev1alpha2.ResourceClass, claim *resourcev1alpha2.ResourceClaim) (*resourcev1alpha2.ResourceClaimParameters, *framework.Status) { func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *resourceapi.ResourceClass, claim *resourceapi.ResourceClaim) (*resourceapi.ResourceClaimParameters, *framework.Status) {
defaultClaimParameters := resourcev1alpha2.ResourceClaimParameters{ defaultClaimParameters := resourceapi.ResourceClaimParameters{
Shareable: true, Shareable: true,
DriverRequests: []resourcev1alpha2.DriverRequests{ DriverRequests: []resourceapi.DriverRequests{
{ {
DriverName: class.DriverName, DriverName: class.DriverName,
Requests: []resourcev1alpha2.ResourceRequest{ Requests: []resourceapi.ResourceRequest{
{ {
ResourceRequestModel: resourcev1alpha2.ResourceRequestModel{ ResourceRequestModel: resourceapi.ResourceRequestModel{
// TODO: This only works because NamedResources is // TODO: This only works because NamedResources is
// the only model currently implemented. We need to // the only model currently implemented. We need to
// match the default to how the resources of this // match the default to how the resources of this
// class are being advertized in a ResourceSlice. // class are being advertized in a ResourceSlice.
NamedResources: &resourcev1alpha2.NamedResourcesRequest{ NamedResources: &resourceapi.NamedResourcesRequest{
Selector: "true", Selector: "true",
}, },
}, },
@ -1079,7 +1079,7 @@ func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *res
if claim.Spec.ParametersRef == nil { if claim.Spec.ParametersRef == nil {
return &defaultClaimParameters, nil return &defaultClaimParameters, nil
} }
if claim.Spec.ParametersRef.APIGroup == resourcev1alpha2.SchemeGroupVersion.Group && if claim.Spec.ParametersRef.APIGroup == resourceapi.SchemeGroupVersion.Group &&
claim.Spec.ParametersRef.Kind == "ResourceClaimParameters" { claim.Spec.ParametersRef.Kind == "ResourceClaimParameters" {
// Use the parameters which were referenced directly. // Use the parameters which were referenced directly.
parameters, err := pl.claimParametersLister.ResourceClaimParameters(claim.Namespace).Get(claim.Spec.ParametersRef.Name) parameters, err := pl.claimParametersLister.ResourceClaimParameters(claim.Namespace).Get(claim.Spec.ParametersRef.Name)
@ -1100,14 +1100,14 @@ func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *res
case 0: case 0:
return nil, statusUnschedulable(logger, fmt.Sprintf("generated claim parameters for %s.%s %s not found", claim.Spec.ParametersRef.Kind, claim.Spec.ParametersRef.APIGroup, klog.KRef(claim.Namespace, claim.Spec.ParametersRef.Name))) return nil, statusUnschedulable(logger, fmt.Sprintf("generated claim parameters for %s.%s %s not found", claim.Spec.ParametersRef.Kind, claim.Spec.ParametersRef.APIGroup, klog.KRef(claim.Namespace, claim.Spec.ParametersRef.Name)))
case 1: case 1:
parameters, ok := objs[0].(*resourcev1alpha2.ResourceClaimParameters) parameters, ok := objs[0].(*resourceapi.ResourceClaimParameters)
if !ok { if !ok {
return nil, statusError(logger, fmt.Errorf("unexpected object in claim parameters index: %T", objs[0])) return nil, statusError(logger, fmt.Errorf("unexpected object in claim parameters index: %T", objs[0]))
} }
return parameters, nil return parameters, nil
default: default:
sort.Slice(objs, func(i, j int) bool { sort.Slice(objs, func(i, j int) bool {
obj1, obj2 := objs[i].(*resourcev1alpha2.ResourceClaimParameters), objs[j].(*resourcev1alpha2.ResourceClaimParameters) obj1, obj2 := objs[i].(*resourceapi.ResourceClaimParameters), objs[j].(*resourceapi.ResourceClaimParameters)
if obj1 == nil || obj2 == nil { if obj1 == nil || obj2 == nil {
return false return false
} }
@ -1172,7 +1172,7 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState
case claim.Status.DeallocationRequested: case claim.Status.DeallocationRequested:
// We shouldn't get here. PreFilter already checked this. // We shouldn't get here. PreFilter already checked this.
return statusUnschedulable(logger, "resourceclaim must be reallocated", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) return statusUnschedulable(logger, "resourceclaim must be reallocated", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim))
case claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer || case claim.Spec.AllocationMode == resourceapi.AllocationModeWaitForFirstConsumer ||
state.informationsForClaim[index].structuredParameters: state.informationsForClaim[index].structuredParameters:
if selector := state.informationsForClaim[index].availableOnNode; selector != nil { if selector := state.informationsForClaim[index].availableOnNode; selector != nil {
if matches := selector.Match(node); !matches { if matches := selector.Match(node); !matches {
@ -1225,7 +1225,7 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState
// //
// Claims with builtin controller are handled like // Claims with builtin controller are handled like
// claims with delayed allocation. // claims with delayed allocation.
if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer || if claim.Spec.AllocationMode == resourceapi.AllocationModeWaitForFirstConsumer ||
state.informationsForClaim[index].controller != nil { state.informationsForClaim[index].controller != nil {
state.unavailableClaims.Insert(index) state.unavailableClaims.Insert(index)
} }
@ -1288,7 +1288,7 @@ func (pl *dynamicResources) PostFilter(ctx context.Context, cs *framework.CycleS
claim.Status.DeallocationRequested = true claim.Status.DeallocationRequested = true
} }
logger.V(5).Info("Requesting deallocation of ResourceClaim", "pod", klog.KObj(pod), "resourceclaim", klog.KObj(claim)) logger.V(5).Info("Requesting deallocation of ResourceClaim", "pod", klog.KObj(pod), "resourceclaim", klog.KObj(claim))
if _, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}); err != nil { if _, err := pl.clientset.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}); err != nil {
return nil, statusError(logger, err) return nil, statusError(logger, err)
} }
return nil, framework.NewStatus(framework.Unschedulable, "deallocation of ResourceClaim completed") return nil, framework.NewStatus(framework.Unschedulable, "deallocation of ResourceClaim completed")
@ -1340,8 +1340,8 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta
// is only a single node. // is only a single node.
logger.V(5).Info("remembering potential nodes", "pod", klog.KObj(pod), "potentialnodes", klog.KObjSlice(nodes)) logger.V(5).Info("remembering potential nodes", "pod", klog.KObj(pod), "potentialnodes", klog.KObjSlice(nodes))
numNodes := len(nodes) numNodes := len(nodes)
if numNodes > resourcev1alpha2.PodSchedulingNodeListMaxSize { if numNodes > resourceapi.PodSchedulingNodeListMaxSize {
numNodes = resourcev1alpha2.PodSchedulingNodeListMaxSize numNodes = resourceapi.PodSchedulingNodeListMaxSize
} }
potentialNodes := make([]string, 0, numNodes) potentialNodes := make([]string, 0, numNodes)
if numNodes == len(nodes) { if numNodes == len(nodes) {
@ -1359,7 +1359,7 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta
nodeNames[node.Node().Name] = struct{}{} nodeNames[node.Node().Name] = struct{}{}
} }
for nodeName := range nodeNames { for nodeName := range nodeNames {
if len(potentialNodes) >= resourcev1alpha2.PodSchedulingNodeListMaxSize { if len(potentialNodes) >= resourceapi.PodSchedulingNodeListMaxSize {
break break
} }
potentialNodes = append(potentialNodes, nodeName) potentialNodes = append(potentialNodes, nodeName)
@ -1370,7 +1370,7 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta
return nil return nil
} }
func haveAllPotentialNodes(schedulingCtx *resourcev1alpha2.PodSchedulingContext, nodes []*framework.NodeInfo) bool { func haveAllPotentialNodes(schedulingCtx *resourceapi.PodSchedulingContext, nodes []*framework.NodeInfo) bool {
if schedulingCtx == nil { if schedulingCtx == nil {
return false return false
} }
@ -1460,8 +1460,8 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat
// The allocation would be enough. The full object is useful for // The allocation would be enough. The full object is useful for
// debugging and testing, so let's make it realistic. // debugging and testing, so let's make it realistic.
claim = claim.DeepCopy() claim = claim.DeepCopy()
if !slices.Contains(claim.Finalizers, resourcev1alpha2.Finalizer) { if !slices.Contains(claim.Finalizers, resourceapi.Finalizer) {
claim.Finalizers = append(claim.Finalizers, resourcev1alpha2.Finalizer) claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer)
} }
claim.Status.DriverName = driverName claim.Status.DriverName = driverName
claim.Status.Allocation = allocation claim.Status.Allocation = allocation
@ -1562,7 +1562,7 @@ func (pl *dynamicResources) Unreserve(ctx context.Context, cs *framework.CycleSt
pod.UID, pod.UID,
) )
logger.V(5).Info("unreserve", "resourceclaim", klog.KObj(claim), "pod", klog.KObj(pod)) logger.V(5).Info("unreserve", "resourceclaim", klog.KObj(claim), "pod", klog.KObj(pod))
claim, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).Patch(ctx, claim.Name, types.StrategicMergePatchType, []byte(patch), metav1.PatchOptions{}, "status") claim, err := pl.clientset.ResourceV1alpha3().ResourceClaims(claim.Namespace).Patch(ctx, claim.Name, types.StrategicMergePatchType, []byte(patch), metav1.PatchOptions{}, "status")
if err != nil { if err != nil {
// We will get here again when pod scheduling is retried. // We will get here again when pod scheduling is retried.
logger.Error(err, "unreserve", "resourceclaim", klog.KObj(claim)) logger.Error(err, "unreserve", "resourceclaim", klog.KObj(claim))
@ -1619,7 +1619,7 @@ func (pl *dynamicResources) PreBind(ctx context.Context, cs *framework.CycleStat
// bindClaim gets called by PreBind for claim which is not reserved for the pod yet. // bindClaim gets called by PreBind for claim which is not reserved for the pod yet.
// It might not even be allocated. bindClaim then ensures that the allocation // It might not even be allocated. bindClaim then ensures that the allocation
// and reservation are recorded. This finishes the work started in Reserve. // and reservation are recorded. This finishes the work started in Reserve.
func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, index int, pod *v1.Pod, nodeName string) (patchedClaim *resourcev1alpha2.ResourceClaim, finalErr error) { func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, index int, pod *v1.Pod, nodeName string) (patchedClaim *resourceapi.ResourceClaim, finalErr error) {
logger := klog.FromContext(ctx) logger := klog.FromContext(ctx)
claim := state.claims[index].DeepCopy() claim := state.claims[index].DeepCopy()
allocation := state.informationsForClaim[index].allocation allocation := state.informationsForClaim[index].allocation
@ -1646,7 +1646,7 @@ func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, ind
refreshClaim := false refreshClaim := false
retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error {
if refreshClaim { if refreshClaim {
updatedClaim, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).Get(ctx, claim.Name, metav1.GetOptions{}) updatedClaim, err := pl.clientset.ResourceV1alpha3().ResourceClaims(claim.Namespace).Get(ctx, claim.Name, metav1.GetOptions{})
if err != nil { if err != nil {
return fmt.Errorf("get updated claim %s after conflict: %w", klog.KObj(claim), err) return fmt.Errorf("get updated claim %s after conflict: %w", klog.KObj(claim), err)
} }
@ -1669,9 +1669,9 @@ func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, ind
// The finalizer needs to be added in a normal update. // The finalizer needs to be added in a normal update.
// If we were interrupted in the past, it might already be set and we simply continue. // If we were interrupted in the past, it might already be set and we simply continue.
if !slices.Contains(claim.Finalizers, resourcev1alpha2.Finalizer) { if !slices.Contains(claim.Finalizers, resourceapi.Finalizer) {
claim.Finalizers = append(claim.Finalizers, resourcev1alpha2.Finalizer) claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer)
updatedClaim, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) updatedClaim, err := pl.clientset.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{})
if err != nil { if err != nil {
return fmt.Errorf("add finalizer to claim %s: %w", klog.KObj(claim), err) return fmt.Errorf("add finalizer to claim %s: %w", klog.KObj(claim), err)
} }
@ -1685,8 +1685,8 @@ func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, ind
// We can simply try to add the pod here without checking // We can simply try to add the pod here without checking
// preconditions. The apiserver will tell us with a // preconditions. The apiserver will tell us with a
// non-conflict error if this isn't possible. // non-conflict error if this isn't possible.
claim.Status.ReservedFor = append(claim.Status.ReservedFor, resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: pod.Name, UID: pod.UID}) claim.Status.ReservedFor = append(claim.Status.ReservedFor, resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: pod.Name, UID: pod.UID})
updatedClaim, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) updatedClaim, err := pl.clientset.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{})
if err != nil { if err != nil {
if allocation != nil { if allocation != nil {
return fmt.Errorf("add allocation and reservation to claim %s: %w", klog.KObj(claim), err) return fmt.Errorf("add allocation and reservation to claim %s: %w", klog.KObj(claim), err)
@ -1727,7 +1727,7 @@ func (pl *dynamicResources) PostBind(ctx context.Context, cs *framework.CycleSta
// have it in our informer cache yet. Let's try to delete, just to be // have it in our informer cache yet. Let's try to delete, just to be
// on the safe side. // on the safe side.
logger := klog.FromContext(ctx) logger := klog.FromContext(ctx)
err = pl.clientset.ResourceV1alpha2().PodSchedulingContexts(pod.Namespace).Delete(ctx, pod.Name, metav1.DeleteOptions{}) err = pl.clientset.ResourceV1alpha3().PodSchedulingContexts(pod.Namespace).Delete(ctx, pod.Name, metav1.DeleteOptions{})
switch { switch {
case apierrors.IsNotFound(err): case apierrors.IsNotFound(err):
logger.V(5).Info("no PodSchedulingContext object to delete") logger.V(5).Info("no PodSchedulingContext object to delete")

View File

@ -22,7 +22,7 @@ import (
"fmt" "fmt"
"slices" "slices"
resourceapi "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
"k8s.io/apiserver/pkg/cel/environment" "k8s.io/apiserver/pkg/cel/environment"
"k8s.io/dynamic-resource-allocation/structured/namedresources/cel" "k8s.io/dynamic-resource-allocation/structured/namedresources/cel"
) )

View File

@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
resourceapi "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
"k8s.io/kubernetes/test/utils/ktesting" "k8s.io/kubernetes/test/utils/ktesting"
"k8s.io/utils/ptr" "k8s.io/utils/ptr"
) )

View File

@ -22,7 +22,7 @@ import (
"sync" "sync"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/klog/v2" "k8s.io/klog/v2"
@ -39,10 +39,10 @@ type ResourceModels struct {
NamedResources namedresourcesmodel.Model NamedResources namedresourcesmodel.Model
} }
// resourceSliceLister is the subset of resourcev1alpha2listers.ResourceSliceLister needed by // resourceSliceLister is the subset of resourcelisters.ResourceSliceLister needed by
// newResourceModel. // newResourceModel.
type resourceSliceLister interface { type resourceSliceLister interface {
List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceSlice, err error) List(selector labels.Selector) (ret []*resourceapi.ResourceSlice, err error)
} }
// assumeCacheLister is the subset of volumebinding.AssumeCache needed by newResourceModel. // assumeCacheLister is the subset of volumebinding.AssumeCache needed by newResourceModel.
@ -72,14 +72,14 @@ func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceListe
objs := claimAssumeCache.List(nil) objs := claimAssumeCache.List(nil)
for _, obj := range objs { for _, obj := range objs {
claim, ok := obj.(*resourcev1alpha2.ResourceClaim) claim, ok := obj.(*resourceapi.ResourceClaim)
if !ok { if !ok {
return nil, fmt.Errorf("got unexpected object of type %T from claim assume cache", obj) return nil, fmt.Errorf("got unexpected object of type %T from claim assume cache", obj)
} }
if obj, ok := inFlightAllocations.Load(claim.UID); ok { if obj, ok := inFlightAllocations.Load(claim.UID); ok {
// If the allocation is in-flight, then we have to use the allocation // If the allocation is in-flight, then we have to use the allocation
// from that claim. // from that claim.
claim = obj.(*resourcev1alpha2.ResourceClaim) claim = obj.(*resourceapi.ResourceClaim)
} }
if claim.Status.Allocation == nil { if claim.Status.Allocation == nil {
continue continue
@ -103,13 +103,13 @@ func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceListe
return model, nil return model, nil
} }
func newClaimController(logger klog.Logger, class *resourcev1alpha2.ResourceClass, classParameters *resourcev1alpha2.ResourceClassParameters, claimParameters *resourcev1alpha2.ResourceClaimParameters) (*claimController, error) { func newClaimController(logger klog.Logger, class *resourceapi.ResourceClass, classParameters *resourceapi.ResourceClassParameters, claimParameters *resourceapi.ResourceClaimParameters) (*claimController, error) {
// Each node driver is separate from the others. Each driver may have // Each node driver is separate from the others. Each driver may have
// multiple requests which need to be allocated together, so here // multiple requests which need to be allocated together, so here
// we have to collect them per model. // we have to collect them per model.
type perDriverRequests struct { type perDriverRequests struct {
parameters []runtime.RawExtension parameters []runtime.RawExtension
requests []*resourcev1alpha2.NamedResourcesRequest requests []*resourceapi.NamedResourcesRequest
} }
namedresourcesRequests := make(map[string]perDriverRequests) namedresourcesRequests := make(map[string]perDriverRequests)
for i, request := range claimParameters.DriverRequests { for i, request := range claimParameters.DriverRequests {
@ -136,7 +136,7 @@ func newClaimController(logger klog.Logger, class *resourcev1alpha2.ResourceClas
namedresources: make(map[string]perDriverController, len(namedresourcesRequests)), namedresources: make(map[string]perDriverController, len(namedresourcesRequests)),
} }
for driverName, perDriver := range namedresourcesRequests { for driverName, perDriver := range namedresourcesRequests {
var filter *resourcev1alpha2.NamedResourcesFilter var filter *resourceapi.NamedResourcesFilter
for _, f := range classParameters.Filters { for _, f := range classParameters.Filters {
if f.DriverName == driverName && f.ResourceFilterModel.NamedResources != nil { if f.DriverName == driverName && f.ResourceFilterModel.NamedResources != nil {
filter = f.ResourceFilterModel.NamedResources filter = f.ResourceFilterModel.NamedResources
@ -158,9 +158,9 @@ func newClaimController(logger klog.Logger, class *resourcev1alpha2.ResourceClas
// claimController currently wraps exactly one structured parameter model. // claimController currently wraps exactly one structured parameter model.
type claimController struct { type claimController struct {
class *resourcev1alpha2.ResourceClass class *resourceapi.ResourceClass
classParameters *resourcev1alpha2.ResourceClassParameters classParameters *resourceapi.ResourceClassParameters
claimParameters *resourcev1alpha2.ResourceClaimParameters claimParameters *resourceapi.ResourceClaimParameters
namedresources map[string]perDriverController namedresources map[string]perDriverController
} }
@ -186,8 +186,8 @@ func (c claimController) nodeIsSuitable(ctx context.Context, nodeName string, re
return true, nil return true, nil
} }
func (c claimController) allocate(ctx context.Context, nodeName string, resources resources) (string, *resourcev1alpha2.AllocationResult, error) { func (c claimController) allocate(ctx context.Context, nodeName string, resources resources) (string, *resourceapi.AllocationResult, error) {
allocation := &resourcev1alpha2.AllocationResult{ allocation := &resourceapi.AllocationResult{
Shareable: c.claimParameters.Shareable, Shareable: c.claimParameters.Shareable,
AvailableOnNodes: &v1.NodeSelector{ AvailableOnNodes: &v1.NodeSelector{
NodeSelectorTerms: []v1.NodeSelectorTerm{ NodeSelectorTerms: []v1.NodeSelectorTerm{
@ -208,9 +208,9 @@ func (c claimController) allocate(ctx context.Context, nodeName string, resource
if err != nil { if err != nil {
return "", nil, fmt.Errorf("allocating via named resources structured model: %w", err) return "", nil, fmt.Errorf("allocating via named resources structured model: %w", err)
} }
handle := resourcev1alpha2.ResourceHandle{ handle := resourceapi.ResourceHandle{
DriverName: driverName, DriverName: driverName,
StructuredData: &resourcev1alpha2.StructuredResourceHandle{ StructuredData: &resourceapi.StructuredResourceHandle{
NodeName: nodeName, NodeName: nodeName,
}, },
} }
@ -219,9 +219,9 @@ func (c claimController) allocate(ctx context.Context, nodeName string, resource
continue continue
} }
handle.StructuredData.Results = append(handle.StructuredData.Results, handle.StructuredData.Results = append(handle.StructuredData.Results,
resourcev1alpha2.DriverAllocationResult{ resourceapi.DriverAllocationResult{
VendorRequestParameters: perDriver.parameters[i], VendorRequestParameters: perDriver.parameters[i],
AllocationResultModel: resourcev1alpha2.AllocationResultModel{ AllocationResultModel: resourceapi.AllocationResultModel{
NamedResources: result, NamedResources: result,
}, },
}, },

View File

@ -25,7 +25,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourceapi "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"

View File

@ -297,7 +297,7 @@ func New(ctx context.Context,
var resourceClaimCache *assumecache.AssumeCache var resourceClaimCache *assumecache.AssumeCache
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
resourceClaimInformer := informerFactory.Resource().V1alpha2().ResourceClaims().Informer() resourceClaimInformer := informerFactory.Resource().V1alpha3().ResourceClaims().Informer()
resourceClaimCache = assumecache.NewAssumeCache(logger, resourceClaimInformer, "ResourceClaim", "", nil) resourceClaimCache = assumecache.NewAssumeCache(logger, resourceClaimInformer, "ResourceClaim", "", nil)
} }

View File

@ -21,7 +21,7 @@ import (
"time" "time"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
"k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
@ -897,20 +897,20 @@ func (p *PersistentVolumeWrapper) NodeAffinityIn(key string, vals []string) *Per
} }
// ResourceClaimWrapper wraps a ResourceClaim inside. // ResourceClaimWrapper wraps a ResourceClaim inside.
type ResourceClaimWrapper struct{ resourcev1alpha2.ResourceClaim } type ResourceClaimWrapper struct{ resourceapi.ResourceClaim }
// MakeResourceClaim creates a ResourceClaim wrapper. // MakeResourceClaim creates a ResourceClaim wrapper.
func MakeResourceClaim() *ResourceClaimWrapper { func MakeResourceClaim() *ResourceClaimWrapper {
return &ResourceClaimWrapper{resourcev1alpha2.ResourceClaim{}} return &ResourceClaimWrapper{resourceapi.ResourceClaim{}}
} }
// FromResourceClaim creates a ResourceClaim wrapper from some existing object. // FromResourceClaim creates a ResourceClaim wrapper from some existing object.
func FromResourceClaim(other *resourcev1alpha2.ResourceClaim) *ResourceClaimWrapper { func FromResourceClaim(other *resourceapi.ResourceClaim) *ResourceClaimWrapper {
return &ResourceClaimWrapper{*other.DeepCopy()} return &ResourceClaimWrapper{*other.DeepCopy()}
} }
// Obj returns the inner ResourceClaim. // Obj returns the inner ResourceClaim.
func (wrapper *ResourceClaimWrapper) Obj() *resourcev1alpha2.ResourceClaim { func (wrapper *ResourceClaimWrapper) Obj() *resourceapi.ResourceClaim {
return &wrapper.ResourceClaim return &wrapper.ResourceClaim
} }
@ -947,14 +947,14 @@ func (wrapper *ResourceClaimWrapper) OwnerReference(name, uid string, gvk schema
} }
// AllocationMode sets the allocation mode of the inner object. // AllocationMode sets the allocation mode of the inner object.
func (wrapper *ResourceClaimWrapper) AllocationMode(a resourcev1alpha2.AllocationMode) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) AllocationMode(a resourceapi.AllocationMode) *ResourceClaimWrapper {
wrapper.ResourceClaim.Spec.AllocationMode = a wrapper.ResourceClaim.Spec.AllocationMode = a
return wrapper return wrapper
} }
// ParametersRef sets a reference to a ResourceClaimParameters.resource.k8s.io. // ParametersRef sets a reference to a ResourceClaimParameters.resource.k8s.io.
func (wrapper *ResourceClaimWrapper) ParametersRef(name string) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) ParametersRef(name string) *ResourceClaimWrapper {
wrapper.ResourceClaim.Spec.ParametersRef = &resourcev1alpha2.ResourceClaimParametersReference{ wrapper.ResourceClaim.Spec.ParametersRef = &resourceapi.ResourceClaimParametersReference{
Name: name, Name: name,
Kind: "ResourceClaimParameters", Kind: "ResourceClaimParameters",
APIGroup: "resource.k8s.io", APIGroup: "resource.k8s.io",
@ -969,7 +969,7 @@ func (wrapper *ResourceClaimWrapper) ResourceClassName(name string) *ResourceCla
} }
// Allocation sets the allocation of the inner object. // Allocation sets the allocation of the inner object.
func (wrapper *ResourceClaimWrapper) Allocation(driverName string, allocation *resourcev1alpha2.AllocationResult) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) Allocation(driverName string, allocation *resourceapi.AllocationResult) *ResourceClaimWrapper {
wrapper.ResourceClaim.Status.DriverName = driverName wrapper.ResourceClaim.Status.DriverName = driverName
wrapper.ResourceClaim.Status.Allocation = allocation wrapper.ResourceClaim.Status.Allocation = allocation
return wrapper return wrapper
@ -981,27 +981,27 @@ func (wrapper *ResourceClaimWrapper) Allocation(driverName string, allocation *r
// "named resources" are used. // "named resources" are used.
func (wrapper *ResourceClaimWrapper) Structured(nodeName string, namedResourcesInstances ...string) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) Structured(nodeName string, namedResourcesInstances ...string) *ResourceClaimWrapper {
if wrapper.ResourceClaim.Status.Allocation != nil { if wrapper.ResourceClaim.Status.Allocation != nil {
wrapper.ResourceClaim.Finalizers = append(wrapper.ResourceClaim.Finalizers, resourcev1alpha2.Finalizer) wrapper.ResourceClaim.Finalizers = append(wrapper.ResourceClaim.Finalizers, resourceapi.Finalizer)
for i, resourceHandle := range wrapper.ResourceClaim.Status.Allocation.ResourceHandles { for i, resourceHandle := range wrapper.ResourceClaim.Status.Allocation.ResourceHandles {
resourceHandle.Data = "" resourceHandle.Data = ""
resourceHandle.StructuredData = &resourcev1alpha2.StructuredResourceHandle{ resourceHandle.StructuredData = &resourceapi.StructuredResourceHandle{
NodeName: nodeName, NodeName: nodeName,
} }
wrapper.ResourceClaim.Status.Allocation.ResourceHandles[i] = resourceHandle wrapper.ResourceClaim.Status.Allocation.ResourceHandles[i] = resourceHandle
} }
if len(wrapper.ResourceClaim.Status.Allocation.ResourceHandles) == 0 { if len(wrapper.ResourceClaim.Status.Allocation.ResourceHandles) == 0 {
wrapper.ResourceClaim.Status.Allocation.ResourceHandles = []resourcev1alpha2.ResourceHandle{{ wrapper.ResourceClaim.Status.Allocation.ResourceHandles = []resourceapi.ResourceHandle{{
DriverName: wrapper.ResourceClaim.Status.DriverName, DriverName: wrapper.ResourceClaim.Status.DriverName,
StructuredData: &resourcev1alpha2.StructuredResourceHandle{ StructuredData: &resourceapi.StructuredResourceHandle{
NodeName: nodeName, NodeName: nodeName,
}, },
}} }}
} }
for _, resourceHandle := range wrapper.ResourceClaim.Status.Allocation.ResourceHandles { for _, resourceHandle := range wrapper.ResourceClaim.Status.Allocation.ResourceHandles {
for _, name := range namedResourcesInstances { for _, name := range namedResourcesInstances {
result := resourcev1alpha2.DriverAllocationResult{ result := resourceapi.DriverAllocationResult{
AllocationResultModel: resourcev1alpha2.AllocationResultModel{ AllocationResultModel: resourceapi.AllocationResultModel{
NamedResources: &resourcev1alpha2.NamedResourcesAllocationResult{ NamedResources: &resourceapi.NamedResourcesAllocationResult{
Name: name, Name: name,
}, },
}, },
@ -1030,33 +1030,33 @@ func (wrapper *ResourceClaimWrapper) DeallocationRequested(deallocationRequested
} }
// ReservedFor sets that field of the inner object. // ReservedFor sets that field of the inner object.
func (wrapper *ResourceClaimWrapper) ReservedFor(consumers ...resourcev1alpha2.ResourceClaimConsumerReference) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) ReservedFor(consumers ...resourceapi.ResourceClaimConsumerReference) *ResourceClaimWrapper {
wrapper.ResourceClaim.Status.ReservedFor = consumers wrapper.ResourceClaim.Status.ReservedFor = consumers
return wrapper return wrapper
} }
// ReservedFor sets that field of the inner object given information about one pod. // ReservedFor sets that field of the inner object given information about one pod.
func (wrapper *ResourceClaimWrapper) ReservedForPod(podName string, podUID types.UID) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) ReservedForPod(podName string, podUID types.UID) *ResourceClaimWrapper {
return wrapper.ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: podUID}) return wrapper.ReservedFor(resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: podUID})
} }
// PodSchedulingWrapper wraps a PodSchedulingContext inside. // PodSchedulingWrapper wraps a PodSchedulingContext inside.
type PodSchedulingWrapper struct { type PodSchedulingWrapper struct {
resourcev1alpha2.PodSchedulingContext resourceapi.PodSchedulingContext
} }
// MakePodSchedulingContexts creates a PodSchedulingContext wrapper. // MakePodSchedulingContexts creates a PodSchedulingContext wrapper.
func MakePodSchedulingContexts() *PodSchedulingWrapper { func MakePodSchedulingContexts() *PodSchedulingWrapper {
return &PodSchedulingWrapper{resourcev1alpha2.PodSchedulingContext{}} return &PodSchedulingWrapper{resourceapi.PodSchedulingContext{}}
} }
// FromPodSchedulingContexts creates a PodSchedulingContext wrapper from an existing object. // FromPodSchedulingContexts creates a PodSchedulingContext wrapper from an existing object.
func FromPodSchedulingContexts(other *resourcev1alpha2.PodSchedulingContext) *PodSchedulingWrapper { func FromPodSchedulingContexts(other *resourceapi.PodSchedulingContext) *PodSchedulingWrapper {
return &PodSchedulingWrapper{*other.DeepCopy()} return &PodSchedulingWrapper{*other.DeepCopy()}
} }
// Obj returns the inner object. // Obj returns the inner object.
func (wrapper *PodSchedulingWrapper) Obj() *resourcev1alpha2.PodSchedulingContext { func (wrapper *PodSchedulingWrapper) Obj() *resourceapi.PodSchedulingContext {
return &wrapper.PodSchedulingContext return &wrapper.PodSchedulingContext
} }
@ -1115,13 +1115,13 @@ func (wrapper *PodSchedulingWrapper) PotentialNodes(nodes ...string) *PodSchedul
} }
// ResourceClaims sets that field of the inner object. // ResourceClaims sets that field of the inner object.
func (wrapper *PodSchedulingWrapper) ResourceClaims(statuses ...resourcev1alpha2.ResourceClaimSchedulingStatus) *PodSchedulingWrapper { func (wrapper *PodSchedulingWrapper) ResourceClaims(statuses ...resourceapi.ResourceClaimSchedulingStatus) *PodSchedulingWrapper {
wrapper.Status.ResourceClaims = statuses wrapper.Status.ResourceClaims = statuses
return wrapper return wrapper
} }
type ResourceSliceWrapper struct { type ResourceSliceWrapper struct {
resourcev1alpha2.ResourceSlice resourceapi.ResourceSlice
} }
func MakeResourceSlice(nodeName, driverName string) *ResourceSliceWrapper { func MakeResourceSlice(nodeName, driverName string) *ResourceSliceWrapper {
@ -1132,22 +1132,22 @@ func MakeResourceSlice(nodeName, driverName string) *ResourceSliceWrapper {
return wrapper return wrapper
} }
func (wrapper *ResourceSliceWrapper) Obj() *resourcev1alpha2.ResourceSlice { func (wrapper *ResourceSliceWrapper) Obj() *resourceapi.ResourceSlice {
return &wrapper.ResourceSlice return &wrapper.ResourceSlice
} }
func (wrapper *ResourceSliceWrapper) NamedResourcesInstances(names ...string) *ResourceSliceWrapper { func (wrapper *ResourceSliceWrapper) NamedResourcesInstances(names ...string) *ResourceSliceWrapper {
wrapper.ResourceModel = resourcev1alpha2.ResourceModel{NamedResources: &resourcev1alpha2.NamedResourcesResources{}} wrapper.ResourceModel = resourceapi.ResourceModel{NamedResources: &resourceapi.NamedResourcesResources{}}
for _, name := range names { for _, name := range names {
wrapper.ResourceModel.NamedResources.Instances = append(wrapper.ResourceModel.NamedResources.Instances, wrapper.ResourceModel.NamedResources.Instances = append(wrapper.ResourceModel.NamedResources.Instances,
resourcev1alpha2.NamedResourcesInstance{Name: name}, resourceapi.NamedResourcesInstance{Name: name},
) )
} }
return wrapper return wrapper
} }
type ClaimParametersWrapper struct { type ClaimParametersWrapper struct {
resourcev1alpha2.ResourceClaimParameters resourceapi.ResourceClaimParameters
} }
func MakeClaimParameters() *ClaimParametersWrapper { func MakeClaimParameters() *ClaimParametersWrapper {
@ -1155,11 +1155,11 @@ func MakeClaimParameters() *ClaimParametersWrapper {
} }
// FromClaimParameters creates a ResourceClaimParameters wrapper from an existing object. // FromClaimParameters creates a ResourceClaimParameters wrapper from an existing object.
func FromClaimParameters(other *resourcev1alpha2.ResourceClaimParameters) *ClaimParametersWrapper { func FromClaimParameters(other *resourceapi.ResourceClaimParameters) *ClaimParametersWrapper {
return &ClaimParametersWrapper{*other.DeepCopy()} return &ClaimParametersWrapper{*other.DeepCopy()}
} }
func (wrapper *ClaimParametersWrapper) Obj() *resourcev1alpha2.ResourceClaimParameters { func (wrapper *ClaimParametersWrapper) Obj() *resourceapi.ResourceClaimParameters {
return &wrapper.ResourceClaimParameters return &wrapper.ResourceClaimParameters
} }
@ -1183,19 +1183,19 @@ func (wrapper *ClaimParametersWrapper) Shareable(value bool) *ClaimParametersWra
return wrapper return wrapper
} }
func (wrapper *ClaimParametersWrapper) GeneratedFrom(value *resourcev1alpha2.ResourceClaimParametersReference) *ClaimParametersWrapper { func (wrapper *ClaimParametersWrapper) GeneratedFrom(value *resourceapi.ResourceClaimParametersReference) *ClaimParametersWrapper {
wrapper.ResourceClaimParameters.GeneratedFrom = value wrapper.ResourceClaimParameters.GeneratedFrom = value
return wrapper return wrapper
} }
func (wrapper *ClaimParametersWrapper) NamedResourcesRequests(driverName string, selectors ...string) *ClaimParametersWrapper { func (wrapper *ClaimParametersWrapper) NamedResourcesRequests(driverName string, selectors ...string) *ClaimParametersWrapper {
requests := resourcev1alpha2.DriverRequests{ requests := resourceapi.DriverRequests{
DriverName: driverName, DriverName: driverName,
} }
for _, selector := range selectors { for _, selector := range selectors {
request := resourcev1alpha2.ResourceRequest{ request := resourceapi.ResourceRequest{
ResourceRequestModel: resourcev1alpha2.ResourceRequestModel{ ResourceRequestModel: resourceapi.ResourceRequestModel{
NamedResources: &resourcev1alpha2.NamedResourcesRequest{ NamedResources: &resourceapi.NamedResourcesRequest{
Selector: selector, Selector: selector,
}, },
}, },
@ -1207,7 +1207,7 @@ func (wrapper *ClaimParametersWrapper) NamedResourcesRequests(driverName string,
} }
type ClassParametersWrapper struct { type ClassParametersWrapper struct {
resourcev1alpha2.ResourceClassParameters resourceapi.ResourceClassParameters
} }
func MakeClassParameters() *ClassParametersWrapper { func MakeClassParameters() *ClassParametersWrapper {
@ -1215,11 +1215,11 @@ func MakeClassParameters() *ClassParametersWrapper {
} }
// FromClassParameters creates a ResourceClassParameters wrapper from an existing object. // FromClassParameters creates a ResourceClassParameters wrapper from an existing object.
func FromClassParameters(other *resourcev1alpha2.ResourceClassParameters) *ClassParametersWrapper { func FromClassParameters(other *resourceapi.ResourceClassParameters) *ClassParametersWrapper {
return &ClassParametersWrapper{*other.DeepCopy()} return &ClassParametersWrapper{*other.DeepCopy()}
} }
func (wrapper *ClassParametersWrapper) Obj() *resourcev1alpha2.ResourceClassParameters { func (wrapper *ClassParametersWrapper) Obj() *resourceapi.ResourceClassParameters {
return &wrapper.ResourceClassParameters return &wrapper.ResourceClassParameters
} }
@ -1238,17 +1238,17 @@ func (wrapper *ClassParametersWrapper) Namespace(s string) *ClassParametersWrapp
return wrapper return wrapper
} }
func (wrapper *ClassParametersWrapper) GeneratedFrom(value *resourcev1alpha2.ResourceClassParametersReference) *ClassParametersWrapper { func (wrapper *ClassParametersWrapper) GeneratedFrom(value *resourceapi.ResourceClassParametersReference) *ClassParametersWrapper {
wrapper.ResourceClassParameters.GeneratedFrom = value wrapper.ResourceClassParameters.GeneratedFrom = value
return wrapper return wrapper
} }
func (wrapper *ClassParametersWrapper) NamedResourcesFilters(driverName string, selectors ...string) *ClassParametersWrapper { func (wrapper *ClassParametersWrapper) NamedResourcesFilters(driverName string, selectors ...string) *ClassParametersWrapper {
for _, selector := range selectors { for _, selector := range selectors {
filter := resourcev1alpha2.ResourceFilter{ filter := resourceapi.ResourceFilter{
DriverName: driverName, DriverName: driverName,
ResourceFilterModel: resourcev1alpha2.ResourceFilterModel{ ResourceFilterModel: resourceapi.ResourceFilterModel{
NamedResources: &resourcev1alpha2.NamedResourcesFilter{ NamedResources: &resourceapi.NamedResourcesFilter{
Selector: selector, Selector: selector,
}, },
}, },

View File

@ -22,11 +22,11 @@ import (
"k8s.io/klog/v2" "k8s.io/klog/v2"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
storagev1 "k8s.io/api/storage/v1" storagev1 "k8s.io/api/storage/v1"
"k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/util/wait"
corev1informers "k8s.io/client-go/informers/core/v1" corev1informers "k8s.io/client-go/informers/core/v1"
resourcev1alpha2informers "k8s.io/client-go/informers/resource/v1alpha2" resourceinformers "k8s.io/client-go/informers/resource/v1alpha3"
storageinformers "k8s.io/client-go/informers/storage/v1" storageinformers "k8s.io/client-go/informers/storage/v1"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
) )
@ -41,7 +41,7 @@ func AddGraphEventHandlers(
pods corev1informers.PodInformer, pods corev1informers.PodInformer,
pvs corev1informers.PersistentVolumeInformer, pvs corev1informers.PersistentVolumeInformer,
attachments storageinformers.VolumeAttachmentInformer, attachments storageinformers.VolumeAttachmentInformer,
slices resourcev1alpha2informers.ResourceSliceInformer, slices resourceinformers.ResourceSliceInformer,
) { ) {
g := &graphPopulator{ g := &graphPopulator{
graph: graph, graph: graph,
@ -201,7 +201,7 @@ func (g *graphPopulator) deleteVolumeAttachment(obj interface{}) {
} }
func (g *graphPopulator) addResourceSlice(obj interface{}) { func (g *graphPopulator) addResourceSlice(obj interface{}) {
slice, ok := obj.(*resourcev1alpha2.ResourceSlice) slice, ok := obj.(*resourceapi.ResourceSlice)
if !ok { if !ok {
klog.Infof("unexpected type %T", obj) klog.Infof("unexpected type %T", obj)
return return
@ -213,7 +213,7 @@ func (g *graphPopulator) deleteResourceSlice(obj interface{}) {
if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok {
obj = tombstone.Obj obj = tombstone.Obj
} }
slice, ok := obj.(*resourcev1alpha2.ResourceSlice) slice, ok := obj.(*resourceapi.ResourceSlice)
if !ok { if !ok {
klog.Infof("unexpected type %T", obj) klog.Infof("unexpected type %T", obj)
return return

View File

@ -28,7 +28,7 @@ import (
"time" "time"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
storagev1 "k8s.io/api/storage/v1" storagev1 "k8s.io/api/storage/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/fields"
@ -1158,7 +1158,7 @@ func BenchmarkAuthorization(b *testing.B) {
} }
} }
func populate(graph *Graph, nodes []*corev1.Node, pods []*corev1.Pod, pvs []*corev1.PersistentVolume, attachments []*storagev1.VolumeAttachment, slices []*resourcev1alpha2.ResourceSlice) { func populate(graph *Graph, nodes []*corev1.Node, pods []*corev1.Pod, pvs []*corev1.PersistentVolume, attachments []*storagev1.VolumeAttachment, slices []*resourceapi.ResourceSlice) {
p := &graphPopulator{} p := &graphPopulator{}
p.graph = graph p.graph = graph
for _, pod := range pods { for _, pod := range pods {
@ -1186,12 +1186,12 @@ func randomSubset(a, b int) []int {
// the secret/configmap/pvc/node references in the pod and pv objects are named to indicate the connections between the objects. // the secret/configmap/pvc/node references in the pod and pv objects are named to indicate the connections between the objects.
// for example, secret0-pod0-node0 is a secret referenced by pod0 which is bound to node0. // for example, secret0-pod0-node0 is a secret referenced by pod0 which is bound to node0.
// when populated into the graph, the node authorizer should allow node0 to access that secret, but not node1. // when populated into the graph, the node authorizer should allow node0 to access that secret, but not node1.
func generate(opts *sampleDataOpts) ([]*corev1.Node, []*corev1.Pod, []*corev1.PersistentVolume, []*storagev1.VolumeAttachment, []*resourcev1alpha2.ResourceSlice) { func generate(opts *sampleDataOpts) ([]*corev1.Node, []*corev1.Pod, []*corev1.PersistentVolume, []*storagev1.VolumeAttachment, []*resourceapi.ResourceSlice) {
nodes := make([]*corev1.Node, 0, opts.nodes) nodes := make([]*corev1.Node, 0, opts.nodes)
pods := make([]*corev1.Pod, 0, opts.nodes*opts.podsPerNode) pods := make([]*corev1.Pod, 0, opts.nodes*opts.podsPerNode)
pvs := make([]*corev1.PersistentVolume, 0, (opts.nodes*opts.podsPerNode*opts.uniquePVCsPerPod)+(opts.sharedPVCsPerPod*opts.namespaces)) pvs := make([]*corev1.PersistentVolume, 0, (opts.nodes*opts.podsPerNode*opts.uniquePVCsPerPod)+(opts.sharedPVCsPerPod*opts.namespaces))
attachments := make([]*storagev1.VolumeAttachment, 0, opts.nodes*opts.attachmentsPerNode) attachments := make([]*storagev1.VolumeAttachment, 0, opts.nodes*opts.attachmentsPerNode)
slices := make([]*resourcev1alpha2.ResourceSlice, 0, opts.nodes*opts.nodeResourceCapacitiesPerNode) slices := make([]*resourceapi.ResourceSlice, 0, opts.nodes*opts.nodeResourceCapacitiesPerNode)
rand.Seed(12345) rand.Seed(12345)
@ -1220,7 +1220,7 @@ func generate(opts *sampleDataOpts) ([]*corev1.Node, []*corev1.Pod, []*corev1.Pe
for p := 0; p <= opts.nodeResourceCapacitiesPerNode; p++ { for p := 0; p <= opts.nodeResourceCapacitiesPerNode; p++ {
name := fmt.Sprintf("slice%d-%s", p, nodeName) name := fmt.Sprintf("slice%d-%s", p, nodeName)
slice := &resourcev1alpha2.ResourceSlice{ slice := &resourceapi.ResourceSlice{
ObjectMeta: metav1.ObjectMeta{Name: name}, ObjectMeta: metav1.ObjectMeta{Name: name},
NodeName: nodeName, NodeName: nodeName,
} }

View File

@ -20,5 +20,5 @@ limitations under the License.
// +groupName=resource.k8s.io // +groupName=resource.k8s.io
// Package v1alpha2 is the v1alpha2 version of the resource API. // Package v1alpha3 is the v1alpha3 version of the resource API.
package v1alpha2 // import "k8s.io/api/resource/v1alpha2" package v1alpha3 // import "k8s.io/api/resource/v1alpha3"

View File

@ -15,9 +15,9 @@ limitations under the License.
*/ */
// Code generated by protoc-gen-gogo. DO NOT EDIT. // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: k8s.io/api/resource/v1alpha2/generated.proto // source: k8s.io/api/resource/v1alpha3/generated.proto
package v1alpha2 package v1alpha3
import ( import (
fmt "fmt" fmt "fmt"
@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *AllocationResult) Reset() { *m = AllocationResult{} } func (m *AllocationResult) Reset() { *m = AllocationResult{} }
func (*AllocationResult) ProtoMessage() {} func (*AllocationResult) ProtoMessage() {}
func (*AllocationResult) Descriptor() ([]byte, []int) { func (*AllocationResult) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{0} return fileDescriptor_66649ee9bbcd89d2, []int{0}
} }
func (m *AllocationResult) XXX_Unmarshal(b []byte) error { func (m *AllocationResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -78,7 +78,7 @@ var xxx_messageInfo_AllocationResult proto.InternalMessageInfo
func (m *AllocationResultModel) Reset() { *m = AllocationResultModel{} } func (m *AllocationResultModel) Reset() { *m = AllocationResultModel{} }
func (*AllocationResultModel) ProtoMessage() {} func (*AllocationResultModel) ProtoMessage() {}
func (*AllocationResultModel) Descriptor() ([]byte, []int) { func (*AllocationResultModel) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{1} return fileDescriptor_66649ee9bbcd89d2, []int{1}
} }
func (m *AllocationResultModel) XXX_Unmarshal(b []byte) error { func (m *AllocationResultModel) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -106,7 +106,7 @@ var xxx_messageInfo_AllocationResultModel proto.InternalMessageInfo
func (m *DriverAllocationResult) Reset() { *m = DriverAllocationResult{} } func (m *DriverAllocationResult) Reset() { *m = DriverAllocationResult{} }
func (*DriverAllocationResult) ProtoMessage() {} func (*DriverAllocationResult) ProtoMessage() {}
func (*DriverAllocationResult) Descriptor() ([]byte, []int) { func (*DriverAllocationResult) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{2} return fileDescriptor_66649ee9bbcd89d2, []int{2}
} }
func (m *DriverAllocationResult) XXX_Unmarshal(b []byte) error { func (m *DriverAllocationResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -134,7 +134,7 @@ var xxx_messageInfo_DriverAllocationResult proto.InternalMessageInfo
func (m *DriverRequests) Reset() { *m = DriverRequests{} } func (m *DriverRequests) Reset() { *m = DriverRequests{} }
func (*DriverRequests) ProtoMessage() {} func (*DriverRequests) ProtoMessage() {}
func (*DriverRequests) Descriptor() ([]byte, []int) { func (*DriverRequests) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{3} return fileDescriptor_66649ee9bbcd89d2, []int{3}
} }
func (m *DriverRequests) XXX_Unmarshal(b []byte) error { func (m *DriverRequests) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -162,7 +162,7 @@ var xxx_messageInfo_DriverRequests proto.InternalMessageInfo
func (m *NamedResourcesAllocationResult) Reset() { *m = NamedResourcesAllocationResult{} } func (m *NamedResourcesAllocationResult) Reset() { *m = NamedResourcesAllocationResult{} }
func (*NamedResourcesAllocationResult) ProtoMessage() {} func (*NamedResourcesAllocationResult) ProtoMessage() {}
func (*NamedResourcesAllocationResult) Descriptor() ([]byte, []int) { func (*NamedResourcesAllocationResult) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{4} return fileDescriptor_66649ee9bbcd89d2, []int{4}
} }
func (m *NamedResourcesAllocationResult) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesAllocationResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -190,7 +190,7 @@ var xxx_messageInfo_NamedResourcesAllocationResult proto.InternalMessageInfo
func (m *NamedResourcesAttribute) Reset() { *m = NamedResourcesAttribute{} } func (m *NamedResourcesAttribute) Reset() { *m = NamedResourcesAttribute{} }
func (*NamedResourcesAttribute) ProtoMessage() {} func (*NamedResourcesAttribute) ProtoMessage() {}
func (*NamedResourcesAttribute) Descriptor() ([]byte, []int) { func (*NamedResourcesAttribute) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{5} return fileDescriptor_66649ee9bbcd89d2, []int{5}
} }
func (m *NamedResourcesAttribute) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesAttribute) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -218,7 +218,7 @@ var xxx_messageInfo_NamedResourcesAttribute proto.InternalMessageInfo
func (m *NamedResourcesAttributeValue) Reset() { *m = NamedResourcesAttributeValue{} } func (m *NamedResourcesAttributeValue) Reset() { *m = NamedResourcesAttributeValue{} }
func (*NamedResourcesAttributeValue) ProtoMessage() {} func (*NamedResourcesAttributeValue) ProtoMessage() {}
func (*NamedResourcesAttributeValue) Descriptor() ([]byte, []int) { func (*NamedResourcesAttributeValue) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{6} return fileDescriptor_66649ee9bbcd89d2, []int{6}
} }
func (m *NamedResourcesAttributeValue) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesAttributeValue) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -246,7 +246,7 @@ var xxx_messageInfo_NamedResourcesAttributeValue proto.InternalMessageInfo
func (m *NamedResourcesFilter) Reset() { *m = NamedResourcesFilter{} } func (m *NamedResourcesFilter) Reset() { *m = NamedResourcesFilter{} }
func (*NamedResourcesFilter) ProtoMessage() {} func (*NamedResourcesFilter) ProtoMessage() {}
func (*NamedResourcesFilter) Descriptor() ([]byte, []int) { func (*NamedResourcesFilter) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{7} return fileDescriptor_66649ee9bbcd89d2, []int{7}
} }
func (m *NamedResourcesFilter) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesFilter) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -274,7 +274,7 @@ var xxx_messageInfo_NamedResourcesFilter proto.InternalMessageInfo
func (m *NamedResourcesInstance) Reset() { *m = NamedResourcesInstance{} } func (m *NamedResourcesInstance) Reset() { *m = NamedResourcesInstance{} }
func (*NamedResourcesInstance) ProtoMessage() {} func (*NamedResourcesInstance) ProtoMessage() {}
func (*NamedResourcesInstance) Descriptor() ([]byte, []int) { func (*NamedResourcesInstance) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{8} return fileDescriptor_66649ee9bbcd89d2, []int{8}
} }
func (m *NamedResourcesInstance) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesInstance) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -302,7 +302,7 @@ var xxx_messageInfo_NamedResourcesInstance proto.InternalMessageInfo
func (m *NamedResourcesIntSlice) Reset() { *m = NamedResourcesIntSlice{} } func (m *NamedResourcesIntSlice) Reset() { *m = NamedResourcesIntSlice{} }
func (*NamedResourcesIntSlice) ProtoMessage() {} func (*NamedResourcesIntSlice) ProtoMessage() {}
func (*NamedResourcesIntSlice) Descriptor() ([]byte, []int) { func (*NamedResourcesIntSlice) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{9} return fileDescriptor_66649ee9bbcd89d2, []int{9}
} }
func (m *NamedResourcesIntSlice) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesIntSlice) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -330,7 +330,7 @@ var xxx_messageInfo_NamedResourcesIntSlice proto.InternalMessageInfo
func (m *NamedResourcesRequest) Reset() { *m = NamedResourcesRequest{} } func (m *NamedResourcesRequest) Reset() { *m = NamedResourcesRequest{} }
func (*NamedResourcesRequest) ProtoMessage() {} func (*NamedResourcesRequest) ProtoMessage() {}
func (*NamedResourcesRequest) Descriptor() ([]byte, []int) { func (*NamedResourcesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{10} return fileDescriptor_66649ee9bbcd89d2, []int{10}
} }
func (m *NamedResourcesRequest) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -358,7 +358,7 @@ var xxx_messageInfo_NamedResourcesRequest proto.InternalMessageInfo
func (m *NamedResourcesResources) Reset() { *m = NamedResourcesResources{} } func (m *NamedResourcesResources) Reset() { *m = NamedResourcesResources{} }
func (*NamedResourcesResources) ProtoMessage() {} func (*NamedResourcesResources) ProtoMessage() {}
func (*NamedResourcesResources) Descriptor() ([]byte, []int) { func (*NamedResourcesResources) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{11} return fileDescriptor_66649ee9bbcd89d2, []int{11}
} }
func (m *NamedResourcesResources) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesResources) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -386,7 +386,7 @@ var xxx_messageInfo_NamedResourcesResources proto.InternalMessageInfo
func (m *NamedResourcesStringSlice) Reset() { *m = NamedResourcesStringSlice{} } func (m *NamedResourcesStringSlice) Reset() { *m = NamedResourcesStringSlice{} }
func (*NamedResourcesStringSlice) ProtoMessage() {} func (*NamedResourcesStringSlice) ProtoMessage() {}
func (*NamedResourcesStringSlice) Descriptor() ([]byte, []int) { func (*NamedResourcesStringSlice) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{12} return fileDescriptor_66649ee9bbcd89d2, []int{12}
} }
func (m *NamedResourcesStringSlice) XXX_Unmarshal(b []byte) error { func (m *NamedResourcesStringSlice) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -414,7 +414,7 @@ var xxx_messageInfo_NamedResourcesStringSlice proto.InternalMessageInfo
func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} } func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} }
func (*PodSchedulingContext) ProtoMessage() {} func (*PodSchedulingContext) ProtoMessage() {}
func (*PodSchedulingContext) Descriptor() ([]byte, []int) { func (*PodSchedulingContext) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{13} return fileDescriptor_66649ee9bbcd89d2, []int{13}
} }
func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error { func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -442,7 +442,7 @@ var xxx_messageInfo_PodSchedulingContext proto.InternalMessageInfo
func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} } func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} }
func (*PodSchedulingContextList) ProtoMessage() {} func (*PodSchedulingContextList) ProtoMessage() {}
func (*PodSchedulingContextList) Descriptor() ([]byte, []int) { func (*PodSchedulingContextList) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{14} return fileDescriptor_66649ee9bbcd89d2, []int{14}
} }
func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error { func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -470,7 +470,7 @@ var xxx_messageInfo_PodSchedulingContextList proto.InternalMessageInfo
func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} } func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} }
func (*PodSchedulingContextSpec) ProtoMessage() {} func (*PodSchedulingContextSpec) ProtoMessage() {}
func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) { func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{15} return fileDescriptor_66649ee9bbcd89d2, []int{15}
} }
func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error { func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -498,7 +498,7 @@ var xxx_messageInfo_PodSchedulingContextSpec proto.InternalMessageInfo
func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} } func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} }
func (*PodSchedulingContextStatus) ProtoMessage() {} func (*PodSchedulingContextStatus) ProtoMessage() {}
func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) { func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{16} return fileDescriptor_66649ee9bbcd89d2, []int{16}
} }
func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error { func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -526,7 +526,7 @@ var xxx_messageInfo_PodSchedulingContextStatus proto.InternalMessageInfo
func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (m *ResourceClaim) Reset() { *m = ResourceClaim{} }
func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) ProtoMessage() {}
func (*ResourceClaim) Descriptor() ([]byte, []int) { func (*ResourceClaim) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{17} return fileDescriptor_66649ee9bbcd89d2, []int{17}
} }
func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { func (m *ResourceClaim) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -554,7 +554,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo
func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} }
func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) ProtoMessage() {}
func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{18} return fileDescriptor_66649ee9bbcd89d2, []int{18}
} }
func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -582,7 +582,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo
func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} }
func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) ProtoMessage() {}
func (*ResourceClaimList) Descriptor() ([]byte, []int) { func (*ResourceClaimList) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{19} return fileDescriptor_66649ee9bbcd89d2, []int{19}
} }
func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -610,7 +610,7 @@ var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo
func (m *ResourceClaimParameters) Reset() { *m = ResourceClaimParameters{} } func (m *ResourceClaimParameters) Reset() { *m = ResourceClaimParameters{} }
func (*ResourceClaimParameters) ProtoMessage() {} func (*ResourceClaimParameters) ProtoMessage() {}
func (*ResourceClaimParameters) Descriptor() ([]byte, []int) { func (*ResourceClaimParameters) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{20} return fileDescriptor_66649ee9bbcd89d2, []int{20}
} }
func (m *ResourceClaimParameters) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimParameters) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -638,7 +638,7 @@ var xxx_messageInfo_ResourceClaimParameters proto.InternalMessageInfo
func (m *ResourceClaimParametersList) Reset() { *m = ResourceClaimParametersList{} } func (m *ResourceClaimParametersList) Reset() { *m = ResourceClaimParametersList{} }
func (*ResourceClaimParametersList) ProtoMessage() {} func (*ResourceClaimParametersList) ProtoMessage() {}
func (*ResourceClaimParametersList) Descriptor() ([]byte, []int) { func (*ResourceClaimParametersList) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{21} return fileDescriptor_66649ee9bbcd89d2, []int{21}
} }
func (m *ResourceClaimParametersList) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimParametersList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -666,7 +666,7 @@ var xxx_messageInfo_ResourceClaimParametersList proto.InternalMessageInfo
func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} } func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} }
func (*ResourceClaimParametersReference) ProtoMessage() {} func (*ResourceClaimParametersReference) ProtoMessage() {}
func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) { func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{22} return fileDescriptor_66649ee9bbcd89d2, []int{22}
} }
func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -694,7 +694,7 @@ var xxx_messageInfo_ResourceClaimParametersReference proto.InternalMessageInfo
func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} }
func (*ResourceClaimSchedulingStatus) ProtoMessage() {} func (*ResourceClaimSchedulingStatus) ProtoMessage() {}
func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{23} return fileDescriptor_66649ee9bbcd89d2, []int{23}
} }
func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -722,7 +722,7 @@ var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo
func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} }
func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) ProtoMessage() {}
func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { func (*ResourceClaimSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{24} return fileDescriptor_66649ee9bbcd89d2, []int{24}
} }
func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -750,7 +750,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo
func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} }
func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) ProtoMessage() {}
func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { func (*ResourceClaimStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{25} return fileDescriptor_66649ee9bbcd89d2, []int{25}
} }
func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -778,7 +778,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo
func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} }
func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) ProtoMessage() {}
func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{26} return fileDescriptor_66649ee9bbcd89d2, []int{26}
} }
func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -806,7 +806,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo
func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} }
func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) ProtoMessage() {}
func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{27} return fileDescriptor_66649ee9bbcd89d2, []int{27}
} }
func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -834,7 +834,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo
func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} }
func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) ProtoMessage() {}
func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{28} return fileDescriptor_66649ee9bbcd89d2, []int{28}
} }
func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -862,7 +862,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo
func (m *ResourceClass) Reset() { *m = ResourceClass{} } func (m *ResourceClass) Reset() { *m = ResourceClass{} }
func (*ResourceClass) ProtoMessage() {} func (*ResourceClass) ProtoMessage() {}
func (*ResourceClass) Descriptor() ([]byte, []int) { func (*ResourceClass) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{29} return fileDescriptor_66649ee9bbcd89d2, []int{29}
} }
func (m *ResourceClass) XXX_Unmarshal(b []byte) error { func (m *ResourceClass) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -890,7 +890,7 @@ var xxx_messageInfo_ResourceClass proto.InternalMessageInfo
func (m *ResourceClassList) Reset() { *m = ResourceClassList{} } func (m *ResourceClassList) Reset() { *m = ResourceClassList{} }
func (*ResourceClassList) ProtoMessage() {} func (*ResourceClassList) ProtoMessage() {}
func (*ResourceClassList) Descriptor() ([]byte, []int) { func (*ResourceClassList) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{30} return fileDescriptor_66649ee9bbcd89d2, []int{30}
} }
func (m *ResourceClassList) XXX_Unmarshal(b []byte) error { func (m *ResourceClassList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -918,7 +918,7 @@ var xxx_messageInfo_ResourceClassList proto.InternalMessageInfo
func (m *ResourceClassParameters) Reset() { *m = ResourceClassParameters{} } func (m *ResourceClassParameters) Reset() { *m = ResourceClassParameters{} }
func (*ResourceClassParameters) ProtoMessage() {} func (*ResourceClassParameters) ProtoMessage() {}
func (*ResourceClassParameters) Descriptor() ([]byte, []int) { func (*ResourceClassParameters) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{31} return fileDescriptor_66649ee9bbcd89d2, []int{31}
} }
func (m *ResourceClassParameters) XXX_Unmarshal(b []byte) error { func (m *ResourceClassParameters) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -946,7 +946,7 @@ var xxx_messageInfo_ResourceClassParameters proto.InternalMessageInfo
func (m *ResourceClassParametersList) Reset() { *m = ResourceClassParametersList{} } func (m *ResourceClassParametersList) Reset() { *m = ResourceClassParametersList{} }
func (*ResourceClassParametersList) ProtoMessage() {} func (*ResourceClassParametersList) ProtoMessage() {}
func (*ResourceClassParametersList) Descriptor() ([]byte, []int) { func (*ResourceClassParametersList) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{32} return fileDescriptor_66649ee9bbcd89d2, []int{32}
} }
func (m *ResourceClassParametersList) XXX_Unmarshal(b []byte) error { func (m *ResourceClassParametersList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -974,7 +974,7 @@ var xxx_messageInfo_ResourceClassParametersList proto.InternalMessageInfo
func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} }
func (*ResourceClassParametersReference) ProtoMessage() {} func (*ResourceClassParametersReference) ProtoMessage() {}
func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{33} return fileDescriptor_66649ee9bbcd89d2, []int{33}
} }
func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1002,7 +1002,7 @@ var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo
func (m *ResourceFilter) Reset() { *m = ResourceFilter{} } func (m *ResourceFilter) Reset() { *m = ResourceFilter{} }
func (*ResourceFilter) ProtoMessage() {} func (*ResourceFilter) ProtoMessage() {}
func (*ResourceFilter) Descriptor() ([]byte, []int) { func (*ResourceFilter) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{34} return fileDescriptor_66649ee9bbcd89d2, []int{34}
} }
func (m *ResourceFilter) XXX_Unmarshal(b []byte) error { func (m *ResourceFilter) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1030,7 +1030,7 @@ var xxx_messageInfo_ResourceFilter proto.InternalMessageInfo
func (m *ResourceFilterModel) Reset() { *m = ResourceFilterModel{} } func (m *ResourceFilterModel) Reset() { *m = ResourceFilterModel{} }
func (*ResourceFilterModel) ProtoMessage() {} func (*ResourceFilterModel) ProtoMessage() {}
func (*ResourceFilterModel) Descriptor() ([]byte, []int) { func (*ResourceFilterModel) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{35} return fileDescriptor_66649ee9bbcd89d2, []int{35}
} }
func (m *ResourceFilterModel) XXX_Unmarshal(b []byte) error { func (m *ResourceFilterModel) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1058,7 +1058,7 @@ var xxx_messageInfo_ResourceFilterModel proto.InternalMessageInfo
func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } func (m *ResourceHandle) Reset() { *m = ResourceHandle{} }
func (*ResourceHandle) ProtoMessage() {} func (*ResourceHandle) ProtoMessage() {}
func (*ResourceHandle) Descriptor() ([]byte, []int) { func (*ResourceHandle) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{36} return fileDescriptor_66649ee9bbcd89d2, []int{36}
} }
func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { func (m *ResourceHandle) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1086,7 +1086,7 @@ var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo
func (m *ResourceModel) Reset() { *m = ResourceModel{} } func (m *ResourceModel) Reset() { *m = ResourceModel{} }
func (*ResourceModel) ProtoMessage() {} func (*ResourceModel) ProtoMessage() {}
func (*ResourceModel) Descriptor() ([]byte, []int) { func (*ResourceModel) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{37} return fileDescriptor_66649ee9bbcd89d2, []int{37}
} }
func (m *ResourceModel) XXX_Unmarshal(b []byte) error { func (m *ResourceModel) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1114,7 +1114,7 @@ var xxx_messageInfo_ResourceModel proto.InternalMessageInfo
func (m *ResourceRequest) Reset() { *m = ResourceRequest{} } func (m *ResourceRequest) Reset() { *m = ResourceRequest{} }
func (*ResourceRequest) ProtoMessage() {} func (*ResourceRequest) ProtoMessage() {}
func (*ResourceRequest) Descriptor() ([]byte, []int) { func (*ResourceRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{38} return fileDescriptor_66649ee9bbcd89d2, []int{38}
} }
func (m *ResourceRequest) XXX_Unmarshal(b []byte) error { func (m *ResourceRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1142,7 +1142,7 @@ var xxx_messageInfo_ResourceRequest proto.InternalMessageInfo
func (m *ResourceRequestModel) Reset() { *m = ResourceRequestModel{} } func (m *ResourceRequestModel) Reset() { *m = ResourceRequestModel{} }
func (*ResourceRequestModel) ProtoMessage() {} func (*ResourceRequestModel) ProtoMessage() {}
func (*ResourceRequestModel) Descriptor() ([]byte, []int) { func (*ResourceRequestModel) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{39} return fileDescriptor_66649ee9bbcd89d2, []int{39}
} }
func (m *ResourceRequestModel) XXX_Unmarshal(b []byte) error { func (m *ResourceRequestModel) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1170,7 +1170,7 @@ var xxx_messageInfo_ResourceRequestModel proto.InternalMessageInfo
func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } func (m *ResourceSlice) Reset() { *m = ResourceSlice{} }
func (*ResourceSlice) ProtoMessage() {} func (*ResourceSlice) ProtoMessage() {}
func (*ResourceSlice) Descriptor() ([]byte, []int) { func (*ResourceSlice) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{40} return fileDescriptor_66649ee9bbcd89d2, []int{40}
} }
func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { func (m *ResourceSlice) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1198,7 +1198,7 @@ var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo
func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} }
func (*ResourceSliceList) ProtoMessage() {} func (*ResourceSliceList) ProtoMessage() {}
func (*ResourceSliceList) Descriptor() ([]byte, []int) { func (*ResourceSliceList) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{41} return fileDescriptor_66649ee9bbcd89d2, []int{41}
} }
func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1226,7 +1226,7 @@ var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo
func (m *StructuredResourceHandle) Reset() { *m = StructuredResourceHandle{} } func (m *StructuredResourceHandle) Reset() { *m = StructuredResourceHandle{} }
func (*StructuredResourceHandle) ProtoMessage() {} func (*StructuredResourceHandle) ProtoMessage() {}
func (*StructuredResourceHandle) Descriptor() ([]byte, []int) { func (*StructuredResourceHandle) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{42} return fileDescriptor_66649ee9bbcd89d2, []int{42}
} }
func (m *StructuredResourceHandle) XXX_Unmarshal(b []byte) error { func (m *StructuredResourceHandle) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1254,7 +1254,7 @@ var xxx_messageInfo_StructuredResourceHandle proto.InternalMessageInfo
func (m *VendorParameters) Reset() { *m = VendorParameters{} } func (m *VendorParameters) Reset() { *m = VendorParameters{} }
func (*VendorParameters) ProtoMessage() {} func (*VendorParameters) ProtoMessage() {}
func (*VendorParameters) Descriptor() ([]byte, []int) { func (*VendorParameters) Descriptor() ([]byte, []int) {
return fileDescriptor_4312f5b44a31ec02, []int{43} return fileDescriptor_66649ee9bbcd89d2, []int{43}
} }
func (m *VendorParameters) XXX_Unmarshal(b []byte) error { func (m *VendorParameters) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -1280,57 +1280,57 @@ func (m *VendorParameters) XXX_DiscardUnknown() {
var xxx_messageInfo_VendorParameters proto.InternalMessageInfo var xxx_messageInfo_VendorParameters proto.InternalMessageInfo
func init() { func init() {
proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult") proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha3.AllocationResult")
proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha2.AllocationResultModel") proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha3.AllocationResultModel")
proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.DriverAllocationResult") proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DriverAllocationResult")
proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha2.DriverRequests") proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha3.DriverRequests")
proto.RegisterType((*NamedResourcesAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAllocationResult") proto.RegisterType((*NamedResourcesAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAllocationResult")
proto.RegisterType((*NamedResourcesAttribute)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttribute") proto.RegisterType((*NamedResourcesAttribute)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAttribute")
proto.RegisterType((*NamedResourcesAttributeValue)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttributeValue") proto.RegisterType((*NamedResourcesAttributeValue)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAttributeValue")
proto.RegisterType((*NamedResourcesFilter)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesFilter") proto.RegisterType((*NamedResourcesFilter)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesFilter")
proto.RegisterType((*NamedResourcesInstance)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesInstance") proto.RegisterType((*NamedResourcesInstance)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesInstance")
proto.RegisterType((*NamedResourcesIntSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesIntSlice") proto.RegisterType((*NamedResourcesIntSlice)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesIntSlice")
proto.RegisterType((*NamedResourcesRequest)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesRequest") proto.RegisterType((*NamedResourcesRequest)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesRequest")
proto.RegisterType((*NamedResourcesResources)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesResources") proto.RegisterType((*NamedResourcesResources)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesResources")
proto.RegisterType((*NamedResourcesStringSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesStringSlice") proto.RegisterType((*NamedResourcesStringSlice)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesStringSlice")
proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContext") proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContext")
proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextList") proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextList")
proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextSpec") proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextSpec")
proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextStatus") proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextStatus")
proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim") proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaim")
proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference") proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimConsumerReference")
proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList") proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimList")
proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParameters") proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParameters")
proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersList") proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParametersList")
proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference") proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParametersReference")
proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSchedulingStatus") proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSchedulingStatus")
proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSpec") proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSpec")
proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimStatus") proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimStatus")
proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplate") proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplate")
proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateList") proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateList")
proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateSpec") proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateSpec")
proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha2.ResourceClass") proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha3.ResourceClass")
proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassList") proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassList")
proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParameters") proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParameters")
proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersList") proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParametersList")
proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersReference") proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParametersReference")
proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilter") proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha3.ResourceFilter")
proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilterModel") proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceFilterModel")
proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.ResourceHandle") proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha3.ResourceHandle")
proto.RegisterType((*ResourceModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceModel") proto.RegisterType((*ResourceModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceModel")
proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequest") proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha3.ResourceRequest")
proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequestModel") proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceRequestModel")
proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha2.ResourceSlice") proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha3.ResourceSlice")
proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha2.ResourceSliceList") proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha3.ResourceSliceList")
proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.StructuredResourceHandle") proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha3.StructuredResourceHandle")
proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha2.VendorParameters") proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha3.VendorParameters")
} }
func init() { func init() {
proto.RegisterFile("k8s.io/api/resource/v1alpha2/generated.proto", fileDescriptor_4312f5b44a31ec02) proto.RegisterFile("k8s.io/api/resource/v1alpha3/generated.proto", fileDescriptor_66649ee9bbcd89d2)
} }
var fileDescriptor_4312f5b44a31ec02 = []byte{ var fileDescriptor_66649ee9bbcd89d2 = []byte{
// 2242 bytes of a gzipped FileDescriptorProto // 2242 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0x4d, 0x6c, 0x1c, 0x57, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0x4d, 0x6c, 0x1c, 0x57,
0xd9, 0xb3, 0xbb, 0x89, 0xd7, 0x9f, 0xed, 0xb5, 0x33, 0xb6, 0xe3, 0x4d, 0xea, 0xee, 0x6e, 0x47, 0xd9, 0xb3, 0xbb, 0x89, 0xd7, 0x9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, 0x47,
0xc7, 0x95, 0xa9, 0x4f, 0x1e, 0x57, 0xa6, 0x1e, 0x0c, 0x2a, 0xca, 0xc3, 0x41, 0x45, 0x79, 0x34, 0x8f, 0x2b, 0x53, 0x9f, 0x3c, 0xae, 0x4c, 0x3d, 0x18, 0x54, 0x94, 0x87, 0x83, 0x8a, 0xf2, 0x68,
0xa8, 0x28, 0x9f, 0x0c, 0x2a, 0xca, 0xbf, 0x06, 0x15, 0xe5, 0xc3, 0x7f, 0x57, 0xa6, 0xde, 0x5d, 0x50, 0x51, 0x3e, 0x19, 0x54, 0x94, 0x7f, 0x0d, 0x2a, 0xca, 0x87, 0xff, 0xae, 0x4c, 0xbd, 0xbb,
0x1b, 0xf5, 0x0f, 0x82, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x94, 0xb7, 0xe5, 0x3f, 0x28, 0x36, 0xea, 0x1f, 0x04, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x46, 0x21, 0x2d, 0x8a, 0x3f, 0x28,
0x00, 0x00, 0x00, 0x00,
} }

View File

@ -19,7 +19,7 @@ limitations under the License.
syntax = "proto2"; syntax = "proto2";
package k8s.io.api.resource.v1alpha2; package k8s.io.api.resource.v1alpha3;
import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/api/resource/generated.proto"; import "k8s.io/apimachinery/pkg/api/resource/generated.proto";
@ -28,7 +28,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated". // Package-wide variables from generator "generated".
option go_package = "k8s.io/api/resource/v1alpha2"; option go_package = "k8s.io/api/resource/v1alpha3";
// AllocationResult contains attributes of an allocated resource. // AllocationResult contains attributes of an allocated resource.
message AllocationResult { message AllocationResult {

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2 package v1alpha3
import ( import (
"k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/api/resource"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2 package v1alpha3
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -26,7 +26,7 @@ import (
const GroupName = "resource.k8s.io" const GroupName = "resource.k8s.io"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha3"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource // Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource { func Resource(resource string) schema.GroupResource {

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2 package v1alpha3
import ( import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha2 package v1alpha3
// This file contains a collection of methods that can be used from go-restful to // This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more // generate Swagger API documentation for its models. Please read this PR for more

View File

@ -19,7 +19,7 @@ limitations under the License.
// Code generated by deepcopy-gen. DO NOT EDIT. // Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha2 package v1alpha3
import ( import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"

View File

@ -68,7 +68,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha2 "k8s.io/api/resource/v1alpha2" resourceapi "k8s.io/api/resource/v1alpha3"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -134,7 +134,7 @@ var groups = []runtime.SchemeBuilder{
rbacv1alpha1.SchemeBuilder, rbacv1alpha1.SchemeBuilder,
rbacv1beta1.SchemeBuilder, rbacv1beta1.SchemeBuilder,
rbacv1.SchemeBuilder, rbacv1.SchemeBuilder,
resourcev1alpha2.SchemeBuilder, resourceapi.SchemeBuilder,
schedulingv1alpha1.SchemeBuilder, schedulingv1alpha1.SchemeBuilder,
schedulingv1beta1.SchemeBuilder, schedulingv1beta1.SchemeBuilder,
schedulingv1.SchemeBuilder, schedulingv1.SchemeBuilder,

View File

@ -1,84 +0,0 @@
{
"kind": "ResourceClaimParameters",
"apiVersion": "resource.k8s.io/v1alpha2",
"metadata": {
"name": "nameValue",
"generateName": "generateNameValue",
"namespace": "namespaceValue",
"selfLink": "selfLinkValue",
"uid": "uidValue",
"resourceVersion": "resourceVersionValue",
"generation": 7,
"creationTimestamp": "2008-01-01T01:01:01Z",
"deletionTimestamp": "2009-01-01T01:01:01Z",
"deletionGracePeriodSeconds": 10,
"labels": {
"labelsKey": "labelsValue"
},
"annotations": {
"annotationsKey": "annotationsValue"
},
"ownerReferences": [
{
"apiVersion": "apiVersionValue",
"kind": "kindValue",
"name": "nameValue",
"uid": "uidValue",
"controller": true,
"blockOwnerDeletion": true
}
],
"finalizers": [
"finalizersValue"
],
"managedFields": [
{
"manager": "managerValue",
"operation": "operationValue",
"apiVersion": "apiVersionValue",
"time": "2004-01-01T01:01:01Z",
"fieldsType": "fieldsTypeValue",
"fieldsV1": {},
"subresource": "subresourceValue"
}
]
},
"generatedFrom": {
"apiGroup": "apiGroupValue",
"kind": "kindValue",
"name": "nameValue"
},
"shareable": true,
"driverRequests": [
{
"driverName": "driverNameValue",
"vendorParameters": {
"apiVersion": "example.com/v1",
"kind": "CustomType",
"spec": {
"replicas": 1
},
"status": {
"available": 1
}
},
"requests": [
{
"vendorParameters": {
"apiVersion": "example.com/v1",
"kind": "CustomType",
"spec": {
"replicas": 1
},
"status": {
"available": 1
}
},
"namedResources": {
"selector": "selectorValue"
}
}
]
}
]
}

View File

@ -1,58 +0,0 @@
apiVersion: resource.k8s.io/v1alpha2
driverRequests:
- driverName: driverNameValue
requests:
- namedResources:
selector: selectorValue
vendorParameters:
apiVersion: example.com/v1
kind: CustomType
spec:
replicas: 1
status:
available: 1
vendorParameters:
apiVersion: example.com/v1
kind: CustomType
spec:
replicas: 1
status:
available: 1
generatedFrom:
apiGroup: apiGroupValue
kind: kindValue
name: nameValue
kind: ResourceClaimParameters
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
shareable: true

View File

@ -1,74 +0,0 @@
apiVersion: resource.k8s.io/v1alpha2
kind: ResourceClaimTemplate
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
spec:
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
spec:
allocationMode: allocationModeValue
parametersRef:
apiGroup: apiGroupValue
kind: kindValue
name: nameValue
resourceClassName: resourceClassNameValue

View File

@ -1,53 +0,0 @@
apiVersion: resource.k8s.io/v1alpha2
driverName: driverNameValue
kind: ResourceClass
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
parametersRef:
apiGroup: apiGroupValue
kind: kindValue
name: nameValue
namespace: namespaceValue
structuredParameters: true
suitableNodes:
nodeSelectorTerms:
- matchExpressions:
- key: keyValue
operator: operatorValue
values:
- valuesValue
matchFields:
- key: keyValue
operator: operatorValue
values:
- valuesValue

View File

@ -1,75 +0,0 @@
{
"kind": "ResourceClassParameters",
"apiVersion": "resource.k8s.io/v1alpha2",
"metadata": {
"name": "nameValue",
"generateName": "generateNameValue",
"namespace": "namespaceValue",
"selfLink": "selfLinkValue",
"uid": "uidValue",
"resourceVersion": "resourceVersionValue",
"generation": 7,
"creationTimestamp": "2008-01-01T01:01:01Z",
"deletionTimestamp": "2009-01-01T01:01:01Z",
"deletionGracePeriodSeconds": 10,
"labels": {
"labelsKey": "labelsValue"
},
"annotations": {
"annotationsKey": "annotationsValue"
},
"ownerReferences": [
{
"apiVersion": "apiVersionValue",
"kind": "kindValue",
"name": "nameValue",
"uid": "uidValue",
"controller": true,
"blockOwnerDeletion": true
}
],
"finalizers": [
"finalizersValue"
],
"managedFields": [
{
"manager": "managerValue",
"operation": "operationValue",
"apiVersion": "apiVersionValue",
"time": "2004-01-01T01:01:01Z",
"fieldsType": "fieldsTypeValue",
"fieldsV1": {},
"subresource": "subresourceValue"
}
]
},
"generatedFrom": {
"apiGroup": "apiGroupValue",
"kind": "kindValue",
"name": "nameValue",
"namespace": "namespaceValue"
},
"vendorParameters": [
{
"driverName": "driverNameValue",
"parameters": {
"apiVersion": "example.com/v1",
"kind": "CustomType",
"spec": {
"replicas": 1
},
"status": {
"available": 1
}
}
}
],
"filters": [
{
"driverName": "driverNameValue",
"namedResources": {
"selector": "selectorValue"
}
}
]
}

View File

@ -1,52 +0,0 @@
apiVersion: resource.k8s.io/v1alpha2
filters:
- driverName: driverNameValue
namedResources:
selector: selectorValue
generatedFrom:
apiGroup: apiGroupValue
kind: kindValue
name: nameValue
namespace: namespaceValue
kind: ResourceClassParameters
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
vendorParameters:
- driverName: driverNameValue
parameters:
apiVersion: example.com/v1
kind: CustomType
spec:
replicas: 1
status:
available: 1

View File

@ -1,75 +0,0 @@
{
"kind": "ResourceSlice",
"apiVersion": "resource.k8s.io/v1alpha2",
"metadata": {
"name": "nameValue",
"generateName": "generateNameValue",
"namespace": "namespaceValue",
"selfLink": "selfLinkValue",
"uid": "uidValue",
"resourceVersion": "resourceVersionValue",
"generation": 7,
"creationTimestamp": "2008-01-01T01:01:01Z",
"deletionTimestamp": "2009-01-01T01:01:01Z",
"deletionGracePeriodSeconds": 10,
"labels": {
"labelsKey": "labelsValue"
},
"annotations": {
"annotationsKey": "annotationsValue"
},
"ownerReferences": [
{
"apiVersion": "apiVersionValue",
"kind": "kindValue",
"name": "nameValue",
"uid": "uidValue",
"controller": true,
"blockOwnerDeletion": true
}
],
"finalizers": [
"finalizersValue"
],
"managedFields": [
{
"manager": "managerValue",
"operation": "operationValue",
"apiVersion": "apiVersionValue",
"time": "2004-01-01T01:01:01Z",
"fieldsType": "fieldsTypeValue",
"fieldsV1": {},
"subresource": "subresourceValue"
}
]
},
"nodeName": "nodeNameValue",
"driverName": "driverNameValue",
"namedResources": {
"instances": [
{
"name": "nameValue",
"attributes": [
{
"name": "nameValue",
"quantity": "0",
"bool": true,
"int": 7,
"intSlice": {
"ints": [
1
]
},
"string": "stringValue",
"stringSlice": {
"strings": [
"stringsValue"
]
},
"version": "versionValue"
}
]
}
]
}
}

View File

@ -1,52 +0,0 @@
apiVersion: resource.k8s.io/v1alpha2
driverName: driverNameValue
kind: ResourceSlice
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
namedResources:
instances:
- attributes:
- bool: true
int: 7
intSlice:
ints:
- 1
name: nameValue
quantity: "0"
string: stringValue
stringSlice:
strings:
- stringsValue
version: versionValue
name: nameValue
nodeName: nodeNameValue

Some files were not shown because too many files have changed in this diff Show More