From b98903d083e99f9e5a3754e77b0757da891a1c79 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 29 May 2024 08:50:06 +0200 Subject: [PATCH 01/20] dra e2e node: addd test case for ResourceSlice handling during kubelet startup Any redundant object must get deleted, but not the ones of other names. --- test/e2e_node/dra_test.go | 105 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 5 deletions(-) diff --git a/test/e2e_node/dra_test.go b/test/e2e_node/dra_test.go index 871f11e4abeb2..a07a4022ea328 100644 --- a/test/e2e_node/dra_test.go +++ b/test/e2e_node/dra_test.go @@ -34,9 +34,12 @@ import ( "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" + "github.com/onsi/gomega/gstruct" + "github.com/onsi/gomega/types" v1 "k8s.io/api/core/v1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" @@ -70,7 +73,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, f.Context("Resource Kubelet Plugin", f.WithSerial(), func() { ginkgo.BeforeEach(func(ctx context.Context) { - kubeletPlugin = newKubeletPlugin(ctx, getNodeName(ctx, f), driverName) + kubeletPlugin = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) }) ginkgo.It("must register after Kubelet restart", func(ctx context.Context) { @@ -90,7 +93,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("must register after plugin restart", func(ctx context.Context) { ginkgo.By("restart Kubelet Plugin") kubeletPlugin.Stop() - kubeletPlugin = newKubeletPlugin(ctx, getNodeName(ctx, f), driverName) + kubeletPlugin = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) ginkgo.By("wait for Kubelet plugin re-registration") gomega.Eventually(kubeletPlugin.GetGRPCCalls).WithTimeout(pluginRegistrationTimeout).Should(testdriver.BeRegistered) @@ -307,8 +310,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, f.Context("Two resource Kubelet Plugins", f.WithSerial(), func() { ginkgo.BeforeEach(func(ctx context.Context) { - kubeletPlugin1 = newKubeletPlugin(ctx, getNodeName(ctx, f), kubeletPlugin1Name) - kubeletPlugin2 = newKubeletPlugin(ctx, getNodeName(ctx, f), kubeletPlugin2Name) + kubeletPlugin1 = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), kubeletPlugin1Name) + kubeletPlugin2 = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), kubeletPlugin2Name) ginkgo.By("wait for Kubelet plugin registration") gomega.Eventually(kubeletPlugin1.GetGRPCCalls()).WithTimeout(pluginRegistrationTimeout).Should(testdriver.BeRegistered) @@ -423,10 +426,73 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, framework.ExpectNoError(err) }) }) + + f.Context("ResourceSlice", f.WithSerial(), func() { + listResources := func(ctx context.Context) ([]resourcev1alpha2.ResourceSlice, error) { + slices, err := f.ClientSet.ResourceV1alpha2().ResourceSlices().List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + return slices.Items, nil + } + + matchResourcesByNodeName := func(nodeName string) types.GomegaMatcher { + return gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ + "NodeName": gomega.Equal(nodeName), + }) + } + + f.It("must be removed on kubelet startup", f.WithDisruptive(), func(ctx context.Context) { + gomega.Expect(listResources(ctx)).To(gomega.BeEmpty(), "ResourceSlices should have been deleted after previous test") + + ginkgo.By("stop kubelet") + startKubelet := stopKubelet() + ginkgo.DeferCleanup(func() { + if startKubelet != nil { + startKubelet() + } + }) + + ginkgo.By("create some ResourceSlices") + nodeName := getNodeName(ctx, f) + otherNodeName := nodeName + "-other" + createTestResourceSlice(ctx, f.ClientSet, nodeName, driverName) + createTestResourceSlice(ctx, f.ClientSet, nodeName+"-other", driverName) + + matchAll := gomega.ConsistOf(matchResourcesByNodeName(nodeName), matchResourcesByNodeName(otherNodeName)) + matchOtherNode := gomega.ConsistOf(matchResourcesByNodeName(otherNodeName)) + + gomega.Consistently(ctx, listResources).WithTimeout(5*time.Second).Should(matchAll, "ResourceSlices without kubelet") + + ginkgo.By("start kubelet") + startKubelet() + startKubelet = nil + + ginkgo.By("wait for exactly the node's ResourceSlice to get deleted") + gomega.Eventually(ctx, listResources).Should(matchOtherNode, "ResourceSlices with kubelet") + gomega.Consistently(ctx, listResources).WithTimeout(5*time.Second).Should(matchOtherNode, "ResourceSlices with kubelet") + }) + + f.It("must be removed after plugin unregistration", func(ctx context.Context) { + gomega.Expect(listResources(ctx)).To(gomega.BeEmpty(), "ResourceSlices should have been deleted after previous test") + nodeName := getNodeName(ctx, f) + matchNode := gomega.ConsistOf(matchResourcesByNodeName(nodeName)) + + ginkgo.By("start plugin and wait for ResourceSlice") + kubeletPlugin = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + gomega.Eventually(ctx, listResources).Should(matchNode, "ResourceSlice from kubelet plugin") + gomega.Consistently(ctx, listResources).WithTimeout(5*time.Second).Should(matchNode, "ResourceSlice from kubelet plugin") + + ginkgo.By("stop plugin and wait for ResourceSlice removal") + kubeletPlugin.Stop() + gomega.Eventually(ctx, listResources).Should(gomega.BeEmpty(), "ResourceSlices with no plugin") + gomega.Consistently(ctx, listResources).WithTimeout(5*time.Second).Should(gomega.BeEmpty(), "ResourceSlices with no plugin") + }) + }) }) // Run Kubelet plugin and wait until it's registered -func newKubeletPlugin(ctx context.Context, nodeName, pluginName string) *testdriver.ExamplePlugin { +func newKubeletPlugin(ctx context.Context, clientSet kubernetes.Interface, nodeName, pluginName string) *testdriver.ExamplePlugin { ginkgo.By("start Kubelet plugin") logger := klog.LoggerWithValues(klog.LoggerWithName(klog.Background(), "kubelet plugin "+pluginName), "node", nodeName) ctx = klog.NewContext(ctx, logger) @@ -454,6 +520,11 @@ func newKubeletPlugin(ctx context.Context, nodeName, pluginName string) *testdri gomega.Eventually(plugin.GetGRPCCalls).WithTimeout(pluginRegistrationTimeout).Should(testdriver.BeRegistered) + ginkgo.DeferCleanup(func(ctx context.Context) { + // kubelet should do this eventually, but better make sure. + // A separate test checks this explicitly. + framework.ExpectNoError(clientSet.ResourceV1alpha2().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: "driverName=" + driverName})) + }) ginkgo.DeferCleanup(plugin.Stop) return plugin @@ -549,3 +620,27 @@ func createTestObjects(ctx context.Context, clientSet kubernetes.Interface, node return pod } + +func createTestResourceSlice(ctx context.Context, clientSet kubernetes.Interface, nodeName, driverName string) { + slice := &resourcev1alpha2.ResourceSlice{ + ObjectMeta: metav1.ObjectMeta{ + Name: nodeName, + }, + NodeName: nodeName, + DriverName: driverName, + ResourceModel: resourcev1alpha2.ResourceModel{ + NamedResources: &resourcev1alpha2.NamedResourcesResources{}, + }, + } + + ginkgo.By(fmt.Sprintf("Creating ResourceSlice %s", nodeName)) + slice, err := clientSet.ResourceV1alpha2().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}) + framework.ExpectNoError(err, "create ResourceSlice") + ginkgo.DeferCleanup(func(ctx context.Context) { + ginkgo.By(fmt.Sprintf("Deleting ResourceSlice %s", nodeName)) + err := clientSet.ResourceV1alpha2().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}) + if !apierrors.IsNotFound(err) { + framework.ExpectNoError(err, "delete ResourceSlice") + } + }) +} From c1c91a514ba074def23a870b0783f47e894579f0 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Apr 2024 14:36:44 +0200 Subject: [PATCH 02/20] kubelet: grant permission for DeleteCollection 2e34e187c9941c31ae7da099d5e16838523ce399 enabled kubelet to do List and Watch requests with the caveat that kubelet should better use a field selector (which it does). The same is now also needed for DeleteCollection because kubelet will use that to clean up in one operation instead of using multiple. --- .../admission/noderestriction/admission.go | 19 +++++++- .../noderestriction/admission_test.go | 48 ++++++++++++++++--- .../auth/authorizer/node/node_authorizer.go | 14 ++++-- test/integration/auth/node_test.go | 43 +++++++++++++++++ 4 files changed, 113 insertions(+), 11 deletions(-) diff --git a/plugin/pkg/admission/noderestriction/admission.go b/plugin/pkg/admission/noderestriction/admission.go index 9388ac52252f9..7f869d18bdad5 100644 --- a/plugin/pkg/admission/noderestriction/admission.go +++ b/plugin/pkg/admission/noderestriction/admission.go @@ -641,8 +641,14 @@ func (p *Plugin) admitCSINode(nodeName string, a admission.Attributes) error { func (p *Plugin) admitResourceSlice(nodeName string, a admission.Attributes) error { // The create request must come from a node with the same name as the NodeName field. - // Other requests gets checked by the node authorizer. - if a.GetOperation() == admission.Create { + // Same when deleting an object. + // + // Other requests get checked by the node authorizer. The checks here are necessary + // because the node authorizer does not know the object content for a create request + // and not each deleted object in a DeleteCollection. DeleteCollection checks each + // individual object. + switch a.GetOperation() { + case admission.Create: slice, ok := a.GetObject().(*resource.ResourceSlice) if !ok { return admission.NewForbidden(a, fmt.Errorf("unexpected type %T", a.GetObject())) @@ -651,6 +657,15 @@ func (p *Plugin) admitResourceSlice(nodeName string, a admission.Attributes) err if slice.NodeName != nodeName { return admission.NewForbidden(a, errors.New("can only create ResourceSlice with the same NodeName as the requesting node")) } + case admission.Delete: + slice, ok := a.GetOldObject().(*resource.ResourceSlice) + if !ok { + return admission.NewForbidden(a, fmt.Errorf("unexpected type %T", a.GetOldObject())) + } + + if slice.NodeName != nodeName { + return admission.NewForbidden(a, errors.New("can only delete ResourceSlice with the same NodeName as the requesting node")) + } } return nil diff --git a/plugin/pkg/admission/noderestriction/admission_test.go b/plugin/pkg/admission/noderestriction/admission_test.go index d4eb6d8fef466..6044c33ae4a69 100644 --- a/plugin/pkg/admission/noderestriction/admission_test.go +++ b/plugin/pkg/admission/noderestriction/admission_test.go @@ -1607,7 +1607,8 @@ func TestAdmitResourceSlice(t *testing.T) { apiResource := resourceapi.SchemeGroupVersion.WithResource("resourceslices") nodename := "mynode" mynode := &user.DefaultInfo{Name: "system:node:" + nodename, Groups: []string{"system:nodes"}} - err := "can only create ResourceSlice with the same NodeName as the requesting node" + createErr := "can only create ResourceSlice with the same NodeName as the requesting node" + deleteErr := "can only delete ResourceSlice with the same NodeName as the requesting node" sliceNode := &resourceapi.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{ @@ -1624,53 +1625,88 @@ func TestAdmitResourceSlice(t *testing.T) { tests := map[string]struct { operation admission.Operation - obj runtime.Object + options runtime.Object + obj, oldObj runtime.Object featureEnabled bool expectError string }{ "create allowed, enabled": { operation: admission.Create, + options: &metav1.CreateOptions{}, obj: sliceNode, featureEnabled: true, expectError: "", }, "create disallowed, enabled": { operation: admission.Create, + options: &metav1.CreateOptions{}, obj: sliceOtherNode, featureEnabled: true, - expectError: err, + expectError: createErr, }, "create allowed, disabled": { operation: admission.Create, + options: &metav1.CreateOptions{}, obj: sliceNode, featureEnabled: false, expectError: "", }, "create disallowed, disabled": { operation: admission.Create, + options: &metav1.CreateOptions{}, obj: sliceOtherNode, featureEnabled: false, - expectError: err, + expectError: createErr, }, "update allowed, same node": { operation: admission.Update, + options: &metav1.UpdateOptions{}, obj: sliceNode, featureEnabled: true, expectError: "", }, "update allowed, other node": { operation: admission.Update, + options: &metav1.UpdateOptions{}, obj: sliceOtherNode, featureEnabled: true, expectError: "", }, + "delete allowed, enabled": { + operation: admission.Delete, + options: &metav1.DeleteOptions{}, + oldObj: sliceNode, + featureEnabled: true, + expectError: "", + }, + "delete disallowed, enabled": { + operation: admission.Delete, + options: &metav1.DeleteOptions{}, + oldObj: sliceOtherNode, + featureEnabled: true, + expectError: deleteErr, + }, + "delete allowed, disabled": { + operation: admission.Delete, + options: &metav1.DeleteOptions{}, + oldObj: sliceNode, + featureEnabled: false, + expectError: "", + }, + "delete disallowed, disabled": { + operation: admission.Delete, + options: &metav1.DeleteOptions{}, + oldObj: sliceOtherNode, + featureEnabled: false, + expectError: deleteErr, + }, } for name, test := range tests { t.Run(name, func(t *testing.T) { attributes := admission.NewAttributesRecord( - test.obj, nil, schema.GroupVersionKind{}, - "", "foo", apiResource, "", test.operation, &metav1.CreateOptions{}, false, mynode) + test.obj, test.oldObj, schema.GroupVersionKind{}, + "", "foo", apiResource, "", test.operation, test.options, false, mynode) featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.DynamicResourceAllocation, test.featureEnabled) a := &admitTestCase{ name: name, diff --git a/plugin/pkg/auth/authorizer/node/node_authorizer.go b/plugin/pkg/auth/authorizer/node/node_authorizer.go index d6b5c8d303745..0b4e4c679b399 100644 --- a/plugin/pkg/auth/authorizer/node/node_authorizer.go +++ b/plugin/pkg/auth/authorizer/node/node_authorizer.go @@ -309,13 +309,21 @@ func (r *NodeAuthorizer) authorizeResourceSlice(nodeName string, attrs authorize return authorizer.DecisionNoOpinion, "cannot authorize ResourceSlice subresources", nil } - // allowed verbs: get, create, update, patch, delete + // allowed verbs: get, create, update, patch, delete, watch, list, deletecollection verb := attrs.GetVerb() switch verb { case "get", "create", "update", "patch", "delete": // Okay, but check individual object permission below. - case "watch", "list": - // Okay. The kubelet is trusted to use a filter for its own objects. + case "watch", "list", "deletecollection": + // Okay. The kubelet is trusted to use a filter for its own objects in watch and list. + // The NodeRestriction admission plugin (plugin/pkg/admission/noderestriction) + // ensures that the node is not deleting some ResourceSlice belonging to + // some other node. + // + // TODO (https://github.com/kubernetes/kubernetes/issues/125355): + // Once https://github.com/kubernetes/enhancements/pull/4600 is implemented, + // this code needs to be extended to verify that the node filter is indeed set. + // Then the admission check can be removed. return authorizer.DecisionAllow, "", nil default: klog.V(2).Infof("NODE DENY: '%s' %#v", nodeName, attrs) diff --git a/test/integration/auth/node_test.go b/test/integration/auth/node_test.go index 774ebd7e3ff9f..8c16b02813ea8 100644 --- a/test/integration/auth/node_test.go +++ b/test/integration/auth/node_test.go @@ -41,6 +41,7 @@ import ( "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/test/integration/framework" "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ) func TestNodeAuthorizer(t *testing.T) { @@ -113,6 +114,13 @@ func TestNodeAuthorizer(t *testing.T) { if _, err := superuserClient.ResourceV1alpha2().ResourceClaims("ns").Create(context.TODO(), &v1alpha2.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mytemplatizedresourceclaim"}, Spec: v1alpha2.ResourceClaimSpec{ResourceClassName: "example.com"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } + model := v1alpha2.ResourceModel{NamedResources: &v1alpha2.NamedResourcesResources{}} + if _, err := superuserClient.ResourceV1alpha2().ResourceSlices().Create(context.TODO(), &v1alpha2.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice1"}, NodeName: "node1", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { + t.Fatal(err) + } + if _, err := superuserClient.ResourceV1alpha2().ResourceSlices().Create(context.TODO(), &v1alpha2.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice2"}, NodeName: "node2", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { + t.Fatal(err) + } pvName := "mypv" if _, err := superuserClientExternal.StorageV1().VolumeAttachments().Create(context.TODO(), &storagev1.VolumeAttachment{ @@ -195,6 +203,15 @@ func TestNodeAuthorizer(t *testing.T) { return err } } + deleteResourceSliceCollection := func(client clientset.Interface, nodeName *string) func() error { + return func() error { + var listOptions metav1.ListOptions + if nodeName != nil { + listOptions.FieldSelector = "nodeName=" + *nodeName + } + return client.ResourceV1alpha2().ResourceSlices().DeleteCollection(context.TODO(), metav1.DeleteOptions{}, listOptions) + } + } addResourceClaimTemplateReference := func(client clientset.Interface) func() error { return func() error { _, err := client.CoreV1().Pods("ns").Patch(context.TODO(), "node2normalpod", types.MergePatchType, @@ -640,6 +657,32 @@ func TestNodeAuthorizer(t *testing.T) { expectForbidden(t, updateNode1CSINode(csiNode2Client)) expectForbidden(t, patchNode1CSINode(csiNode2Client)) expectForbidden(t, deleteNode1CSINode(csiNode2Client)) + + // Always allowed. Permission to delete specific objects is checked per object. + // Beware, this is destructive! + expectAllowed(t, deleteResourceSliceCollection(csiNode1Client, ptr.To("node1"))) + + // One slice must have been deleted, the other not. + slices, err := superuserClient.ResourceV1alpha2().ResourceSlices().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + t.Fatal(err) + } + if len(slices.Items) != 1 { + t.Fatalf("unexpected slices: %v", slices.Items) + } + if slices.Items[0].NodeName != "node2" { + t.Fatal("wrong slice deleted") + } + + // Superuser can delete. + expectAllowed(t, deleteResourceSliceCollection(superuserClient, nil)) + slices, err = superuserClient.ResourceV1alpha2().ResourceSlices().List(context.TODO(), metav1.ListOptions{}) + if err != nil { + t.Fatal(err) + } + if len(slices.Items) != 0 { + t.Fatalf("unexpected slices: %v", slices.Items) + } } // expect executes a function a set number of times until it either returns the From 4fbaba34c61cff35a6b8ebe791cd377d8798b499 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Apr 2024 16:20:34 +0200 Subject: [PATCH 03/20] DRA: move ResourceSlice publishing into DRA drivers This is a first step towards making kubelet independent of the resource.k8s.io API versioning because it now doesn't need to copy structs defined by that API from the driver to the API server. The next step is removing the other direction (reading ResourceClaim status and passing the resource handle to drivers). The drivers must get deployed so that they have their own connection to the API server. Securing at least the writes via a validating admission policy should be possible. As before, the kubelet removes all ResourceSlices for its node at startup, then DRA drivers recreate them if (and only if) they start up again. This ensures that there are no orphaned ResourceSlices when a driver gets removed while the kubelet was down. While at it, logging gets cleaned up and updated to use structured, contextual logging as much as possible. gRPC requests and streams now use a shared, per-process request ID and streams also get logged. --- pkg/kubelet/cm/dra/plugin/client.go | 92 +++- pkg/kubelet/cm/dra/plugin/client_test.go | 104 +--- pkg/kubelet/cm/dra/plugin/noderesources.go | 520 ------------------ pkg/kubelet/cm/dra/plugin/plugin.go | 225 ++++---- pkg/kubelet/cm/dra/plugin/plugins_store.go | 26 +- .../kubeletplugin/draplugin.go | 190 ++++++- .../kubeletplugin/noderegistrar.go | 10 +- .../kubeletplugin/nonblockinggrpcserver.go | 122 +++- .../resourceslice/noderesources.go | 391 +++++++++++++ .../kubelet/pkg/apis/dra/v1alpha3/api.pb.go | 478 ++-------------- .../kubelet/pkg/apis/dra/v1alpha3/api.proto | 15 +- test/e2e/dra/deploy.go | 7 +- test/e2e/dra/dra.go | 9 - test/e2e/dra/test-driver/README.md | 2 +- test/e2e/dra/test-driver/app/kubeletplugin.go | 59 +- test/e2e/dra/test-driver/app/server.go | 8 +- test/e2e_node/dra_test.go | 67 ++- 17 files changed, 1015 insertions(+), 1310 deletions(-) delete mode 100644 pkg/kubelet/cm/dra/plugin/noderesources.go create mode 100644 staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go diff --git a/pkg/kubelet/cm/dra/plugin/client.go b/pkg/kubelet/cm/dra/plugin/client.go index 5ec5c9d39878d..12ce6625c6d2f 100644 --- a/pkg/kubelet/cm/dra/plugin/client.go +++ b/pkg/kubelet/cm/dra/plugin/client.go @@ -18,18 +18,28 @@ package plugin import ( "context" + "errors" "fmt" + "net" + "sync" "time" "google.golang.org/grpc" + "google.golang.org/grpc/connectivity" + "google.golang.org/grpc/credentials/insecure" + utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/klog/v2" drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha3" ) const PluginClientTimeout = 45 * time.Second -func NewDRAPluginClient(pluginName string) (drapb.NodeClient, error) { +// NewDRAPluginClient returns a wrapper around those gRPC methods of a DRA +// driver kubelet plugin which need to be called by kubelet. The wrapper +// handles gRPC connection management and logging. Connections are reused +// across different NewDRAPluginClient calls. +func NewDRAPluginClient(pluginName string) (*Plugin, error) { if pluginName == "" { return nil, fmt.Errorf("plugin name is empty") } @@ -42,35 +52,64 @@ func NewDRAPluginClient(pluginName string) (drapb.NodeClient, error) { return existingPlugin, nil } -func (p *plugin) NodePrepareResources( - ctx context.Context, - req *drapb.NodePrepareResourcesRequest, - opts ...grpc.CallOption, -) (*drapb.NodePrepareResourcesResponse, error) { +type Plugin struct { + backgroundCtx context.Context + cancel func(cause error) + + mutex sync.Mutex + conn *grpc.ClientConn + endpoint string + highestSupportedVersion *utilversion.Version + clientTimeout time.Duration +} + +func (p *Plugin) getOrCreateGRPCConn() (*grpc.ClientConn, error) { + p.mutex.Lock() + defer p.mutex.Unlock() + + if p.conn != nil { + return p.conn, nil + } + + ctx := p.backgroundCtx logger := klog.FromContext(ctx) - logger.V(4).Info(log("calling NodePrepareResources rpc"), "request", req) - conn, err := p.getOrCreateGRPCConn() + network := "unix" + logger.V(4).Info("Creating new gRPC connection", "protocol", network, "endpoint", p.endpoint) + // grpc.Dial is deprecated. grpc.NewClient should be used instead. + // For now this gets ignored because this function is meant to establish + // the connection, with the one second timeout below. Perhaps that + // approach should be reconsidered? + //nolint:staticcheck + conn, err := grpc.Dial( + p.endpoint, + grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithContextDialer(func(ctx context.Context, target string) (net.Conn, error) { + return (&net.Dialer{}).DialContext(ctx, network, target) + }), + ) if err != nil { return nil, err } - ctx, cancel := context.WithTimeout(ctx, p.clientTimeout) + ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - nodeClient := drapb.NewNodeClient(conn) - response, err := nodeClient.NodePrepareResources(ctx, req) - logger.V(4).Info(log("done calling NodePrepareResources rpc"), "response", response, "err", err) - return response, err + if ok := conn.WaitForStateChange(ctx, connectivity.Connecting); !ok { + return nil, errors.New("timed out waiting for gRPC connection to be ready") + } + + p.conn = conn + return p.conn, nil } -func (p *plugin) NodeUnprepareResources( +func (p *Plugin) NodePrepareResources( ctx context.Context, - req *drapb.NodeUnprepareResourcesRequest, + req *drapb.NodePrepareResourcesRequest, opts ...grpc.CallOption, -) (*drapb.NodeUnprepareResourcesResponse, error) { +) (*drapb.NodePrepareResourcesResponse, error) { logger := klog.FromContext(ctx) - logger.V(4).Info(log("calling NodeUnprepareResource rpc"), "request", req) + logger.V(4).Info("Calling NodePrepareResources rpc", "request", req) conn, err := p.getOrCreateGRPCConn() if err != nil { @@ -81,24 +120,29 @@ func (p *plugin) NodeUnprepareResources( defer cancel() nodeClient := drapb.NewNodeClient(conn) - response, err := nodeClient.NodeUnprepareResources(ctx, req) - logger.V(4).Info(log("done calling NodeUnprepareResources rpc"), "response", response, "err", err) + response, err := nodeClient.NodePrepareResources(ctx, req) + logger.V(4).Info("Done calling NodePrepareResources rpc", "response", response, "err", err) return response, err } -func (p *plugin) NodeListAndWatchResources( +func (p *Plugin) NodeUnprepareResources( ctx context.Context, - req *drapb.NodeListAndWatchResourcesRequest, + req *drapb.NodeUnprepareResourcesRequest, opts ...grpc.CallOption, -) (drapb.Node_NodeListAndWatchResourcesClient, error) { +) (*drapb.NodeUnprepareResourcesResponse, error) { logger := klog.FromContext(ctx) - logger.V(4).Info(log("calling NodeListAndWatchResources rpc"), "request", req) + logger.V(4).Info("Calling NodeUnprepareResource rpc", "request", req) conn, err := p.getOrCreateGRPCConn() if err != nil { return nil, err } + ctx, cancel := context.WithTimeout(ctx, p.clientTimeout) + defer cancel() + nodeClient := drapb.NewNodeClient(conn) - return nodeClient.NodeListAndWatchResources(ctx, req, opts...) + response, err := nodeClient.NodeUnprepareResources(ctx, req) + logger.V(4).Info("Done calling NodeUnprepareResources rpc", "response", response, "err", err) + return response, err } diff --git a/pkg/kubelet/cm/dra/plugin/client_test.go b/pkg/kubelet/cm/dra/plugin/client_test.go index 398f8ff60f94c..b0e9ab058aaa2 100644 --- a/pkg/kubelet/cm/dra/plugin/client_test.go +++ b/pkg/kubelet/cm/dra/plugin/client_test.go @@ -28,6 +28,11 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/grpc" drapbv1alpha3 "k8s.io/kubelet/pkg/apis/dra/v1alpha3" + "k8s.io/kubernetes/test/utils/ktesting" +) + +const ( + v1alpha3Version = "v1alpha3" ) type fakeV1alpha3GRPCServer struct { @@ -45,16 +50,6 @@ func (f *fakeV1alpha3GRPCServer) NodeUnprepareResources(ctx context.Context, in return &drapbv1alpha3.NodeUnprepareResourcesResponse{}, nil } -func (f *fakeV1alpha3GRPCServer) NodeListAndWatchResources(req *drapbv1alpha3.NodeListAndWatchResourcesRequest, srv drapbv1alpha3.Node_NodeListAndWatchResourcesServer) error { - if err := srv.Send(&drapbv1alpha3.NodeListAndWatchResourcesResponse{}); err != nil { - return err - } - if err := srv.Send(&drapbv1alpha3.NodeListAndWatchResourcesResponse{}); err != nil { - return err - } - return nil -} - type tearDown func() func setupFakeGRPCServer(version string) (string, tearDown, error) { @@ -95,6 +90,7 @@ func setupFakeGRPCServer(version string) (string, tearDown, error) { } func TestGRPCConnIsReused(t *testing.T) { + ctx := ktesting.Init(t) addr, teardown, err := setupFakeGRPCServer(v1alpha3Version) if err != nil { t.Fatal(err) @@ -105,8 +101,9 @@ func TestGRPCConnIsReused(t *testing.T) { wg := sync.WaitGroup{} m := sync.Mutex{} - p := &plugin{ - endpoint: addr, + p := &Plugin{ + backgroundCtx: ctx, + endpoint: addr, } conn, err := p.getOrCreateGRPCConn() @@ -147,9 +144,9 @@ func TestGRPCConnIsReused(t *testing.T) { } client.NodePrepareResources(context.TODO(), req) - client.(*plugin).Lock() - conn := client.(*plugin).conn - client.(*plugin).Unlock() + client.mutex.Lock() + conn := client.conn + client.mutex.Unlock() m.Lock() defer m.Unlock() @@ -193,7 +190,7 @@ func TestNewDRAPluginClient(t *testing.T) { { description: "plugin exists", setup: func(name string) tearDown { - draPlugins.add(name, &plugin{}) + draPlugins.add(name, &Plugin{}) return func() { draPlugins.delete(name) } @@ -232,13 +229,15 @@ func TestNodeUnprepareResources(t *testing.T) { }, } { t.Run(test.description, func(t *testing.T) { + ctx := ktesting.Init(t) addr, teardown, err := setupFakeGRPCServer(test.serverVersion) if err != nil { t.Fatal(err) } defer teardown() - p := &plugin{ + p := &Plugin{ + backgroundCtx: ctx, endpoint: addr, clientTimeout: PluginClientTimeout, } @@ -269,74 +268,3 @@ func TestNodeUnprepareResources(t *testing.T) { }) } } - -func TestListAndWatchResources(t *testing.T) { - for _, test := range []struct { - description string - serverSetup func(string) (string, tearDown, error) - serverVersion string - request *drapbv1alpha3.NodeListAndWatchResourcesRequest - responses []*drapbv1alpha3.NodeListAndWatchResourcesResponse - expectError string - }{ - { - description: "server supports NodeResources API", - serverSetup: setupFakeGRPCServer, - serverVersion: v1alpha3Version, - request: &drapbv1alpha3.NodeListAndWatchResourcesRequest{}, - responses: []*drapbv1alpha3.NodeListAndWatchResourcesResponse{ - {}, - {}, - }, - expectError: "EOF", - }, - } { - t.Run(test.description, func(t *testing.T) { - addr, teardown, err := setupFakeGRPCServer(test.serverVersion) - if err != nil { - t.Fatal(err) - } - defer teardown() - - p := &plugin{ - endpoint: addr, - } - - conn, err := p.getOrCreateGRPCConn() - defer func() { - err := conn.Close() - if err != nil { - t.Error(err) - } - }() - if err != nil { - t.Fatal(err) - } - - draPlugins.add("dummy-plugin", p) - defer draPlugins.delete("dummy-plugin") - - client, err := NewDRAPluginClient("dummy-plugin") - if err != nil { - t.Fatal(err) - } - - stream, err := client.NodeListAndWatchResources(context.Background(), test.request) - if err != nil { - t.Fatal(err) - } - var actualResponses []*drapbv1alpha3.NodeListAndWatchResourcesResponse - var actualErr error - for { - resp, err := stream.Recv() - if err != nil { - actualErr = err - break - } - actualResponses = append(actualResponses, resp) - } - assert.Equal(t, test.responses, actualResponses) - assert.Contains(t, actualErr.Error(), test.expectError) - }) - } -} diff --git a/pkg/kubelet/cm/dra/plugin/noderesources.go b/pkg/kubelet/cm/dra/plugin/noderesources.go deleted file mode 100644 index 741eb17c89773..0000000000000 --- a/pkg/kubelet/cm/dra/plugin/noderesources.go +++ /dev/null @@ -1,520 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package plugin - -import ( - "context" - "errors" - "fmt" - "io" - "sync" - "time" - - "github.com/google/go-cmp/cmp" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - v1 "k8s.io/api/core/v1" - resourceapi "k8s.io/api/resource/v1alpha2" - apiequality "k8s.io/apimachinery/pkg/api/equality" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/sets" - resourceinformers "k8s.io/client-go/informers/resource/v1alpha2" - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/flowcontrol" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog/v2" - drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha3" - "k8s.io/utils/ptr" -) - -const ( - // resyncPeriod for informer - // TODO (https://github.com/kubernetes/kubernetes/issues/123688): disable? - resyncPeriod = time.Duration(10 * time.Minute) - retryPeriod = 5 * time.Second - maxRetryPeriod = 180 * time.Second - backoffFactor = 2.0 // Introduce a backoff multiplier as jitter factor -) - -// nodeResourcesController collects resource information from all registered -// plugins and synchronizes that information with ResourceSlice objects. -type nodeResourcesController struct { - ctx context.Context - kubeClient kubernetes.Interface - getNode func() (*v1.Node, error) - wg sync.WaitGroup - queue workqueue.TypedRateLimitingInterface[string] - sliceStore cache.Store - - mutex sync.RWMutex - activePlugins map[string]*activePlugin -} - -// activePlugin holds the resource information about one plugin -// and the gRPC stream that is used to retrieve that. The context -// used by that stream can be canceled separately to stop -// the monitoring. -type activePlugin struct { - // cancel is the function which cancels the monitorPlugin goroutine - // for this plugin. - cancel func(reason error) - - // resources is protected by the nodeResourcesController read/write lock. - // When receiving updates from the driver, the entire slice gets replaced, - // so it is okay to not do a deep copy of it. Only retrieving the slice - // must be protected by a read lock. - resources []*resourceapi.ResourceModel -} - -// startNodeResourcesController constructs a new controller and starts it. -// -// If a kubeClient is provided, then it synchronizes ResourceSlices -// with the resource information provided by plugins. Without it, -// the controller is inactive. This can happen when kubelet is run stand-alone -// without an apiserver. In that case we can't and don't need to publish -// ResourceSlices. -func startNodeResourcesController(ctx context.Context, kubeClient kubernetes.Interface, getNode func() (*v1.Node, error)) *nodeResourcesController { - if kubeClient == nil { - return nil - } - - logger := klog.FromContext(ctx) - logger = klog.LoggerWithName(logger, "node resources controller") - ctx = klog.NewContext(ctx, logger) - - c := &nodeResourcesController{ - ctx: ctx, - kubeClient: kubeClient, - getNode: getNode, - queue: workqueue.NewTypedRateLimitingQueueWithConfig( - workqueue.DefaultTypedControllerRateLimiter[string](), - workqueue.TypedRateLimitingQueueConfig[string]{Name: "node_resource_slices"}, - ), - activePlugins: make(map[string]*activePlugin), - } - - c.wg.Add(1) - go func() { - defer c.wg.Done() - c.run(ctx) - }() - - return c -} - -// waitForStop blocks until all background activity spawned by -// the controller has stopped. The context passed to start must -// be canceled for that to happen. -// -// Not needed at the moment, but if it was, this is what it would -// look like... -// func (c *nodeResourcesController) waitForStop() { -// if c == nil { -// return -// } -// -// c.wg.Wait() -// } - -// addPlugin is called whenever a plugin has been (re-)registered. -func (c *nodeResourcesController) addPlugin(driverName string, pluginInstance *plugin) { - if c == nil { - return - } - - klog.FromContext(c.ctx).V(2).Info("Adding plugin", "driverName", driverName) - c.mutex.Lock() - defer c.mutex.Unlock() - - if active := c.activePlugins[driverName]; active != nil { - active.cancel(errors.New("plugin has re-registered")) - } - active := &activePlugin{} - cancelCtx, cancel := context.WithCancelCause(c.ctx) - active.cancel = cancel - c.activePlugins[driverName] = active - c.queue.Add(driverName) - - c.wg.Add(1) - go func() { - defer c.wg.Done() - c.monitorPlugin(cancelCtx, active, driverName, pluginInstance) - }() -} - -// removePlugin is called whenever a plugin has been unregistered. -func (c *nodeResourcesController) removePlugin(driverName string) { - if c == nil { - return - } - - klog.FromContext(c.ctx).V(2).Info("Removing plugin", "driverName", driverName) - c.mutex.Lock() - defer c.mutex.Unlock() - if active, ok := c.activePlugins[driverName]; ok { - active.cancel(errors.New("plugin has unregistered")) - delete(c.activePlugins, driverName) - c.queue.Add(driverName) - } -} - -// monitorPlugin calls the plugin to retrieve resource information and caches -// all responses that it gets for processing in the sync method. It keeps -// retrying until an error or EOF response indicates that no further data is -// going to be sent, then watch resources of the plugin stops until it -// re-registers. -func (c *nodeResourcesController) monitorPlugin(ctx context.Context, active *activePlugin, driverName string, pluginInstance *plugin) { - logger := klog.FromContext(ctx) - logger = klog.LoggerWithValues(logger, "driverName", driverName) - logger.Info("Starting to monitor node resources of the plugin") - defer func() { - r := recover() - logger.Info("Stopping to monitor node resources of the plugin", "reason", context.Cause(ctx), "err", ctx.Err(), "recover", r) - }() - - backOff := flowcontrol.NewBackOffWithJitter(retryPeriod, maxRetryPeriod, backoffFactor) - backOffID := "retry" - - // Keep trying until canceled. - for ctx.Err() == nil { - logger.V(5).Info("Calling NodeListAndWatchResources") - stream, err := pluginInstance.NodeListAndWatchResources(ctx, new(drapb.NodeListAndWatchResourcesRequest)) - if err != nil { - switch { - case status.Convert(err).Code() == codes.Unimplemented: - // The plugin simply doesn't provide node resources. - active.cancel(errors.New("plugin does not support node resource reporting")) - default: - // This is a problem, report it and retry. - logger.Error(err, "Creating gRPC stream for node resources failed") - select { - case <-time.After(backOff.Get(backOffID)): - backOff.Next(backOffID, time.Now()) - case <-ctx.Done(): - } - } - continue - } - for { - response, err := stream.Recv() - if err != nil { - switch { - case errors.Is(err, io.EOF): - // This is okay. Some plugins might never change their - // resources after reporting them once. - active.cancel(errors.New("plugin has closed the stream")) - case status.Convert(err).Code() == codes.Unimplemented: - // The plugin has the method, does not really implement it. - active.cancel(errors.New("plugin does not support node resource reporting")) - case ctx.Err() == nil: - // This is a problem, report it and retry. - logger.Error(err, "Reading node resources from gRPC stream failed") - select { - case <-time.After(backOff.Get(backOffID)): - backOff.Next(backOffID, time.Now()) - case <-ctx.Done(): - } - } - break - } - - if loggerV := logger.V(6); loggerV.Enabled() { - loggerV.Info("Driver resources updated", "resources", response.Resources) - } else { - logger.V(5).Info("Driver resources updated", "numResources", len(response.Resources)) - } - - c.mutex.Lock() - active.resources = response.Resources - c.mutex.Unlock() - c.queue.Add(driverName) - } - } -} - -// run is running in the background. It handles blocking initialization (like -// syncing the informer) and then syncs the actual with the desired state. -func (c *nodeResourcesController) run(ctx context.Context) { - logger := klog.FromContext(ctx) - - // When kubelet starts, we have two choices: - // - Sync immediately, which in practice will delete all ResourceSlices - // because no plugin has registered yet. We could do a DeleteCollection - // to speed this up. - // - Wait a bit, then sync. If all plugins have re-registered in the meantime, - // we might not need to change any ResourceSlice. - // - // For now syncing starts immediately, with no DeleteCollection. This - // can be reconsidered later. - - // Wait until we're able to get a Node object. - // This means that the object is created on the API server, - // the kubeclient is functional and the node informer cache is populated with the node object. - // Without this it doesn't make sense to proceed further as we need a node name and - // a node UID for this controller to work. - var node *v1.Node - var err error - for { - node, err = c.getNode() - if err == nil { - break - } - logger.V(5).Info("Getting Node object failed, waiting", "err", err) - select { - case <-ctx.Done(): - return - case <-time.After(time.Second): - } - } - - // We could use an indexer on driver name, but that seems overkill. - informer := resourceinformers.NewFilteredResourceSliceInformer(c.kubeClient, resyncPeriod, nil, func(options *metav1.ListOptions) { - options.FieldSelector = "nodeName=" + node.Name - }) - c.sliceStore = informer.GetStore() - handler, err := informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj any) { - slice, ok := obj.(*resourceapi.ResourceSlice) - if !ok { - return - } - logger.V(5).Info("ResourceSlice add", "slice", klog.KObj(slice)) - c.queue.Add(slice.DriverName) - }, - UpdateFunc: func(old, new any) { - oldSlice, ok := old.(*resourceapi.ResourceSlice) - if !ok { - return - } - newSlice, ok := new.(*resourceapi.ResourceSlice) - if !ok { - return - } - if loggerV := logger.V(6); loggerV.Enabled() { - loggerV.Info("ResourceSlice update", "slice", klog.KObj(newSlice), "diff", cmp.Diff(oldSlice, newSlice)) - } else { - logger.V(5).Info("ResourceSlice update", "slice", klog.KObj(newSlice)) - } - c.queue.Add(newSlice.DriverName) - }, - DeleteFunc: func(obj any) { - if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { - obj = tombstone.Obj - } - slice, ok := obj.(*resourceapi.ResourceSlice) - if !ok { - return - } - logger.V(5).Info("ResourceSlice delete", "slice", klog.KObj(slice)) - c.queue.Add(slice.DriverName) - }, - }) - if err != nil { - logger.Error(err, "Registering event handler on the ResourceSlice informer failed, disabling resource monitoring") - return - } - - // Start informer and wait for our cache to be populated. - c.wg.Add(1) - go func() { - defer c.wg.Done() - informer.Run(ctx.Done()) - }() - for !handler.HasSynced() { - select { - case <-time.After(time.Second): - case <-ctx.Done(): - return - } - } - logger.Info("ResourceSlice informer has synced") - - for c.processNextWorkItem(ctx) { - } -} - -func (c *nodeResourcesController) processNextWorkItem(ctx context.Context) bool { - key, shutdown := c.queue.Get() - if shutdown { - return false - } - defer c.queue.Done(key) - - driverName := key - - // Panics are caught and treated like errors. - var err error - func() { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("internal error: %v", r) - } - }() - err = c.sync(ctx, driverName) - }() - - if err != nil { - // TODO (https://github.com/kubernetes/enhancements/issues/3077): contextual logging in utilruntime - utilruntime.HandleError(fmt.Errorf("processing driver %v: %v", driverName, err)) - c.queue.AddRateLimited(key) - - // Return without removing the work item from the queue. - // It will be retried. - return true - } - - c.queue.Forget(key) - return true -} - -func (c *nodeResourcesController) sync(ctx context.Context, driverName string) error { - logger := klog.FromContext(ctx) - - // Gather information about the actual and desired state. - slices := c.sliceStore.List() - var driverResources []*resourceapi.ResourceModel - c.mutex.RLock() - if active, ok := c.activePlugins[driverName]; ok { - // No need for a deep copy, the entire slice gets replaced on writes. - driverResources = active.resources - } - c.mutex.RUnlock() - - // Resources that are not yet stored in any slice need to be published. - // Here we track the indices of any resources that are already stored. - storedResourceIndices := sets.New[int]() - - // Slices that don't match any driver resource can either be updated (if there - // are new driver resources that need to be stored) or they need to be deleted. - obsoleteSlices := make([]*resourceapi.ResourceSlice, 0, len(slices)) - - // Match slices with resource information. - for _, obj := range slices { - slice := obj.(*resourceapi.ResourceSlice) - if slice.DriverName != driverName { - continue - } - - index := indexOfModel(driverResources, &slice.ResourceModel) - if index >= 0 { - storedResourceIndices.Insert(index) - continue - } - - obsoleteSlices = append(obsoleteSlices, slice) - } - - if loggerV := logger.V(6); loggerV.Enabled() { - // Dump entire resource information. - loggerV.Info("Syncing existing driver node resource slices with driver resources", "slices", klog.KObjSlice(slices), "resources", driverResources) - } else { - logger.V(5).Info("Syncing existing driver node resource slices with driver resources", "slices", klog.KObjSlice(slices), "numResources", len(driverResources)) - } - - // Update stale slices before removing what's left. - // - // We don't really know which of these slices might have - // been used for "the" driver resource because they don't - // have a unique ID. In practice, a driver is most likely - // to just give us one ResourceModel, in which case - // this isn't a problem at all. If we have more than one, - // then at least conceptually it currently doesn't matter - // where we publish it. - // - // The long-term goal is to move the handling of - // ResourceSlice objects into the driver, with kubelet - // just acting as a REST proxy. The advantage of that will - // be that kubelet won't need to support the same - // resource API version as the driver and the control plane. - // With that approach, the driver will be able to match - // up objects more intelligently. - numObsoleteSlices := len(obsoleteSlices) - for index, resource := range driverResources { - if storedResourceIndices.Has(index) { - // No need to do anything, it is already stored exactly - // like this in an existing slice. - continue - } - - if numObsoleteSlices > 0 { - // Update one existing slice. - slice := obsoleteSlices[numObsoleteSlices-1] - numObsoleteSlices-- - slice = slice.DeepCopy() - slice.ResourceModel = *resource - logger.V(5).Info("Reusing existing node resource slice", "slice", klog.KObj(slice)) - if _, err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Update(ctx, slice, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("update node resource slice: %w", err) - } - continue - } - - // Although node name and UID are unlikely to change - // we're getting updated node object just to be on the safe side. - // It's a cheap operation as it gets an object from the node informer cache. - node, err := c.getNode() - if err != nil { - return fmt.Errorf("retrieve node object: %w", err) - } - - // Create a new slice. - slice := &resourceapi.ResourceSlice{ - ObjectMeta: metav1.ObjectMeta{ - GenerateName: node.Name + "-" + driverName + "-", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: v1.SchemeGroupVersion.WithKind("Node").Version, - Kind: v1.SchemeGroupVersion.WithKind("Node").Kind, - Name: node.Name, - UID: node.UID, - Controller: ptr.To(true), - }, - }, - }, - NodeName: node.Name, - DriverName: driverName, - ResourceModel: *resource, - } - logger.V(5).Info("Creating new node resource slice", "slice", klog.KObj(slice)) - if _, err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("create node resource slice: %w", err) - } - } - - // All remaining slices are truly orphaned. - for i := 0; i < numObsoleteSlices; i++ { - slice := obsoleteSlices[i] - logger.V(5).Info("Deleting obsolete node resource slice", "slice", klog.KObj(slice)) - if err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}); err != nil { - return fmt.Errorf("delete node resource slice: %w", err) - } - } - - return nil -} - -func indexOfModel(models []*resourceapi.ResourceModel, model *resourceapi.ResourceModel) int { - for index, m := range models { - if apiequality.Semantic.DeepEqual(m, model) { - return index - } - } - return -1 -} diff --git a/pkg/kubelet/cm/dra/plugin/plugin.go b/pkg/kubelet/cm/dra/plugin/plugin.go index 2d3d0dc547200..e3f03d3bf7fb3 100644 --- a/pkg/kubelet/cm/dra/plugin/plugin.go +++ b/pkg/kubelet/cm/dra/plugin/plugin.go @@ -20,94 +20,125 @@ import ( "context" "errors" "fmt" - "net" "strings" - "sync" "time" - "google.golang.org/grpc" - "google.golang.org/grpc/connectivity" - "google.golang.org/grpc/credentials/insecure" v1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" utilversion "k8s.io/apimachinery/pkg/util/version" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" + "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" ) -const ( - // DRAPluginName is the name of the in-tree DRA Plugin. - DRAPluginName = "kubernetes.io/dra" - v1alpha3Version = "v1alpha3" -) - -// Plugin is a description of a DRA Plugin, defined by an endpoint. -type plugin struct { - sync.Mutex - conn *grpc.ClientConn - endpoint string - highestSupportedVersion *utilversion.Version - clientTimeout time.Duration -} - -func (p *plugin) getOrCreateGRPCConn() (*grpc.ClientConn, error) { - p.Lock() - defer p.Unlock() - - if p.conn != nil { - return p.conn, nil - } - - network := "unix" - klog.V(4).InfoS(log("creating new gRPC connection"), "protocol", network, "endpoint", p.endpoint) - conn, err := grpc.Dial( - p.endpoint, - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithContextDialer(func(ctx context.Context, target string) (net.Conn, error) { - return (&net.Dialer{}).DialContext(ctx, network, target) - }), - ) - if err != nil { - return nil, err - } - - ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - - if ok := conn.WaitForStateChange(ctx, connectivity.Connecting); !ok { - return nil, errors.New("timed out waiting for gRPC connection to be ready") - } - - p.conn = conn - return p.conn, nil -} - // RegistrationHandler is the handler which is fed to the pluginwatcher API. type RegistrationHandler struct { - controller *nodeResourcesController + // backgroundCtx is used for all future activities of the handler. + // This is necessary because it implements APIs which don't + // provide a context. + backgroundCtx context.Context + kubeClient kubernetes.Interface + getNode func() (*v1.Node, error) } +var _ cache.PluginHandler = &RegistrationHandler{} + // NewPluginHandler returns new registration handler. // // Must only be called once per process because it manages global state. // If a kubeClient is provided, then it synchronizes ResourceSlices // with the resource information provided by plugins. func NewRegistrationHandler(kubeClient kubernetes.Interface, getNode func() (*v1.Node, error)) *RegistrationHandler { - handler := &RegistrationHandler{} + handler := &RegistrationHandler{ + // The context and thus logger should come from the caller. + backgroundCtx: klog.NewContext(context.TODO(), klog.LoggerWithName(klog.TODO(), "DRA registration handler")), + kubeClient: kubeClient, + getNode: getNode, + } - // If kubelet ever gets an API for stopping registration handlers, then - // that would need to be hooked up with stopping the controller. - handler.controller = startNodeResourcesController(context.TODO(), kubeClient, getNode) + // When kubelet starts up, no DRA driver has registered yet. None of + // the drivers are usable until they come back, which might not happen + // at all. Therefore it is better to not advertise any local resources + // because pods could get stuck on the node waiting for the driver + // to start up. + // + // This has to run in the background. + go handler.wipeResourceSlices("") return handler } +// wipeResourceSlices deletes ResourceSlices of the node, optionally just for a specific driver. +func (h *RegistrationHandler) wipeResourceSlices(pluginName string) { + if h.kubeClient == nil { + return + } + ctx := h.backgroundCtx + logger := klog.FromContext(ctx) + + backoff := wait.Backoff{ + Duration: time.Second, + Factor: 2, + Jitter: 0.2, + Cap: 5 * time.Minute, + Steps: 100, + } + + // Error logging is done inside the loop. Context cancellation doesn't get logged. + _ = wait.ExponentialBackoffWithContext(ctx, backoff, func(ctx context.Context) (bool, error) { + node, err := h.getNode() + if apierrors.IsNotFound(err) { + return false, nil + } + if err != nil { + logger.Error(err, "Unexpected error checking for node") + return false, nil + } + fieldSelector := fields.Set{"nodeName": node.Name} + if pluginName != "" { + fieldSelector["driverName"] = pluginName + } + + err = h.kubeClient.ResourceV1alpha2().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: fieldSelector.String()}) + switch { + case err == nil: + logger.V(3).Info("Deleted ResourceSlices", "fieldSelector", fieldSelector) + return true, nil + case apierrors.IsUnauthorized(err): + // This can happen while kubelet is still figuring out + // its credentials. + logger.V(5).Info("Deleting ResourceSlice failed, retrying", "fieldSelector", fieldSelector, "err", err) + return false, nil + default: + // Log and retry for other errors. + logger.V(3).Info("Deleting ResourceSlice failed, retrying", "fieldSelector", fieldSelector, "err", err) + return false, nil + } + }) +} + // RegisterPlugin is called when a plugin can be registered. func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, versions []string, pluginClientTimeout *time.Duration) error { - klog.InfoS("Register new DRA plugin", "name", pluginName, "endpoint", endpoint) - - highestSupportedVersion, err := h.validateVersions("RegisterPlugin", pluginName, versions) + // Prepare a context with its own logger for the plugin. + // + // The lifecycle of the plugin's background activities is tied to our + // root context, so canceling that will also cancel the plugin. + // + // The logger injects the plugin name as additional value + // into all log output related to the plugin. + ctx := h.backgroundCtx + logger := klog.FromContext(ctx) + logger = klog.LoggerWithValues(logger, "pluginName", pluginName) + ctx = klog.NewContext(ctx, logger) + + logger.V(3).Info("Register new DRA plugin", "endpoint", endpoint) + + highestSupportedVersion, err := h.validateVersions(pluginName, versions) if err != nil { - return err + return fmt.Errorf("version check of plugin %s failed: %w", pluginName, err) } var timeout time.Duration @@ -117,7 +148,11 @@ func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, timeout = *pluginClientTimeout } - pluginInstance := &plugin{ + ctx, cancel := context.WithCancelCause(ctx) + + pluginInstance := &Plugin{ + backgroundCtx: ctx, + cancel: cancel, conn: nil, endpoint: endpoint, highestSupportedVersion: highestSupportedVersion, @@ -126,40 +161,27 @@ func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, // Storing endpoint of newly registered DRA Plugin into the map, where plugin name will be the key // all other DRA components will be able to get the actual socket of DRA plugins by its name. - // By default we assume the supported plugin version is v1alpha3 - draPlugins.add(pluginName, pluginInstance) - h.controller.addPlugin(pluginName, pluginInstance) + if draPlugins.add(pluginName, pluginInstance) { + logger.V(1).Info("Already registered, previous plugin was replaced") + } return nil } func (h *RegistrationHandler) validateVersions( - callerName string, pluginName string, versions []string, ) (*utilversion.Version, error) { if len(versions) == 0 { - return nil, errors.New( - log( - "%s for DRA plugin %q failed. Plugin returned an empty list for supported versions", - callerName, - pluginName, - ), - ) + return nil, errors.New("empty list for supported versions") } // Validate version newPluginHighestVersion, err := utilversion.HighestSupportedVersion(versions) if err != nil { - return nil, errors.New( - log( - "%s for DRA plugin %q failed. None of the versions specified %q are supported. err=%v", - callerName, - pluginName, - versions, - err, - ), - ) + // HighestSupportedVersion includes the list of versions in its error + // if relevant, no need to repeat it here. + return nil, fmt.Errorf("none of the versions are supported: %w", err) } existingPlugin := draPlugins.get(pluginName) @@ -169,26 +191,26 @@ func (h *RegistrationHandler) validateVersions( if existingPlugin.highestSupportedVersion.LessThan(newPluginHighestVersion) { return newPluginHighestVersion, nil } - return nil, errors.New( - log( - "%s for DRA plugin %q failed. Another plugin with the same name is already registered with a higher supported version: %q", - callerName, - pluginName, - existingPlugin.highestSupportedVersion, - ), - ) -} - -func deregisterPlugin(pluginName string) { - draPlugins.delete(pluginName) + return nil, fmt.Errorf("another plugin instance is already registered with a higher supported version: %q < %q", newPluginHighestVersion, existingPlugin.highestSupportedVersion) } // DeRegisterPlugin is called when a plugin has removed its socket, // signaling it is no longer available. func (h *RegistrationHandler) DeRegisterPlugin(pluginName string) { - klog.InfoS("DeRegister DRA plugin", "name", pluginName) - deregisterPlugin(pluginName) - h.controller.removePlugin(pluginName) + if p := draPlugins.delete(pluginName); p != nil { + logger := klog.FromContext(p.backgroundCtx) + logger.V(3).Info("Deregister DRA plugin", "endpoint", p.endpoint) + + // Clean up the ResourceSlices for the deleted Plugin since it + // may have died without doing so itself and might never come + // back. + go h.wipeResourceSlices(pluginName) + + return + } + + logger := klog.FromContext(h.backgroundCtx) + logger.V(3).Info("Deregister DRA plugin not necessary, was already removed") } // ValidatePlugin is called by kubelet's plugin watcher upon detection @@ -196,15 +218,10 @@ func (h *RegistrationHandler) DeRegisterPlugin(pluginName string) { func (h *RegistrationHandler) ValidatePlugin(pluginName string, endpoint string, versions []string) error { klog.InfoS("Validate DRA plugin", "name", pluginName, "endpoint", endpoint, "versions", strings.Join(versions, ",")) - _, err := h.validateVersions("ValidatePlugin", pluginName, versions) + _, err := h.validateVersions(pluginName, versions) if err != nil { - return fmt.Errorf("validation failed for DRA plugin %s at endpoint %s: %+v", pluginName, endpoint, err) + return fmt.Errorf("invalid versions of plugin %s: %w", pluginName, err) } return err } - -// log prepends log string with `kubernetes.io/dra`. -func log(msg string, parts ...interface{}) string { - return fmt.Sprintf(fmt.Sprintf("%s: %s", DRAPluginName, msg), parts...) -} diff --git a/pkg/kubelet/cm/dra/plugin/plugins_store.go b/pkg/kubelet/cm/dra/plugin/plugins_store.go index aa1449e5913de..e172ac2545b34 100644 --- a/pkg/kubelet/cm/dra/plugin/plugins_store.go +++ b/pkg/kubelet/cm/dra/plugin/plugins_store.go @@ -17,15 +17,14 @@ limitations under the License. package plugin import ( + "errors" "sync" - - "k8s.io/klog/v2" ) // PluginsStore holds a list of DRA Plugins. type pluginsStore struct { sync.RWMutex - store map[string]*plugin + store map[string]*Plugin } // draPlugins map keeps track of all registered DRA plugins on the node @@ -34,7 +33,7 @@ var draPlugins = &pluginsStore{} // Get lets you retrieve a DRA Plugin by name. // This method is protected by a mutex. -func (s *pluginsStore) get(pluginName string) *plugin { +func (s *pluginsStore) get(pluginName string) *Plugin { s.RLock() defer s.RUnlock() @@ -43,26 +42,33 @@ func (s *pluginsStore) get(pluginName string) *plugin { // Set lets you save a DRA Plugin to the list and give it a specific name. // This method is protected by a mutex. -func (s *pluginsStore) add(pluginName string, p *plugin) { +func (s *pluginsStore) add(pluginName string, p *Plugin) (replaced bool) { s.Lock() defer s.Unlock() if s.store == nil { - s.store = make(map[string]*plugin) + s.store = make(map[string]*Plugin) } _, exists := s.store[pluginName] - if exists { - klog.V(1).InfoS(log("plugin: %s already registered, previous plugin will be overridden", pluginName)) - } s.store[pluginName] = p + return exists } // Delete lets you delete a DRA Plugin by name. // This method is protected by a mutex. -func (s *pluginsStore) delete(pluginName string) { +func (s *pluginsStore) delete(pluginName string) *Plugin { s.Lock() defer s.Unlock() + p, exists := s.store[pluginName] + if !exists { + return nil + } + if p.cancel != nil { + p.cancel(errors.New("plugin got removed")) + } delete(s.store, pluginName) + + return p } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go index 4033d6056c390..9f1ca8b4abcbb 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go @@ -17,13 +17,19 @@ limitations under the License. package kubeletplugin import ( + "context" "errors" "fmt" "net" + "sync" "google.golang.org/grpc" "k8s.io/klog/v2" + resourceapi "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/types" + "k8s.io/client-go/kubernetes" + "k8s.io/dynamic-resource-allocation/resourceslice" drapbv1alpha3 "k8s.io/kubelet/pkg/apis/dra/v1alpha3" registerapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" ) @@ -39,6 +45,18 @@ type DRAPlugin interface { // received yet. RegistrationStatus() *registerapi.RegistrationStatus + // PublishResources may be called one or more times to publish + // resource information in ResourceSlice objects. If it never gets + // called, then the kubelet plugin does not manage any ResourceSlice + // objects. + // + // PublishResources does not block, so it might still take a while + // after it returns before all information is actually written + // to the API server. + // + // The caller must not modify the content of the slice. + PublishResources(ctx context.Context, nodeResources []*resourceapi.ResourceModel) + // This unexported method ensures that we can modify the interface // without causing an API break of the package // (https://pkg.go.dev/golang.org/x/exp/apidiff#section-readme). @@ -57,14 +75,6 @@ func DriverName(driverName string) Option { } } -// Logger overrides the default klog.Background logger. -func Logger(logger klog.Logger) Option { - return func(o *options) error { - o.logger = logger - return nil - } -} - // GRPCVerbosity sets the verbosity for logging gRPC calls. Default is 4. A negative // value disables logging. func GRPCVerbosity(level int) Option { @@ -162,15 +172,50 @@ func NodeV1alpha3(enabled bool) Option { } } +// KubeClient grants the plugin access to the API server. This is needed +// for syncing ResourceSlice objects. It's the responsibility of the DRA driver +// developer to ensure that this client has permission to read, write, +// patch and list such objects. It also needs permission to read node objects. +// Ideally, a validating admission policy should be used to limit write +// access to ResourceSlices which belong to the node. +func KubeClient(kubeClient kubernetes.Interface) Option { + return func(o *options) error { + o.kubeClient = kubeClient + return nil + } +} + +// NodeName tells the plugin on which node it is running. This is needed for +// syncing ResourceSlice objects. +func NodeName(nodeName string) Option { + return func(o *options) error { + o.nodeName = nodeName + return nil + } +} + +// NodeUID tells the plugin the UID of the v1.Node object. This is used +// when syncing ResourceSlice objects, but doesn't have to be used. If +// not supplied, the controller will look up the object once. +func NodeUID(nodeUID types.UID) Option { + return func(o *options) error { + o.nodeUID = nodeUID + return nil + } +} + type options struct { logger klog.Logger grpcVerbosity int driverName string + nodeName string + nodeUID types.UID draEndpoint endpoint draAddress string pluginRegistrationEndpoint endpoint unaryInterceptors []grpc.UnaryServerInterceptor streamInterceptors []grpc.StreamServerInterceptor + kubeClient kubernetes.Interface nodeV1alpha3 bool } @@ -178,18 +223,36 @@ type options struct { // draPlugin combines the kubelet registration service and the DRA node plugin // service. type draPlugin struct { - registrar *nodeRegistrar - plugin *grpcServer + // backgroundCtx is for activities that are started later. + backgroundCtx context.Context + // cancel cancels the backgroundCtx. + cancel func(cause error) + wg sync.WaitGroup + registrar *nodeRegistrar + plugin *grpcServer + driverName string + nodeName string + nodeUID types.UID + kubeClient kubernetes.Interface + + // Information about resource publishing changes concurrently and thus + // must be protected by the mutex. The controller gets started only + // if needed. + mutex sync.Mutex + resourceSliceController *resourceslice.Controller } // Start sets up two gRPC servers (one for registration, one for the DRA node // client). By default, all APIs implemented by the nodeServer get registered. -func Start(nodeServer interface{}, opts ...Option) (result DRAPlugin, finalErr error) { - d := &draPlugin{} - +// +// The context and/or DRAPlugin.Stop can be used to stop all background activity. +// Stop also blocks. A logger can be stored in the context to add values or +// a name to all log entries. +func Start(ctx context.Context, nodeServer interface{}, opts ...Option) (result DRAPlugin, finalErr error) { + logger := klog.FromContext(ctx) o := options{ logger: klog.Background(), - grpcVerbosity: 4, + grpcVerbosity: 6, // Logs requests and responses, which can be large. nodeV1alpha3: true, } for _, option := range opts { @@ -212,11 +275,41 @@ func Start(nodeServer interface{}, opts ...Option) (result DRAPlugin, finalErr e return nil, errors.New("a Unix domain socket path and/or listener must be set for the registrar") } + d := &draPlugin{ + driverName: o.driverName, + nodeName: o.nodeName, + nodeUID: o.nodeUID, + kubeClient: o.kubeClient, + } + + // Stop calls cancel and therefore both cancellation + // and Stop cause goroutines to stop. + ctx, cancel := context.WithCancelCause(ctx) + d.backgroundCtx, d.cancel = ctx, cancel + logger.V(3).Info("Starting") + d.wg.Add(1) + go func() { + defer d.wg.Done() + defer logger.V(3).Info("Stopping") + <-ctx.Done() + }() + + // Clean up if we don't finish succcessfully. + defer func() { + if r := recover(); r != nil { + d.Stop() + panic(r) + } + if finalErr != nil { + d.Stop() + } + }() + // Run the node plugin gRPC server first to ensure that it is ready. implemented := false - plugin, err := startGRPCServer(klog.LoggerWithName(o.logger, "dra"), o.grpcVerbosity, o.unaryInterceptors, o.streamInterceptors, o.draEndpoint, func(grpcServer *grpc.Server) { + plugin, err := startGRPCServer(klog.NewContext(ctx, klog.LoggerWithName(logger, "dra")), o.grpcVerbosity, o.unaryInterceptors, o.streamInterceptors, o.draEndpoint, func(grpcServer *grpc.Server) { if nodeServer, ok := nodeServer.(drapbv1alpha3.NodeServer); ok && o.nodeV1alpha3 { - o.logger.V(5).Info("registering drapbv1alpha3.NodeServer") + logger.V(5).Info("registering drapbv1alpha3.NodeServer") drapbv1alpha3.RegisterNodeServer(grpcServer, nodeServer) implemented = true } @@ -225,38 +318,77 @@ func Start(nodeServer interface{}, opts ...Option) (result DRAPlugin, finalErr e return nil, fmt.Errorf("start node client: %v", err) } d.plugin = plugin - defer func() { - // Clean up if we didn't finish succcessfully. - if r := recover(); r != nil { - plugin.stop() - panic(r) - } - if finalErr != nil { - plugin.stop() - } - }() if !implemented { return nil, errors.New("no supported DRA gRPC API is implemented and enabled") } // Now make it available to kubelet. - registrar, err := startRegistrar(klog.LoggerWithName(o.logger, "registrar"), o.grpcVerbosity, o.unaryInterceptors, o.streamInterceptors, o.driverName, o.draAddress, o.pluginRegistrationEndpoint) + registrar, err := startRegistrar(klog.NewContext(ctx, klog.LoggerWithName(logger, "registrar")), o.grpcVerbosity, o.unaryInterceptors, o.streamInterceptors, o.driverName, o.draAddress, o.pluginRegistrationEndpoint) if err != nil { return nil, fmt.Errorf("start registrar: %v", err) } d.registrar = registrar + // startGRPCServer and startRegistrar don't implement cancellation + // themselves, we add that for both here. + d.wg.Add(1) + go func() { + defer d.wg.Done() + <-ctx.Done() + + // Time to stop. + d.plugin.stop() + d.registrar.stop() + + // d.resourceSliceController is set concurrently. + d.mutex.Lock() + d.resourceSliceController.Stop() + d.mutex.Unlock() + }() + return d, nil } +// Stop implements [DRAPlugin.Stop]. func (d *draPlugin) Stop() { if d == nil { return } - d.registrar.stop() - d.plugin.stop() + d.cancel(errors.New("DRA plugin was stopped")) + // Wait for goroutines in Start to clean up and exit. + d.wg.Wait() +} + +// PublishResources implements [DRAPlugin.PublishResources]. +func (d *draPlugin) PublishResources(ctx context.Context, nodeResources []*resourceapi.ResourceModel) { + d.mutex.Lock() + defer d.mutex.Unlock() + + owner := resourceslice.Owner{ + APIVersion: "v1", + Kind: "Node", + Name: d.nodeName, + UID: d.nodeUID, // Optional, will be determined by controller if empty. + } + resources := &resourceslice.Resources{NodeResources: nodeResources} + if d.resourceSliceController == nil { + // Start publishing the information. The controller is using + // our background context, not the one passed into this + // function, and thus is connected to the lifecycle of the + // plugin. + controllerCtx := d.backgroundCtx + controllerLogger := klog.FromContext(controllerCtx) + controllerLogger = klog.LoggerWithName(controllerLogger, "ResourceSlice controller") + controllerCtx = klog.NewContext(controllerCtx, controllerLogger) + d.resourceSliceController = resourceslice.StartController(controllerCtx, d.kubeClient, d.driverName, owner, resources) + return + } + + // Inform running controller about new information. + d.resourceSliceController.Update(resources) } +// RegistrationStatus implements [DRAPlugin.RegistrationStatus]. func (d *draPlugin) RegistrationStatus() *registerapi.RegistrationStatus { if d.registrar == nil { return nil diff --git a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/noderegistrar.go b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/noderegistrar.go index 579f86245a750..abcc6df2170f5 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/noderegistrar.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/noderegistrar.go @@ -17,30 +17,30 @@ limitations under the License. package kubeletplugin import ( + "context" "fmt" "google.golang.org/grpc" - "k8s.io/klog/v2" registerapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" ) type nodeRegistrar struct { - logger klog.Logger registrationServer server *grpcServer } // startRegistrar returns a running instance. -func startRegistrar(logger klog.Logger, grpcVerbosity int, interceptors []grpc.UnaryServerInterceptor, streamInterceptors []grpc.StreamServerInterceptor, driverName string, endpoint string, pluginRegistrationEndpoint endpoint) (*nodeRegistrar, error) { +// +// The context is only used for additional values, cancellation is ignored. +func startRegistrar(valueCtx context.Context, grpcVerbosity int, interceptors []grpc.UnaryServerInterceptor, streamInterceptors []grpc.StreamServerInterceptor, driverName string, endpoint string, pluginRegistrationEndpoint endpoint) (*nodeRegistrar, error) { n := &nodeRegistrar{ - logger: logger, registrationServer: registrationServer{ driverName: driverName, endpoint: endpoint, supportedVersions: []string{"1.0.0"}, // TODO: is this correct? }, } - s, err := startGRPCServer(logger, grpcVerbosity, interceptors, streamInterceptors, pluginRegistrationEndpoint, func(grpcServer *grpc.Server) { + s, err := startGRPCServer(valueCtx, grpcVerbosity, interceptors, streamInterceptors, pluginRegistrationEndpoint, func(grpcServer *grpc.Server) { registerapi.RegisterRegistrationServer(grpcServer, n) }) if err != nil { diff --git a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/nonblockinggrpcserver.go b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/nonblockinggrpcserver.go index c2d6cf18267fd..c8b0a2594d770 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/nonblockinggrpcserver.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/nonblockinggrpcserver.go @@ -26,15 +26,17 @@ import ( "google.golang.org/grpc" "k8s.io/klog/v2" + + utilruntime "k8s.io/apimachinery/pkg/util/runtime" ) +var requestID int64 + type grpcServer struct { - logger klog.Logger grpcVerbosity int wg sync.WaitGroup endpoint endpoint server *grpc.Server - requestID int64 } type registerService func(s *grpc.Server) @@ -54,9 +56,11 @@ type endpoint struct { // startGRPCServer sets up the GRPC server on a Unix domain socket and spawns a goroutine // which handles requests for arbitrary services. -func startGRPCServer(logger klog.Logger, grpcVerbosity int, unaryInterceptors []grpc.UnaryServerInterceptor, streamInterceptors []grpc.StreamServerInterceptor, endpoint endpoint, services ...registerService) (*grpcServer, error) { +// +// The context is only used for additional values, cancellation is ignored. +func startGRPCServer(valueCtx context.Context, grpcVerbosity int, unaryInterceptors []grpc.UnaryServerInterceptor, streamInterceptors []grpc.StreamServerInterceptor, endpoint endpoint, services ...registerService) (*grpcServer, error) { + logger := klog.FromContext(valueCtx) s := &grpcServer{ - logger: logger, endpoint: endpoint, grpcVerbosity: grpcVerbosity, } @@ -79,10 +83,11 @@ func startGRPCServer(logger klog.Logger, grpcVerbosity int, unaryInterceptors [] // Run a gRPC server. It will close the listening socket when // shutting down, so we don't need to do that. var opts []grpc.ServerOption - var finalUnaryInterceptors []grpc.UnaryServerInterceptor - var finalStreamInterceptors []grpc.StreamServerInterceptor + finalUnaryInterceptors := []grpc.UnaryServerInterceptor{unaryContextInterceptor(valueCtx)} + finalStreamInterceptors := []grpc.StreamServerInterceptor{streamContextInterceptor(valueCtx)} if grpcVerbosity >= 0 { finalUnaryInterceptors = append(finalUnaryInterceptors, s.interceptor) + finalStreamInterceptors = append(finalStreamInterceptors, s.streamInterceptor) } finalUnaryInterceptors = append(finalUnaryInterceptors, unaryInterceptors...) finalStreamInterceptors = append(finalStreamInterceptors, streamInterceptors...) @@ -103,16 +108,66 @@ func startGRPCServer(logger klog.Logger, grpcVerbosity int, unaryInterceptors [] } }() - logger.Info("GRPC server started") + logger.V(3).Info("GRPC server started") return s, nil } +// unaryContextInterceptor injects values from the context into the context +// used by the call chain. +func unaryContextInterceptor(valueCtx context.Context) grpc.UnaryServerInterceptor { + return func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) { + ctx = mergeContexts(ctx, valueCtx) + return handler(ctx, req) + } +} + +// streamContextInterceptor does the same as UnaryContextInterceptor for streams. +func streamContextInterceptor(valueCtx context.Context) grpc.StreamServerInterceptor { + return func(srv any, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { + ctx := mergeContexts(ss.Context(), valueCtx) + return handler(srv, mergeServerStream{ServerStream: ss, ctx: ctx}) + } +} + +type mergeServerStream struct { + grpc.ServerStream + ctx context.Context +} + +func (m mergeServerStream) Context() context.Context { + return m.ctx +} + +// mergeContexts creates a new context where cancellation is handled by the +// root context. The values stored by the value context are used as fallback if +// the root context doesn't have a certain value. +func mergeContexts(rootCtx, valueCtx context.Context) context.Context { + return mergeCtx{ + Context: rootCtx, + valueCtx: valueCtx, + } +} + +type mergeCtx struct { + context.Context + valueCtx context.Context +} + +func (m mergeCtx) Value(i interface{}) interface{} { + if v := m.Context.Value(i); v != nil { + return v + } + return m.valueCtx.Value(i) +} + // interceptor is called for each request. It creates a logger with a unique, // sequentially increasing request ID and adds that logger to the context. It // also logs request and response. func (s *grpcServer) interceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - requestID := atomic.AddInt64(&s.requestID, 1) - logger := klog.LoggerWithValues(s.logger, "requestID", requestID) + + requestID := atomic.AddInt64(&requestID, 1) + logger := klog.FromContext(ctx) + logger = klog.LoggerWithValues(logger, "requestID", requestID, "method", info.FullMethod) ctx = klog.NewContext(ctx, logger) logger.V(s.grpcVerbosity).Info("handling request", "request", req) defer func() { @@ -123,13 +178,57 @@ func (s *grpcServer) interceptor(ctx context.Context, req interface{}, info *grp }() resp, err = handler(ctx, req) if err != nil { - logger.Error(err, "handling request failed", "request", req) + logger.Error(err, "handling request failed") } else { logger.V(s.grpcVerbosity).Info("handling request succeeded", "response", resp) } return } +func (s *grpcServer) streamInterceptor(server interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { + requestID := atomic.AddInt64(&requestID, 1) + ctx := stream.Context() + logger := klog.FromContext(ctx) + logger = klog.LoggerWithValues(logger, "requestID", requestID, "method", info.FullMethod) + ctx = klog.NewContext(ctx, logger) + stream = logStream{ + ServerStream: stream, + ctx: ctx, + grpcVerbosity: s.grpcVerbosity, + } + logger.V(s.grpcVerbosity).Info("handling stream") + err := handler(server, stream) + if err != nil { + logger.Error(err, "handling stream failed") + } else { + logger.V(s.grpcVerbosity).Info("handling stream succeeded") + } + return err + +} + +type logStream struct { + grpc.ServerStream + ctx context.Context + grpcVerbosity int +} + +func (l logStream) Context() context.Context { + return l.ctx +} + +func (l logStream) SendMsg(msg interface{}) error { + logger := klog.FromContext(l.ctx) + logger.V(l.grpcVerbosity).Info("sending stream message", "message", msg) + err := l.ServerStream.SendMsg(msg) + if err != nil { + logger.Error(err, "sending stream message failed") + } else { + logger.V(l.grpcVerbosity).Info("sending stream message succeeded") + } + return err +} + // stop ensures that the server is not running anymore and cleans up all resources. // It is idempotent and may be called with a nil pointer. func (s *grpcServer) stop() { @@ -143,8 +242,7 @@ func (s *grpcServer) stop() { s.server = nil if s.endpoint.path != "" { if err := os.Remove(s.endpoint.path); err != nil && !os.IsNotExist(err) { - s.logger.Error(err, "remove Unix socket") + utilruntime.HandleError(fmt.Errorf("remove Unix socket: %w", err)) } } - s.logger.V(3).Info("GRPC server stopped") } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go b/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go new file mode 100644 index 0000000000000..7cb1d0e79e813 --- /dev/null +++ b/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go @@ -0,0 +1,391 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resourceslice + +import ( + "context" + "errors" + "fmt" + "sync" + "time" + + "github.com/google/go-cmp/cmp" + + resourceapi "k8s.io/api/resource/v1alpha2" + apiequality "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/types" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" + resourceinformers "k8s.io/client-go/informers/resource/v1alpha2" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/util/workqueue" + "k8s.io/klog/v2" + "k8s.io/utils/ptr" +) + +const ( + // resyncPeriod for informer + // TODO (https://github.com/kubernetes/kubernetes/issues/123688): disable? + resyncPeriod = time.Duration(10 * time.Minute) +) + +// Controller synchronizes information about resources of one +// driver with ResourceSlice objects. It currently supports node-local +// resources. A DRA driver for node-local resources typically runs this +// controller as part of its kubelet plugin. +// +// Support for network-attached resources will be added later. +type Controller struct { + cancel func(cause error) + driverName string + owner Owner + kubeClient kubernetes.Interface + wg sync.WaitGroup + queue workqueue.TypedRateLimitingInterface[string] + sliceStore cache.Store + + mutex sync.RWMutex + + // When receiving updates from the driver, the entire pointer replaced, + // so it is okay to not do a deep copy of it when reading it. Only reading + // the pointer itself must be protected by a read lock. + resources *Resources +} + +// Resources is a complete description of all resources synchronized by the controller. +type Resources struct { + // NodeResources are resources that are local to one node. + NodeResources []*resourceapi.ResourceModel +} + +type Owner struct { + APIVersion string + Kind string + Name string + UID types.UID +} + +// StartController constructs a new controller and starts it. +// If the owner is a v1.Node, then the NodeName field in the +// ResourceSlice objects is set and used to identify objects +// managed by the controller. The UID is not needed in that +// case, the controller will determine it automatically. +// +// If a kubeClient is provided, then it synchronizes ResourceSlices +// with the resource information provided by plugins. Without it, +// the controller is inactive. This can happen when kubelet is run stand-alone +// without an apiserver. In that case we can't and don't need to publish +// ResourceSlices. +func StartController(ctx context.Context, kubeClient kubernetes.Interface, driverName string, owner Owner, resources *Resources) *Controller { + if kubeClient == nil { + return nil + } + + logger := klog.FromContext(ctx) + ctx, cancel := context.WithCancelCause(ctx) + + c := &Controller{ + cancel: cancel, + kubeClient: kubeClient, + driverName: driverName, + owner: owner, + queue: workqueue.NewTypedRateLimitingQueueWithConfig( + workqueue.DefaultTypedControllerRateLimiter[string](), + workqueue.TypedRateLimitingQueueConfig[string]{Name: "node_resource_slices"}, + ), + resources: resources, + } + + logger.V(3).Info("Starting") + c.wg.Add(1) + go func() { + defer c.wg.Done() + defer logger.V(3).Info("Stopping") + c.run(ctx) + }() + + // Sync once. + c.queue.Add("") + + return c +} + +// Stop cancels all background activity and blocks until the controller has stopped. +func (c *Controller) Stop() { + if c == nil { + return + } + c.cancel(errors.New("ResourceSlice controller was asked to stop")) + c.wg.Wait() +} + +// Update sets the new desired state of the resource information. +func (c *Controller) Update(resources *Resources) { + c.mutex.Lock() + defer c.mutex.Unlock() + + c.resources = resources + c.queue.Add("") +} + +// run is running in the background. It handles blocking initialization (like +// syncing the informer) and then syncs the actual with the desired state. +func (c *Controller) run(ctx context.Context) { + logger := klog.FromContext(ctx) + + // We always filter by driver name, by node name only for node-local resources. + selector := fields.Set{"driverName": c.driverName} + if c.owner.APIVersion == "v1" && c.owner.Kind == "Node" { + selector["nodeName"] = c.owner.Name + } + informer := resourceinformers.NewFilteredResourceSliceInformer(c.kubeClient, resyncPeriod, nil, func(options *metav1.ListOptions) { + options.FieldSelector = selector.String() + }) + c.sliceStore = informer.GetStore() + handler, err := informer.AddEventHandler(cache.ResourceEventHandlerFuncs{ + AddFunc: func(obj any) { + slice, ok := obj.(*resourceapi.ResourceSlice) + if !ok { + return + } + logger.V(5).Info("ResourceSlice add", "slice", klog.KObj(slice)) + c.queue.Add("") + }, + UpdateFunc: func(old, new any) { + oldSlice, ok := old.(*resourceapi.ResourceSlice) + if !ok { + return + } + newSlice, ok := new.(*resourceapi.ResourceSlice) + if !ok { + return + } + if loggerV := logger.V(6); loggerV.Enabled() { + loggerV.Info("ResourceSlice update", "slice", klog.KObj(newSlice), "diff", cmp.Diff(oldSlice, newSlice)) + } else { + logger.V(5).Info("ResourceSlice update", "slice", klog.KObj(newSlice)) + } + c.queue.Add("") + }, + DeleteFunc: func(obj any) { + if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { + obj = tombstone.Obj + } + slice, ok := obj.(*resourceapi.ResourceSlice) + if !ok { + return + } + logger.V(5).Info("ResourceSlice delete", "slice", klog.KObj(slice)) + c.queue.Add("") + }, + }) + if err != nil { + logger.Error(err, "Registering event handler on the ResourceSlice informer failed, disabling resource monitoring") + return + } + + // Start informer and wait for our cache to be populated. + logger.V(3).Info("Starting ResourceSlice informer and waiting for it to sync") + c.wg.Add(1) + go func() { + defer c.wg.Done() + defer logger.V(3).Info("ResourceSlice informer has stopped") + defer c.queue.ShutDown() // Once we get here, we must have been asked to stop. + informer.Run(ctx.Done()) + }() + for !handler.HasSynced() { + select { + case <-time.After(time.Second): + case <-ctx.Done(): + return + } + } + logger.V(3).Info("ResourceSlice informer has synced") + + for c.processNextWorkItem(ctx) { + } +} + +func (c *Controller) processNextWorkItem(ctx context.Context) bool { + key, shutdown := c.queue.Get() + if shutdown { + return false + } + defer c.queue.Done(key) + + // Panics are caught and treated like errors. + var err error + func() { + defer func() { + if r := recover(); r != nil { + err = fmt.Errorf("internal error: %v", r) + } + }() + err = c.sync(ctx) + }() + + if err != nil { + utilruntime.HandleErrorWithContext(ctx, err, "processing ResourceSlice objects") + c.queue.AddRateLimited(key) + + // Return without removing the work item from the queue. + // It will be retried. + return true + } + + c.queue.Forget(key) + return true +} + +func (c *Controller) sync(ctx context.Context) error { + logger := klog.FromContext(ctx) + + // Gather information about the actual and desired state. + slices := c.sliceStore.List() + var resources *Resources + c.mutex.RLock() + resources = c.resources + c.mutex.RUnlock() + + // Resources that are not yet stored in any slice need to be published. + // Here we track the indices of any resources that are already stored. + storedResourceIndices := sets.New[int]() + + // Slices that don't match any driver resource can either be updated (if there + // are new driver resources that need to be stored) or they need to be deleted. + obsoleteSlices := make([]*resourceapi.ResourceSlice, 0, len(slices)) + + // Match slices with resource information. + for _, obj := range slices { + slice := obj.(*resourceapi.ResourceSlice) + + // TODO: network-attached resources. + index := indexOfModel(resources.NodeResources, &slice.ResourceModel) + if index >= 0 { + storedResourceIndices.Insert(index) + continue + } + + obsoleteSlices = append(obsoleteSlices, slice) + } + + if loggerV := logger.V(6); loggerV.Enabled() { + // Dump entire resource information. + loggerV.Info("Syncing existing driver resource slices with driver resources", "slices", klog.KObjSlice(slices), "resources", resources) + } else { + logger.V(5).Info("Syncing existing driver resource slices with driver resources", "slices", klog.KObjSlice(slices), "numResources", len(resources.NodeResources)) + } + + // Retrieve node object to get UID? + // The result gets cached and is expected to not change while + // the controller runs. + if c.owner.UID == "" && c.owner.APIVersion == "v1" && c.owner.Kind == "Node" { + node, err := c.kubeClient.CoreV1().Nodes().Get(ctx, c.owner.Name, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("retrieve node %q: %w", c.owner.Name, err) + } + // There is only one worker, so no locking needed. + c.owner.UID = node.UID + } + + // Update stale slices before removing what's left. + // + // We don't really know which of these slices might have + // been used for "the" driver resource because they don't + // have a unique ID. In practice, a driver is most likely + // to just give us one ResourceModel, in which case + // this isn't a problem at all. If we have more than one, + // then at least conceptually it currently doesn't matter + // where we publish it. + // + // The long-term goal is to move the handling of + // ResourceSlice objects into the driver, with kubelet + // just acting as a REST proxy. The advantage of that will + // be that kubelet won't need to support the same + // resource API version as the driver and the control plane. + // With that approach, the driver will be able to match + // up objects more intelligently. + numObsoleteSlices := len(obsoleteSlices) + for index, resource := range resources.NodeResources { + if storedResourceIndices.Has(index) { + // No need to do anything, it is already stored exactly + // like this in an existing slice. + continue + } + + if numObsoleteSlices > 0 { + // Update one existing slice. + slice := obsoleteSlices[numObsoleteSlices-1] + numObsoleteSlices-- + slice = slice.DeepCopy() + slice.ResourceModel = *resource + logger.V(5).Info("Reusing existing resource slice", "slice", klog.KObj(slice)) + if _, err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Update(ctx, slice, metav1.UpdateOptions{}); err != nil { + return fmt.Errorf("update resource slice: %w", err) + } + continue + } + + // Create a new slice. + slice := &resourceapi.ResourceSlice{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: c.owner.Name + "-" + c.driverName + "-", + OwnerReferences: []metav1.OwnerReference{ + { + APIVersion: c.owner.APIVersion, + Kind: c.owner.Kind, + Name: c.owner.Name, + UID: c.owner.UID, + Controller: ptr.To(true), + }, + }, + }, + DriverName: c.driverName, + ResourceModel: *resource, + } + if c.owner.APIVersion == "v1" && c.owner.Kind == "Node" { + slice.NodeName = c.owner.Name + } + logger.V(5).Info("Creating new resource slice", "slice", klog.KObj(slice)) + if _, err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}); err != nil { + return fmt.Errorf("create resource slice: %w", err) + } + } + + // All remaining slices are truly orphaned. + for i := 0; i < numObsoleteSlices; i++ { + slice := obsoleteSlices[i] + logger.V(5).Info("Deleting obsolete resource slice", "slice", klog.KObj(slice)) + if err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}); err != nil { + return fmt.Errorf("delete resource slice: %w", err) + } + } + + return nil +} + +func indexOfModel(models []*resourceapi.ResourceModel, model *resourceapi.ResourceModel) int { + for index, m := range models { + if apiequality.Semantic.DeepEqual(m, model) { + return index + } + } + return -1 +} diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go index c0972a59bcdc2..3a9929690b139 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go @@ -342,88 +342,6 @@ func (m *NodeUnprepareResourceResponse) GetError() string { return "" } -type NodeListAndWatchResourcesRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeListAndWatchResourcesRequest) Reset() { *m = NodeListAndWatchResourcesRequest{} } -func (*NodeListAndWatchResourcesRequest) ProtoMessage() {} -func (*NodeListAndWatchResourcesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{6} -} -func (m *NodeListAndWatchResourcesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeListAndWatchResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeListAndWatchResourcesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodeListAndWatchResourcesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeListAndWatchResourcesRequest.Merge(m, src) -} -func (m *NodeListAndWatchResourcesRequest) XXX_Size() int { - return m.Size() -} -func (m *NodeListAndWatchResourcesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NodeListAndWatchResourcesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeListAndWatchResourcesRequest proto.InternalMessageInfo - -type NodeListAndWatchResourcesResponse struct { - Resources []*v1alpha2.ResourceModel `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NodeListAndWatchResourcesResponse) Reset() { *m = NodeListAndWatchResourcesResponse{} } -func (*NodeListAndWatchResourcesResponse) ProtoMessage() {} -func (*NodeListAndWatchResourcesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{7} -} -func (m *NodeListAndWatchResourcesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeListAndWatchResourcesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NodeListAndWatchResourcesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NodeListAndWatchResourcesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeListAndWatchResourcesResponse.Merge(m, src) -} -func (m *NodeListAndWatchResourcesResponse) XXX_Size() int { - return m.Size() -} -func (m *NodeListAndWatchResourcesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_NodeListAndWatchResourcesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeListAndWatchResourcesResponse proto.InternalMessageInfo - -func (m *NodeListAndWatchResourcesResponse) GetResources() []*v1alpha2.ResourceModel { - if m != nil { - return m.Resources - } - return nil -} - type Claim struct { // The ResourceClaim namespace (ResourceClaim.meta.Namespace). // This field is REQUIRED. @@ -450,7 +368,7 @@ type Claim struct { func (m *Claim) Reset() { *m = Claim{} } func (*Claim) ProtoMessage() {} func (*Claim) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{8} + return fileDescriptor_00212fb1f9d3bf1c, []int{6} } func (m *Claim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -523,55 +441,49 @@ func init() { proto.RegisterType((*NodeUnprepareResourcesResponse)(nil), "v1alpha3.NodeUnprepareResourcesResponse") proto.RegisterMapType((map[string]*NodeUnprepareResourceResponse)(nil), "v1alpha3.NodeUnprepareResourcesResponse.ClaimsEntry") proto.RegisterType((*NodeUnprepareResourceResponse)(nil), "v1alpha3.NodeUnprepareResourceResponse") - proto.RegisterType((*NodeListAndWatchResourcesRequest)(nil), "v1alpha3.NodeListAndWatchResourcesRequest") - proto.RegisterType((*NodeListAndWatchResourcesResponse)(nil), "v1alpha3.NodeListAndWatchResourcesResponse") proto.RegisterType((*Claim)(nil), "v1alpha3.Claim") } func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 631 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x6e, 0xd3, 0x4c, - 0x10, 0xcf, 0xb6, 0x4d, 0xf5, 0x65, 0x22, 0xb5, 0x9f, 0x56, 0x15, 0x0a, 0xa6, 0x98, 0x60, 0x51, - 0x12, 0x51, 0xb0, 0xc1, 0x05, 0x54, 0x81, 0x38, 0xd0, 0x16, 0xd4, 0xa2, 0x82, 0x90, 0x11, 0x42, - 0xe2, 0x52, 0x36, 0xde, 0xc5, 0xb1, 0xe2, 0xd8, 0x66, 0xd7, 0xae, 0xe8, 0x8d, 0x47, 0xe0, 0xb1, - 0x7a, 0xe0, 0x80, 0x38, 0xf5, 0x84, 0x68, 0xb8, 0xf1, 0x14, 0xc8, 0x6b, 0x6f, 0xda, 0x44, 0x4e, - 0x52, 0x89, 0xdb, 0xec, 0xfc, 0xf9, 0xcd, 0xce, 0x6f, 0x66, 0x76, 0xa1, 0x46, 0x62, 0xdf, 0x8c, - 0x79, 0x94, 0x44, 0xf8, 0xbf, 0xc3, 0x7b, 0x24, 0x88, 0xbb, 0x64, 0x43, 0xbb, 0xe3, 0xf9, 0x49, - 0x37, 0xed, 0x98, 0x6e, 0xd4, 0xb7, 0xbc, 0xc8, 0x8b, 0x2c, 0xe9, 0xd0, 0x49, 0x3f, 0xca, 0x93, - 0x3c, 0x48, 0x29, 0x0f, 0xd4, 0x6e, 0xf7, 0x36, 0x85, 0xe9, 0x47, 0x16, 0x89, 0x7d, 0x8b, 0x33, - 0x11, 0x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 0xca, - 0x76, 0x1b, 0xaf, 0xcd, 0xda, 0x7d, 0xd9, 0x24, 0xed, 0xe6, 0xc5, 0x9e, 0x08, 0xa3, 0x82, 0xfb, - 0x70, 0xa9, 0x7c, 0x86, 0x71, 0x6b, 0xf6, 0x94, 0xe7, 0xc9, 0xda, 0x17, 0x5d, 0x07, 0xa3, 0x82, - 0x3f, 0xc3, 0xe5, 0x89, 0xd3, 0x83, 0x6f, 0x8d, 0x02, 0x4d, 0x1b, 0x43, 0x6d, 0xfd, 0x42, 0xbe, - 0x2a, 0xef, 0x5d, 0xb4, 0xb5, 0x75, 0x7c, 0xaa, 0xa3, 0x93, 0x53, 0xbd, 0xf2, 0x65, 0xa0, 0xa3, - 0xe3, 0x81, 0x8e, 0xbe, 0x0f, 0x74, 0xf4, 0x6b, 0xa0, 0xa3, 0xaf, 0xbf, 0xf5, 0xca, 0xfb, 0x1b, - 0xc5, 0xd3, 0xdf, 0x4b, 0x3b, 0x2c, 0x60, 0x89, 0x15, 0xf7, 0xbc, 0xec, 0x1b, 0x10, 0x16, 0xe5, - 0x44, 0x7d, 0x01, 0x1b, 0x9d, 0x45, 0xf9, 0xf2, 0x6f, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xb2, - 0x0b, 0x57, 0x0c, 0x6d, 0x06, 0x00, 0x00, + // 562 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xce, 0x36, 0x49, 0x45, 0x26, 0x52, 0x8b, 0x56, 0x15, 0xb2, 0x42, 0x31, 0x91, 0x45, 0x49, + 0x0e, 0x60, 0x0b, 0x07, 0x50, 0x05, 0xe2, 0x92, 0x16, 0x54, 0x10, 0x42, 0xc8, 0x88, 0x0b, 0x97, + 0xb0, 0xb1, 0x07, 0xc7, 0x4a, 0x62, 0x9b, 0x5d, 0x3b, 0x52, 0x6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0xc7, 0x76, 0x14, 0x73, 0x74, 0x06, 0xcb, 0x31, 0x75, 0xc9, + 0xf9, 0x53, 0x3d, 0x5b, 0x4e, 0x3d, 0xdd, 0xf3, 0xc2, 0xa5, 0x60, 0xc6, 0xd4, 0x3f, 0xcc, 0xe3, + 0xad, 0x85, 0xdc, 0x96, 0x22, 0x56, 0x58, 0xcc, 0x53, 0x02, 0xb5, 0x94, 0x24, 0xea, 0xc2, 0x4e, + 0xd9, 0x1e, 0xd1, 0xbd, 0x75, 0x7b, 0x26, 0x27, 0xad, 0x75, 0xff, 0x6a, 0xeb, 0xa8, 0x55, 0xe8, + 0x14, 0x6e, 0x95, 0xcf, 0x0b, 0xed, 0xac, 0x9f, 0xa8, 0x0c, 0xac, 0x7b, 0xd5, 0xd1, 0xd3, 0x2a, + 0xfd, 0xfe, 0xc9, 0x99, 0x4a, 0x7e, 0x9f, 0xa9, 0x95, 0x6f, 0x89, 0x4a, 0x4e, 0x12, 0x95, 0xfc, + 0x4c, 0x54, 0xf2, 0x27, 0x51, 0xc9, 0xf7, 0xbf, 0x6a, 0xe5, 0xd3, 0xbd, 0xfc, 0xd8, 0x8d, 0xe3, + 0x21, 0x4e, 0x30, 0x32, 0xc2, 0xb1, 0x9b, 0x1e, 0x3e, 0x61, 0x38, 0x9c, 0x15, 0x47, 0xaf, 0x37, + 0xdc, 0x94, 0xb7, 0xae, 0xf7, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x14, 0x30, 0xd4, 0x5f, 0x05, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -594,10 +506,6 @@ type NodeClient interface { // NodeUnprepareResources is the opposite of NodePrepareResources. // The same error handling rules apply, NodeUnprepareResources(ctx context.Context, in *NodeUnprepareResourcesRequest, opts ...grpc.CallOption) (*NodeUnprepareResourcesResponse, error) - // NodeListAndWatchResources returns a stream of NodeResourcesResponse objects. - // At the start and whenever resource availability changes, the - // plugin must send one such object with all information to the Kubelet. - NodeListAndWatchResources(ctx context.Context, in *NodeListAndWatchResourcesRequest, opts ...grpc.CallOption) (Node_NodeListAndWatchResourcesClient, error) } type nodeClient struct { @@ -626,38 +534,6 @@ func (c *nodeClient) NodeUnprepareResources(ctx context.Context, in *NodeUnprepa return out, nil } -func (c *nodeClient) NodeListAndWatchResources(ctx context.Context, in *NodeListAndWatchResourcesRequest, opts ...grpc.CallOption) (Node_NodeListAndWatchResourcesClient, error) { - stream, err := c.cc.NewStream(ctx, &_Node_serviceDesc.Streams[0], "/v1alpha3.Node/NodeListAndWatchResources", opts...) - if err != nil { - return nil, err - } - x := &nodeNodeListAndWatchResourcesClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Node_NodeListAndWatchResourcesClient interface { - Recv() (*NodeListAndWatchResourcesResponse, error) - grpc.ClientStream -} - -type nodeNodeListAndWatchResourcesClient struct { - grpc.ClientStream -} - -func (x *nodeNodeListAndWatchResourcesClient) Recv() (*NodeListAndWatchResourcesResponse, error) { - m := new(NodeListAndWatchResourcesResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - // NodeServer is the server API for Node service. type NodeServer interface { // NodePrepareResources prepares several ResourceClaims @@ -668,10 +544,6 @@ type NodeServer interface { // NodeUnprepareResources is the opposite of NodePrepareResources. // The same error handling rules apply, NodeUnprepareResources(context.Context, *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error) - // NodeListAndWatchResources returns a stream of NodeResourcesResponse objects. - // At the start and whenever resource availability changes, the - // plugin must send one such object with all information to the Kubelet. - NodeListAndWatchResources(*NodeListAndWatchResourcesRequest, Node_NodeListAndWatchResourcesServer) error } // UnimplementedNodeServer can be embedded to have forward compatible implementations. @@ -684,9 +556,6 @@ func (*UnimplementedNodeServer) NodePrepareResources(ctx context.Context, req *N func (*UnimplementedNodeServer) NodeUnprepareResources(ctx context.Context, req *NodeUnprepareResourcesRequest) (*NodeUnprepareResourcesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NodeUnprepareResources not implemented") } -func (*UnimplementedNodeServer) NodeListAndWatchResources(req *NodeListAndWatchResourcesRequest, srv Node_NodeListAndWatchResourcesServer) error { - return status.Errorf(codes.Unimplemented, "method NodeListAndWatchResources not implemented") -} func RegisterNodeServer(s *grpc.Server, srv NodeServer) { s.RegisterService(&_Node_serviceDesc, srv) @@ -728,27 +597,6 @@ func _Node_NodeUnprepareResources_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _Node_NodeListAndWatchResources_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(NodeListAndWatchResourcesRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(NodeServer).NodeListAndWatchResources(m, &nodeNodeListAndWatchResourcesServer{stream}) -} - -type Node_NodeListAndWatchResourcesServer interface { - Send(*NodeListAndWatchResourcesResponse) error - grpc.ServerStream -} - -type nodeNodeListAndWatchResourcesServer struct { - grpc.ServerStream -} - -func (x *nodeNodeListAndWatchResourcesServer) Send(m *NodeListAndWatchResourcesResponse) error { - return x.ServerStream.SendMsg(m) -} - var _Node_serviceDesc = grpc.ServiceDesc{ ServiceName: "v1alpha3.Node", HandlerType: (*NodeServer)(nil), @@ -762,13 +610,7 @@ var _Node_serviceDesc = grpc.ServiceDesc{ Handler: _Node_NodeUnprepareResources_Handler, }, }, - Streams: []grpc.StreamDesc{ - { - StreamName: "NodeListAndWatchResources", - Handler: _Node_NodeListAndWatchResources_Handler, - ServerStreams: true, - }, - }, + Streams: []grpc.StreamDesc{}, Metadata: "api.proto", } @@ -1013,66 +855,6 @@ func (m *NodeUnprepareResourceResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *NodeListAndWatchResourcesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeListAndWatchResourcesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeListAndWatchResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *NodeListAndWatchResourcesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeListAndWatchResourcesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NodeListAndWatchResourcesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Resources) > 0 { - for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *Claim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1255,30 +1037,6 @@ func (m *NodeUnprepareResourceResponse) Size() (n int) { return n } -func (m *NodeListAndWatchResourcesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *NodeListAndWatchResourcesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Resources) > 0 { - for _, e := range m.Resources { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } - } - return n -} - func (m *Claim) Size() (n int) { if m == nil { return 0 @@ -1407,30 +1165,6 @@ func (this *NodeUnprepareResourceResponse) String() string { }, "") return s } -func (this *NodeListAndWatchResourcesRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NodeListAndWatchResourcesRequest{`, - `}`, - }, "") - return s -} -func (this *NodeListAndWatchResourcesResponse) String() string { - if this == nil { - return "nil" - } - repeatedStringForResources := "[]*ResourceModel{" - for _, f := range this.Resources { - repeatedStringForResources += strings.Replace(fmt.Sprintf("%v", f), "ResourceModel", "v1alpha2.ResourceModel", 1) + "," - } - repeatedStringForResources += "}" - s := strings.Join([]string{`&NodeListAndWatchResourcesResponse{`, - `Resources:` + repeatedStringForResources + `,`, - `}`, - }, "") - return s -} func (this *Claim) String() string { if this == nil { return "nil" @@ -2180,140 +1914,6 @@ func (m *NodeUnprepareResourceResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *NodeListAndWatchResourcesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeListAndWatchResourcesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeListAndWatchResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeListAndWatchResourcesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeListAndWatchResourcesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeListAndWatchResourcesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, &v1alpha2.ResourceModel{}) - if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Claim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto index 3e83ba807dec1..a4879e6c28aa2 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto @@ -45,11 +45,9 @@ service Node { rpc NodeUnprepareResources (NodeUnprepareResourcesRequest) returns (NodeUnprepareResourcesResponse) {} - // NodeListAndWatchResources returns a stream of NodeResourcesResponse objects. - // At the start and whenever resource availability changes, the - // plugin must send one such object with all information to the Kubelet. - rpc NodeListAndWatchResources(NodeListAndWatchResourcesRequest) - returns (stream NodeListAndWatchResourcesResponse) {} + // TODO: removing NodeListAndWatchResources and the code for + // publishing ResourceSlice objects by kubelet is an API break. + // If we do this, then v1alpha3 must be renamed to v1alpha4. } message NodePrepareResourcesRequest { @@ -94,13 +92,6 @@ message NodeUnprepareResourceResponse { string error = 1; } -message NodeListAndWatchResourcesRequest { -} - -message NodeListAndWatchResourcesResponse { - repeated k8s.io.api.resource.v1alpha2.ResourceModel resources = 1; -} - message Claim { // The ResourceClaim namespace (ResourceClaim.meta.Namespace). // This field is REQUIRED. diff --git a/test/e2e/dra/deploy.go b/test/e2e/dra/deploy.go index b07d3d00f13d1..8c5d86c09d434 100644 --- a/test/e2e/dra/deploy.go +++ b/test/e2e/dra/deploy.go @@ -55,9 +55,8 @@ import ( ) const ( - NodePrepareResourcesMethod = "/v1alpha3.Node/NodePrepareResources" - NodeUnprepareResourcesMethod = "/v1alpha3.Node/NodeUnprepareResources" - NodeListAndWatchResourcesMethod = "/v1alpha3.Node/NodeListAndWatchResources" + NodePrepareResourcesMethod = "/v1alpha3.Node/NodePrepareResources" + NodeUnprepareResourcesMethod = "/v1alpha3.Node/NodeUnprepareResources" ) type Nodes struct { @@ -314,7 +313,7 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { nodename := pod.Spec.NodeName logger := klog.LoggerWithValues(klog.LoggerWithName(klog.Background(), "kubelet plugin"), "node", pod.Spec.NodeName, "pod", klog.KObj(&pod)) loggerCtx := klog.NewContext(ctx, logger) - plugin, err := app.StartPlugin(loggerCtx, "/cdi", d.Name, nodename, + plugin, err := app.StartPlugin(loggerCtx, "/cdi", d.Name, d.f.ClientSet, nodename, app.FileOperations{ Create: func(name string, content []byte) error { klog.Background().Info("creating CDI file", "node", nodename, "filename", name, "content", string(content)) diff --git a/test/e2e/dra/dra.go b/test/e2e/dra/dra.go index 15c7f9652634f..1c507699636b1 100644 --- a/test/e2e/dra/dra.go +++ b/test/e2e/dra/dra.go @@ -892,17 +892,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, driver.parameterMode = parameterModeStructured f.It("must manage ResourceSlices", f.WithSlow(), func(ctx context.Context) { - nodeName := nodes.NodeNames[0] driverName := driver.Name - // Check for gRPC call on one node. If that already fails, then - // we have a fundamental problem. - m := MethodInstance{nodeName, NodeListAndWatchResourcesMethod} - ginkgo.By("wait for NodeListAndWatchResources call") - gomega.Eventually(ctx, func() int64 { - return driver.CallCount(m) - }).WithTimeout(podStartTimeout).Should(gomega.BeNumerically(">", int64(0)), "NodeListAndWatchResources call count") - // Now check for exactly the right set of objects for all nodes. ginkgo.By("check if ResourceSlice object(s) exist on the API server") resourceClient := f.ClientSet.ResourceV1alpha2().ResourceSlices() diff --git a/test/e2e/dra/test-driver/README.md b/test/e2e/dra/test-driver/README.md index a8362f5850cea..be79dbbf9a09d 100644 --- a/test/e2e/dra/test-driver/README.md +++ b/test/e2e/dra/test-driver/README.md @@ -66,7 +66,7 @@ go run ./test/e2e/dra/test-driver --feature-gates ContextualLogging=true -v=5 co In yet another: ```console sudo mkdir -p /var/run/cdi && sudo chmod a+rwx /var/run/cdi /var/lib/kubelet/plugins_registry -go run ./test/e2e/dra/test-driver --feature-gates ContextualLogging=true -v=5 kubelet-plugin +go run ./test/e2e/dra/test-driver --feature-gates ContextualLogging=true -v=5 kubelet-plugin --node-name=127.0.0.1 ``` And finally: diff --git a/test/e2e/dra/test-driver/app/kubeletplugin.go b/test/e2e/dra/test-driver/app/kubeletplugin.go index 2656a45e10d82..00b56f3056d10 100644 --- a/test/e2e/dra/test-driver/app/kubeletplugin.go +++ b/test/e2e/dra/test-driver/app/kubeletplugin.go @@ -28,12 +28,11 @@ import ( "github.com/google/go-cmp/cmp" "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" resourceapi "k8s.io/api/resource/v1alpha2" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/kubeletplugin" "k8s.io/klog/v2" drapbv1alpha3 "k8s.io/kubelet/pkg/apis/dra/v1alpha3" @@ -111,8 +110,9 @@ type FileOperations struct { } // StartPlugin sets up the servers that are necessary for a DRA kubelet plugin. -func StartPlugin(ctx context.Context, cdiDir, driverName string, nodeName string, fileOps FileOperations, opts ...kubeletplugin.Option) (*ExamplePlugin, error) { +func StartPlugin(ctx context.Context, cdiDir, driverName string, kubeClient kubernetes.Interface, nodeName string, fileOps FileOperations, opts ...kubeletplugin.Option) (*ExamplePlugin, error) { logger := klog.FromContext(ctx) + if fileOps.Create == nil { fileOps.Create = func(name string, content []byte) error { return os.WriteFile(name, content, os.FileMode(0644)) @@ -143,17 +143,33 @@ func StartPlugin(ctx context.Context, cdiDir, driverName string, nodeName string } opts = append(opts, - kubeletplugin.Logger(logger), kubeletplugin.DriverName(driverName), + kubeletplugin.NodeName(nodeName), + kubeletplugin.KubeClient(kubeClient), kubeletplugin.GRPCInterceptor(ex.recordGRPCCall), kubeletplugin.GRPCStreamInterceptor(ex.recordGRPCStream), ) - d, err := kubeletplugin.Start(ex, opts...) + d, err := kubeletplugin.Start(ctx, ex, opts...) if err != nil { return nil, fmt.Errorf("start kubelet plugin: %w", err) } ex.d = d + if fileOps.NumResourceInstances >= 0 { + instances := make([]resourceapi.NamedResourcesInstance, ex.fileOps.NumResourceInstances) + for i := 0; i < ex.fileOps.NumResourceInstances; i++ { + instances[i].Name = fmt.Sprintf("instance-%02d", i) + } + nodeResources := []*resourceapi.ResourceModel{ + { + NamedResources: &resourceapi.NamedResourcesResources{ + Instances: instances, + }, + }, + } + ex.d.PublishResources(ctx, nodeResources) + } + return ex, nil } @@ -453,39 +469,6 @@ func (ex *ExamplePlugin) NodeUnprepareResources(ctx context.Context, req *drapbv return resp, nil } -func (ex *ExamplePlugin) NodeListAndWatchResources(req *drapbv1alpha3.NodeListAndWatchResourcesRequest, stream drapbv1alpha3.Node_NodeListAndWatchResourcesServer) error { - if ex.fileOps.NumResourceInstances < 0 { - ex.logger.Info("Sending no NodeResourcesResponse") - return status.New(codes.Unimplemented, "node resource support disabled").Err() - } - - instances := make([]resourceapi.NamedResourcesInstance, len(ex.instances)) - for i, name := range sets.List(ex.instances) { - instances[i].Name = name - } - resp := &drapbv1alpha3.NodeListAndWatchResourcesResponse{ - Resources: []*resourceapi.ResourceModel{ - { - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: instances, - }, - }, - }, - } - - ex.logger.Info("Sending NodeListAndWatchResourcesResponse", "response", resp) - if err := stream.Send(resp); err != nil { - return err - } - - // Keep the stream open until the test is done. - // TODO: test sending more updates later - <-ex.stopCh - ex.logger.Info("Done sending NodeListAndWatchResourcesResponse, closing stream") - - return nil -} - func (ex *ExamplePlugin) GetPreparedResources() []ClaimID { ex.mutex.Lock() defer ex.mutex.Unlock() diff --git a/test/e2e/dra/test-driver/app/server.go b/test/e2e/dra/test-driver/app/server.go index 3f55c5414634c..cb0cb4c3696a3 100644 --- a/test/e2e/dra/test-driver/app/server.go +++ b/test/e2e/dra/test-driver/app/server.go @@ -21,6 +21,7 @@ package app import ( "context" "encoding/json" + "errors" "fmt" "net" "net/http" @@ -272,6 +273,7 @@ func NewCommand() *cobra.Command { draAddress := fs.String("dra-address", "/var/lib/kubelet/plugins/test-driver/dra.sock", "The Unix domain socket that kubelet will connect to for dynamic resource allocation requests, in the filesystem of kubelet.") fs = kubeletPluginFlagSets.FlagSet("CDI") cdiDir := fs.String("cdi-dir", "/var/run/cdi", "directory for dynamically created CDI JSON files") + nodeName := fs.String("node-name", "", "name of the node that the kubelet plugin is responsible for") fs = kubeletPlugin.Flags() for _, f := range kubeletPluginFlagSets.FlagSets { fs.AddFlagSet(f) @@ -287,7 +289,11 @@ func NewCommand() *cobra.Command { return fmt.Errorf("create socket directory: %w", err) } - plugin, err := StartPlugin(cmd.Context(), *cdiDir, *driverName, "", FileOperations{}, + if *nodeName == "" { + return errors.New("--node-name not set") + } + + plugin, err := StartPlugin(cmd.Context(), *cdiDir, *driverName, clientset, *nodeName, FileOperations{}, kubeletplugin.PluginSocketPath(*endpoint), kubeletplugin.RegistrarSocketPath(path.Join(*pluginRegistrationPath, *driverName+"-reg.sock")), kubeletplugin.KubeletPluginSocketPath(*draAddress), diff --git a/test/e2e_node/dra_test.go b/test/e2e_node/dra_test.go index a07a4022ea328..e459f986c6e23 100644 --- a/test/e2e_node/dra_test.go +++ b/test/e2e_node/dra_test.go @@ -69,14 +69,19 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, f := framework.NewDefaultFramework("dra-node") f.NamespacePodSecurityLevel = admissionapi.LevelBaseline - var kubeletPlugin, kubeletPlugin1, kubeletPlugin2 *testdriver.ExamplePlugin - - f.Context("Resource Kubelet Plugin", f.WithSerial(), func() { - ginkgo.BeforeEach(func(ctx context.Context) { - kubeletPlugin = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + ginkgo.BeforeEach(func() { + ginkgo.DeferCleanup(func(ctx context.Context) { + // When plugin and kubelet get killed at the end of the tests, they leave ResourceSlices behind. + // Perhaps garbage collection would eventually remove them (not sure how the node instance + // is managed), but this could take time. Let's clean up explicitly. + framework.ExpectNoError(f.ClientSet.ResourceV1alpha2().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{})) }) + }) + f.Context("Resource Kubelet Plugin", f.WithSerial(), func() { ginkgo.It("must register after Kubelet restart", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + oldCalls := kubeletPlugin.GetGRPCCalls() getNewCalls := func() []testdriver.GRPCCall { calls := kubeletPlugin.GetGRPCCalls() @@ -91,6 +96,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must register after plugin restart", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + ginkgo.By("restart Kubelet Plugin") kubeletPlugin.Stop() kubeletPlugin = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) @@ -100,7 +107,10 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must process pod created when kubelet is not running", func(ctx context.Context) { + newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + // Stop Kubelet + ginkgo.By("stop kubelet") startKubelet := stopKubelet() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{driverName}) // Pod must be in pending state @@ -109,6 +119,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) framework.ExpectNoError(err) // Start Kubelet + ginkgo.By("restart kubelet") startKubelet() // Pod should succeed err = e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, f.ClientSet, pod.Name, f.Namespace.Name, framework.PodStartShortTimeout) @@ -116,6 +127,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must keep pod in pending state if NodePrepareResources times out", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unblock := kubeletPlugin.BlockNodePrepareResources() defer unblock() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{driverName}) @@ -134,6 +147,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must run pod if NodePrepareResources fails and then succeeds", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unset := kubeletPlugin.SetNodePrepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{driverName}) @@ -157,6 +172,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must run pod if NodeUnprepareResources fails and then succeeds", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unset := kubeletPlugin.SetNodeUnprepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{driverName}) @@ -177,6 +194,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must retry NodePrepareResources after Kubelet restart", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unset := kubeletPlugin.SetNodePrepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{driverName}) @@ -206,6 +225,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must retry NodeUnprepareResources after Kubelet restart", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unset := kubeletPlugin.SetNodeUnprepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{driverName}) ginkgo.By("wait for NodePrepareResources call to succeed") @@ -231,6 +252,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must call NodeUnprepareResources for deleted pod", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unset := kubeletPlugin.SetNodeUnprepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", false, []string{driverName}) @@ -253,6 +276,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must call NodeUnprepareResources for deleted pod after Kubelet restart", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unset := kubeletPlugin.SetNodeUnprepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", false, []string{driverName}) @@ -282,6 +307,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must not call NodePrepareResources for deleted pod after Kubelet restart", func(ctx context.Context) { + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unblock := kubeletPlugin.BlockNodePrepareResources() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", false, []string{driverName}) @@ -309,16 +336,21 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) f.Context("Two resource Kubelet Plugins", f.WithSerial(), func() { - ginkgo.BeforeEach(func(ctx context.Context) { - kubeletPlugin1 = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), kubeletPlugin1Name) - kubeletPlugin2 = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), kubeletPlugin2Name) + // start creates plugins which will get stopped when the context gets canceled. + start := func(ctx context.Context) (*testdriver.ExamplePlugin, *testdriver.ExamplePlugin) { + kubeletPlugin1 := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), kubeletPlugin1Name) + kubeletPlugin2 := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), kubeletPlugin2Name) ginkgo.By("wait for Kubelet plugin registration") gomega.Eventually(kubeletPlugin1.GetGRPCCalls()).WithTimeout(pluginRegistrationTimeout).Should(testdriver.BeRegistered) gomega.Eventually(kubeletPlugin2.GetGRPCCalls()).WithTimeout(pluginRegistrationTimeout).Should(testdriver.BeRegistered) - }) + + return kubeletPlugin1, kubeletPlugin2 + } ginkgo.It("must prepare and unprepare resources", func(ctx context.Context) { + kubeletPlugin1, kubeletPlugin2 := start(ctx) + pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{kubeletPlugin1Name, kubeletPlugin2Name}) ginkgo.By("wait for pod to succeed") @@ -335,6 +367,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must run pod if NodePrepareResources fails for one plugin and then succeeds", func(ctx context.Context) { + _, kubeletPlugin2 := start(ctx) + unset := kubeletPlugin2.SetNodePrepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{kubeletPlugin1Name, kubeletPlugin2Name}) @@ -358,6 +392,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must run pod if NodeUnprepareResources fails for one plugin and then succeeds", func(ctx context.Context) { + kubeletPlugin1, kubeletPlugin2 := start(ctx) + unset := kubeletPlugin2.SetNodeUnprepareResourcesFailureMode() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{kubeletPlugin1Name, kubeletPlugin2Name}) @@ -381,6 +417,9 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must run pod if NodePrepareResources is in progress for one plugin when Kubelet restarts", func(ctx context.Context) { + _, kubeletPlugin2 := start(ctx) + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + unblock := kubeletPlugin.BlockNodePrepareResources() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{kubeletPlugin1Name, kubeletPlugin2Name}) @@ -404,6 +443,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must call NodeUnprepareResources again if it's in progress for one plugin when Kubelet restarts", func(ctx context.Context) { + kubeletPlugin1, kubeletPlugin2 := start(ctx) + unblock := kubeletPlugin2.BlockNodeUnprepareResources() pod := createTestObjects(ctx, f.ClientSet, getNodeName(ctx, f), f.Namespace.Name, "draclass", "external-claim", "drapod", true, []string{kubeletPlugin1Name, kubeletPlugin2Name}) @@ -443,8 +484,6 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, } f.It("must be removed on kubelet startup", f.WithDisruptive(), func(ctx context.Context) { - gomega.Expect(listResources(ctx)).To(gomega.BeEmpty(), "ResourceSlices should have been deleted after previous test") - ginkgo.By("stop kubelet") startKubelet := stopKubelet() ginkgo.DeferCleanup(func() { @@ -474,12 +513,11 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) f.It("must be removed after plugin unregistration", func(ctx context.Context) { - gomega.Expect(listResources(ctx)).To(gomega.BeEmpty(), "ResourceSlices should have been deleted after previous test") nodeName := getNodeName(ctx, f) matchNode := gomega.ConsistOf(matchResourcesByNodeName(nodeName)) ginkgo.By("start plugin and wait for ResourceSlice") - kubeletPlugin = newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) + kubeletPlugin := newKubeletPlugin(ctx, f.ClientSet, getNodeName(ctx, f), driverName) gomega.Eventually(ctx, listResources).Should(matchNode, "ResourceSlice from kubelet plugin") gomega.Consistently(ctx, listResources).WithTimeout(5*time.Second).Should(matchNode, "ResourceSlice from kubelet plugin") @@ -510,7 +548,8 @@ func newKubeletPlugin(ctx context.Context, clientSet kubernetes.Interface, nodeN ctx, cdiDir, pluginName, - "", + clientSet, + nodeName, testdriver.FileOperations{}, kubeletplugin.PluginSocketPath(endpoint), kubeletplugin.RegistrarSocketPath(path.Join(pluginRegistrationPath, pluginName+"-reg.sock")), From b416bb7248df872f2061e5744c0ab31ad0ecb4c0 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Apr 2024 16:20:34 +0200 Subject: [PATCH 04/20] DRA: read ResourceClaim in DRA drivers This is the second and final step towards making kubelet independent of the resource.k8s.io API versioning because it now doesn't need to copy structs defined by that API from the driver to the API server. --- pkg/kubelet/cm/dra/manager.go | 20 +- pkg/kubelet/cm/dra/plugin/client_test.go | 7 +- .../kubelet/pkg/apis/dra/v1alpha3/api.pb.go | 202 +++--------------- .../kubelet/pkg/apis/dra/v1alpha3/api.proto | 10 - test/e2e/dra/test-driver/app/kubeletplugin.go | 110 +++++----- 5 files changed, 100 insertions(+), 249 deletions(-) diff --git a/pkg/kubelet/cm/dra/manager.go b/pkg/kubelet/cm/dra/manager.go index 188060060314b..234b06eed0d51 100644 --- a/pkg/kubelet/cm/dra/manager.go +++ b/pkg/kubelet/cm/dra/manager.go @@ -224,13 +224,9 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { // Loop through all plugins and prepare for calling NodePrepareResources. for _, resourceHandle := range claimInfo.ResourceHandles { claim := &drapb.Claim{ - Namespace: claimInfo.Namespace, - Uid: string(claimInfo.ClaimUID), - Name: claimInfo.ClaimName, - ResourceHandle: resourceHandle.Data, - } - if resourceHandle.StructuredData != nil { - claim.StructuredResourceHandle = []*resourceapi.StructuredResourceHandle{resourceHandle.StructuredData} + Namespace: claimInfo.Namespace, + Uid: string(claimInfo.ClaimUID), + Name: claimInfo.ClaimName, } pluginName := resourceHandle.DriverName batches[pluginName] = append(batches[pluginName], claim) @@ -455,13 +451,9 @@ func (m *ManagerImpl) unprepareResources(podUID types.UID, namespace string, cla // Loop through all plugins and prepare for calling NodeUnprepareResources. for _, resourceHandle := range claimInfo.ResourceHandles { claim := &drapb.Claim{ - Namespace: claimInfo.Namespace, - Uid: string(claimInfo.ClaimUID), - Name: claimInfo.ClaimName, - ResourceHandle: resourceHandle.Data, - } - if resourceHandle.StructuredData != nil { - claim.StructuredResourceHandle = []*resourceapi.StructuredResourceHandle{resourceHandle.StructuredData} + Namespace: claimInfo.Namespace, + Uid: string(claimInfo.ClaimUID), + Name: claimInfo.ClaimName, } pluginName := resourceHandle.DriverName batches[pluginName] = append(batches[pluginName], claim) diff --git a/pkg/kubelet/cm/dra/plugin/client_test.go b/pkg/kubelet/cm/dra/plugin/client_test.go index b0e9ab058aaa2..5c6e46b33f020 100644 --- a/pkg/kubelet/cm/dra/plugin/client_test.go +++ b/pkg/kubelet/cm/dra/plugin/client_test.go @@ -135,10 +135,9 @@ func TestGRPCConnIsReused(t *testing.T) { req := &drapbv1alpha3.NodePrepareResourcesRequest{ Claims: []*drapbv1alpha3.Claim{ { - Namespace: "dummy-namespace", - Uid: "dummy-uid", - Name: "dummy-claim", - ResourceHandle: "dummy-resource", + Namespace: "dummy-namespace", + Uid: "dummy-uid", + Name: "dummy-claim", }, }, } diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go index 3a9929690b139..c8186e8803ab7 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go @@ -29,7 +29,6 @@ import ( codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" io "io" - v1alpha2 "k8s.io/api/resource/v1alpha2" math "math" math_bits "math/bits" reflect "reflect" @@ -351,18 +350,9 @@ type Claim struct { Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` // The name of the Resource claim (ResourceClaim.meta.Name) // This field is REQUIRED. - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // Resource handle (AllocationResult.ResourceHandles[*].Data) - // This field is REQUIRED. - ResourceHandle string `protobuf:"bytes,4,opt,name=resource_handle,json=resourceHandle,proto3" json:"resource_handle,omitempty"` - // Structured parameter resource handle (AllocationResult.ResourceHandles[*].StructuredData). - // This field is OPTIONAL. If present, it needs to be used - // instead of resource_handle. It will only have a single entry. - // - // Using "repeated" instead of "optional" is a workaround for https://github.com/gogo/protobuf/issues/713. - StructuredResourceHandle []*v1alpha2.StructuredResourceHandle `protobuf:"bytes,5,rep,name=structured_resource_handle,json=structuredResourceHandle,proto3" json:"structured_resource_handle,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_sizecache int32 `json:"-"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Claim) Reset() { *m = Claim{} } @@ -418,20 +408,6 @@ func (m *Claim) GetName() string { return "" } -func (m *Claim) GetResourceHandle() string { - if m != nil { - return m.ResourceHandle - } - return "" -} - -func (m *Claim) GetStructuredResourceHandle() []*v1alpha2.StructuredResourceHandle { - if m != nil { - return m.StructuredResourceHandle - } - return nil -} - func init() { proto.RegisterType((*NodePrepareResourcesRequest)(nil), "v1alpha3.NodePrepareResourcesRequest") proto.RegisterType((*NodePrepareResourcesResponse)(nil), "v1alpha3.NodePrepareResourcesResponse") @@ -447,43 +423,37 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 562 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xce, 0x36, 0x49, 0x45, 0x26, 0x52, 0x8b, 0x56, 0x15, 0xb2, 0x42, 0x31, 0x91, 0x45, 0x49, - 0x0e, 0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a9, 0x92, 0x32, 0xed, - 0xc0, 0x76, 0xb1, 0x45, 0x83, 0x11, 0xf3, 0x9d, 0x09, 0x2a, 0x35, 0x69, 0xde, 0x2a, 0xd4, 0x47, - 0x52, 0x4b, 0x23, 0x68, 0x89, 0x88, 0xc7, 0x76, 0x14, 0x73, 0x74, 0x06, 0xcb, 0x31, 0x75, 0xc9, - 0xf9, 0x53, 0x3d, 0x5b, 0x4e, 0x3d, 0xdd, 0xf3, 0xc2, 0xa5, 0x60, 0xc6, 0xd4, 0x3f, 0xcc, 0xe3, - 0xad, 0x85, 0xdc, 0x96, 0x22, 0x56, 0x58, 0xcc, 0x53, 0x02, 0xb5, 0x94, 0x24, 0xea, 0xc2, 0x4e, - 0xd9, 0x1e, 0xd1, 0xbd, 0x75, 0x7b, 0x26, 0x27, 0xad, 0x75, 0xff, 0x6a, 0xeb, 0xa8, 0x55, 0xe8, - 0x14, 0x6e, 0x95, 0xcf, 0x0b, 0xed, 0xac, 0x9f, 0xa8, 0x0c, 0xac, 0x7b, 0xd5, 0xd1, 0xd3, 0x2a, - 0xfd, 0xfe, 0xc9, 0x99, 0x4a, 0x7e, 0x9f, 0xa9, 0x95, 0x6f, 0x89, 0x4a, 0x4e, 0x12, 0x95, 0xfc, - 0x4c, 0x54, 0xf2, 0x27, 0x51, 0xc9, 0xf7, 0xbf, 0x6a, 0xe5, 0xd3, 0xbd, 0xfc, 0xd8, 0x8d, 0xe3, - 0x21, 0x4e, 0x30, 0x32, 0xc2, 0xb1, 0x9b, 0x1e, 0x3e, 0x61, 0x38, 0x9c, 0x15, 0x47, 0xaf, 0x37, - 0xdc, 0x94, 0xb7, 0xae, 0xf7, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x14, 0x30, 0xd4, 0x5f, 0x05, - 0x00, 0x00, + // 480 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x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0x6c, 0x56, 0xdd, 0x29, 0xdd, + 0xae, 0xbb, 0x63, 0xe3, 0x64, 0xf7, 0xfe, 0xd5, 0xce, 0xdd, 0x69, 0xd0, 0x29, 0xdc, 0xaa, 0xf6, + 0x83, 0xf6, 0xeb, 0x1d, 0x2b, 0xc0, 0x06, 0x57, 0xb5, 0xd6, 0x69, 0x8c, 0x46, 0x47, 0x27, 0x36, + 0xf9, 0x7d, 0x62, 0x37, 0xbe, 0x65, 0x36, 0x39, 0xca, 0x6c, 0xf2, 0x33, 0xb3, 0xc9, 0x9f, 0xcc, + 0x26, 0xdf, 0xff, 0xda, 0x8d, 0x8f, 0xf7, 0xc6, 0xbb, 0xda, 0xe5, 0xc2, 0x1b, 0xa7, 0x01, 0x4e, + 0x30, 0xf1, 0xe4, 0x38, 0xf6, 0x98, 0xe4, 0xda, 0x8b, 0x14, 0xf3, 0x16, 0x20, 0xc1, 0x86, 0xf9, + 0x97, 0xec, 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xac, 0xa8, 0xa3, 0x6a, 0x91, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -875,27 +845,6 @@ func (m *Claim) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.StructuredResourceHandle) > 0 { - for iNdEx := len(m.StructuredResourceHandle) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StructuredResourceHandle[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.ResourceHandle) > 0 { - i -= len(m.ResourceHandle) - copy(dAtA[i:], m.ResourceHandle) - i = encodeVarintApi(dAtA, i, uint64(len(m.ResourceHandle))) - i-- - dAtA[i] = 0x22 - } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) @@ -1055,16 +1004,6 @@ func (m *Claim) Size() (n int) { if l > 0 { n += 1 + l + sovApi(uint64(l)) } - l = len(m.ResourceHandle) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if len(m.StructuredResourceHandle) > 0 { - for _, e := range m.StructuredResourceHandle { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } - } return n } @@ -1169,17 +1108,10 @@ func (this *Claim) String() string { if this == nil { return "nil" } - repeatedStringForStructuredResourceHandle := "[]*StructuredResourceHandle{" - for _, f := range this.StructuredResourceHandle { - repeatedStringForStructuredResourceHandle += strings.Replace(fmt.Sprintf("%v", f), "StructuredResourceHandle", "v1alpha2.StructuredResourceHandle", 1) + "," - } - repeatedStringForStructuredResourceHandle += "}" s := strings.Join([]string{`&Claim{`, `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, `Uid:` + fmt.Sprintf("%v", this.Uid) + `,`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `ResourceHandle:` + fmt.Sprintf("%v", this.ResourceHandle) + `,`, - `StructuredResourceHandle:` + repeatedStringForStructuredResourceHandle + `,`, `}`, }, "") return s @@ -2039,72 +1971,6 @@ func (m *Claim) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceHandle", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceHandle = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StructuredResourceHandle", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StructuredResourceHandle = append(m.StructuredResourceHandle, &v1alpha2.StructuredResourceHandle{}) - if err := m.StructuredResourceHandle[len(m.StructuredResourceHandle)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto index a4879e6c28aa2..46af3e07bc58d 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto @@ -22,7 +22,6 @@ package v1alpha3; option go_package = "k8s.io/kubelet/pkg/apis/dra/v1alpha3"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "k8s.io/api/resource/v1alpha2/generated.proto"; option (gogoproto.goproto_stringer_all) = false; option (gogoproto.stringer_all) = true; @@ -102,13 +101,4 @@ message Claim { // The name of the Resource claim (ResourceClaim.meta.Name) // This field is REQUIRED. string name = 3; - // Resource handle (AllocationResult.ResourceHandles[*].Data) - // This field is REQUIRED. - string resource_handle = 4; - // Structured parameter resource handle (AllocationResult.ResourceHandles[*].StructuredData). - // This field is OPTIONAL. If present, it needs to be used - // instead of resource_handle. It will only have a single entry. - // - // Using "repeated" instead of "optional" is a workaround for https://github.com/gogo/protobuf/issues/713. - repeated k8s.io.api.resource.v1alpha2.StructuredResourceHandle structured_resource_handle = 5; } diff --git a/test/e2e/dra/test-driver/app/kubeletplugin.go b/test/e2e/dra/test-driver/app/kubeletplugin.go index 00b56f3056d10..b07c7a2c4a088 100644 --- a/test/e2e/dra/test-driver/app/kubeletplugin.go +++ b/test/e2e/dra/test-driver/app/kubeletplugin.go @@ -26,11 +26,12 @@ import ( "strings" "sync" - "github.com/google/go-cmp/cmp" "google.golang.org/grpc" resourceapi "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/kubeletplugin" @@ -39,10 +40,11 @@ import ( ) type ExamplePlugin struct { - stopCh <-chan struct{} - logger klog.Logger - d kubeletplugin.DRAPlugin - fileOps FileOperations + stopCh <-chan struct{} + logger klog.Logger + kubeClient kubernetes.Interface + d kubeletplugin.DRAPlugin + fileOps FileOperations cdiDir string driverName string @@ -51,7 +53,7 @@ type ExamplePlugin struct { mutex sync.Mutex instancesInUse sets.Set[string] - prepared map[ClaimID]any + prepared map[ClaimID][]string // instance names gRPCCalls []GRPCCall blockPrepareResourcesMutex sync.Mutex @@ -129,13 +131,14 @@ func StartPlugin(ctx context.Context, cdiDir, driverName string, kubeClient kube ex := &ExamplePlugin{ stopCh: ctx.Done(), logger: logger, + kubeClient: kubeClient, fileOps: fileOps, cdiDir: cdiDir, driverName: driverName, nodeName: nodeName, instances: sets.New[string](), instancesInUse: sets.New[string](), - prepared: make(map[ClaimID]any), + prepared: make(map[ClaimID][]string), } for i := 0; i < ex.fileOps.NumResourceInstances; i++ { @@ -246,19 +249,47 @@ func (ex *ExamplePlugin) getUnprepareResourcesFailure() error { // a deterministic name to simplify NodeUnprepareResource (no need to remember // or discover the name) and idempotency (when called again, the file simply // gets written again). -func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimName string, claimUID string, resourceHandle string, structuredResourceHandle []*resourceapi.StructuredResourceHandle) ([]string, error) { +func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimReq *drapbv1alpha3.Claim) ([]string, error) { logger := klog.FromContext(ctx) + // The plugin must retrieve the claim itself to get it in the version + // that it understands. + var resourceHandle string + var structuredResourceHandle *resourceapi.StructuredResourceHandle + claim, err := ex.kubeClient.ResourceV1alpha2().ResourceClaims(claimReq.Namespace).Get(ctx, claimReq.Name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("retrieve claim %s/%s: %w", claimReq.Namespace, claimReq.Name, err) + } + if claim.Status.Allocation == nil { + return nil, fmt.Errorf("claim %s/%s not allocated", claimReq.Namespace, claimReq.Name) + } + if claim.UID != types.UID(claimReq.Uid) { + return nil, fmt.Errorf("claim %s/%s got replaced", claimReq.Namespace, claimReq.Name) + } + haveResources := false + for _, handle := range claim.Status.Allocation.ResourceHandles { + if handle.DriverName == ex.driverName { + haveResources = true + resourceHandle = handle.Data + structuredResourceHandle = handle.StructuredData + break + } + } + if !haveResources { + // Nothing to do. + return nil, nil + } + ex.mutex.Lock() defer ex.mutex.Unlock() ex.blockPrepareResourcesMutex.Lock() defer ex.blockPrepareResourcesMutex.Unlock() - deviceName := "claim-" + claimUID + deviceName := "claim-" + claimReq.Uid vendor := ex.driverName class := "test" dev := vendor + "/" + class + "=" + deviceName - claimID := ClaimID{Name: claimName, UID: claimUID} + claimID := ClaimID{Name: claimReq.Name, UID: claimReq.Uid} if _, ok := ex.prepared[claimID]; ok { // Idempotent call, nothing to do. return []string{dev}, nil @@ -266,29 +297,22 @@ func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimName stri // Determine environment variables. var p parameters - var actualResourceHandle any var instanceNames []string - switch len(structuredResourceHandle) { - case 0: + if structuredResourceHandle == nil { // Control plane controller did the allocation. if err := json.Unmarshal([]byte(resourceHandle), &p); err != nil { return nil, fmt.Errorf("unmarshal resource handle: %w", err) } - actualResourceHandle = resourceHandle - case 1: + } else { // Scheduler did the allocation with structured parameters. - handle := structuredResourceHandle[0] - if handle == nil { - return nil, errors.New("unexpected nil StructuredResourceHandle") - } - p.NodeName = handle.NodeName - if err := extractParameters(handle.VendorClassParameters, &p.EnvVars, "admin"); err != nil { + p.NodeName = structuredResourceHandle.NodeName + if err := extractParameters(structuredResourceHandle.VendorClassParameters, &p.EnvVars, "admin"); err != nil { return nil, err } - if err := extractParameters(handle.VendorClaimParameters, &p.EnvVars, "user"); err != nil { + if err := extractParameters(structuredResourceHandle.VendorClaimParameters, &p.EnvVars, "user"); err != nil { return nil, err } - for _, result := range handle.Results { + for _, result := range structuredResourceHandle.Results { if err := extractParameters(result.VendorRequestParameters, &p.EnvVars, "user"); err != nil { return nil, err } @@ -308,10 +332,6 @@ func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimName stri } instanceNames = append(instanceNames, instanceName) } - actualResourceHandle = handle - default: - // Huh? - return nil, fmt.Errorf("invalid length of NodePrepareResourceRequest.StructuredResourceHandle: %d", len(structuredResourceHandle)) } // Sanity check scheduling. @@ -339,7 +359,7 @@ func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimName stri }, }, } - filePath := ex.getJSONFilePath(claimUID) + filePath := ex.getJSONFilePath(claimReq.Uid) buffer, err := json.Marshal(spec) if err != nil { return nil, fmt.Errorf("marshal spec: %w", err) @@ -348,7 +368,7 @@ func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimName stri return nil, fmt.Errorf("failed to write CDI file %v", err) } - ex.prepared[claimID] = actualResourceHandle + ex.prepared[claimID] = instanceNames for _, instanceName := range instanceNames { ex.instancesInUse.Insert(instanceName) } @@ -384,7 +404,7 @@ func (ex *ExamplePlugin) NodePrepareResources(ctx context.Context, req *drapbv1a } for _, claimReq := range req.Claims { - cdiDevices, err := ex.nodePrepareResource(ctx, claimReq.Name, claimReq.Uid, claimReq.ResourceHandle, claimReq.StructuredResourceHandle) + cdiDevices, err := ex.nodePrepareResource(ctx, claimReq) if err != nil { resp.Claims[claimReq.Uid] = &drapbv1alpha3.NodePrepareResourceResponse{ Error: err.Error(), @@ -401,13 +421,13 @@ func (ex *ExamplePlugin) NodePrepareResources(ctx context.Context, req *drapbv1a // NodeUnprepareResource removes the CDI file created by // NodePrepareResource. It's idempotent, therefore it is not an error when that // file is already gone. -func (ex *ExamplePlugin) nodeUnprepareResource(ctx context.Context, claimName string, claimUID string, resourceHandle string, structuredResourceHandle []*resourceapi.StructuredResourceHandle) error { +func (ex *ExamplePlugin) nodeUnprepareResource(ctx context.Context, claimReq *drapbv1alpha3.Claim) error { ex.blockUnprepareResourcesMutex.Lock() defer ex.blockUnprepareResourcesMutex.Unlock() logger := klog.FromContext(ctx) - filePath := ex.getJSONFilePath(claimUID) + filePath := ex.getJSONFilePath(claimReq.Uid) if err := ex.fileOps.Remove(filePath); err != nil { return fmt.Errorf("error removing CDI file: %w", err) } @@ -416,33 +436,17 @@ func (ex *ExamplePlugin) nodeUnprepareResource(ctx context.Context, claimName st ex.mutex.Lock() defer ex.mutex.Unlock() - claimID := ClaimID{Name: claimName, UID: claimUID} - expectedResourceHandle, ok := ex.prepared[claimID] + claimID := ClaimID{Name: claimReq.Name, UID: claimReq.Uid} + instanceNames, ok := ex.prepared[claimID] if !ok { // Idempotent call, nothing to do. return nil } - var actualResourceHandle any = resourceHandle - if structuredResourceHandle != nil { - if len(structuredResourceHandle) != 1 { - return fmt.Errorf("unexpected number of entries in StructuredResourceHandle: %d", len(structuredResourceHandle)) - } - actualResourceHandle = structuredResourceHandle[0] - } - if diff := cmp.Diff(expectedResourceHandle, actualResourceHandle); diff != "" { - return fmt.Errorf("difference between expected (-) and actual resource handle (+):\n%s", diff) - } delete(ex.prepared, claimID) - if structuredResourceHandle := structuredResourceHandle; structuredResourceHandle != nil { - for _, handle := range structuredResourceHandle { - for _, result := range handle.Results { - instanceName := result.NamedResources.Name - ex.instancesInUse.Delete(instanceName) - } - } + for _, instanceName := range instanceNames { + ex.instancesInUse.Delete(instanceName) } - delete(ex.prepared, ClaimID{Name: claimName, UID: claimUID}) return nil } @@ -457,7 +461,7 @@ func (ex *ExamplePlugin) NodeUnprepareResources(ctx context.Context, req *drapbv } for _, claimReq := range req.Claims { - err := ex.nodeUnprepareResource(ctx, claimReq.Name, claimReq.Uid, claimReq.ResourceHandle, claimReq.StructuredResourceHandle) + err := ex.nodeUnprepareResource(ctx, claimReq) if err != nil { resp.Claims[claimReq.Uid] = &drapbv1alpha3.NodeUnprepareResourceResponse{ Error: err.Error(), From 03168845802686cb23a795443c46013d0d45d82e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 6 Jun 2024 09:40:06 +0200 Subject: [PATCH 05/20] dra e2e: impersonate a daemonset pod for kubelet plugin In reality, the kubelet plugin of a DRA driver is meant to be deployed as a daemonset with a service account that limits its permissions. https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/#additional-metadata-in-pod-bound-tokens ensures that the node name is bound to the pod. In E2E testing, we emulate that via impersonation. This ensures that the plugin does not accidentally depend on additional permissions. --- test/e2e/dra/deploy.go | 95 ++++++++++++++++++- .../deploy/example/plugin-rbac.yaml | 36 +++++++ 2 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 test/e2e/dra/test-driver/deploy/example/plugin-rbac.yaml diff --git a/test/e2e/dra/deploy.go b/test/e2e/dra/deploy.go index 8c5d86c09d434..38c4801e975bd 100644 --- a/test/e2e/dra/deploy.go +++ b/test/e2e/dra/deploy.go @@ -19,6 +19,7 @@ package dra import ( "bytes" "context" + _ "embed" "errors" "fmt" "net" @@ -38,10 +39,19 @@ import ( v1 "k8s.io/api/core/v1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/selection" + "k8s.io/apiserver/pkg/authentication/serviceaccount" + "k8s.io/client-go/discovery/cached/memory" resourceapiinformer "k8s.io/client-go/informers/resource/v1alpha2" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/restmapper" "k8s.io/client-go/tools/cache" "k8s.io/dynamic-resource-allocation/kubeletplugin" "k8s.io/klog/v2" @@ -52,6 +62,7 @@ import ( e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper" "k8s.io/kubernetes/test/e2e/storage/drivers/proxy" "k8s.io/kubernetes/test/e2e/storage/utils" + "sigs.k8s.io/yaml" ) const ( @@ -63,10 +74,14 @@ type Nodes struct { NodeNames []string } +//go:embed test-driver/deploy/example/plugin-rbac.yaml +var pluginRBAC string + // NewNodes selects nodes to run the test on. func NewNodes(f *framework.Framework, minNodes, maxNodes int) *Nodes { nodes := &Nodes{} ginkgo.BeforeEach(func(ctx context.Context) { + ginkgo.By("selecting nodes") // The kubelet plugin is harder. We deploy the builtin manifest // after patching in the driver name and all nodes on which we @@ -250,6 +265,12 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { framework.Failf("unknown test driver parameter mode: %s", d.parameterMode) } + // Create service account and corresponding RBAC rules. + serviceAccountName := "dra-kubelet-plugin-" + d.Name + "-service-account" + content := strings.ReplaceAll(pluginRBAC, "dra-kubelet-plugin", "dra-kubelet-plugin-"+d.Name) + content = strings.ReplaceAll(content, "namespace: default", "namespace: "+d.f.Namespace.Name) + d.createFromYAML(ctx, []byte(content), d.f.Namespace.Name) + instanceKey := "app.kubernetes.io/instance" rsName := "" draAddr := path.Join(framework.TestContext.KubeletRootDir, "plugins", d.Name+".sock") @@ -262,6 +283,7 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { item.Spec.Replicas = &numNodes item.Spec.Selector.MatchLabels[instanceKey] = d.Name item.Spec.Template.Labels[instanceKey] = d.Name + item.Spec.Template.Spec.ServiceAccountName = serviceAccountName item.Spec.Template.Spec.Affinity.PodAntiAffinity.RequiredDuringSchedulingIgnoredDuringExecution[0].LabelSelector.MatchLabels[instanceKey] = d.Name item.Spec.Template.Spec.Affinity.NodeAffinity = &v1.NodeAffinity{ RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{ @@ -305,15 +327,33 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { framework.ExpectNoError(err, "list proxy pods") gomega.Expect(numNodes).To(gomega.Equal(int32(len(pods.Items))), "number of proxy pods") - // Run registar and plugin for each of the pods. + // Run registrar and plugin for each of the pods. for _, pod := range pods.Items { // Need a local variable, not the loop variable, for the anonymous // callback functions below. pod := pod nodename := pod.Spec.NodeName + + // Authenticate the plugin so that it only has minimal permissions. + driverUserInfo := (&serviceaccount.ServiceAccountInfo{ + Name: serviceAccountName, + Namespace: d.f.Namespace.Name, + NodeName: nodename, + PodName: pod.Name, + PodUID: string(pod.UID), + }).UserInfo() + driverClientConfig := d.f.ClientConfig() + driverClientConfig.Impersonate = rest.ImpersonationConfig{ + UserName: driverUserInfo.GetName(), + Groups: driverUserInfo.GetGroups(), + Extra: driverUserInfo.GetExtra(), + } + driverClient, err := kubernetes.NewForConfig(driverClientConfig) + + framework.ExpectNoError(err, "create client for driver") logger := klog.LoggerWithValues(klog.LoggerWithName(klog.Background(), "kubelet plugin"), "node", pod.Spec.NodeName, "pod", klog.KObj(&pod)) loggerCtx := klog.NewContext(ctx, logger) - plugin, err := app.StartPlugin(loggerCtx, "/cdi", d.Name, d.f.ClientSet, nodename, + plugin, err := app.StartPlugin(loggerCtx, "/cdi", d.Name, driverClient, nodename, app.FileOperations{ Create: func(name string, content []byte) error { klog.Background().Info("creating CDI file", "node", nodename, "filename", name, "content", string(content)) @@ -375,6 +415,57 @@ func (d *Driver) removeFile(pod *v1.Pod, name string) error { return d.podIO(pod).RemoveAll(name) } +func (d *Driver) createFromYAML(ctx context.Context, content []byte, namespace string) { + // Not caching the discovery result isn't very efficient, but good enough. + discoveryCache := memory.NewMemCacheClient(d.f.ClientSet.Discovery()) + restMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryCache) + + for _, content := range bytes.Split(content, []byte("---\n")) { + if len(content) == 0 { + continue + } + + var obj *unstructured.Unstructured + framework.ExpectNoError(yaml.UnmarshalStrict(content, &obj)) + + gv, err := schema.ParseGroupVersion(obj.GetAPIVersion()) + framework.ExpectNoError(err, fmt.Sprintf("extract group+version from object %q", klog.KObj(obj))) + gk := schema.GroupKind{Group: gv.Group, Kind: obj.GetKind()} + + mapping, err := restMapper.RESTMapping(gk, gv.Version) + framework.ExpectNoError(err, fmt.Sprintf("map %q to resource", gk)) + + resourceClient := d.f.DynamicClient.Resource(mapping.Resource) + options := metav1.CreateOptions{ + // If the YAML input is invalid, then we want the + // apiserver to tell us via an error. This can + // happen because decoding into an unstructured object + // doesn't validate. + FieldValidation: "Strict", + } + switch mapping.Scope.Name() { + case meta.RESTScopeNameRoot: + _, err = resourceClient.Create(ctx, obj, options) + case meta.RESTScopeNameNamespace: + if namespace == "" { + framework.Failf("need namespace for object type %s", gk) + } + _, err = resourceClient.Namespace(namespace).Create(ctx, obj, options) + } + framework.ExpectNoError(err, "create object") + ginkgo.DeferCleanup(func(ctx context.Context) { + del := resourceClient.Delete + if mapping.Scope.Name() == meta.RESTScopeNameNamespace { + del = resourceClient.Namespace(namespace).Delete + } + err := del(ctx, obj.GetName(), metav1.DeleteOptions{}) + if !apierrors.IsNotFound(err) { + framework.ExpectNoError(err, fmt.Sprintf("deleting %s.%s %s", obj.GetKind(), obj.GetAPIVersion(), klog.KObj(obj))) + } + }) + } +} + func (d *Driver) podIO(pod *v1.Pod) proxy.PodDirIO { logger := klog.Background() return proxy.PodDirIO{ diff --git a/test/e2e/dra/test-driver/deploy/example/plugin-rbac.yaml b/test/e2e/dra/test-driver/deploy/example/plugin-rbac.yaml new file mode 100644 index 0000000000000..3259ba87a08b3 --- /dev/null +++ b/test/e2e/dra/test-driver/deploy/example/plugin-rbac.yaml @@ -0,0 +1,36 @@ +# Real driver deployments must replace all occurrences of "dra-kubelet-plugin" +# with something specific to their driver. + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: dra-kubelet-plugin-service-account + namespace: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: dra-kubelet-plugin-role +rules: +- apiGroups: ["resource.k8s.io"] + resources: ["resourceclaims"] + verbs: ["get"] +- apiGroups: [""] + resources: ["nodes"] + verbs: ["get"] +- apiGroups: ["resource.k8s.io"] + resources: ["resourceslices"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete" ] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: dra-kubelet-plugin-role-binding +subjects: +- kind: ServiceAccount + name: dra-kubelet-plugin-service-account + namespace: default +roleRef: + kind: ClusterRole + name: dra-kubelet-plugin-role + apiGroup: rbac.authorization.k8s.io From a304b3c4dca239432f58c4457277de46e9d8d329 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 6 Jun 2024 16:53:11 +0200 Subject: [PATCH 06/20] dra kubelet: bump gRPC API to v1alpha4 The previous changes are an API break, therefore we need a new version. --- pkg/kubelet/cm/dra/manager.go | 2 +- pkg/kubelet/cm/dra/manager_test.go | 52 ++++++++-------- pkg/kubelet/cm/dra/plugin/client.go | 2 +- pkg/kubelet/cm/dra/plugin/client_test.go | 38 ++++++------ .../kubeletplugin/draplugin.go | 6 +- .../apis/dra/{v1alpha3 => v1alpha4}/api.pb.go | 61 ++++++++++--------- .../apis/dra/{v1alpha3 => v1alpha4}/api.proto | 6 +- test/e2e/dra/test-driver/app/kubeletplugin.go | 28 ++++----- 8 files changed, 96 insertions(+), 99 deletions(-) rename staging/src/k8s.io/kubelet/pkg/apis/dra/{v1alpha3 => v1alpha4}/api.pb.go (94%) rename staging/src/k8s.io/kubelet/pkg/apis/dra/{v1alpha3 => v1alpha4}/api.proto (93%) diff --git a/pkg/kubelet/cm/dra/manager.go b/pkg/kubelet/cm/dra/manager.go index 234b06eed0d51..55c1925470986 100644 --- a/pkg/kubelet/cm/dra/manager.go +++ b/pkg/kubelet/cm/dra/manager.go @@ -30,7 +30,7 @@ import ( clientset "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/resourceclaim" "k8s.io/klog/v2" - drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha3" + drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" dra "k8s.io/kubernetes/pkg/kubelet/cm/dra/plugin" "k8s.io/kubernetes/pkg/kubelet/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" diff --git a/pkg/kubelet/cm/dra/manager_test.go b/pkg/kubelet/cm/dra/manager_test.go index 6b878ed0d2ed0..279669a841c80 100644 --- a/pkg/kubelet/cm/dra/manager_test.go +++ b/pkg/kubelet/cm/dra/manager_test.go @@ -36,7 +36,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/kubernetes/fake" "k8s.io/dynamic-resource-allocation/resourceclaim" - drapbv1 "k8s.io/kubelet/pkg/apis/dra/v1alpha3" + drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" "k8s.io/kubernetes/pkg/kubelet/cm/dra/plugin" "k8s.io/kubernetes/pkg/kubelet/cm/dra/state" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" @@ -48,16 +48,16 @@ const ( ) type fakeDRADriverGRPCServer struct { - drapbv1.UnimplementedNodeServer + drapb.UnimplementedNodeServer driverName string timeout *time.Duration prepareResourceCalls atomic.Uint32 unprepareResourceCalls atomic.Uint32 - prepareResourcesResponse *drapbv1.NodePrepareResourcesResponse - unprepareResourcesResponse *drapbv1.NodeUnprepareResourcesResponse + prepareResourcesResponse *drapb.NodePrepareResourcesResponse + unprepareResourcesResponse *drapb.NodeUnprepareResourcesResponse } -func (s *fakeDRADriverGRPCServer) NodePrepareResources(ctx context.Context, req *drapbv1.NodePrepareResourcesRequest) (*drapbv1.NodePrepareResourcesResponse, error) { +func (s *fakeDRADriverGRPCServer) NodePrepareResources(ctx context.Context, req *drapb.NodePrepareResourcesRequest) (*drapb.NodePrepareResourcesResponse, error) { s.prepareResourceCalls.Add(1) if s.timeout != nil { @@ -67,8 +67,8 @@ func (s *fakeDRADriverGRPCServer) NodePrepareResources(ctx context.Context, req if s.prepareResourcesResponse == nil { deviceName := "claim-" + req.Claims[0].Uid result := s.driverName + "/" + driverClassName + "=" + deviceName - return &drapbv1.NodePrepareResourcesResponse{ - Claims: map[string]*drapbv1.NodePrepareResourceResponse{ + return &drapb.NodePrepareResourcesResponse{ + Claims: map[string]*drapb.NodePrepareResourceResponse{ req.Claims[0].Uid: { CDIDevices: []string{result}, }, @@ -79,7 +79,7 @@ func (s *fakeDRADriverGRPCServer) NodePrepareResources(ctx context.Context, req return s.prepareResourcesResponse, nil } -func (s *fakeDRADriverGRPCServer) NodeUnprepareResources(ctx context.Context, req *drapbv1.NodeUnprepareResourcesRequest) (*drapbv1.NodeUnprepareResourcesResponse, error) { +func (s *fakeDRADriverGRPCServer) NodeUnprepareResources(ctx context.Context, req *drapb.NodeUnprepareResourcesRequest) (*drapb.NodeUnprepareResourcesResponse, error) { s.unprepareResourceCalls.Add(1) if s.timeout != nil { @@ -87,8 +87,8 @@ func (s *fakeDRADriverGRPCServer) NodeUnprepareResources(ctx context.Context, re } if s.unprepareResourcesResponse == nil { - return &drapbv1.NodeUnprepareResourcesResponse{ - Claims: map[string]*drapbv1.NodeUnprepareResourceResponse{ + return &drapb.NodeUnprepareResourcesResponse{ + Claims: map[string]*drapb.NodeUnprepareResourceResponse{ req.Claims[0].Uid: {}, }, }, nil @@ -108,7 +108,7 @@ type fakeDRAServerInfo struct { teardownFn tearDown } -func setupFakeDRADriverGRPCServer(shouldTimeout bool, pluginClientTimeout *time.Duration, prepareResourcesResponse *drapbv1.NodePrepareResourcesResponse, unprepareResourcesResponse *drapbv1.NodeUnprepareResourcesResponse) (fakeDRAServerInfo, error) { +func setupFakeDRADriverGRPCServer(shouldTimeout bool, pluginClientTimeout *time.Duration, prepareResourcesResponse *drapb.NodePrepareResourcesResponse, unprepareResourcesResponse *drapb.NodeUnprepareResourcesResponse) (fakeDRAServerInfo, error) { socketDir, err := os.MkdirTemp("", "dra") if err != nil { return fakeDRAServerInfo{ @@ -147,7 +147,7 @@ func setupFakeDRADriverGRPCServer(shouldTimeout bool, pluginClientTimeout *time. fakeDRADriverGRPCServer.timeout = &timeout } - drapbv1.RegisterNodeServer(s, fakeDRADriverGRPCServer) + drapb.RegisterNodeServer(s, fakeDRADriverGRPCServer) go func() { go s.Serve(l) @@ -345,7 +345,7 @@ func TestPrepareResources(t *testing.T) { pod *v1.Pod claimInfo *ClaimInfo resourceClaim *resourcev1alpha2.ResourceClaim - resp *drapbv1.NodePrepareResourcesResponse + resp *drapb.NodePrepareResourcesResponse wantErr bool wantTimeout bool wantResourceSkipped bool @@ -484,7 +484,7 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resp: &drapbv1.NodePrepareResourcesResponse{Claims: map[string]*drapbv1.NodePrepareResourceResponse{"test-reserved": nil}}, + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{"test-reserved": nil}}, expectedCDIDevices: []string{}, ExpectedPrepareCalls: 1, }, @@ -541,7 +541,7 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resp: &drapbv1.NodePrepareResourcesResponse{Claims: map[string]*drapbv1.NodePrepareResourceResponse{"test-reserved": nil}}, + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{"test-reserved": nil}}, expectedCDIDevices: []string{}, ExpectedPrepareCalls: 1, }, @@ -748,8 +748,8 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resp: &drapbv1.NodePrepareResourcesResponse{ - Claims: map[string]*drapbv1.NodePrepareResourceResponse{ + resp: &drapb.NodePrepareResourcesResponse{ + Claims: map[string]*drapb.NodePrepareResourceResponse{ "test-reserved": {CDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}}, }, }, @@ -810,8 +810,8 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resp: &drapbv1.NodePrepareResourcesResponse{ - Claims: map[string]*drapbv1.NodePrepareResourceResponse{ + resp: &drapb.NodePrepareResourcesResponse{ + Claims: map[string]*drapb.NodePrepareResourceResponse{ "test-reserved": {CDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}}, }, }, @@ -884,8 +884,8 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resp: &drapbv1.NodePrepareResourcesResponse{ - Claims: map[string]*drapbv1.NodePrepareResourceResponse{ + resp: &drapb.NodePrepareResourcesResponse{ + Claims: map[string]*drapb.NodePrepareResourceResponse{ "test-reserved": {CDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}}, }, }, @@ -977,7 +977,7 @@ func TestUnprepareResources(t *testing.T) { driverName string pod *v1.Pod claimInfo *ClaimInfo - resp *drapbv1.NodeUnprepareResourcesResponse + resp *drapb.NodeUnprepareResourcesResponse wantErr bool wantTimeout bool wantResourceSkipped bool @@ -1117,7 +1117,7 @@ func TestUnprepareResources(t *testing.T) { }, }, }, - resp: &drapbv1.NodeUnprepareResourcesResponse{Claims: map[string]*drapbv1.NodeUnprepareResourceResponse{"test-reserved": {}}}, + resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"test-reserved": {}}}, wantErr: true, wantTimeout: true, expectedUnprepareCalls: 1, @@ -1168,7 +1168,7 @@ func TestUnprepareResources(t *testing.T) { }, prepared: true, }, - resp: &drapbv1.NodeUnprepareResourcesResponse{Claims: map[string]*drapbv1.NodeUnprepareResourceResponse{"": {}}}, + resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"": {}}}, expectedUnprepareCalls: 1, }, { @@ -1217,7 +1217,7 @@ func TestUnprepareResources(t *testing.T) { }, prepared: false, }, - resp: &drapbv1.NodeUnprepareResourcesResponse{Claims: map[string]*drapbv1.NodeUnprepareResourceResponse{"": {}}}, + resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"": {}}}, expectedUnprepareCalls: 1, }, { @@ -1267,7 +1267,7 @@ func TestUnprepareResources(t *testing.T) { }, prepared: true, }, - resp: &drapbv1.NodeUnprepareResourcesResponse{Claims: map[string]*drapbv1.NodeUnprepareResourceResponse{"test-reserved": nil}}, + resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"test-reserved": nil}}, expectedUnprepareCalls: 1, }, } { diff --git a/pkg/kubelet/cm/dra/plugin/client.go b/pkg/kubelet/cm/dra/plugin/client.go index 12ce6625c6d2f..d79f1a51b045a 100644 --- a/pkg/kubelet/cm/dra/plugin/client.go +++ b/pkg/kubelet/cm/dra/plugin/client.go @@ -30,7 +30,7 @@ import ( utilversion "k8s.io/apimachinery/pkg/util/version" "k8s.io/klog/v2" - drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha3" + drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" ) const PluginClientTimeout = 45 * time.Second diff --git a/pkg/kubelet/cm/dra/plugin/client_test.go b/pkg/kubelet/cm/dra/plugin/client_test.go index 5c6e46b33f020..ef374bd10c992 100644 --- a/pkg/kubelet/cm/dra/plugin/client_test.go +++ b/pkg/kubelet/cm/dra/plugin/client_test.go @@ -27,27 +27,27 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/grpc" - drapbv1alpha3 "k8s.io/kubelet/pkg/apis/dra/v1alpha3" + drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" "k8s.io/kubernetes/test/utils/ktesting" ) const ( - v1alpha3Version = "v1alpha3" + v1alpha4Version = "v1alpha4" ) -type fakeV1alpha3GRPCServer struct { - drapbv1alpha3.UnimplementedNodeServer +type fakeV1alpha4GRPCServer struct { + drapb.UnimplementedNodeServer } -var _ drapbv1alpha3.NodeServer = &fakeV1alpha3GRPCServer{} +var _ drapb.NodeServer = &fakeV1alpha4GRPCServer{} -func (f *fakeV1alpha3GRPCServer) NodePrepareResources(ctx context.Context, in *drapbv1alpha3.NodePrepareResourcesRequest) (*drapbv1alpha3.NodePrepareResourcesResponse, error) { - return &drapbv1alpha3.NodePrepareResourcesResponse{Claims: map[string]*drapbv1alpha3.NodePrepareResourceResponse{"dummy": {CDIDevices: []string{"dummy"}}}}, nil +func (f *fakeV1alpha4GRPCServer) NodePrepareResources(ctx context.Context, in *drapb.NodePrepareResourcesRequest) (*drapb.NodePrepareResourcesResponse, error) { + return &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{"dummy": {CDIDevices: []string{"dummy"}}}}, nil } -func (f *fakeV1alpha3GRPCServer) NodeUnprepareResources(ctx context.Context, in *drapbv1alpha3.NodeUnprepareResourcesRequest) (*drapbv1alpha3.NodeUnprepareResourcesResponse, error) { +func (f *fakeV1alpha4GRPCServer) NodeUnprepareResources(ctx context.Context, in *drapb.NodeUnprepareResourcesRequest) (*drapb.NodeUnprepareResourcesResponse, error) { - return &drapbv1alpha3.NodeUnprepareResourcesResponse{}, nil + return &drapb.NodeUnprepareResourcesResponse{}, nil } type tearDown func() @@ -73,9 +73,9 @@ func setupFakeGRPCServer(version string) (string, tearDown, error) { s := grpc.NewServer() switch version { - case v1alpha3Version: - fakeGRPCServer := &fakeV1alpha3GRPCServer{} - drapbv1alpha3.RegisterNodeServer(s, fakeGRPCServer) + case v1alpha4Version: + fakeGRPCServer := &fakeV1alpha4GRPCServer{} + drapb.RegisterNodeServer(s, fakeGRPCServer) default: return "", nil, fmt.Errorf("unsupported version: %s", version) } @@ -91,7 +91,7 @@ func setupFakeGRPCServer(version string) (string, tearDown, error) { func TestGRPCConnIsReused(t *testing.T) { ctx := ktesting.Init(t) - addr, teardown, err := setupFakeGRPCServer(v1alpha3Version) + addr, teardown, err := setupFakeGRPCServer(v1alpha4Version) if err != nil { t.Fatal(err) } @@ -132,8 +132,8 @@ func TestGRPCConnIsReused(t *testing.T) { return } - req := &drapbv1alpha3.NodePrepareResourcesRequest{ - Claims: []*drapbv1alpha3.Claim{ + req := &drapb.NodePrepareResourcesRequest{ + Claims: []*drapb.Claim{ { Namespace: "dummy-namespace", Uid: "dummy-uid", @@ -218,13 +218,13 @@ func TestNodeUnprepareResources(t *testing.T) { description string serverSetup func(string) (string, tearDown, error) serverVersion string - request *drapbv1alpha3.NodeUnprepareResourcesRequest + request *drapb.NodeUnprepareResourcesRequest }{ { - description: "server supports v1alpha3", + description: "server supports v1alpha4", serverSetup: setupFakeGRPCServer, - serverVersion: v1alpha3Version, - request: &drapbv1alpha3.NodeUnprepareResourcesRequest{}, + serverVersion: v1alpha4Version, + request: &drapb.NodeUnprepareResourcesRequest{}, }, } { t.Run(test.description, func(t *testing.T) { diff --git a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go index 9f1ca8b4abcbb..c5e440ab4b8fb 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go @@ -30,7 +30,7 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/resourceslice" - drapbv1alpha3 "k8s.io/kubelet/pkg/apis/dra/v1alpha3" + drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" registerapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" ) @@ -308,9 +308,9 @@ func Start(ctx context.Context, nodeServer interface{}, opts ...Option) (result // Run the node plugin gRPC server first to ensure that it is ready. implemented := false plugin, err := startGRPCServer(klog.NewContext(ctx, klog.LoggerWithName(logger, "dra")), o.grpcVerbosity, o.unaryInterceptors, o.streamInterceptors, o.draEndpoint, func(grpcServer *grpc.Server) { - if nodeServer, ok := nodeServer.(drapbv1alpha3.NodeServer); ok && o.nodeV1alpha3 { + if nodeServer, ok := nodeServer.(drapb.NodeServer); ok && o.nodeV1alpha3 { logger.V(5).Info("registering drapbv1alpha3.NodeServer") - drapbv1alpha3.RegisterNodeServer(grpcServer, nodeServer) + drapb.RegisterNodeServer(grpcServer, nodeServer) implemented = true } }) diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go similarity index 94% rename from staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go rename to staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go index c8186e8803ab7..5c96e3edda5a6 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.pb.go +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go @@ -17,7 +17,7 @@ limitations under the License. // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: api.proto -package v1alpha3 +package v1alpha4 import ( context "context" @@ -423,37 +423,38 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 480 bytes of a gzipped FileDescriptorProto + // 481 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xd3, 0x40, 0x10, 0xcd, 0x36, 0x4d, 0x85, 0x27, 0x12, 0xa0, 0x55, 0x85, 0xa2, 0x50, 0x4c, 0x64, 0x51, 0x92, - 0x0b, 0xb6, 0x48, 0x41, 0xaa, 0x40, 0x5c, 0xd2, 0x82, 0xf8, 0x12, 0x42, 0x96, 0xb8, 0x70, 0x81, - 0xb5, 0x3d, 0xb8, 0xab, 0x7c, 0xec, 0xb2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5, 0x17, 0x3d, 0x4f, 0xd6, - 0x76, 0x89, 0x13, 0x55, 0xca, 0xb2, 0x5c, 0xc6, 0x83, 0x76, 0x18, 0xf1, 0x4f, 0x11, 0xce, 0x79, - 0x88, 0xc5, 0x46, 0xd6, 0xe8, 0x7a, 0x76, 0x7c, 0x17, 0xf6, 0xf6, 0x5f, 0xed, 0x17, 0x55, 0x1f, - 0xc2, 0x88, 0x97, 0x31, 0xdd, 0x84, 0x16, 0x2a, 0x25, 0x94, 0x21, 0x64, 0xf9, 0x45, 0xe2, 0xbc, - 0x84, 0x3b, 0x39, 0xca, 0x87, 0x99, 0xfc, 0x5f, 0xf9, 0x7f, 0x11, 0xb0, 0x57, 0x8d, 0x2a, 0x39, - 0xbf, 0xbd, 0x30, 0xeb, 0xd1, 0x79, 0x51, 0x56, 0x77, 0x56, 0x5a, 0x10, 0xd4, 0x59, 0xf0, 0xec, - 0xbc, 0x05, 0xfd, 0x1a, 0xb4, 0x2a, 0x13, 0x1e, 0xaf, 0x90, 0x67, 0xb9, 0xd2, 0x52, 0x55, 0x72, - 0x56, 0xd5, 0x37, 0xd0, 0x32, 0xd4, 0xe8, 0x16, 0x58, 0x33, 0x36, 0x45, 0x2d, 0x59, 0x88, 0xe5, - 0x93, 0xd3, 0x42, 0x4e, 0x39, 0xe5, 0x51, 0x69, 0x48, 0x1e, 0x52, 0x0a, 0xeb, 0xf9, 0xe7, 0x4e, - 0xd3, 0x94, 0x4c, 0x3c, 0x3c, 0x26, 0xb0, 0x9e, 0x93, 0xa0, 0x31, 0x6c, 0x56, 0xdd, 0x29, 0xdd, - 0xae, 0xbb, 0x63, 0xe3, 0x64, 0xf7, 0xfe, 0xd5, 0xce, 0xdd, 0x69, 0xd0, 0x29, 0xdc, 0xaa, 0xf6, - 0x83, 0xf6, 0xeb, 0x1d, 0x2b, 0xc0, 0x06, 0x57, 0xb5, 0xd6, 0x69, 0x8c, 0x46, 0x47, 0x27, 0x36, - 0xf9, 0x7d, 0x62, 0x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0x79, 0x55, 0xdf, 0x42, 0xc3, 0x50, 0xa3, 0x5b, 0x60, 0x4d, 0xd8, 0x18, 0xb5, 0x64, 0x21, 0x96, + 0x4f, 0xce, 0x0a, 0x39, 0xe5, 0x94, 0x47, 0xa5, 0x21, 0x79, 0x48, 0x29, 0xac, 0xe7, 0x9f, 0x5b, + 0x75, 0x53, 0x32, 0x71, 0xff, 0x84, 0xc0, 0x7a, 0x4e, 0x82, 0xc6, 0xb0, 0x59, 0x75, 0xa7, 0x74, + 0x7b, 0xd9, 0x1d, 0x1b, 0x27, 0xdb, 0x0f, 0x57, 0x3b, 0x77, 0xa7, 0x46, 0xc7, 0x70, 0xa7, 0xda, + 0x0f, 0xda, 0x5d, 0xee, 0x58, 0x01, 0xd6, 0x5b, 0xd5, 0x5a, 0xa7, 0x36, 0x18, 0x1c, 0x9f, 0xda, + 0xe4, 0xcf, 0xa9, 0x5d, 0xfb, 0x9e, 0xd9, 0xe4, 0x38, 0xb3, 0xc9, 0xaf, 0xcc, 0x26, 0x7f, 0x33, + 0x9b, 0xfc, 0xf8, 0x67, 0xd7, 0x3e, 0x3d, 0x18, 0xee, 0x69, 0x97, 0x0b, 0x6f, 0x98, 0x06, 0x38, + 0xc2, 0xc4, 0x93, 0xc3, 0xd8, 0x63, 0x92, 0x6b, 0x2f, 0x52, 0xcc, 0x2b, 0x41, 0x76, 0x83, 0x0d, + 0xf3, 0x2f, 0xd9, 0xf9, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x65, 0xc5, 0xc2, 0x0e, 0x91, 0x04, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto similarity index 93% rename from staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto rename to staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto index 46af3e07bc58d..04a374535b6f2 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha3/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto @@ -19,7 +19,7 @@ limitations under the License. syntax = "proto3"; package v1alpha3; -option go_package = "k8s.io/kubelet/pkg/apis/dra/v1alpha3"; +option go_package = "k8s.io/kubelet/pkg/apis/dra/v1alpha4"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; @@ -43,10 +43,6 @@ service Node { // The same error handling rules apply, rpc NodeUnprepareResources (NodeUnprepareResourcesRequest) returns (NodeUnprepareResourcesResponse) {} - - // TODO: removing NodeListAndWatchResources and the code for - // publishing ResourceSlice objects by kubelet is an API break. - // If we do this, then v1alpha3 must be renamed to v1alpha4. } message NodePrepareResourcesRequest { diff --git a/test/e2e/dra/test-driver/app/kubeletplugin.go b/test/e2e/dra/test-driver/app/kubeletplugin.go index b07c7a2c4a088..ce320c51352dd 100644 --- a/test/e2e/dra/test-driver/app/kubeletplugin.go +++ b/test/e2e/dra/test-driver/app/kubeletplugin.go @@ -36,7 +36,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/kubeletplugin" "k8s.io/klog/v2" - drapbv1alpha3 "k8s.io/kubelet/pkg/apis/dra/v1alpha3" + drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" ) type ExamplePlugin struct { @@ -88,7 +88,7 @@ type ClaimID struct { UID string } -var _ drapbv1alpha3.NodeServer = &ExamplePlugin{} +var _ drapb.NodeServer = &ExamplePlugin{} // getJSONFilePath returns the absolute path where CDI file is/should be. func (ex *ExamplePlugin) getJSONFilePath(claimUID string) string { @@ -249,7 +249,7 @@ func (ex *ExamplePlugin) getUnprepareResourcesFailure() error { // a deterministic name to simplify NodeUnprepareResource (no need to remember // or discover the name) and idempotency (when called again, the file simply // gets written again). -func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimReq *drapbv1alpha3.Claim) ([]string, error) { +func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimReq *drapb.Claim) ([]string, error) { logger := klog.FromContext(ctx) // The plugin must retrieve the claim itself to get it in the version @@ -394,9 +394,9 @@ func extractParameters(parameters runtime.RawExtension, env *map[string]string, return nil } -func (ex *ExamplePlugin) NodePrepareResources(ctx context.Context, req *drapbv1alpha3.NodePrepareResourcesRequest) (*drapbv1alpha3.NodePrepareResourcesResponse, error) { - resp := &drapbv1alpha3.NodePrepareResourcesResponse{ - Claims: make(map[string]*drapbv1alpha3.NodePrepareResourceResponse), +func (ex *ExamplePlugin) NodePrepareResources(ctx context.Context, req *drapb.NodePrepareResourcesRequest) (*drapb.NodePrepareResourcesResponse, error) { + resp := &drapb.NodePrepareResourcesResponse{ + Claims: make(map[string]*drapb.NodePrepareResourceResponse), } if failure := ex.getPrepareResourcesFailure(); failure != nil { @@ -406,11 +406,11 @@ func (ex *ExamplePlugin) NodePrepareResources(ctx context.Context, req *drapbv1a for _, claimReq := range req.Claims { cdiDevices, err := ex.nodePrepareResource(ctx, claimReq) if err != nil { - resp.Claims[claimReq.Uid] = &drapbv1alpha3.NodePrepareResourceResponse{ + resp.Claims[claimReq.Uid] = &drapb.NodePrepareResourceResponse{ Error: err.Error(), } } else { - resp.Claims[claimReq.Uid] = &drapbv1alpha3.NodePrepareResourceResponse{ + resp.Claims[claimReq.Uid] = &drapb.NodePrepareResourceResponse{ CDIDevices: cdiDevices, } } @@ -421,7 +421,7 @@ func (ex *ExamplePlugin) NodePrepareResources(ctx context.Context, req *drapbv1a // NodeUnprepareResource removes the CDI file created by // NodePrepareResource. It's idempotent, therefore it is not an error when that // file is already gone. -func (ex *ExamplePlugin) nodeUnprepareResource(ctx context.Context, claimReq *drapbv1alpha3.Claim) error { +func (ex *ExamplePlugin) nodeUnprepareResource(ctx context.Context, claimReq *drapb.Claim) error { ex.blockUnprepareResourcesMutex.Lock() defer ex.blockUnprepareResourcesMutex.Unlock() @@ -451,9 +451,9 @@ func (ex *ExamplePlugin) nodeUnprepareResource(ctx context.Context, claimReq *dr return nil } -func (ex *ExamplePlugin) NodeUnprepareResources(ctx context.Context, req *drapbv1alpha3.NodeUnprepareResourcesRequest) (*drapbv1alpha3.NodeUnprepareResourcesResponse, error) { - resp := &drapbv1alpha3.NodeUnprepareResourcesResponse{ - Claims: make(map[string]*drapbv1alpha3.NodeUnprepareResourceResponse), +func (ex *ExamplePlugin) NodeUnprepareResources(ctx context.Context, req *drapb.NodeUnprepareResourcesRequest) (*drapb.NodeUnprepareResourcesResponse, error) { + resp := &drapb.NodeUnprepareResourcesResponse{ + Claims: make(map[string]*drapb.NodeUnprepareResourceResponse), } if failure := ex.getUnprepareResourcesFailure(); failure != nil { @@ -463,11 +463,11 @@ func (ex *ExamplePlugin) NodeUnprepareResources(ctx context.Context, req *drapbv for _, claimReq := range req.Claims { err := ex.nodeUnprepareResource(ctx, claimReq) if err != nil { - resp.Claims[claimReq.Uid] = &drapbv1alpha3.NodeUnprepareResourceResponse{ + resp.Claims[claimReq.Uid] = &drapb.NodeUnprepareResourceResponse{ Error: err.Error(), } } else { - resp.Claims[claimReq.Uid] = &drapbv1alpha3.NodeUnprepareResourceResponse{} + resp.Claims[claimReq.Uid] = &drapb.NodeUnprepareResourceResponse{} } } return resp, nil From a754ec9ac567f06dccbd2237a900ed2b29ae5ea0 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 13 Jun 2024 08:25:00 +0200 Subject: [PATCH 07/20] kubelet: grant permission for DeleteCollection also with RBAC If the node authorizer is active, RBAC rules are not needed. But if it's disabled, kubelet needs to get permission through RBAC. In contrast to the authorizer code which is a bit more flexible and isn't directly tied to the current kubelet implementation (i.e. it allows list+delete instead of just deletecollection), the RBAC entry is just for what the current kubelet does because it's a bit easier to change. --- plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go index f91da6e2673dd..8e3f4090c2e97 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go @@ -181,6 +181,7 @@ func NodeRules() []rbacv1.PolicyRule { // DRA Resource Claims if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { nodePolicyRules = append(nodePolicyRules, rbacv1helpers.NewRule("get").Groups(resourceGroup).Resources("resourceclaims").RuleOrDie()) + nodePolicyRules = append(nodePolicyRules, rbacv1helpers.NewRule("deletecollection").Groups(resourceGroup).Resources("resourceslices").RuleOrDie()) } // Kubelet needs access to ClusterTrustBundles to support the pemTrustAnchors volume type. if utilfeature.DefaultFeatureGate.Enabled(features.ClusterTrustBundle) { From 7017ab536832e1009f5fca60c835e4ef947bae59 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 13 Jun 2024 17:25:39 +0200 Subject: [PATCH 08/20] DRA: remove immediate allocation As agreed in https://github.com/kubernetes/enhancements/pull/4709, immediate allocation is one of those features which can be removed because it makes no sense for structured parameters and the justification for classic DRA is weak. --- api/openapi-spec/swagger.json | 4 - ...is__resource.k8s.io__v1alpha2_openapi.json | 4 - pkg/api/testing/defaulting_test.go | 4 - pkg/apis/resource/fuzzer/fuzzer.go | 16 +- pkg/apis/resource/types.go | 28 +- pkg/apis/resource/v1alpha2/defaults.go | 7 - pkg/apis/resource/v1alpha2/defaults_test.go | 75 ---- .../v1alpha2/zz_generated.conversion.go | 2 - .../v1alpha2/zz_generated.defaults.go | 29 -- pkg/apis/resource/validation/validation.go | 5 - .../validation_resourceclaim_test.go | 25 -- .../validation_resourceclaimtemplate_test.go | 24 -- pkg/controller/resourceclaim/controller.go | 19 +- .../resourceclaim/controller_test.go | 76 +---- pkg/generated/openapi/zz_generated.openapi.go | 7 - pkg/printers/internalversion/printers.go | 6 +- .../resourceclaim/storage/storage_test.go | 1 - .../resource/resourceclaim/strategy_test.go | 1 - .../storage/storage_test.go | 1 - .../resourceclaimtemplate/strategy_test.go | 1 - .../dynamicresources/dynamicresources.go | 85 ++--- .../dynamicresources/dynamicresources_test.go | 246 ++++---------- pkg/scheduler/testing/wrappers.go | 6 - .../api/resource/v1alpha2/generated.pb.go | 320 ++++++++---------- .../api/resource/v1alpha2/generated.proto | 5 - .../src/k8s.io/api/resource/v1alpha2/types.go | 26 -- .../v1alpha2/types_swagger_doc_generated.go | 1 - ...esource.k8s.io.v1alpha2.ResourceClaim.json | 3 +- .../resource.k8s.io.v1alpha2.ResourceClaim.pb | Bin 1031 -> 1010 bytes ...esource.k8s.io.v1alpha2.ResourceClaim.yaml | 1 - ...k8s.io.v1alpha2.ResourceClaimTemplate.json | 3 +- ...e.k8s.io.v1alpha2.ResourceClaimTemplate.pb | Bin 861 -> 840 bytes ...k8s.io.v1alpha2.ResourceClaimTemplate.yaml | 1 - ...1alpha2.ResourceClaim.after_roundtrip.json | 99 ++++++ ....v1alpha2.ResourceClaim.after_roundtrip.pb | Bin 0 -> 667 bytes ...1alpha2.ResourceClaim.after_roundtrip.yaml | 65 ++++ ...ResourceClaimTemplate.after_roundtrip.json | 98 ++++++ ...2.ResourceClaimTemplate.after_roundtrip.pb | Bin 0 -> 840 bytes ...ResourceClaimTemplate.after_roundtrip.yaml | 73 ++++ ...1alpha2.ResourceClaim.after_roundtrip.json | 139 ++++++++ ....v1alpha2.ResourceClaim.after_roundtrip.pb | Bin 0 -> 1010 bytes ...1alpha2.ResourceClaim.after_roundtrip.yaml | 91 +++++ ...ResourceClaimTemplate.after_roundtrip.json | 98 ++++++ ...2.ResourceClaimTemplate.after_roundtrip.pb | Bin 0 -> 840 bytes ...ResourceClaimTemplate.after_roundtrip.yaml | 73 ++++ .../applyconfigurations/internal/internal.go | 3 - .../resource/v1alpha2/resourceclaimspec.go | 13 - .../controller/controller.go | 47 +-- .../controller/controller_test.go | 198 +++-------- test/e2e/dra/dra.go | 286 +++++----------- 50 files changed, 1125 insertions(+), 1190 deletions(-) delete mode 100644 pkg/apis/resource/v1alpha2/defaults_test.go create mode 100644 staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json create mode 100644 staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb create mode 100644 staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml create mode 100644 staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.json create mode 100644 staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.pb create mode 100644 staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.json create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.pb create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index d51c1efb2f2ec..9190889512242 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -15484,10 +15484,6 @@ "io.k8s.api.resource.v1alpha2.ResourceClaimSpec": { "description": "ResourceClaimSpec defines how a resource is to be allocated.", "properties": { - "allocationMode": { - "description": "Allocation can start immediately or when a Pod wants to use the resource. \"WaitForFirstConsumer\" is the default.", - "type": "string" - }, "parametersRef": { "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference", "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." diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json index abe72129b03fb..9744839793281 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json @@ -762,10 +762,6 @@ "io.k8s.api.resource.v1alpha2.ResourceClaimSpec": { "description": "ResourceClaimSpec defines how a resource is to be allocated.", "properties": { - "allocationMode": { - "description": "Allocation can start immediately or when a Pod wants to use the resource. \"WaitForFirstConsumer\" is the default.", - "type": "string" - }, "parametersRef": { "allOf": [ { diff --git a/pkg/api/testing/defaulting_test.go b/pkg/api/testing/defaulting_test.go index 07c63b4c0085e..a442b14dfbfc0 100644 --- a/pkg/api/testing/defaulting_test.go +++ b/pkg/api/testing/defaulting_test.go @@ -135,10 +135,6 @@ func TestDefaulting(t *testing.T) { {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: "RoleBindingList"}: {}, - {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaim"}: {}, - {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimList"}: {}, - {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimTemplate"}: {}, - {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimTemplateList"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicy"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyList"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyBinding"}: {}, diff --git a/pkg/apis/resource/fuzzer/fuzzer.go b/pkg/apis/resource/fuzzer/fuzzer.go index 5cf5b5e635bc2..5f9b5273900c0 100644 --- a/pkg/apis/resource/fuzzer/fuzzer.go +++ b/pkg/apis/resource/fuzzer/fuzzer.go @@ -17,24 +17,10 @@ limitations under the License. package fuzzer import ( - fuzz "github.com/google/gofuzz" - runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" - "k8s.io/kubernetes/pkg/apis/resource" ) // Funcs contains the fuzzer functions for the resource group. var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { - return []interface{}{ - func(obj *resource.ResourceClaimSpec, c fuzz.Continue) { - c.FuzzNoCustom(obj) // fuzz self without calling this function again - - // Custom fuzzing for allocation mode: pick one valid mode randomly. - modes := []resource.AllocationMode{ - resource.AllocationModeImmediate, - resource.AllocationModeWaitForFirstConsumer, - } - obj.AllocationMode = modes[c.Rand.Intn(len(modes))] - }, - } + return nil } diff --git a/pkg/apis/resource/types.go b/pkg/apis/resource/types.go index fa3fba7f39ef4..6a633c1782c44 100644 --- a/pkg/apis/resource/types.go +++ b/pkg/apis/resource/types.go @@ -62,33 +62,7 @@ type ResourceClaimSpec struct { // The object must be in the same namespace as the ResourceClaim. // +optional ParametersRef *ResourceClaimParametersReference - - // Allocation can start immediately or when a Pod wants to use the - // resource. "WaitForFirstConsumer" is the default. - // +optional - AllocationMode AllocationMode -} - -// AllocationMode describes whether a ResourceClaim gets allocated immediately -// when it gets created (AllocationModeImmediate) or whether allocation is -// delayed until it is needed for a Pod -// (AllocationModeWaitForFirstConsumer). Other modes might get added in the -// future. -type AllocationMode string - -const ( - // When a ResourceClaim has AllocationModeWaitForFirstConsumer, allocation is - // delayed until a Pod gets scheduled that needs the ResourceClaim. The - // scheduler will consider all resource requirements of that Pod and - // trigger allocation for a node that fits the Pod. - AllocationModeWaitForFirstConsumer AllocationMode = "WaitForFirstConsumer" - - // When a ResourceClaim has AllocationModeImmediate, allocation starts - // as soon as the ResourceClaim gets created. This is done without - // considering the needs of Pods that will use the ResourceClaim - // because those Pods are not known yet. - AllocationModeImmediate AllocationMode = "Immediate" -) +} // ResourceClaimStatus tracks whether the resource has been allocated and what // the resulting attributes are. diff --git a/pkg/apis/resource/v1alpha2/defaults.go b/pkg/apis/resource/v1alpha2/defaults.go index a6c681f8bf54d..8682b9a2a88f8 100644 --- a/pkg/apis/resource/v1alpha2/defaults.go +++ b/pkg/apis/resource/v1alpha2/defaults.go @@ -17,16 +17,9 @@ limitations under the License. package v1alpha2 import ( - "k8s.io/api/resource/v1alpha2" "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } - -func SetDefaults_ResourceClaimSpec(obj *v1alpha2.ResourceClaimSpec) { - if obj.AllocationMode == "" { - obj.AllocationMode = v1alpha2.AllocationModeWaitForFirstConsumer - } -} diff --git a/pkg/apis/resource/v1alpha2/defaults_test.go b/pkg/apis/resource/v1alpha2/defaults_test.go deleted file mode 100644 index 7f5b0d01046ef..0000000000000 --- a/pkg/apis/resource/v1alpha2/defaults_test.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha2_test - -import ( - "reflect" - "testing" - - v1alpha2 "k8s.io/api/resource/v1alpha2" - "k8s.io/apimachinery/pkg/runtime" - - // ensure types are installed - "k8s.io/kubernetes/pkg/api/legacyscheme" - _ "k8s.io/kubernetes/pkg/apis/resource/install" -) - -func TestSetDefaultAllocationMode(t *testing.T) { - claim := &v1alpha2.ResourceClaim{} - - // field should be defaulted - defaultMode := v1alpha2.AllocationModeWaitForFirstConsumer - output := roundTrip(t, runtime.Object(claim)).(*v1alpha2.ResourceClaim) - outMode := output.Spec.AllocationMode - if outMode != defaultMode { - t.Errorf("Expected AllocationMode to be defaulted to: %+v, got: %+v", defaultMode, outMode) - } - - // field should not change - nonDefaultMode := v1alpha2.AllocationModeImmediate - claim = &v1alpha2.ResourceClaim{ - Spec: v1alpha2.ResourceClaimSpec{ - AllocationMode: nonDefaultMode, - }, - } - output = roundTrip(t, runtime.Object(claim)).(*v1alpha2.ResourceClaim) - outMode = output.Spec.AllocationMode - if outMode != v1alpha2.AllocationModeImmediate { - t.Errorf("Expected AllocationMode to remain %+v, got: %+v", nonDefaultMode, outMode) - } -} - -func roundTrip(t *testing.T, obj runtime.Object) runtime.Object { - codec := legacyscheme.Codecs.LegacyCodec(v1alpha2.SchemeGroupVersion) - data, err := runtime.Encode(codec, obj) - if err != nil { - t.Errorf("%v\n %#v", err, obj) - return nil - } - obj2, err := runtime.Decode(codec, data) - if err != nil { - t.Errorf("%v\nData: %s\nSource: %#v", err, string(data), obj) - return nil - } - obj3 := reflect.New(reflect.TypeOf(obj).Elem()).Interface().(runtime.Object) - err = legacyscheme.Scheme.Convert(obj2, obj3, nil) - if err != nil { - t.Errorf("%v\nSource: %#v", err, obj2) - return nil - } - return obj3 -} diff --git a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go b/pkg/apis/resource/v1alpha2/zz_generated.conversion.go index c49d690c705c2..862ccac3ddd9c 100644 --- a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/resource/v1alpha2/zz_generated.conversion.go @@ -1159,7 +1159,6 @@ func Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSch func autoConvert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha2.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error { out.ResourceClassName = in.ResourceClassName out.ParametersRef = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) - out.AllocationMode = resource.AllocationMode(in.AllocationMode) return nil } @@ -1171,7 +1170,6 @@ func Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alph func autoConvert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha2.ResourceClaimSpec, s conversion.Scope) error { out.ResourceClassName = in.ResourceClassName out.ParametersRef = (*v1alpha2.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) - out.AllocationMode = v1alpha2.AllocationMode(in.AllocationMode) return nil } diff --git a/pkg/apis/resource/v1alpha2/zz_generated.defaults.go b/pkg/apis/resource/v1alpha2/zz_generated.defaults.go index bcf5e1aa5bbc9..7e0a05edc9500 100644 --- a/pkg/apis/resource/v1alpha2/zz_generated.defaults.go +++ b/pkg/apis/resource/v1alpha2/zz_generated.defaults.go @@ -22,7 +22,6 @@ limitations under the License. package v1alpha2 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -30,33 +29,5 @@ import ( // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*v1alpha2.ResourceClaim)) }) - scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*v1alpha2.ResourceClaimList)) }) - scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimTemplate{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimTemplate(obj.(*v1alpha2.ResourceClaimTemplate)) }) - scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimTemplateList{}, func(obj interface{}) { - SetObjectDefaults_ResourceClaimTemplateList(obj.(*v1alpha2.ResourceClaimTemplateList)) - }) return nil } - -func SetObjectDefaults_ResourceClaim(in *v1alpha2.ResourceClaim) { - SetDefaults_ResourceClaimSpec(&in.Spec) -} - -func SetObjectDefaults_ResourceClaimList(in *v1alpha2.ResourceClaimList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_ResourceClaim(a) - } -} - -func SetObjectDefaults_ResourceClaimTemplate(in *v1alpha2.ResourceClaimTemplate) { - SetDefaults_ResourceClaimSpec(&in.Spec.Spec) -} - -func SetObjectDefaults_ResourceClaimTemplateList(in *v1alpha2.ResourceClaimTemplateList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_ResourceClaimTemplate(a) - } -} diff --git a/pkg/apis/resource/validation/validation.go b/pkg/apis/resource/validation/validation.go index 7b93aae7db4a9..39db1d71b66c1 100644 --- a/pkg/apis/resource/validation/validation.go +++ b/pkg/apis/resource/validation/validation.go @@ -46,14 +46,9 @@ func validateResourceClaimSpec(spec *resource.ResourceClaimSpec, fldPath *field. allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceClassName"), spec.ResourceClassName, msg)) } allErrs = append(allErrs, validateResourceClaimParametersRef(spec.ParametersRef, fldPath.Child("parametersRef"))...) - if !supportedAllocationModes.Has(string(spec.AllocationMode)) { - allErrs = append(allErrs, field.NotSupported(fldPath.Child("allocationMode"), spec.AllocationMode, supportedAllocationModes.List())) - } return allErrs } -var supportedAllocationModes = sets.NewString(string(resource.AllocationModeImmediate), string(resource.AllocationModeWaitForFirstConsumer)) - // It would have been nice to use Go generics to reuse the same validation // function for Kind and Name in both types, but generics cannot be used to // access common fields in structs. diff --git a/pkg/apis/resource/validation/validation_resourceclaim_test.go b/pkg/apis/resource/validation/validation_resourceclaim_test.go index 5c735baef5386..3836e0d9f4447 100644 --- a/pkg/apis/resource/validation/validation_resourceclaim_test.go +++ b/pkg/apis/resource/validation/validation_resourceclaim_test.go @@ -42,14 +42,11 @@ func testClaim(name, namespace string, spec resource.ResourceClaimSpec) *resourc } func TestValidateClaim(t *testing.T) { - validMode := resource.AllocationModeImmediate - invalidMode := resource.AllocationMode("invalid") goodName := "foo" badName := "!@#$%^" goodNS := "ns" goodClaimSpec := resource.ResourceClaimSpec{ ResourceClassName: goodName, - AllocationMode: validMode, } now := metav1.Now() badValue := "spaces not allowed" @@ -200,14 +197,6 @@ func TestValidateClaim(t *testing.T) { return claim }(), }, - "bad-mode": { - wantFailures: field.ErrorList{field.NotSupported(field.NewPath("spec", "allocationMode"), invalidMode, supportedAllocationModes.List())}, - claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) - claim.Spec.AllocationMode = invalidMode - return claim - }(), - }, "good-parameters": { claim: func() *resource.ResourceClaim { claim := testClaim(goodName, goodNS, goodClaimSpec) @@ -279,7 +268,6 @@ func TestValidateClaimUpdate(t *testing.T) { } validClaim := testClaim("foo", "ns", resource.ResourceClaimSpec{ ResourceClassName: name, - AllocationMode: resource.AllocationModeImmediate, ParametersRef: parameters, }) @@ -316,18 +304,6 @@ func TestValidateClaimUpdate(t *testing.T) { return claim }, }, - "invalid-update-mode": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec"), func() resource.ResourceClaimSpec { - spec := validClaim.Spec.DeepCopy() - spec.AllocationMode = resource.AllocationModeWaitForFirstConsumer - return *spec - }(), "field is immutable")}, - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Spec.AllocationMode = resource.AllocationModeWaitForFirstConsumer - return claim - }, - }, } for name, scenario := range scenarios { @@ -343,7 +319,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) { invalidName := "!@#$%^" validClaim := testClaim("foo", "ns", resource.ResourceClaimSpec{ ResourceClassName: "valid", - AllocationMode: resource.AllocationModeImmediate, }) validAllocatedClaim := validClaim.DeepCopy() diff --git a/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go b/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go index 3f6c55041476e..ba51420c26888 100644 --- a/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go +++ b/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go @@ -40,14 +40,11 @@ func testClaimTemplate(name, namespace string, spec resource.ResourceClaimSpec) } func TestValidateClaimTemplate(t *testing.T) { - validMode := resource.AllocationModeImmediate - invalidMode := resource.AllocationMode("invalid") goodName := "foo" badName := "!@#$%^" goodNS := "ns" goodClaimSpec := resource.ResourceClaimSpec{ ResourceClassName: goodName, - AllocationMode: validMode, } now := metav1.Now() badValue := "spaces not allowed" @@ -198,14 +195,6 @@ func TestValidateClaimTemplate(t *testing.T) { return template }(), }, - "bad-mode": { - wantFailures: field.ErrorList{field.NotSupported(field.NewPath("spec", "spec", "allocationMode"), invalidMode, supportedAllocationModes.List())}, - template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) - template.Spec.Spec.AllocationMode = invalidMode - return template - }(), - }, "good-parameters": { template: func() *resource.ResourceClaimTemplate { template := testClaimTemplate(goodName, goodNS, goodClaimSpec) @@ -277,7 +266,6 @@ func TestValidateClaimTemplateUpdate(t *testing.T) { } validClaimTemplate := testClaimTemplate("foo", "ns", resource.ResourceClaimSpec{ ResourceClassName: name, - AllocationMode: resource.AllocationModeImmediate, ParametersRef: parameters, }) @@ -314,18 +302,6 @@ func TestValidateClaimTemplateUpdate(t *testing.T) { return template }, }, - "invalid-update-mode": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec"), func() resource.ResourceClaimTemplateSpec { - spec := validClaimTemplate.Spec.DeepCopy() - spec.Spec.AllocationMode = resource.AllocationModeWaitForFirstConsumer - return *spec - }(), "field is immutable")}, - oldClaimTemplate: validClaimTemplate, - update: func(template *resource.ResourceClaimTemplate) *resource.ResourceClaimTemplate { - template.Spec.Spec.AllocationMode = resource.AllocationModeWaitForFirstConsumer - return template - }, - }, } for name, scenario := range scenarios { diff --git a/pkg/controller/resourceclaim/controller.go b/pkg/controller/resourceclaim/controller.go index daa000ee92ac9..e9da966f85ad4 100644 --- a/pkg/controller/resourceclaim/controller.go +++ b/pkg/controller/resourceclaim/controller.go @@ -329,8 +329,7 @@ func (ec *Controller) podNeedsWork(pod *v1.Pod) (bool, string) { // - a user created a pod with spec.nodeName set, perhaps for testing // - some scheduler was used which is unaware of DRA // - DRA was not enabled in kube-scheduler (version skew, configuration) - if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer && - claim.Status.Allocation == nil { + if claim.Status.Allocation == nil { scheduling, err := ec.podSchedulingLister.PodSchedulingContexts(pod.Namespace).Get(pod.Name) if apierrors.IsNotFound(err) { return true, "need to create PodSchedulingContext for scheduled pod" @@ -533,8 +532,7 @@ func (ec *Controller) syncPod(ctx context.Context, namespace, name string) error return err } } - if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer && - claim.Status.Allocation == nil { + if claim.Status.Allocation == nil { logger.V(5).Info("create PodSchedulingContext because claim needs to be allocated", "resourceClaim", klog.KObj(claim)) return ec.ensurePodSchedulingContext(ctx, pod) } @@ -864,19 +862,14 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err // for such claims and not checking for them keeps this code simpler. if len(valid) == 0 { if builtinControllerFinalizer >= 0 { - if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer || - claim.DeletionTimestamp != nil { - // Allocated by scheduler with structured parameters. We can "deallocate" - // by clearing the allocation. - claim.Status.Allocation = nil - } - } else if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer { + // Allocated by scheduler with structured parameters. We can "deallocate" + // by clearing the allocation. + claim.Status.Allocation = nil + } else { // DRA driver controller in the control plane // needs to do the deallocation. claim.Status.DeallocationRequested = true } - // In all other cases, we keep the claim allocated, in particular for immediate allocation - // with a control plane controller. } claim, err := ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) diff --git a/pkg/controller/resourceclaim/controller_test.go b/pkg/controller/resourceclaim/controller_test.go index b089c74c95122..d1a48afee6920 100644 --- a/pkg/controller/resourceclaim/controller_test.go +++ b/pkg/controller/resourceclaim/controller_test.go @@ -281,7 +281,7 @@ func TestSyncHandler(t *testing.T) { expectedMetrics: expectedMetrics{0, 0}, }, { - name: "clear-reserved-delayed-allocation", + name: "clear-reserved", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, @@ -293,7 +293,7 @@ func TestSyncHandler(t *testing.T) { expectedMetrics: expectedMetrics{0, 0}, }, { - name: "clear-reserved-delayed-allocation-structured", + name: "clear-reserved-structured", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), claims: []*resourcev1alpha2.ResourceClaim{structuredParameters(testClaimReserved)}, @@ -306,7 +306,7 @@ func TestSyncHandler(t *testing.T) { expectedMetrics: expectedMetrics{0, 0}, }, { - name: "dont-clear-reserved-delayed-allocation-structured", + name: "dont-clear-reserved-structured", pods: []*v1.Pod{testPodWithResource}, key: claimKey(testClaimReserved), claims: func() []*resourcev1alpha2.ResourceClaim { @@ -318,50 +318,16 @@ func TestSyncHandler(t *testing.T) { expectedMetrics: expectedMetrics{0, 0}, }, { - name: "clear-reserved-immediate-allocation", - pods: []*v1.Pod{}, - key: claimKey(testClaimReserved), - claims: func() []*resourcev1alpha2.ResourceClaim { - claim := testClaimReserved.DeepCopy() - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate - return []*resourcev1alpha2.ResourceClaim{claim} - }(), - expectedClaims: func() []resourcev1alpha2.ResourceClaim { - claim := testClaimAllocated.DeepCopy() - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate - return []resourcev1alpha2.ResourceClaim{*claim} - }(), - expectedMetrics: expectedMetrics{0, 0}, - }, - { - name: "clear-reserved-immediate-allocation-structured", + name: "clear-reserved-structured-deleted", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), claims: func() []*resourcev1alpha2.ResourceClaim { claim := structuredParameters(testClaimReserved.DeepCopy()) - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate - return []*resourcev1alpha2.ResourceClaim{claim} - }(), - expectedClaims: func() []resourcev1alpha2.ResourceClaim { - claim := structuredParameters(testClaimAllocated.DeepCopy()) - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate - return []resourcev1alpha2.ResourceClaim{*claim} - }(), - expectedMetrics: expectedMetrics{0, 0}, - }, - { - name: "clear-reserved-immediate-allocation-structured-deleted", - pods: []*v1.Pod{}, - key: claimKey(testClaimReserved), - claims: func() []*resourcev1alpha2.ResourceClaim { - claim := structuredParameters(testClaimReserved.DeepCopy()) - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.DeletionTimestamp = &metav1.Time{} return []*resourcev1alpha2.ResourceClaim{claim} }(), expectedClaims: func() []resourcev1alpha2.ResourceClaim { claim := structuredParameters(testClaimAllocated.DeepCopy()) - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.DeletionTimestamp = &metav1.Time{} claim.Finalizers = []string{} claim.Status.Allocation = nil @@ -370,18 +336,16 @@ func TestSyncHandler(t *testing.T) { expectedMetrics: expectedMetrics{0, 0}, }, { - name: "immediate-allocation-structured-deleted", + name: "structured-deleted", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), claims: func() []*resourcev1alpha2.ResourceClaim { claim := structuredParameters(testClaimAllocated.DeepCopy()) - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.DeletionTimestamp = &metav1.Time{} return []*resourcev1alpha2.ResourceClaim{claim} }(), expectedClaims: func() []resourcev1alpha2.ResourceClaim { claim := structuredParameters(testClaimAllocated.DeepCopy()) - claim.Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate claim.DeletionTimestamp = &metav1.Time{} claim.Finalizers = []string{} claim.Status.Allocation = nil @@ -390,7 +354,7 @@ func TestSyncHandler(t *testing.T) { expectedMetrics: expectedMetrics{0, 0}, }, { - name: "clear-reserved-when-done-delayed-allocation", + name: "clear-reserved-when-done", pods: func() []*v1.Pod { pods := []*v1.Pod{testPodWithResource.DeepCopy()} pods[0].Status.Phase = v1.PodSucceeded @@ -410,28 +374,6 @@ func TestSyncHandler(t *testing.T) { }(), expectedMetrics: expectedMetrics{0, 0}, }, - { - name: "clear-reserved-when-done-immediate-allocation", - pods: func() []*v1.Pod { - pods := []*v1.Pod{testPodWithResource.DeepCopy()} - pods[0].Status.Phase = v1.PodSucceeded - return pods - }(), - key: claimKey(testClaimReserved), - claims: func() []*resourcev1alpha2.ResourceClaim { - claims := []*resourcev1alpha2.ResourceClaim{testClaimReserved.DeepCopy()} - claims[0].OwnerReferences = nil - claims[0].Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate - return claims - }(), - expectedClaims: func() []resourcev1alpha2.ResourceClaim { - claims := []resourcev1alpha2.ResourceClaim{*testClaimAllocated.DeepCopy()} - claims[0].OwnerReferences = nil - claims[0].Spec.AllocationMode = resourcev1alpha2.AllocationModeImmediate - return claims - }(), - expectedMetrics: expectedMetrics{0, 0}, - }, { name: "remove-reserved", pods: []*v1.Pod{testPod}, @@ -587,7 +529,6 @@ func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, Spec: resourcev1alpha2.ResourceClaimSpec{ ResourceClassName: classname, - AllocationMode: resourcev1alpha2.AllocationModeWaitForFirstConsumer, }, } if owner != nil { @@ -607,7 +548,6 @@ func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, }, Spec: resourcev1alpha2.ResourceClaimSpec{ ResourceClassName: classname, - AllocationMode: resourcev1alpha2.AllocationModeWaitForFirstConsumer, }, } if owner != nil { @@ -709,10 +649,6 @@ func normalizeClaims(claims []resourcev1alpha2.ResourceClaim) []resourcev1alpha2 if len(claims[i].Status.ReservedFor) == 0 { claims[i].Status.ReservedFor = nil } - if claims[i].Spec.AllocationMode == "" { - // This emulates defaulting. - claims[i].Spec.AllocationMode = resourcev1alpha2.AllocationModeWaitForFirstConsumer - } } return claims } diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 00b5b69cde1d2..4521169d37e29 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -46369,13 +46369,6 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref common.ReferenceCa Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"), }, }, - "allocationMode": { - SchemaProps: spec.SchemaProps{ - Description: "Allocation can start immediately or when a Pod wants to use the resource. \"WaitForFirstConsumer\" is the default.", - Type: []string{"string"}, - Format: "", - }, - }, }, Required: []string{"resourceClassName"}, }, diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index e52a427cb14e2..2dcff139b00d1 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -634,7 +634,6 @@ func AddHandlers(h printers.PrintHandler) { resourceClaimColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "ResourceClassName", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, - {Name: "AllocationMode", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]}, {Name: "State", Type: "string", Description: "A summary of the current state (allocated, pending, reserved, etc.)."}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } @@ -644,7 +643,6 @@ func AddHandlers(h printers.PrintHandler) { resourceClaimTemplateColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "ResourceClassName", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, - {Name: "AllocationMode", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } _ = h.TableHandler(resourceClaimTemplateColumnDefinitions, printResourceClaimTemplate) @@ -3006,7 +3004,7 @@ func printResourceClaim(obj *resource.ResourceClaim, options printers.GenerateOp row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - row.Cells = append(row.Cells, obj.Name, obj.Spec.ResourceClassName, string(obj.Spec.AllocationMode), resourceClaimState(obj), translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, obj.Spec.ResourceClassName, resourceClaimState(obj), translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } @@ -3047,7 +3045,7 @@ func printResourceClaimTemplate(obj *resource.ResourceClaimTemplate, options pri row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - row.Cells = append(row.Cells, obj.Name, obj.Spec.Spec.ResourceClassName, string(obj.Spec.Spec.AllocationMode), translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, obj.Spec.Spec.ResourceClassName, translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } diff --git a/pkg/registry/resource/resourceclaim/storage/storage_test.go b/pkg/registry/resource/resourceclaim/storage/storage_test.go index 613d3c80467b7..114c5f36b914b 100644 --- a/pkg/registry/resource/resourceclaim/storage/storage_test.go +++ b/pkg/registry/resource/resourceclaim/storage/storage_test.go @@ -58,7 +58,6 @@ func validNewClaim(name, ns string) *resource.ResourceClaim { }, Spec: resource.ResourceClaimSpec{ ResourceClassName: "example", - AllocationMode: resource.AllocationModeImmediate, }, Status: resource.ResourceClaimStatus{}, } diff --git a/pkg/registry/resource/resourceclaim/strategy_test.go b/pkg/registry/resource/resourceclaim/strategy_test.go index d4091893b5b2e..e99439234b03d 100644 --- a/pkg/registry/resource/resourceclaim/strategy_test.go +++ b/pkg/registry/resource/resourceclaim/strategy_test.go @@ -31,7 +31,6 @@ var resourceClaim = &resource.ResourceClaim{ }, Spec: resource.ResourceClaimSpec{ ResourceClassName: "valid-class", - AllocationMode: resource.AllocationModeImmediate, }, } diff --git a/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go b/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go index 642938b3bc2cb..332cfc2e8514e 100644 --- a/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go +++ b/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go @@ -55,7 +55,6 @@ func validNewClaimTemplate(name string) *resource.ResourceClaimTemplate { Spec: resource.ResourceClaimTemplateSpec{ Spec: resource.ResourceClaimSpec{ ResourceClassName: "valid-class", - AllocationMode: resource.AllocationModeImmediate, }, }, } diff --git a/pkg/registry/resource/resourceclaimtemplate/strategy_test.go b/pkg/registry/resource/resourceclaimtemplate/strategy_test.go index 47e2537532160..1eb8ad05c77e3 100644 --- a/pkg/registry/resource/resourceclaimtemplate/strategy_test.go +++ b/pkg/registry/resource/resourceclaimtemplate/strategy_test.go @@ -32,7 +32,6 @@ var resourceClaimTemplate = &resource.ResourceClaimTemplate{ Spec: resource.ResourceClaimTemplateSpec{ Spec: resource.ResourceClaimSpec{ ResourceClassName: "valid-class", - AllocationMode: resource.AllocationModeImmediate, }, }, } diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go index 90039854a1471..1bcc40cbf5ad8 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go @@ -713,8 +713,7 @@ func (pl *dynamicResources) isSchedulableAfterPodSchedulingContextChange(logger // we allow backoff. pendingDelayedClaims := 0 if err := pl.foreachPodResourceClaim(pod, func(podResourceName string, claim *resourcev1alpha2.ResourceClaim) { - if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer && - claim.Status.Allocation == nil && + if claim.Status.Allocation == nil && !podSchedulingHasClaimInfo(podScheduling, podResourceName) { pendingDelayedClaims++ } @@ -970,9 +969,6 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl } s.informationsForClaim[index].controller = controller needResourceInformation = true - } else if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeImmediate { - // This will get resolved by the resource driver. - return nil, statusUnschedulable(logger, "unallocated immediate resourceclaim", "pod", klog.KObj(pod), "resourceclaim", klog.KObj(claim)) } } } @@ -1161,74 +1157,63 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState var unavailableClaims []int for index, claim := range state.claims { logger.V(10).Info("filtering based on resource claims of the pod", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) - switch { - case claim.Status.Allocation != nil: + + if claim.Status.Allocation != nil { if nodeSelector := state.informationsForClaim[index].availableOnNode; nodeSelector != nil { if !nodeSelector.Match(node) { logger.V(5).Info("AvailableOnNodes does not match", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) unavailableClaims = append(unavailableClaims, index) } } - case claim.Status.DeallocationRequested: + continue + } + + if claim.Status.DeallocationRequested { // 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)) - case claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer || - state.informationsForClaim[index].structuredParameters: - if selector := state.informationsForClaim[index].availableOnNode; selector != nil { - if matches := selector.Match(node); !matches { - return statusUnschedulable(logger, "excluded by resource class node filter", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclassName", claim.Spec.ResourceClassName) - } + } + + if selector := state.informationsForClaim[index].availableOnNode; selector != nil { + if matches := selector.Match(node); !matches { + return statusUnschedulable(logger, "excluded by resource class node filter", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclassName", claim.Spec.ResourceClassName) } - // Can the builtin controller tell us whether the node is suitable? - if state.informationsForClaim[index].structuredParameters { - suitable, err := state.informationsForClaim[index].controller.nodeIsSuitable(ctx, node.Name, state.resources) - if err != nil { - // An error indicates that something wasn't configured correctly, for example - // writing a CEL expression which doesn't handle a map lookup error. Normally - // this should never fail. We could return an error here, but then the pod - // would get retried. Instead we ignore the node. - return statusUnschedulable(logger, fmt.Sprintf("checking structured parameters failed: %v", err), "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) - } - if !suitable { - return statusUnschedulable(logger, "resourceclaim cannot be allocated for the node (unsuitable)", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) - } - } else { - if status := state.informationsForClaim[index].status; status != nil { - for _, unsuitableNode := range status.UnsuitableNodes { - if node.Name == unsuitableNode { - return statusUnschedulable(logger, "resourceclaim cannot be allocated for the node (unsuitable)", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim), "unsuitablenodes", status.UnsuitableNodes) - } + } + // Can the builtin controller tell us whether the node is suitable? + if state.informationsForClaim[index].structuredParameters { + suitable, err := state.informationsForClaim[index].controller.nodeIsSuitable(ctx, node.Name, state.resources) + if err != nil { + // An error indicates that something wasn't configured correctly, for example + // writing a CEL expression which doesn't handle a map lookup error. Normally + // this should never fail. We could return an error here, but then the pod + // would get retried. Instead we ignore the node. + return statusUnschedulable(logger, fmt.Sprintf("checking structured parameters failed: %v", err), "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) + } + if !suitable { + return statusUnschedulable(logger, "resourceclaim cannot be allocated for the node (unsuitable)", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) + } + } else { + if status := state.informationsForClaim[index].status; status != nil { + for _, unsuitableNode := range status.UnsuitableNodes { + if node.Name == unsuitableNode { + return statusUnschedulable(logger, "resourceclaim cannot be allocated for the node (unsuitable)", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim), "unsuitablenodes", status.UnsuitableNodes) } } } - default: - // This claim should have been handled above. - // Immediate allocation with control plane controller - // was already checked for in PreFilter. - return statusError(logger, fmt.Errorf("internal error, unexpected allocation mode %v", claim.Spec.AllocationMode)) } } if len(unavailableClaims) > 0 { + // Remember all unavailable claims. This might be observed + // concurrently, so we have to lock the state before writing. state.mutex.Lock() defer state.mutex.Unlock() + if state.unavailableClaims == nil { state.unavailableClaims = sets.New[int]() } for _, index := range unavailableClaims { - claim := state.claims[index] - // Deallocation makes more sense for claims with - // delayed allocation. Claims with immediate allocation - // would just get allocated again for a random node, - // which is unlikely to help the pod. - // - // Claims with builtin controller are handled like - // claims with delayed allocation. - if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer || - state.informationsForClaim[index].controller != nil { - state.unavailableClaims.Insert(index) - } + state.unavailableClaims.Insert(index) } return statusUnschedulable(logger, "resourceclaim not available on the node", "pod", klog.KObj(pod)) } diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go index fb46fb443bde7..f06f1740d36f7 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go @@ -165,53 +165,39 @@ var ( Namespace(namespace). ResourceClassName(className). Obj() - pendingImmediateClaim = st.FromResourceClaim(claim). - AllocationMode(resourcev1alpha2.AllocationModeImmediate). - Obj() - structuredAllocatedImmediateClaim = st.FromResourceClaim(pendingImmediateClaim). - Allocation("some-driver", &resourcev1alpha2.AllocationResult{}). - Structured("worker", "instance-1"). - Obj() - pendingDelayedClaim = st.FromResourceClaim(claim). - OwnerReference(podName, podUID, podKind). - AllocationMode(resourcev1alpha2.AllocationModeWaitForFirstConsumer). - Obj() - pendingDelayedClaim2 = st.FromResourceClaim(pendingDelayedClaim). - Name(claimName2). - Obj() - deallocatingClaim = st.FromResourceClaim(pendingImmediateClaim). + pendingClaim = st.FromResourceClaim(claim). + OwnerReference(podName, podUID, podKind). + Obj() + pendingClaim2 = st.FromResourceClaim(pendingClaim). + Name(claimName2). + Obj() + deallocatingClaim = st.FromResourceClaim(pendingClaim). Allocation("some-driver", &resourcev1alpha2.AllocationResult{}). DeallocationRequested(true). Obj() - inUseClaim = st.FromResourceClaim(pendingImmediateClaim). + inUseClaim = st.FromResourceClaim(pendingClaim). Allocation("some-driver", &resourcev1alpha2.AllocationResult{}). ReservedForPod(podName, types.UID(podUID)). Obj() structuredInUseClaim = st.FromResourceClaim(inUseClaim). Structured("worker", "instance-1"). Obj() - allocatedClaim = st.FromResourceClaim(pendingDelayedClaim). + allocatedClaim = st.FromResourceClaim(pendingClaim). Allocation("some-driver", &resourcev1alpha2.AllocationResult{}). Obj() - pendingDelayedClaimWithParams = st.FromResourceClaim(pendingDelayedClaim).ParametersRef(claimName).Obj() + pendingClaimWithParams = st.FromResourceClaim(pendingClaim).ParametersRef(claimName).Obj() structuredAllocatedClaim = st.FromResourceClaim(allocatedClaim).Structured("worker", "instance-1").Obj() structuredAllocatedClaimWithParams = st.FromResourceClaim(structuredAllocatedClaim).ParametersRef(claimName).Obj() otherStructuredAllocatedClaim = st.FromResourceClaim(structuredAllocatedClaim).Name(structuredAllocatedClaim.Name + "-other").Obj() - allocatedDelayedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaim). - Allocation("some-driver", &resourcev1alpha2.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}). - Obj() - structuredAllocatedDelayedClaimWithWrongTopology = st.FromResourceClaim(allocatedDelayedClaimWithWrongTopology). - Structured("worker-2", "instance-1"). - Obj() - allocatedImmediateClaimWithWrongTopology = st.FromResourceClaim(allocatedDelayedClaimWithWrongTopology). - AllocationMode(resourcev1alpha2.AllocationModeImmediate). + allocatedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaim). + Allocation("some-driver", &resourcev1alpha2.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}). + Obj() + structuredAllocatedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaimWithWrongTopology). + Structured("worker-2", "instance-1"). Obj() - structuredAllocatedImmediateClaimWithWrongTopology = st.FromResourceClaim(allocatedImmediateClaimWithWrongTopology). - Structured("worker-2", "instance-1"). - Obj() allocatedClaimWithGoodTopology = st.FromResourceClaim(allocatedClaim). Allocation("some-driver", &resourcev1alpha2.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("kubernetes.io/hostname", []string{"worker"}).Obj()}). Obj() @@ -483,22 +469,9 @@ func TestPlugin(t *testing.T) { }, }, }, - "waiting-for-immediate-allocation": { + "structured-no-resources": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingImmediateClaim}, - classes: []*resourcev1alpha2.ResourceClass{resourceClass}, - want: want{ - prefilter: result{ - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `unallocated immediate resourceclaim`), - }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), - }, - }, - }, - "immediate-allocation-structured-no-resources": { - pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingImmediateClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, want: want{ filter: perNodeResult{ @@ -511,51 +484,9 @@ func TestPlugin(t *testing.T) { }, }, }, - "immediate-allocation-structured-with-resources": { + "structured-with-resources": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingImmediateClaim}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, - objs: []apiruntime.Object{workerNodeSlice}, - want: want{ - reserve: result{ - inFlightClaim: structuredAllocatedImmediateClaim, - }, - prebind: result{ - assumedClaim: reserve(structuredAllocatedImmediateClaim, podWithClaimName), - changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { - if claim.Name == claimName { - claim = claim.DeepCopy() - claim.Finalizers = structuredAllocatedImmediateClaim.Finalizers - claim.Status = structuredInUseClaim.Status - } - return claim - }, - }, - }, - postbind: result{ - assumedClaim: reserve(structuredAllocatedImmediateClaim, podWithClaimName), - }, - }, - }, - "delayed-allocation-structured-no-resources": { - pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, - want: want{ - filter: perNodeResult{ - workerNode.Name: { - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim cannot be allocated for the node (unsuitable)`), - }, - }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `still not schedulable`), - }, - }, - }, - "delayed-allocation-structured-with-resources": { - pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ @@ -580,12 +511,12 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-structured-with-resources-has-finalizer": { + "structured-with-resources-has-finalizer": { // As before. but the finalizer is already set. Could happen if // the scheduler got interrupted. pod: podWithClaimName, claims: func() []*resourcev1alpha2.ResourceClaim { - claim := pendingDelayedClaim.DeepCopy() + claim := pendingClaim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers return []*resourcev1alpha2.ResourceClaim{claim} }(), @@ -612,12 +543,12 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-structured-with-resources-finalizer-gets-removed": { + "structured-with-resources-finalizer-gets-removed": { // As before. but the finalizer is already set. Then it gets // removed before the scheduler reaches PreBind. pod: podWithClaimName, claims: func() []*resourcev1alpha2.ResourceClaim { - claim := pendingDelayedClaim.DeepCopy() + claim := pendingClaim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers return []*resourcev1alpha2.ResourceClaim{claim} }(), @@ -653,11 +584,11 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-structured-with-resources-finalizer-gets-added": { + "structured-with-resources-finalizer-gets-added": { // No finalizer initially, then it gets added before // the scheduler reaches PreBind. Shouldn't happen? pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, prepare: prepare{ @@ -689,9 +620,9 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-structured-skip-bind": { + "structured-skip-bind": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ @@ -701,9 +632,9 @@ func TestPlugin(t *testing.T) { unreserveBeforePreBind: &result{}, }, }, - "delayed-allocation-structured-exhausted-resources": { + "structured-exhausted-resources": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim, otherStructuredAllocatedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ @@ -720,7 +651,7 @@ func TestPlugin(t *testing.T) { "with-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaimWithParams}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{claimParameters, classParameters, workerNodeSlice}, want: want{ @@ -748,7 +679,7 @@ func TestPlugin(t *testing.T) { "with-translated-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingDelayedClaimWithParams)}, + claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, claimParametersOtherNamespace /* must be ignored */, classParameters, workerNodeSlice}, want: want{ @@ -776,7 +707,7 @@ func TestPlugin(t *testing.T) { "missing-class-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaimWithParams}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{claimParameters, workerNodeSlice}, want: want{ @@ -791,7 +722,7 @@ func TestPlugin(t *testing.T) { "missing-claim-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaimWithParams}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{classParameters, workerNodeSlice}, want: want{ @@ -806,7 +737,7 @@ func TestPlugin(t *testing.T) { "missing-translated-class-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingDelayedClaimWithParams)}, + claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, workerNodeSlice}, want: want{ @@ -821,7 +752,7 @@ func TestPlugin(t *testing.T) { "missing-translated-claim-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingDelayedClaimWithParams)}, + claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{classParameters, workerNodeSlice}, want: want{ @@ -836,7 +767,7 @@ func TestPlugin(t *testing.T) { "too-many-translated-class-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingDelayedClaimWithParams)}, + claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, classParameters, st.FromClassParameters(classParameters).Name("other").Obj() /* too many */, workerNodeSlice}, want: want{ @@ -851,7 +782,7 @@ func TestPlugin(t *testing.T) { "too-many-translated-claim-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingDelayedClaimWithParams)}, + claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, st.FromClaimParameters(claimParameters).Name("other").Obj() /* too many */, classParameters, workerNodeSlice}, want: want{ @@ -866,7 +797,7 @@ func TestPlugin(t *testing.T) { "claim-parameters-CEL-runtime-error": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaimWithParams}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{breakCELInClaimParameters(claimParameters), classParameters, workerNodeSlice}, want: want{ @@ -883,7 +814,7 @@ func TestPlugin(t *testing.T) { "class-parameters-CEL-runtime-error": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaimWithParams}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{claimParameters, breakCELInClassParameters(classParameters), workerNodeSlice}, want: want{ @@ -910,9 +841,9 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-missing-class": { + "missing-class": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, want: want{ prefilter: result{ status: framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("resource class %s does not exist", className)), @@ -922,11 +853,11 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-scheduling-select-immediately": { + "scheduling-select-immediately": { // Create the PodSchedulingContext object, ask for information // and select a node. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, classes: []*resourcev1alpha2.ResourceClass{resourceClass}, want: want{ prebind: result{ @@ -935,12 +866,12 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-scheduling-ask": { + "scheduling-ask": { // Create the PodSchedulingContext object, ask for // information, but do not select a node because // there are multiple claims. pod: podWithTwoClaimNames, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim, pendingDelayedClaim2}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim, pendingClaim2}, classes: []*resourcev1alpha2.ResourceClass{resourceClass}, want: want{ prebind: result{ @@ -949,11 +880,11 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-scheduling-finish": { + "scheduling-finish": { // Use the populated PodSchedulingContext object to select a // node. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, schedulings: []*resourcev1alpha2.PodSchedulingContext{schedulingInfo}, classes: []*resourcev1alpha2.ResourceClass{resourceClass}, want: want{ @@ -969,11 +900,11 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-scheduling-finish-concurrent-label-update": { + "scheduling-finish-concurrent-label-update": { // Use the populated PodSchedulingContext object to select a // node. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, schedulings: []*resourcev1alpha2.PodSchedulingContext{schedulingInfo}, classes: []*resourcev1alpha2.ResourceClass{resourceClass}, prepare: prepare{ @@ -994,7 +925,7 @@ func TestPlugin(t *testing.T) { }, }, }, - "delayed-allocation-scheduling-completed": { + "scheduling-completed": { // Remove PodSchedulingContext object once the pod is scheduled. pod: podWithClaimName, claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim}, @@ -1031,11 +962,11 @@ func TestPlugin(t *testing.T) { }, }, }, - "wrong-topology-delayed-allocation": { + "wrong-topology": { // PostFilter tries to get the pod scheduleable by // deallocating the claim. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{allocatedDelayedClaimWithWrongTopology}, + claims: []*resourcev1alpha2.ResourceClaim{allocatedClaimWithWrongTopology}, want: want{ filter: perNodeResult{ workerNode.Name: { @@ -1055,29 +986,11 @@ func TestPlugin(t *testing.T) { }, }, }, - "wrong-topology-immediate-allocation": { - // PostFilter tries to get the pod scheduleable by - // deallocating the claim. - pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{allocatedImmediateClaimWithWrongTopology}, - want: want{ - filter: perNodeResult{ - workerNode.Name: { - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim not available on the node`), - }, - }, - postfilter: result{ - // Claims with immediate allocation don't. They would just get allocated again right - // away, without considering the needs of the pod. - status: framework.NewStatus(framework.Unschedulable, `still not schedulable`), - }, - }, - }, - "wrong-topology-delayed-allocation-structured": { + "wrong-topology-structured": { // PostFilter tries to get the pod scheduleable by // deallocating the claim. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{structuredAllocatedDelayedClaimWithWrongTopology}, + claims: []*resourcev1alpha2.ResourceClaim{structuredAllocatedClaimWithWrongTopology}, want: want{ filter: perNodeResult{ workerNode.Name: { @@ -1097,25 +1010,6 @@ func TestPlugin(t *testing.T) { }, }, }, - "wrong-topology-immediate-allocation-structured": { - // PostFilter tries to get the pod scheduleable by - // deallocating the claim. - pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{structuredAllocatedImmediateClaimWithWrongTopology}, - want: want{ - filter: perNodeResult{ - workerNode.Name: { - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim not available on the node`), - }, - }, - postfilter: result{ - // Claims with immediate allocation don't. The allocation is considered - // more important than the pod and pods need to wait for the node to - // become available again. - status: framework.NewStatus(framework.Unschedulable, `still not schedulable`), - }, - }, - }, "good-topology": { pod: podWithClaimName, claims: []*resourcev1alpha2.ResourceClaim{allocatedClaimWithGoodTopology}, @@ -1665,22 +1559,22 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "queue-on-add": { pod: podWithClaimName, - newObj: pendingImmediateClaim, + newObj: pendingClaim, expectedHint: framework.Queue, }, "backoff-wrong-old-object": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, oldObj: "not-a-claim", - newObj: pendingImmediateClaim, + newObj: pendingClaim, expectedErr: true, }, "skip-adding-finalizer": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingImmediateClaim}, - oldObj: pendingImmediateClaim, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + oldObj: pendingClaim, newObj: func() *resourcev1alpha2.ResourceClaim { - claim := pendingImmediateClaim.DeepCopy() + claim := pendingClaim.DeepCopy() claim.Finalizers = append(claim.Finalizers, "foo") return claim }(), @@ -1688,10 +1582,10 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "queue-on-status-change": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingImmediateClaim}, - oldObj: pendingImmediateClaim, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + oldObj: pendingClaim, newObj: func() *resourcev1alpha2.ResourceClaim { - claim := pendingImmediateClaim.DeepCopy() + claim := pendingClaim.DeepCopy() claim.Status.Allocation = &resourcev1alpha2.AllocationResult{} return claim }(), @@ -1699,7 +1593,7 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "structured-claim-deallocate": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim, otherStructuredAllocatedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, oldObj: otherStructuredAllocatedClaim, newObj: func() *resourcev1alpha2.ResourceClaim { claim := otherStructuredAllocatedClaim.DeepCopy() @@ -1804,7 +1698,7 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "skip-unrelated-object": { pod: podWithClaimTemplate, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, newObj: func() *resourcev1alpha2.PodSchedulingContext { scheduling := scheduling.DeepCopy() scheduling.Name += "-foo" @@ -1826,21 +1720,21 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "skip-missing-infos": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, oldObj: scheduling, newObj: scheduling, expectedHint: framework.QueueSkip, }, "queue-new-infos": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, oldObj: scheduling, newObj: schedulingInfo, expectedHint: framework.Queue, }, "queue-bad-selected-node": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, oldObj: func() *resourcev1alpha2.PodSchedulingContext { scheduling := schedulingInfo.DeepCopy() scheduling.Spec.SelectedNode = workerNode.Name @@ -1856,7 +1750,7 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "skip-spec-changes": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, oldObj: schedulingInfo, newObj: func() *resourcev1alpha2.PodSchedulingContext { scheduling := schedulingInfo.DeepCopy() @@ -1867,7 +1761,7 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "backoff-other-changes": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim}, + claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, oldObj: schedulingInfo, newObj: func() *resourcev1alpha2.PodSchedulingContext { scheduling := schedulingInfo.DeepCopy() diff --git a/pkg/scheduler/testing/wrappers.go b/pkg/scheduler/testing/wrappers.go index 3ddd79cb61db4..8c1abaf4d25fd 100644 --- a/pkg/scheduler/testing/wrappers.go +++ b/pkg/scheduler/testing/wrappers.go @@ -946,12 +946,6 @@ func (wrapper *ResourceClaimWrapper) OwnerReference(name, uid string, gvk schema return wrapper } -// AllocationMode sets the allocation mode of the inner object. -func (wrapper *ResourceClaimWrapper) AllocationMode(a resourcev1alpha2.AllocationMode) *ResourceClaimWrapper { - wrapper.ResourceClaim.Spec.AllocationMode = a - return wrapper -} - // ParametersRef sets a reference to a ResourceClaimParameters.resource.k8s.io. func (wrapper *ResourceClaimWrapper) ParametersRef(name string) *ResourceClaimWrapper { wrapper.ResourceClaim.Spec.ParametersRef = &resourcev1alpha2.ResourceClaimParametersReference{ diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go b/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go index 6c6ba438e3869..72deb49412727 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go @@ -1331,148 +1331,146 @@ func init() { } var fileDescriptor_4312f5b44a31ec02 = []byte{ - // 2242 bytes of a gzipped FileDescriptorProto + // 2219 bytes of a gzipped FileDescriptorProto 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, - 0x20, 0x2c, 0x70, 0x76, 0x1b, 0xa7, 0x4d, 0xa3, 0x52, 0x90, 0x32, 0x71, 0x13, 0x2c, 0x9a, 0xd4, - 0x7d, 0x4b, 0xdc, 0xa6, 0xfc, 0x75, 0xbc, 0xf3, 0x62, 0x0f, 0xd9, 0x9d, 0xd9, 0xcc, 0x7b, 0xeb, - 0x26, 0xe2, 0x12, 0x55, 0x20, 0xb8, 0x20, 0x15, 0x81, 0x10, 0x9c, 0x38, 0x21, 0xc4, 0x85, 0x0b, - 0x5c, 0x39, 0x55, 0xd0, 0x1c, 0x83, 0x40, 0xa2, 0xe2, 0xb0, 0x22, 0xcb, 0x91, 0x23, 0xb7, 0x9e, - 0xd0, 0xbc, 0xf7, 0xe6, 0xe7, 0xcd, 0xce, 0xac, 0x77, 0x96, 0xc6, 0x4a, 0x4e, 0xde, 0x79, 0xef, - 0xfb, 0x7b, 0xdf, 0xff, 0x7b, 0x9f, 0x61, 0xe3, 0xce, 0x25, 0x52, 0xb7, 0x9c, 0x86, 0xd1, 0xb5, - 0x1a, 0x2e, 0x26, 0x4e, 0xcf, 0x6d, 0xe1, 0xc6, 0xe1, 0x79, 0xa3, 0xdd, 0x3d, 0x30, 0x36, 0x1b, - 0xfb, 0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0x30, 0xc6, 0xe8, 0x33, 0xf9, 0xdf, 0x7e, 0xc2, 0x5e, 0x8d, - 0x7f, 0x13, 0xe4, 0x53, 0xd5, 0x7e, 0xa7, 0xc0, 0x50, 0xce, 0x9b, 0xa8, 0x72, 0x19, 0x00, 0xdd, - 0xff, 0x53, 0xa1, 0x01, 0x8b, 0x88, 0x16, 0x23, 0x44, 0x75, 0xfd, 0xe1, 0xe3, 0xca, 0xd4, 0xa3, - 0xc7, 0x95, 0xa9, 0x4f, 0x1e, 0x57, 0xa6, 0x1e, 0x0c, 0x2a, 0xca, 0xc3, 0x41, 0x45, 0x79, 0x34, - 0xa8, 0x28, 0x9f, 0x0c, 0x2a, 0xca, 0xbf, 0x06, 0x15, 0xe5, 0xc3, 0x7f, 0x57, 0xa6, 0xde, 0x5d, - 0x1b, 0xf5, 0x0f, 0x82, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x94, 0xb7, 0xe5, 0x3f, 0x28, - 0x00, 0x00, + 0xd9, 0xb3, 0xbb, 0x89, 0xd7, 0x9f, 0xed, 0xb5, 0x33, 0xb6, 0xe3, 0x4d, 0xea, 0xee, 0xba, 0x23, + 0x10, 0x11, 0x38, 0xbb, 0x8d, 0xd3, 0xa6, 0x51, 0x29, 0x48, 0x99, 0xb8, 0x09, 0x16, 0x6d, 0xea, + 0xbe, 0x25, 0x6e, 0x53, 0xfe, 0x3a, 0xde, 0x79, 0xb1, 0x87, 0xec, 0xce, 0x6c, 0xe6, 0xbd, 0x71, + 0x13, 0x71, 0x89, 0x2a, 0x10, 0x5c, 0x90, 0x8a, 0x40, 0x08, 0x4e, 0x9c, 0x38, 0x70, 0xe1, 0x02, + 0x57, 0x4e, 0x15, 0x34, 0xc7, 0x20, 0x40, 0x54, 0x1c, 0x56, 0x64, 0x39, 0x72, 0xe4, 0xc6, 0x09, + 0xcd, 0x7b, 0x6f, 0x7e, 0xde, 0xec, 0xcc, 0x7a, 0x67, 0x21, 0x56, 0x72, 0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0xe3, 0x7e, 0x1b, 0xa6, 0x5d, 0x36, 0x10, 0xf1, 0xef, 0x05, 0x63, + 0x3c, 0x54, 0xa6, 0xff, 0x93, 0x4e, 0xd4, 0xab, 0xf1, 0x6f, 0x82, 0x02, 0xaa, 0xda, 0xaf, 0x15, + 0x18, 0xca, 0x79, 0x13, 0x55, 0x2e, 0x03, 0xa0, 0xf7, 0x3f, 0x2a, 0x34, 0x64, 0x11, 0xd3, 0x62, + 0x8c, 0xa8, 0xae, 0x3f, 0x7c, 0x5c, 0x9b, 0x7a, 0xf4, 0xb8, 0x36, 0xf5, 0xe9, 0xe3, 0xda, 0xd4, + 0x83, 0x41, 0x4d, 0x79, 0x38, 0xa8, 0x29, 0x8f, 0x06, 0x35, 0xe5, 0xd3, 0x41, 0x4d, 0xf9, 0xc7, + 0xa0, 0xa6, 0x7c, 0xf4, 0xcf, 0xda, 0xd4, 0x7b, 0x6b, 0xa3, 0xfe, 0x9d, 0xef, 0xbf, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xaf, 0x16, 0x22, 0xd5, 0xed, 0x27, 0x00, 0x00, } func (m *AllocationResult) Marshal() (dAtA []byte, err error) { @@ -2539,11 +2537,6 @@ func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i -= len(m.AllocationMode) - copy(dAtA[i:], m.AllocationMode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllocationMode))) - i-- - dAtA[i] = 0x1a if m.ParametersRef != nil { { size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) @@ -3886,8 +3879,6 @@ func (m *ResourceClaimSpec) Size() (n int) { l = m.ParametersRef.Size() n += 1 + l + sovGenerated(uint64(l)) } - l = len(m.AllocationMode) - n += 1 + l + sovGenerated(uint64(l)) return n } @@ -4536,7 +4527,6 @@ func (this *ResourceClaimSpec) String() string { s := strings.Join([]string{`&ResourceClaimSpec{`, `ResourceClassName:` + fmt.Sprintf("%v", this.ResourceClassName) + `,`, `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, - `AllocationMode:` + fmt.Sprintf("%v", this.AllocationMode) + `,`, `}`, }, "") return s @@ -7889,38 +7879,6 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllocationMode = AllocationMode(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto b/staging/src/k8s.io/api/resource/v1alpha2/generated.proto index 8c46531086d36..25727d8fe4afb 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto +++ b/staging/src/k8s.io/api/resource/v1alpha2/generated.proto @@ -411,11 +411,6 @@ message ResourceClaimSpec { // The object must be in the same namespace as the ResourceClaim. // +optional optional ResourceClaimParametersReference parametersRef = 2; - - // Allocation can start immediately or when a Pod wants to use the - // resource. "WaitForFirstConsumer" is the default. - // +optional - optional string allocationMode = 3; } // ResourceClaimStatus tracks whether the resource has been allocated and what diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types.go b/staging/src/k8s.io/api/resource/v1alpha2/types.go index fa0f2cd707f6c..1915391209c88 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/types.go @@ -72,34 +72,8 @@ type ResourceClaimSpec struct { // The object must be in the same namespace as the ResourceClaim. // +optional ParametersRef *ResourceClaimParametersReference `json:"parametersRef,omitempty" protobuf:"bytes,2,opt,name=parametersRef"` - - // Allocation can start immediately or when a Pod wants to use the - // resource. "WaitForFirstConsumer" is the default. - // +optional - AllocationMode AllocationMode `json:"allocationMode,omitempty" protobuf:"bytes,3,opt,name=allocationMode"` } -// AllocationMode describes whether a ResourceClaim gets allocated immediately -// when it gets created (AllocationModeImmediate) or whether allocation is -// delayed until it is needed for a Pod -// (AllocationModeWaitForFirstConsumer). Other modes might get added in the -// future. -type AllocationMode string - -const ( - // When a ResourceClaim has AllocationModeWaitForFirstConsumer, allocation is - // delayed until a Pod gets scheduled that needs the ResourceClaim. The - // scheduler will consider all resource requirements of that Pod and - // trigger allocation for a node that fits the Pod. - AllocationModeWaitForFirstConsumer AllocationMode = "WaitForFirstConsumer" - - // When a ResourceClaim has AllocationModeImmediate, allocation starts - // as soon as the ResourceClaim gets created. This is done without - // considering the needs of Pods that will use the ResourceClaim - // because those Pods are not known yet. - AllocationModeImmediate AllocationMode = "Immediate" -) - // ResourceClaimStatus tracks whether the resource has been allocated and what // the resulting attributes are. type ResourceClaimStatus struct { diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go index 11f9ffbead2a1..7799e3ca68430 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go @@ -187,7 +187,6 @@ var map_ResourceClaimSpec = map[string]string{ "": "ResourceClaimSpec defines how a resource is to be allocated.", "resourceClassName": "ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.", "parametersRef": "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.", - "allocationMode": "Allocation can start immediately or when a Pod wants to use the resource. \"WaitForFirstConsumer\" is the default.", } func (ResourceClaimSpec) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json index 3b370ead83328..811ee6ee80c9b 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json @@ -49,8 +49,7 @@ "apiGroup": "apiGroupValue", "kind": "kindValue", "name": "nameValue" - }, - "allocationMode": "allocationModeValue" + } }, "status": { "driverName": "driverNameValue", diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb index b6709816fd46d14bce388c8133669e2431fee03d..9bb22e33b60428b528e440ce270f6eabe8da9f01 100644 GIT binary patch delta 23 fcmZqY_{2WJfN{@8!&F8_`^nQ89X7vVlx6||V!j8q delta 38 ucmeyw-p(<>fbrr+!&FAbkjc{-9r%P3b8_;N6H7Al^L+DDHeX;=VgdjIbqz8A diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml index 41079295502cf..d3e59e6a65b13 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml @@ -33,7 +33,6 @@ metadata: selfLink: selfLinkValue uid: uidValue spec: - allocationMode: allocationModeValue parametersRef: apiGroup: apiGroupValue kind: kindValue diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimTemplate.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimTemplate.json index b1e363fa351e4..060fa386e95e4 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimTemplate.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimTemplate.json @@ -92,8 +92,7 @@ "apiGroup": "apiGroupValue", "kind": "kindValue", "name": "nameValue" - }, - "allocationMode": "allocationModeValue" + } } } } \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimTemplate.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimTemplate.pb index b251edf164d8ed9fe858c88a6ac322b4a986166c..d8e02713279d6541bd285b1099307ee6b95cc0cf 100644 GIT binary patch delta 31 ncmcc1c7kn!1ydK><^_x?jEqY*&u2_!WVD~m%Iv_*pu_+Gq<9Ep delta 52 zcmX@Xc9(5}1=D=C%?lV)7#VkNp3j)d$QUx2mDxc;I58(DKRK}^Ge6HaKP5FRF{d1We4apdVbT==>Z%dP6qxqT2=nAdB^MD_R<)Jn zY8!Jwd?wNQVk4IuKYTo8OWH|XJ$}B#RTD1DU{KV-RGi|Gl~<+Q=r~Y7jQJr7V-nde z&AjEz^*$ILVd}7*>UXAUDn%5KSs^=mUFXFfVTh8OSfJ#&*E_H@Kn(RUmw;99gNgq{ zzCBOl#2((pUkfFz7L#G>ii=U8k~zpi=Ju{p5>aQGgbei%RudqOU5IJ6)&`id%wz6H zfja-EEBjf8qRYt;^K>0_wwkX!i%-1h7Ow1|BNHh`>4T8!z=Okw4hNR{ed*oC2}}xS}MuICBz{Qge#E zQ!9nIAxyB2Bqc7s#Js%xlEf0AAz*0%BtBS8mMIr!c4i*LVkw0CmEf+?;!iBdM0SV) zqXlCTe_CcE z0veW@lTsW~SpW$cD;6%M>RKm(;?g8|NPq)%3G-+u(>|2#xx`?>4ou|5#qbm?q{_t$ UObqTt`K1MrNXD9Wq!^SK0Om?2Jpcdz literal 0 HcmV?d00001 diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml new file mode 100644 index 0000000000000..855e06411e472 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml @@ -0,0 +1,73 @@ +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: + parametersRef: + apiGroup: apiGroupValue + kind: kindValue + name: nameValue + resourceClassName: resourceClassNameValue diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json new file mode 100644 index 0000000000000..811ee6ee80c9b --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json @@ -0,0 +1,139 @@ +{ + "kind": "ResourceClaim", + "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" + } + ] + }, + "spec": { + "resourceClassName": "resourceClassNameValue", + "parametersRef": { + "apiGroup": "apiGroupValue", + "kind": "kindValue", + "name": "nameValue" + } + }, + "status": { + "driverName": "driverNameValue", + "allocation": { + "resourceHandles": [ + { + "driverName": "driverNameValue", + "data": "dataValue", + "structuredData": { + "vendorClassParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + }, + "vendorClaimParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + }, + "nodeName": "nodeNameValue", + "results": [ + { + "vendorRequestParameters": { + "apiVersion": "example.com/v1", + "kind": "CustomType", + "spec": { + "replicas": 1 + }, + "status": { + "available": 1 + } + }, + "namedResources": { + "name": "nameValue" + } + } + ] + } + } + ], + "availableOnNodes": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" + ] + } + ] + } + ] + }, + "shareable": true + }, + "reservedFor": [ + { + "apiGroup": "apiGroupValue", + "resource": "resourceValue", + "name": "nameValue", + "uid": "uidValue" + } + ], + "deallocationRequested": true + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb new file mode 100644 index 0000000000000000000000000000000000000000..9bb22e33b60428b528e440ce270f6eabe8da9f01 GIT binary patch literal 1010 zcmcgr&x+GP7*D!|ZNHkf8$?P@GN53Q>Q;o(i?DkTRAgCX58fupx9gb6OqfZEwe$tN z`v9JO1bu>qz4!#;!LvSrP9~-)s|Qbe`{wuk|9!tnX4-)}FjA;xp(30lGd*GQ-eRBf z>=m8*-tiyLA*U?$KkvfV7IXzo@r3dM{k=03sA!JQYbfZKUY*gX3L&0Ge)^1w#Ab{; z1&ggUyDohQcn_~YDINAPk4T~0&f`YA5`US-;hkU*ab zA#<9WBGx_JdfS-S522edQ8f;l`N?LQ@qlJ*dyxC?%vFO^CMaib&49MfJ2!-DDHZe# zl?D91%*y@i@q^1{h}q%W#jl;AGd0DK$NI%GtC*R$p|x5c40RE1n6RWif*UnpXxDnf zt$zzVGv;F@i>zw@&#i*@Z5YIgEl@S7=R5GT^*7v&X-;je@s}3F5Uxl=1ep_jL(`1o zB$BC71-VN~8V!C}=v=1dE(X&XMr6Js3Ny|ks>ytRZBTQO!q}$bf--Y4j-_MmUr86@ z2^lxC92Zx#oCm$_4{{7ga2q-aE~|rim0n~epP;uWFJ6hu|IfIQ8$7tAgTSi=W4n+> N;mv=$=>`sQegm;BSaJXW literal 0 HcmV?d00001 diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml new file mode 100644 index 0000000000000..d3e59e6a65b13 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml @@ -0,0 +1,91 @@ +apiVersion: resource.k8s.io/v1alpha2 +kind: ResourceClaim +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: + parametersRef: + apiGroup: apiGroupValue + kind: kindValue + name: nameValue + resourceClassName: resourceClassNameValue +status: + allocation: + availableOnNodes: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + resourceHandles: + - data: dataValue + driverName: driverNameValue + structuredData: + nodeName: nodeNameValue + results: + - namedResources: + name: nameValue + vendorRequestParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + vendorClaimParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + vendorClassParameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + shareable: true + deallocationRequested: true + driverName: driverNameValue + reservedFor: + - apiGroup: apiGroupValue + name: nameValue + resource: resourceValue + uid: uidValue diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.json b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.json new file mode 100644 index 0000000000000..060fa386e95e4 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.json @@ -0,0 +1,98 @@ +{ + "kind": "ResourceClaimTemplate", + "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" + } + ] + }, + "spec": { + "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" + } + ] + }, + "spec": { + "resourceClassName": "resourceClassNameValue", + "parametersRef": { + "apiGroup": "apiGroupValue", + "kind": "kindValue", + "name": "nameValue" + } + } + } +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.pb new file mode 100644 index 0000000000000000000000000000000000000000..d8e02713279d6541bd285b1099307ee6b95cc0cf GIT binary patch literal 840 zcmd0{C}!X?0_wwkX!i%-1h7Ow1|BNHh`>4T8!z=Okw4hNR{ed*oC2}}xS}MuICBz{Qge#E zQ!9nIAxyB2Bqc7s#Js%xlEf0AAz*0%BtBS8mMIr!c4i*LVkw0CmEf+?;!iBdM0SV) zqXlCTe_CcE z0veW@lTsW~SpW$cD;6%M>RKm(;?g8|NPq)%3G-+u(>|2#xx`?>4ou|5#qbm?q{_t$ UObqTt`K1MrNXD9Wq!^SK0Om?2Jpcdz literal 0 HcmV?d00001 diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml new file mode 100644 index 0000000000000..855e06411e472 --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimTemplate.after_roundtrip.yaml @@ -0,0 +1,73 @@ +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: + parametersRef: + apiGroup: apiGroupValue + kind: kindValue + name: nameValue + resourceClassName: resourceClassNameValue diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index 0b04331415e72..27a4153f088ee 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -12392,9 +12392,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.resource.v1alpha2.ResourceClaimSpec map: fields: - - name: allocationMode - type: - scalar: string - name: parametersRef type: namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimspec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimspec.go index 2ecd95ec82d0d..4c34e672ed7c7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimspec.go @@ -18,16 +18,11 @@ limitations under the License. package v1alpha2 -import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" -) - // ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use // with apply. type ResourceClaimSpecApplyConfiguration struct { ResourceClassName *string `json:"resourceClassName,omitempty"` ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` - AllocationMode *resourcev1alpha2.AllocationMode `json:"allocationMode,omitempty"` } // ResourceClaimSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimSpec type for use with @@ -51,11 +46,3 @@ func (b *ResourceClaimSpecApplyConfiguration) WithParametersRef(value *ResourceC b.ParametersRef = value return b } - -// WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AllocationMode field is set to the value of the last call. -func (b *ResourceClaimSpecApplyConfiguration) WithAllocationMode(value resourcev1alpha2.AllocationMode) *ResourceClaimSpecApplyConfiguration { - b.AllocationMode = &value - return b -} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go index 473e613cfe679..05ea7875c1c3e 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go @@ -515,48 +515,7 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourcev1alpha2.R logger.V(5).Info("ResourceClaim is allocated") return nil } - if claim.Spec.AllocationMode != resourcev1alpha2.AllocationModeImmediate { - logger.V(5).Info("ResourceClaim waiting for first consumer") - return nil - } - - // We need the ResourceClass to determine whether we should allocate it. - class, err := ctrl.rcLister.Get(claim.Spec.ResourceClassName) - if err != nil { - return err - } - if class.DriverName != ctrl.name { - // Not ours *at the moment*. This can change, so requeue and - // check again. We could trigger a faster check when the - // ResourceClass changes, but that shouldn't occur much in - // practice and thus isn't worth the effort. - // - // We use exponential backoff because it is unlikely that - // the ResourceClass changes much. - logger.V(5).Info("ResourceClaim is handled by other driver", "driver", class.DriverName) - return errRequeue - } - - // Check parameters. Do not record event to Claim if its parameters are invalid, - // syncKey will record the error. - claimParameters, classParameters, err := ctrl.getParameters(ctx, claim, class, false) - if err != nil { - return err - } - - claimAllocations := claimAllocations{&ClaimAllocation{ - Claim: claim, - ClaimParameters: claimParameters, - Class: class, - ClassParameters: classParameters, - }} - - ctrl.allocateClaims(ctx, claimAllocations, "", nil) - - if claimAllocations[0].Error != nil { - return fmt.Errorf("allocate: %v", claimAllocations[0].Error) - } - + logger.V(5).Info("ResourceClaim waiting for first consumer") return nil } @@ -678,10 +637,6 @@ func (ctrl *controller) checkPodClaim(ctx context.Context, pod *v1.Pod, podClaim return nil, err } } - if claim.Spec.AllocationMode != resourcev1alpha2.AllocationModeWaitForFirstConsumer { - // Nothing to do for it as part of pod scheduling. - return nil, nil - } if claim.Status.Allocation != nil { // Already allocated, class and parameter are not needed and nothing // need to be done for the claim either. diff --git a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go index 850a1e7e6ab46..a7bb6cc911d7b 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go @@ -53,8 +53,6 @@ func TestController(t *testing.T) { } claim := createClaim(claimName, claimNamespace, className) otherClaim := createClaim(claimName, claimNamespace, otherClassName) - delayedClaim := claim.DeepCopy() - delayedClaim.Spec.AllocationMode = resourcev1alpha2.AllocationModeWaitForFirstConsumer podName := "pod" podKey := "schedulingCtx:default/pod" pod := createPod(podName, claimNamespace, nil) @@ -148,94 +146,6 @@ func TestController(t *testing.T) { classes: classes, claim: otherClaim, expectedClaim: otherClaim, - expectedError: errRequeue.Error(), // class might change - }, - // Immediate allocation: - // deletion time stamp set, our finalizer set, not allocated -> remove finalizer - "immediate-deleted-finalizer-removal": { - key: claimKey, - classes: classes, - claim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), - driver: m.expectDeallocate(map[string]error{claimName: nil}), - expectedClaim: withDeletionTimestamp(claim), - }, - // deletion time stamp set, our finalizer set, not allocated, stopping fails -> requeue - "immediate-deleted-finalizer-stop-failure": { - key: claimKey, - classes: classes, - claim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), - driver: m.expectDeallocate(map[string]error{claimName: errors.New("fake error")}), - expectedClaim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), - expectedError: "stop allocation: fake error", - }, - // deletion time stamp set, other finalizer set, not allocated -> do nothing - "immediate-deleted-finalizer-no-removal": { - key: claimKey, - classes: classes, - claim: withFinalizer(withDeletionTimestamp(claim), otherFinalizer), - expectedClaim: withFinalizer(withDeletionTimestamp(claim), otherFinalizer), - }, - // deletion time stamp set, finalizer set, allocated -> deallocate - "immediate-deleted-allocated": { - key: claimKey, - classes: classes, - claim: withAllocate(withDeletionTimestamp(claim)), - driver: m.expectDeallocate(map[string]error{claimName: nil}), - expectedClaim: withDeletionTimestamp(claim), - }, - // deletion time stamp set, finalizer set, allocated, deallocation fails -> requeue - "immediate-deleted-deallocate-failure": { - key: claimKey, - classes: classes, - claim: withAllocate(withDeletionTimestamp(claim)), - driver: m.expectDeallocate(map[string]error{claimName: errors.New("fake error")}), - expectedClaim: withAllocate(withDeletionTimestamp(claim)), - expectedError: "deallocate: fake error", - }, - // deletion time stamp set, finalizer not set -> do nothing - "immediate-deleted-no-finalizer": { - key: claimKey, - classes: classes, - claim: withDeletionTimestamp(claim), - expectedClaim: withDeletionTimestamp(claim), - }, - // not deleted, not allocated, no finalizer -> add finalizer, allocate - "immediate-do-allocation": { - key: claimKey, - classes: classes, - claim: claim, - driver: m.expectClassParameters(map[string]interface{}{className: 1}). - expectClaimParameters(map[string]interface{}{claimName: 2}). - expectAllocate(map[string]allocate{claimName: {allocResult: &allocation, allocErr: nil}}), - expectedClaim: withAllocate(claim), - }, - // not deleted, not allocated, finalizer -> allocate - "immediate-continue-allocation": { - key: claimKey, - classes: classes, - claim: withFinalizer(claim, ourFinalizer), - driver: m.expectClassParameters(map[string]interface{}{className: 1}). - expectClaimParameters(map[string]interface{}{claimName: 2}). - expectAllocate(map[string]allocate{claimName: {allocResult: &allocation, allocErr: nil}}), - expectedClaim: withAllocate(claim), - }, - // not deleted, not allocated, finalizer, fail allocation -> requeue - "immediate-fail-allocation": { - key: claimKey, - classes: classes, - claim: withFinalizer(claim, ourFinalizer), - driver: m.expectClassParameters(map[string]interface{}{className: 1}). - expectClaimParameters(map[string]interface{}{claimName: 2}). - expectAllocate(map[string]allocate{claimName: {allocErr: errors.New("fake error")}}), - expectedClaim: withFinalizer(claim, ourFinalizer), - expectedError: "allocate: fake error", - }, - // not deleted, allocated -> do nothing - "immediate-allocated-nop": { - key: claimKey, - classes: classes, - claim: withAllocate(claim), - expectedClaim: withAllocate(claim), }, // not deleted, reallocate -> deallocate @@ -257,62 +167,60 @@ func TestController(t *testing.T) { expectedError: "deallocate: fake error", }, - // Delayed allocation is similar in some cases, but not quite - // the same. // deletion time stamp set, our finalizer set, not allocated -> remove finalizer - "delayed-deleted-finalizer-removal": { + "deleted-finalizer-removal": { key: claimKey, classes: classes, - claim: withFinalizer(withDeletionTimestamp(delayedClaim), ourFinalizer), + claim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), driver: m.expectDeallocate(map[string]error{claimName: nil}), - expectedClaim: withDeletionTimestamp(delayedClaim), + expectedClaim: withDeletionTimestamp(claim), }, // deletion time stamp set, our finalizer set, not allocated, stopping fails -> requeue - "delayed-deleted-finalizer-stop-failure": { + "deleted-finalizer-stop-failure": { key: claimKey, classes: classes, - claim: withFinalizer(withDeletionTimestamp(delayedClaim), ourFinalizer), + claim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), driver: m.expectDeallocate(map[string]error{claimName: errors.New("fake error")}), - expectedClaim: withFinalizer(withDeletionTimestamp(delayedClaim), ourFinalizer), + expectedClaim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), expectedError: "stop allocation: fake error", }, // deletion time stamp set, other finalizer set, not allocated -> do nothing - "delayed-deleted-finalizer-no-removal": { + "deleted-finalizer-no-removal": { key: claimKey, classes: classes, - claim: withFinalizer(withDeletionTimestamp(delayedClaim), otherFinalizer), - expectedClaim: withFinalizer(withDeletionTimestamp(delayedClaim), otherFinalizer), + claim: withFinalizer(withDeletionTimestamp(claim), otherFinalizer), + expectedClaim: withFinalizer(withDeletionTimestamp(claim), otherFinalizer), }, // deletion time stamp set, finalizer set, allocated -> deallocate - "delayed-deleted-allocated": { + "deleted-allocated": { key: claimKey, classes: classes, - claim: withAllocate(withDeletionTimestamp(delayedClaim)), + claim: withAllocate(withDeletionTimestamp(claim)), driver: m.expectDeallocate(map[string]error{claimName: nil}), - expectedClaim: withDeletionTimestamp(delayedClaim), + expectedClaim: withDeletionTimestamp(claim), }, // deletion time stamp set, finalizer set, allocated, deallocation fails -> requeue - "delayed-deleted-deallocate-failure": { + "deleted-deallocate-failure": { key: claimKey, classes: classes, - claim: withAllocate(withDeletionTimestamp(delayedClaim)), + claim: withAllocate(withDeletionTimestamp(claim)), driver: m.expectDeallocate(map[string]error{claimName: errors.New("fake error")}), - expectedClaim: withAllocate(withDeletionTimestamp(delayedClaim)), + expectedClaim: withAllocate(withDeletionTimestamp(claim)), expectedError: "deallocate: fake error", }, // deletion time stamp set, finalizer not set -> do nothing - "delayed-deleted-no-finalizer": { + "deleted-no-finalizer": { key: claimKey, classes: classes, - claim: withDeletionTimestamp(delayedClaim), - expectedClaim: withDeletionTimestamp(delayedClaim), + claim: withDeletionTimestamp(claim), + expectedClaim: withDeletionTimestamp(claim), }, // waiting for first consumer -> do nothing - "delayed-pending": { + "pending": { key: claimKey, classes: classes, - claim: delayedClaim, - expectedClaim: delayedClaim, + claim: claim, + expectedClaim: claim, }, // pod with no claims -> shouldn't occur, check again anyway @@ -324,34 +232,23 @@ func TestController(t *testing.T) { expectedError: errPeriodic.Error(), }, - // pod with immediate allocation and selected node -> shouldn't occur, check again in case that claim changes - "pod-immediate": { + // no potential nodes -> shouldn't occur + "no-nodes": { key: podKey, + classes: classes, claim: claim, expectedClaim: claim, pod: podWithClaim, - schedulingCtx: withSelectedNode(podSchedulingCtx), - expectedSchedulingCtx: withSelectedNode(podSchedulingCtx), - expectedError: errPeriodic.Error(), - }, - - // pod with delayed allocation, no potential nodes -> shouldn't occur - "pod-delayed-no-nodes": { - key: podKey, - classes: classes, - claim: delayedClaim, - expectedClaim: delayedClaim, - pod: podWithClaim, schedulingCtx: podSchedulingCtx, expectedSchedulingCtx: podSchedulingCtx, }, - // pod with delayed allocation, potential nodes -> provide unsuitable nodes - "pod-delayed-info": { + // potential nodes -> provide unsuitable nodes + "info": { key: podKey, classes: classes, - claim: delayedClaim, - expectedClaim: delayedClaim, + claim: claim, + expectedClaim: claim, pod: podWithClaim, schedulingCtx: withPotentialNodes(podSchedulingCtx), driver: m.expectClassParameters(map[string]interface{}{className: 1}). @@ -361,23 +258,23 @@ func TestController(t *testing.T) { expectedError: errPeriodic.Error(), }, - // pod with delayed allocation, potential nodes, selected node, missing class -> failure - "pod-delayed-missing-class": { + // potential nodes, selected node, missing class -> failure + "missing-class": { key: podKey, - claim: delayedClaim, - expectedClaim: delayedClaim, + claim: claim, + expectedClaim: claim, pod: podWithClaim, schedulingCtx: withSelectedNode(withPotentialNodes(podSchedulingCtx)), expectedSchedulingCtx: withSelectedNode(withPotentialNodes(podSchedulingCtx)), expectedError: `pod claim my-pod-claim: resourceclass.resource.k8s.io "mock-class" not found`, }, - // pod with delayed allocation, potential nodes, selected node -> allocate - "pod-delayed-allocate": { + // potential nodes, selected node -> allocate + "allocate": { key: podKey, classes: classes, - claim: delayedClaim, - expectedClaim: withReservedFor(withAllocate(delayedClaim), pod), + claim: claim, + expectedClaim: withReservedFor(withAllocate(claim), pod), pod: podWithClaim, schedulingCtx: withSelectedNode(withPotentialNodes(podSchedulingCtx)), driver: m.expectClassParameters(map[string]interface{}{className: 1}). @@ -387,12 +284,12 @@ func TestController(t *testing.T) { expectedSchedulingCtx: withUnsuitableNodes(withSelectedNode(withPotentialNodes(podSchedulingCtx))), expectedError: errPeriodic.Error(), }, - // pod with delayed allocation, potential nodes, selected node, all unsuitable -> update unsuitable nodes - "pod-selected-is-potential-node": { + // potential nodes, selected node, all unsuitable -> update unsuitable nodes + "is-potential-node": { key: podKey, classes: classes, - claim: delayedClaim, - expectedClaim: delayedClaim, + claim: claim, + expectedClaim: claim, pod: podWithClaim, schedulingCtx: withPotentialNodes(withSelectedNode(withPotentialNodes(podSchedulingCtx))), driver: m.expectClassParameters(map[string]interface{}{className: 1}). @@ -401,12 +298,12 @@ func TestController(t *testing.T) { expectedSchedulingCtx: withSpecificUnsuitableNodes(withSelectedNode(withPotentialNodes(podSchedulingCtx)), potentialNodes), expectedError: errPeriodic.Error(), }, - // pod with delayed allocation, max potential nodes, other selected node, all unsuitable -> update unsuitable nodes with truncation at start - "pod-selected-is-potential-node-truncate-first": { + // max potential nodes, other selected node, all unsuitable -> update unsuitable nodes with truncation at start + "is-potential-node-truncate-first": { key: podKey, classes: classes, - claim: delayedClaim, - expectedClaim: delayedClaim, + claim: claim, + expectedClaim: claim, pod: podWithClaim, schedulingCtx: withSpecificPotentialNodes(withSelectedNode(withSpecificPotentialNodes(podSchedulingCtx, maxNodes)), maxNodes), driver: m.expectClassParameters(map[string]interface{}{className: 1}). @@ -415,12 +312,12 @@ func TestController(t *testing.T) { expectedSchedulingCtx: withSpecificUnsuitableNodes(withSelectedNode(withSpecificPotentialNodes(podSchedulingCtx, maxNodes)), append(maxNodes[1:], nodeName)), expectedError: errPeriodic.Error(), }, - // pod with delayed allocation, max potential nodes, other selected node, all unsuitable (but in reverse order) -> update unsuitable nodes with truncation at end + // max potential nodes, other selected node, all unsuitable (but in reverse order) -> update unsuitable nodes with truncation at end "pod-selected-is-potential-node-truncate-last": { key: podKey, classes: classes, - claim: delayedClaim, - expectedClaim: delayedClaim, + claim: claim, + expectedClaim: claim, pod: podWithClaim, schedulingCtx: withSpecificPotentialNodes(withSelectedNode(withSpecificPotentialNodes(podSchedulingCtx, maxNodes)), maxNodes), driver: m.expectClassParameters(map[string]interface{}{className: 1}). @@ -652,7 +549,6 @@ func createClaim(claimName, claimNamespace, className string) *resourcev1alpha2. }, Spec: resourcev1alpha2.ResourceClaimSpec{ ResourceClassName: className, - AllocationMode: resourcev1alpha2.AllocationModeImmediate, }, } } diff --git a/test/e2e/dra/dra.go b/test/e2e/dra/dra.go index 1c507699636b1..d9c0dd088de3d 100644 --- a/test/e2e/dra/dra.go +++ b/test/e2e/dra/dra.go @@ -27,7 +27,6 @@ import ( "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega" - "github.com/onsi/gomega/gcustom" "github.com/onsi/gomega/gstruct" v1 "k8s.io/api/core/v1" @@ -99,7 +98,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.By("waiting for container startup to fail") parameters := b.parameters() - pod, template := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, template := b.podInline() b.create(ctx, parameters, pod, template) @@ -125,7 +124,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // Pretend that the resource is allocated and reserved for some other entity. // Until the resourceclaim controller learns to remove reservations for // arbitrary types we can simply fake somthing here. - claim := b.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + claim := b.externalClaim() b.create(ctx, claim) claim, err := f.ClientSet.ResourceV1alpha2().ResourceClaims(f.Namespace.Name).Get(ctx, claim.Name, metav1.GetOptions{}) @@ -179,7 +178,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("must unprepare resources for force-deleted pod", func(ctx context.Context) { parameters := b.parameters() - claim := b.externalClaim(resourcev1alpha2.AllocationModeImmediate) + claim := b.externalClaim() pod := b.podExternal() zero := int64(0) pod.Spec.TerminationGracePeriodSeconds = &zero @@ -202,7 +201,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("must skip NodePrepareResource if not used by any container", func(ctx context.Context) { parameters := b.parameters() - pod, template := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, template := b.podInline() for i := range pod.Spec.Containers { pod.Spec.Containers[i].Resources.Claims = nil } @@ -218,10 +217,10 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // claimTests tries out several different combinations of pods with // claims, both inline and external. - claimTests := func(b *builder, driver *Driver, allocationMode resourcev1alpha2.AllocationMode) { + claimTests := func(b *builder, driver *Driver) { ginkgo.It("supports simple pod referencing inline resource claim", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() - pod, template := b.podInline(allocationMode) + pod, template := b.podInline() objects = append(objects, pod, template) b.create(ctx, objects...) @@ -230,7 +229,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("supports inline claim referenced by multiple containers", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() - pod, template := b.podInlineMultiple(allocationMode) + pod, template := b.podInlineMultiple() objects = append(objects, pod, template) b.create(ctx, objects...) @@ -240,7 +239,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("supports simple pod referencing external resource claim", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() pod := b.podExternal() - claim := b.externalClaim(allocationMode) + claim := b.externalClaim() objects = append(objects, claim, pod) b.create(ctx, objects...) @@ -252,7 +251,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, pod1 := b.podExternal() pod2 := b.podExternal() pod3 := b.podExternal() - claim := b.externalClaim(allocationMode) + claim := b.externalClaim() objects = append(objects, claim, pod1, pod2, pod3) b.create(ctx, objects...) @@ -266,7 +265,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, pod1 := b.podExternalMultiple() pod2 := b.podExternalMultiple() pod3 := b.podExternalMultiple() - claim := b.externalClaim(allocationMode) + claim := b.externalClaim() objects = append(objects, claim, pod1, pod2, pod3) b.create(ctx, objects...) @@ -277,7 +276,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("supports init containers", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() - pod, template := b.podInline(allocationMode) + pod, template := b.podInline() pod.Spec.InitContainers = []v1.Container{pod.Spec.Containers[0]} pod.Spec.InitContainers[0].Name += "-init" // This must succeed for the pod to start. @@ -291,7 +290,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("removes reservation from claim when pod is done", func(ctx context.Context) { objects, _ := b.flexibleParameters() pod := b.podExternal() - claim := b.externalClaim(allocationMode) + claim := b.externalClaim() pod.Spec.Containers[0].Command = []string{"true"} objects = append(objects, claim, pod) b.create(ctx, objects...) @@ -306,7 +305,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("deletes generated claims when pod is done", func(ctx context.Context) { objects, _ := b.flexibleParameters() - pod, template := b.podInline(allocationMode) + pod, template := b.podInline() pod.Spec.Containers[0].Command = []string{"true"} objects = append(objects, template, pod) b.create(ctx, objects...) @@ -325,7 +324,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("does not delete generated claims when pod is restarting", func(ctx context.Context) { objects, _ := b.flexibleParameters() - pod, template := b.podInline(allocationMode) + pod, template := b.podInline() pod.Spec.Containers[0].Command = []string{"sh", "-c", "sleep 1; exit 1"} pod.Spec.RestartPolicy = v1.RestartPolicyAlways objects = append(objects, template, pod) @@ -340,10 +339,10 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, } }) - ginkgo.It("must deallocate after use when using delayed allocation", func(ctx context.Context) { + ginkgo.It("must deallocate after use", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() pod := b.podExternal() - claim := b.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + claim := b.externalClaim() objects = append(objects, claim, pod) b.create(ctx, objects...) @@ -382,7 +381,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("supports claim and class parameters", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() - pod, template := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, template := b.podInline() objects = append(objects, pod, template) b.create(ctx, objects...) @@ -394,7 +393,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, objects, expectedEnv := b.flexibleParameters() pods := make([]*v1.Pod, numPods) for i := 0; i < numPods; i++ { - pod, template := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, template := b.podInline() pods[i] = pod objects = append(objects, pod, template) } @@ -420,7 +419,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("supports sharing a claim concurrently", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() - objects = append(objects, b.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer)) + objects = append(objects, b.externalClaim()) pods := make([]*v1.Pod, numPods) for i := 0; i < numPods; i++ { @@ -458,7 +457,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, objects[len(objects)-1].(*resourcev1alpha2.ResourceClaimParameters).Shareable = false } - objects = append(objects, b.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer)) + objects = append(objects, b.externalClaim()) pods := make([]*v1.Pod, numPods) for i := 0; i < numPods; i++ { @@ -490,7 +489,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("retries pod scheduling after creating resource class", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() - pod, template := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, template := b.podInline() class, err := f.ClientSet.ResourceV1alpha2().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) framework.ExpectNoError(err) template.Spec.Spec.ResourceClassName += "-b" @@ -509,7 +508,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("retries pod scheduling after updating resource class", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() - pod, template := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, template := b.podInline() // First modify the class so that it matches no nodes. class, err := f.ClientSet.ResourceV1alpha2().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) @@ -545,7 +544,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("runs a pod without a generated resource claim", func(ctx context.Context) { - pod, _ /* template */ := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, _ /* template */ := b.podInline() created := b.create(ctx, pod) pod = created[0].(*v1.Pod) @@ -562,13 +561,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(ctx, f.ClientSet, pod)) }) - ginkgo.Context("with delayed allocation", func() { - claimTests(b, driver, resourcev1alpha2.AllocationModeWaitForFirstConsumer) - }) - - ginkgo.Context("with immediate allocation", func() { - claimTests(b, driver, resourcev1alpha2.AllocationModeImmediate) - }) + claimTests(b, driver) } // These tests depend on having more than one node and a DRA driver controller. @@ -602,7 +595,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, } pod1 := createPod() pod2 := createPod() - claim := b.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + claim := b.externalClaim() b.create(ctx, parameters, claim, pod1, pod2) for _, pod := range []*v1.Pod{pod1, pod2} { @@ -623,7 +616,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, instance := f.UniqueName + "-test-app" pod := b.podExternal() pod.Labels[label] = instance - claim := b.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + claim := b.externalClaim() b.create(ctx, parameters, claim, pod) ginkgo.By("wait for test pod " + pod.Name + " to run") @@ -713,13 +706,13 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, parameters1 := b.parameters() parameters2 := b2.parameters() // Order is relevant here: each pod must be matched with its own claim. - pod1claim1 := b.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod1claim1 := b.externalClaim() pod1 := b.podExternal() - pod2claim1 := b2.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod2claim1 := b2.externalClaim() pod2 := b2.podExternal() // Add another claim to pod1. - pod1claim2 := b2.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod1claim2 := b2.externalClaim() pod1.Spec.ResourceClaims = append(pod1.Spec.ResourceClaims, v1.PodResourceClaim{ Name: "claim-other", @@ -800,51 +793,41 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, driver.parameterMode = parameterMode b := newBuilder(f, driver) - tests := func(allocationMode resourcev1alpha2.AllocationMode) { - ginkgo.It("uses all resources", func(ctx context.Context) { - objs, _ := b.flexibleParameters() - var pods []*v1.Pod - for i := 0; i < len(nodes.NodeNames); i++ { - pod, template := b.podInline(allocationMode) - pods = append(pods, pod) - objs = append(objs, pod, template) - } - b.create(ctx, objs...) + ginkgo.It("uses all resources", func(ctx context.Context) { + objs, _ := b.flexibleParameters() + var pods []*v1.Pod + for i := 0; i < len(nodes.NodeNames); i++ { + pod, template := b.podInline() + pods = append(pods, pod) + objs = append(objs, pod, template) + } + b.create(ctx, objs...) - for _, pod := range pods { - err := e2epod.WaitForPodRunningInNamespace(ctx, f.ClientSet, pod) - framework.ExpectNoError(err, "start pod") - } + for _, pod := range pods { + err := e2epod.WaitForPodRunningInNamespace(ctx, f.ClientSet, pod) + framework.ExpectNoError(err, "start pod") + } - // The pods all should run on different - // nodes because the maximum number of - // claims per node was limited to 1 for - // this test. - // - // We cannot know for sure why the pods - // ran on two different nodes (could - // also be a coincidence) but if they - // don't cover all nodes, then we have - // a problem. - used := make(map[string]*v1.Pod) - for _, pod := range pods { - pod, err := f.ClientSet.CoreV1().Pods(pod.Namespace).Get(ctx, pod.Name, metav1.GetOptions{}) - framework.ExpectNoError(err, "get pod") - nodeName := pod.Spec.NodeName - if other, ok := used[nodeName]; ok { - framework.Failf("Pod %s got started on the same node %s as pod %s although claim allocation should have been limited to one claim per node.", pod.Name, nodeName, other.Name) - } - used[nodeName] = pod + // The pods all should run on different + // nodes because the maximum number of + // claims per node was limited to 1 for + // this test. + // + // We cannot know for sure why the pods + // ran on two different nodes (could + // also be a coincidence) but if they + // don't cover all nodes, then we have + // a problem. + used := make(map[string]*v1.Pod) + for _, pod := range pods { + pod, err := f.ClientSet.CoreV1().Pods(pod.Namespace).Get(ctx, pod.Name, metav1.GetOptions{}) + framework.ExpectNoError(err, "get pod") + nodeName := pod.Spec.NodeName + if other, ok := used[nodeName]; ok { + framework.Failf("Pod %s got started on the same node %s as pod %s although claim allocation should have been limited to one claim per node.", pod.Name, nodeName, other.Name) } - }) - } - - ginkgo.Context("with delayed allocation", func() { - tests(resourcev1alpha2.AllocationModeWaitForFirstConsumer) - }) - - ginkgo.Context("with immediate allocation", func() { - tests(resourcev1alpha2.AllocationModeImmediate) + used[nodeName] = pod + } }) }) } @@ -872,7 +855,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("truncates the name of a generated resource claim", func(ctx context.Context) { parameters := b.parameters() - pod, template := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + pod, template := b.podInline() pod.Name = strings.Repeat("p", 63) pod.Spec.ResourceClaims[0].Name = strings.Repeat("c", 63) pod.Spec.Containers[0].Resources.Claims[0].Name = pod.Spec.ResourceClaims[0].Name @@ -948,118 +931,16 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // which is the goal for 1.31 to support version skew for kubelet. }) - ginkgo.Context("with local unshared resources", func() { - driver := NewDriver(f, nodes, func() app.Resources { - return app.Resources{ - NodeLocal: true, - MaxAllocations: 10, - Nodes: nodes.NodeNames, - } - }) - b := newBuilder(f, driver) - - // This test covers some special code paths in the scheduler: - // - Patching the ReservedFor during PreBind because in contrast - // to claims specifically allocated for a pod, here the claim - // gets allocated without reserving it. - // - Error handling when PreBind fails: multiple attempts to bind pods - // are started concurrently, only one attempt succeeds. - // - Removing a ReservedFor entry because the first inline claim gets - // reserved during allocation. - ginkgo.It("reuses an allocated immediate claim", func(ctx context.Context) { - objects := []klog.KMetadata{ - b.parameters(), - b.externalClaim(resourcev1alpha2.AllocationModeImmediate), - } - podExternal := b.podExternal() - - // Create many pods to increase the chance that the scheduler will - // try to bind two pods at the same time. - numPods := 5 - for i := 0; i < numPods; i++ { - podInline, claimTemplate := b.podInline(resourcev1alpha2.AllocationModeWaitForFirstConsumer) - podInline.Spec.Containers[0].Resources.Claims = append(podInline.Spec.Containers[0].Resources.Claims, podExternal.Spec.Containers[0].Resources.Claims[0]) - podInline.Spec.ResourceClaims = append(podInline.Spec.ResourceClaims, podExternal.Spec.ResourceClaims[0]) - objects = append(objects, claimTemplate, podInline) - } - b.create(ctx, objects...) - - var runningPod *v1.Pod - haveRunningPod := gcustom.MakeMatcher(func(pods []v1.Pod) (bool, error) { - numRunning := 0 - runningPod = nil - for _, pod := range pods { - if pod.Status.Phase == v1.PodRunning { - pod := pod // Don't keep pointer to loop variable... - runningPod = &pod - numRunning++ - } - } - return numRunning == 1, nil - }).WithTemplate("Expected one running Pod.\nGot instead:\n{{.FormattedActual}}") - - for i := 0; i < numPods; i++ { - ginkgo.By("waiting for exactly one pod to start") - runningPod = nil - gomega.Eventually(ctx, b.listTestPods).WithTimeout(f.Timeouts.PodStartSlow).Should(haveRunningPod) - - ginkgo.By("checking that no other pod gets scheduled") - havePendingPods := gcustom.MakeMatcher(func(pods []v1.Pod) (bool, error) { - numPending := 0 - for _, pod := range pods { - if pod.Status.Phase == v1.PodPending { - numPending++ - } - } - return numPending == numPods-1-i, nil - }).WithTemplate("Expected only one running Pod.\nGot instead:\n{{.FormattedActual}}") - gomega.Consistently(ctx, b.listTestPods).WithTimeout(time.Second).Should(havePendingPods) - - ginkgo.By(fmt.Sprintf("deleting pod %s", klog.KObj(runningPod))) - framework.ExpectNoError(b.f.ClientSet.CoreV1().Pods(b.f.Namespace.Name).Delete(ctx, runningPod.Name, metav1.DeleteOptions{})) - - ginkgo.By(fmt.Sprintf("waiting for pod %s to disappear", klog.KObj(runningPod))) - framework.ExpectNoError(e2epod.WaitForPodNotFoundInNamespace(ctx, b.f.ClientSet, runningPod.Name, runningPod.Namespace, f.Timeouts.PodDelete)) - } - }) - }) - - ginkgo.Context("with shared network resources", func() { - driver := NewDriver(f, nodes, networkResources) - b := newBuilder(f, driver) - - // This test complements "reuses an allocated immediate claim" above: - // because the claim can be shared, each PreBind attempt succeeds. - ginkgo.It("shares an allocated immediate claim", func(ctx context.Context) { - objects := []klog.KMetadata{ - b.parameters(), - b.externalClaim(resourcev1alpha2.AllocationModeImmediate), - } - // Create many pods to increase the chance that the scheduler will - // try to bind two pods at the same time. - numPods := 5 - pods := make([]*v1.Pod, numPods) - for i := 0; i < numPods; i++ { - pods[i] = b.podExternal() - objects = append(objects, pods[i]) - } - b.create(ctx, objects...) - - ginkgo.By("waiting all pods to start") - framework.ExpectNoError(e2epod.WaitForPodsRunning(ctx, b.f.ClientSet, f.Namespace.Name, numPods+len(nodes.NodeNames) /* driver(s) */, f.Timeouts.PodStartSlow)) - }) - }) - // kube-controller-manager can trigger delayed allocation for pods where the // node name was already selected when creating the pod. For immediate // allocation, the creator has to ensure that the node matches the claims. // This does not work for resource claim templates and only isn't // a problem here because the resource is network-attached and available // on all nodes. - preScheduledTests := func(b *builder, driver *Driver, allocationMode resourcev1alpha2.AllocationMode) { + preScheduledTests := func(b *builder, driver *Driver) { ginkgo.It("supports scheduled pod referencing inline resource claim", func(ctx context.Context) { parameters := b.parameters() - pod, template := b.podInline(allocationMode) + pod, template := b.podInline() pod.Spec.NodeName = nodes.NodeNames[0] b.create(ctx, parameters, pod, template) @@ -1068,7 +949,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("supports scheduled pod referencing external resource claim", func(ctx context.Context) { parameters := b.parameters() - claim := b.externalClaim(allocationMode) + claim := b.externalClaim() pod := b.podExternal() pod.Spec.NodeName = nodes.NodeNames[0] b.create(ctx, parameters, claim, pod) @@ -1077,29 +958,22 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) } - ginkgo.Context("with delayed allocation and setting ReservedFor", func() { + ginkgo.Context("with setting ReservedFor", func() { driver := NewDriver(f, nodes, networkResources) b := newBuilder(f, driver) - preScheduledTests(b, driver, resourcev1alpha2.AllocationModeWaitForFirstConsumer) - claimTests(b, driver, resourcev1alpha2.AllocationModeWaitForFirstConsumer) + preScheduledTests(b, driver) + claimTests(b, driver) }) - ginkgo.Context("with delayed allocation and not setting ReservedFor", func() { + ginkgo.Context("without setting ReservedFor", func() { driver := NewDriver(f, nodes, func() app.Resources { resources := networkResources() resources.DontSetReservedFor = true return resources }) b := newBuilder(f, driver) - preScheduledTests(b, driver, resourcev1alpha2.AllocationModeWaitForFirstConsumer) - claimTests(b, driver, resourcev1alpha2.AllocationModeWaitForFirstConsumer) - }) - - ginkgo.Context("with immediate allocation", func() { - driver := NewDriver(f, nodes, networkResources) - b := newBuilder(f, driver) - preScheduledTests(b, driver, resourcev1alpha2.AllocationModeImmediate) - claimTests(b, driver, resourcev1alpha2.AllocationModeImmediate) + preScheduledTests(b, driver) + claimTests(b, driver) }) }) @@ -1117,10 +991,10 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("work", func(ctx context.Context) { parameters1 := b1.parameters() parameters2 := b2.parameters() - claim1 := b1.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) - claim1b := b1.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) - claim2 := b2.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) - claim2b := b2.externalClaim(resourcev1alpha2.AllocationModeWaitForFirstConsumer) + claim1 := b1.externalClaim() + claim1b := b1.externalClaim() + claim2 := b2.externalClaim() + claim2b := b2.externalClaim() pod := b1.podExternal() for i, claim := range []*resourcev1alpha2.ResourceClaim{claim1b, claim2, claim2b} { claim := claim @@ -1206,7 +1080,7 @@ func (b *builder) nodeSelector() *v1.NodeSelector { // externalClaim returns external resource claim // that test pods can reference -func (b *builder) externalClaim(allocationMode resourcev1alpha2.AllocationMode) *resourcev1alpha2.ResourceClaim { +func (b *builder) externalClaim() *resourcev1alpha2.ResourceClaim { b.claimCounter++ name := "external-claim" + b.driver.NameSuffix // This is what podExternal expects. if b.claimCounter > 1 { @@ -1223,7 +1097,6 @@ func (b *builder) externalClaim(allocationMode resourcev1alpha2.AllocationMode) Kind: b.driver.claimParameterAPIKind, Name: b.parametersName(), }, - AllocationMode: allocationMode, }, } } @@ -1401,7 +1274,7 @@ func (b *builder) pod() *v1.Pod { } // makePodInline adds an inline resource claim with default class name and parameters. -func (b *builder) podInline(allocationMode resourcev1alpha2.AllocationMode) (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) { +func (b *builder) podInline() (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) { pod := b.pod() pod.Spec.Containers[0].Name = "with-resource" podClaimName := "my-inline-claim" @@ -1425,7 +1298,6 @@ func (b *builder) podInline(allocationMode resourcev1alpha2.AllocationMode) (*v1 Kind: b.driver.claimParameterAPIKind, Name: b.parametersName(), }, - AllocationMode: allocationMode, }, }, } @@ -1433,8 +1305,8 @@ func (b *builder) podInline(allocationMode resourcev1alpha2.AllocationMode) (*v1 } // podInlineMultiple returns a pod with inline resource claim referenced by 3 containers -func (b *builder) podInlineMultiple(allocationMode resourcev1alpha2.AllocationMode) (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) { - pod, template := b.podInline(allocationMode) +func (b *builder) podInlineMultiple() (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) { + pod, template := b.podInline() pod.Spec.Containers = append(pod.Spec.Containers, *pod.Spec.Containers[0].DeepCopy(), *pod.Spec.Containers[0].DeepCopy()) pod.Spec.Containers[1].Name = pod.Spec.Containers[1].Name + "-1" pod.Spec.Containers[2].Name = pod.Spec.Containers[1].Name + "-2" From fd6cb6ab9e274ef98606d6fcb343786237f99fe4 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 13 Jun 2024 18:43:17 +0200 Subject: [PATCH 09/20] DRA: remove "sharable" from claim allocation result Now all claims are shareable up to the limit imposed by the size of the "reserverFor" array. This is one of the agreed simplifications for 1.31. --- api/openapi-spec/swagger.json | 8 - ...is__resource.k8s.io__v1alpha2_openapi.json | 8 - pkg/apis/resource/types.go | 9 - .../v1alpha2/zz_generated.conversion.go | 4 - pkg/apis/resource/validation/validation.go | 3 - .../validation_resourceclaim_test.go | 20 -- .../resourceclaim/controller_test.go | 4 +- pkg/generated/openapi/zz_generated.openapi.go | 14 - .../dynamicresources/dynamicresources.go | 1 - .../dynamicresources/dynamicresources_test.go | 22 -- .../dynamicresources/structuredparameters.go | 1 - pkg/scheduler/testing/wrappers.go | 6 - .../api/resource/v1alpha2/generated.pb.go | 333 +++++++----------- .../api/resource/v1alpha2/generated.proto | 10 - .../src/k8s.io/api/resource/v1alpha2/types.go | 10 - .../v1alpha2/types_swagger_doc_generated.go | 2 - ...esource.k8s.io.v1alpha2.ResourceClaim.json | 3 +- .../resource.k8s.io.v1alpha2.ResourceClaim.pb | Bin 1010 -> 1008 bytes ...esource.k8s.io.v1alpha2.ResourceClaim.yaml | 1 - ...s.io.v1alpha2.ResourceClaimParameters.json | 1 - ...k8s.io.v1alpha2.ResourceClaimParameters.pb | Bin 705 -> 703 bytes ...s.io.v1alpha2.ResourceClaimParameters.yaml | 1 - ...1alpha2.ResourceClaim.after_roundtrip.json | 3 +- ....v1alpha2.ResourceClaim.after_roundtrip.pb | Bin 667 -> 665 bytes ...1alpha2.ResourceClaim.after_roundtrip.yaml | 1 - ...1alpha2.ResourceClaim.after_roundtrip.json | 3 +- ....v1alpha2.ResourceClaim.after_roundtrip.pb | Bin 1010 -> 1008 bytes ...1alpha2.ResourceClaim.after_roundtrip.yaml | 1 - ...sourceClaimParameters.after_roundtrip.json | 83 +++++ ...ResourceClaimParameters.after_roundtrip.pb | Bin 0 -> 703 bytes ...sourceClaimParameters.after_roundtrip.yaml | 57 +++ .../applyconfigurations/internal/internal.go | 6 - .../resource/v1alpha2/allocationresult.go | 9 - .../v1alpha2/resourceclaimparameters.go | 9 - .../resourceclaim/resourceclaim.go | 4 +- test/e2e/dra/dra.go | 64 +--- test/e2e/dra/test-driver/app/controller.go | 5 +- test/integration/scheduler_perf/dra.go | 1 - 38 files changed, 294 insertions(+), 413 deletions(-) create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.json create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.pb create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.yaml diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 9190889512242..605a7266251e2 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -14963,10 +14963,6 @@ }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "shareable": { - "description": "Shareable determines whether the resource supports more than one consumer at a time.", - "type": "boolean" } }, "type": "object" @@ -15391,10 +15387,6 @@ "metadata": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", "description": "Standard object metadata" - }, - "shareable": { - "description": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", - "type": "boolean" } }, "type": "object", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json index 9744839793281..1b0b07cafff87 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json @@ -109,10 +109,6 @@ }, "type": "array", "x-kubernetes-list-type": "atomic" - }, - "shareable": { - "description": "Shareable determines whether the resource supports more than one consumer at a time.", - "type": "boolean" } }, "type": "object" @@ -656,10 +652,6 @@ ], "default": {}, "description": "Standard object metadata" - }, - "shareable": { - "description": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", - "type": "boolean" } }, "type": "object", diff --git a/pkg/apis/resource/types.go b/pkg/apis/resource/types.go index 6a633c1782c44..b5091b1b36650 100644 --- a/pkg/apis/resource/types.go +++ b/pkg/apis/resource/types.go @@ -130,11 +130,6 @@ type AllocationResult struct { // everywhere. // +optional AvailableOnNodes *core.NodeSelector - - // Shareable determines whether the resource supports more - // than one consumer at a time. - // +optional - Shareable bool } // AllocationResultResourceHandlesMaxSize represents the maximum number of @@ -509,10 +504,6 @@ type ResourceClaimParameters struct { // to some unknown type. GeneratedFrom *ResourceClaimParametersReference - // Shareable indicates whether the allocated claim is meant to be shareable - // by multiple consumers at the same time. - Shareable bool - // DriverRequests describes all resources that are needed for the // allocated claim. A single claim may use resources coming from // different drivers. For each driver, this array has at most one diff --git a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go b/pkg/apis/resource/v1alpha2/zz_generated.conversion.go index 862ccac3ddd9c..9d618a0db6884 100644 --- a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/resource/v1alpha2/zz_generated.conversion.go @@ -497,7 +497,6 @@ func autoConvert_v1alpha2_AllocationResult_To_resource_AllocationResult(in *v1al out.ResourceHandles = nil } out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) - out.Shareable = in.Shareable return nil } @@ -519,7 +518,6 @@ func autoConvert_resource_AllocationResult_To_v1alpha2_AllocationResult(in *reso out.ResourceHandles = nil } out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) - out.Shareable = in.Shareable return nil } @@ -1025,7 +1023,6 @@ func Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in *resour func autoConvert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha2.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta out.GeneratedFrom = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - out.Shareable = in.Shareable if in.DriverRequests != nil { in, out := &in.DriverRequests, &out.DriverRequests *out = make([]resource.DriverRequests, len(*in)) @@ -1048,7 +1045,6 @@ func Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameter func autoConvert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha2.ResourceClaimParameters, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta out.GeneratedFrom = (*v1alpha2.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - out.Shareable = in.Shareable if in.DriverRequests != nil { in, out := &in.DriverRequests, &out.DriverRequests *out = make([]v1alpha2.DriverRequests, len(*in)) diff --git a/pkg/apis/resource/validation/validation.go b/pkg/apis/resource/validation/validation.go index 39db1d71b66c1..e1c9f6430f5e1 100644 --- a/pkg/apis/resource/validation/validation.go +++ b/pkg/apis/resource/validation/validation.go @@ -170,9 +170,6 @@ func ValidateClaimStatusUpdate(resourceClaim, oldClaim *resource.ResourceClaim) if resourceClaim.Status.Allocation == nil { allErrs = append(allErrs, field.Forbidden(fldPath.Child("reservedFor"), "may not be specified when `allocated` is not set")) } else { - if !resourceClaim.Status.Allocation.Shareable && len(resourceClaim.Status.ReservedFor) > 1 { - allErrs = append(allErrs, field.Forbidden(fldPath.Child("reservedFor"), "may not be reserved more than once")) - } // Items may be removed from ReservedFor while the claim is meant to be deallocated, // but not added. if resourceClaim.DeletionTimestamp != nil || resourceClaim.Status.DeallocationRequested { diff --git a/pkg/apis/resource/validation/validation_resourceclaim_test.go b/pkg/apis/resource/validation/validation_resourceclaim_test.go index 3836e0d9f4447..0f1062f9c40b1 100644 --- a/pkg/apis/resource/validation/validation_resourceclaim_test.go +++ b/pkg/apis/resource/validation/validation_resourceclaim_test.go @@ -336,7 +336,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) { } return handles }(), - Shareable: true, }, } @@ -584,25 +583,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) { return claim }, }, - "invalid-reserved-for-not-shared": { - wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "reservedFor"), "may not be reserved more than once")}, - oldClaim: func() *resource.ResourceClaim { - claim := validAllocatedClaim.DeepCopy() - claim.Status.Allocation.Shareable = false - return claim - }(), - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - for i := 0; i < 2; i++ { - claim.Status.ReservedFor = append(claim.Status.ReservedFor, - resource.ResourceClaimConsumerReference{ - Resource: "pods", - Name: fmt.Sprintf("foo-%d", i), - UID: types.UID(fmt.Sprintf("%d", i)), - }) - } - return claim - }, - }, "invalid-reserved-for-no-allocation": { wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "reservedFor"), "may not be specified when `allocated` is not set")}, oldClaim: validClaim, diff --git a/pkg/controller/resourceclaim/controller_test.go b/pkg/controller/resourceclaim/controller_test.go index d1a48afee6920..4e16a640dea3d 100644 --- a/pkg/controller/resourceclaim/controller_test.go +++ b/pkg/controller/resourceclaim/controller_test.go @@ -559,9 +559,7 @@ func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, func allocateClaim(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { claim = claim.DeepCopy() - claim.Status.Allocation = &resourcev1alpha2.AllocationResult{ - Shareable: true, - } + claim.Status.Allocation = &resourcev1alpha2.AllocationResult{} return claim } diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 4521169d37e29..beba83b00a856 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -45373,13 +45373,6 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCal Ref: ref("k8s.io/api/core/v1.NodeSelector"), }, }, - "shareable": { - SchemaProps: spec.SchemaProps{ - Description: "Shareable determines whether the resource supports more than one consumer at a time.", - Type: []string{"boolean"}, - Format: "", - }, - }, }, }, }, @@ -46186,13 +46179,6 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.Refer Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"), }, }, - "shareable": { - SchemaProps: spec.SchemaProps{ - Description: "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", - Type: []string{"boolean"}, - Format: "", - }, - }, "driverRequests": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go index 1bcc40cbf5ad8..46d8bb9bc20d5 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go @@ -1051,7 +1051,6 @@ 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) { defaultClaimParameters := resourcev1alpha2.ResourceClaimParameters{ - Shareable: true, DriverRequests: []resourcev1alpha2.DriverRequests{ { DriverName: class.DriverName, diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go index f06f1740d36f7..d7a87f946be70 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go @@ -105,10 +105,6 @@ var ( UID(podUID). PodResourceClaims(v1.PodResourceClaim{Name: resourceName, ResourceClaimName: &claimName}). Obj() - otherPodWithClaimName = st.MakePod().Name(podName).Namespace(namespace). - UID(podUID + "-II"). - PodResourceClaims(v1.PodResourceClaim{Name: resourceName, ResourceClaimName: &claimName}). - Obj() podWithClaimTemplate = st.MakePod().Name(podName).Namespace(namespace). UID(podUID). PodResourceClaims(v1.PodResourceClaim{Name: resourceName, ResourceClaimTemplateName: &claimName}). @@ -134,7 +130,6 @@ var ( claimParameters = st.MakeClaimParameters().Name(claimName).Namespace(namespace). NamedResourcesRequests("some-driver", "true"). - Shareable(true). GeneratedFrom(&resourcev1alpha2.ResourceClaimParametersReference{ Name: claimName, Kind: "ResourceClaimParameters", @@ -143,7 +138,6 @@ var ( Obj() claimParametersOtherNamespace = st.MakeClaimParameters().Name(claimName).Namespace(namespace+"-2"). NamedResourcesRequests("some-driver", "true"). - Shareable(true). GeneratedFrom(&resourcev1alpha2.ResourceClaimParametersReference{ Name: claimName, Kind: "ResourceClaimParameters", @@ -946,22 +940,6 @@ func TestPlugin(t *testing.T) { }, }, }, - "in-use-by-other": { - nodes: []*v1.Node{}, - pod: otherPodWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{inUseClaim}, - classes: []*resourcev1alpha2.ResourceClass{}, - schedulings: []*resourcev1alpha2.PodSchedulingContext{}, - prepare: prepare{}, - want: want{ - prefilter: result{ - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim in use`), - }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), - }, - }, - }, "wrong-topology": { // PostFilter tries to get the pod scheduleable by // deallocating the claim. diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go index 31a532331cc6a..62cc77788bd3d 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go @@ -188,7 +188,6 @@ func (c claimController) nodeIsSuitable(ctx context.Context, nodeName string, re func (c claimController) allocate(ctx context.Context, nodeName string, resources resources) (string, *resourcev1alpha2.AllocationResult, error) { allocation := &resourcev1alpha2.AllocationResult{ - Shareable: c.claimParameters.Shareable, AvailableOnNodes: &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{ { diff --git a/pkg/scheduler/testing/wrappers.go b/pkg/scheduler/testing/wrappers.go index 8c1abaf4d25fd..d8e651a5047bd 100644 --- a/pkg/scheduler/testing/wrappers.go +++ b/pkg/scheduler/testing/wrappers.go @@ -1003,7 +1003,6 @@ func (wrapper *ResourceClaimWrapper) Structured(nodeName string, namedResourcesI resourceHandle.StructuredData.Results = append(resourceHandle.StructuredData.Results, result) } } - wrapper.ResourceClaim.Status.Allocation.Shareable = true wrapper.ResourceClaim.Status.Allocation.AvailableOnNodes = &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{{ MatchExpressions: []v1.NodeSelectorRequirement{{ @@ -1172,11 +1171,6 @@ func (wrapper *ClaimParametersWrapper) Namespace(s string) *ClaimParametersWrapp return wrapper } -func (wrapper *ClaimParametersWrapper) Shareable(value bool) *ClaimParametersWrapper { - wrapper.ResourceClaimParameters.Shareable = value - return wrapper -} - func (wrapper *ClaimParametersWrapper) GeneratedFrom(value *resourcev1alpha2.ResourceClaimParametersReference) *ClaimParametersWrapper { wrapper.ResourceClaimParameters.GeneratedFrom = value return wrapper diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go b/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go index 72deb49412727..7ac0005432910 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go @@ -1331,146 +1331,145 @@ func init() { } var fileDescriptor_4312f5b44a31ec02 = []byte{ - // 2219 bytes of a gzipped FileDescriptorProto + // 2197 bytes of a gzipped FileDescriptorProto 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, 0xba, 0x23, 0x10, 0x11, 0x38, 0xbb, 0x8d, 0xd3, 0xa6, 0x51, 0x29, 0x48, 0x99, 0xb8, 0x09, 0x16, 0x6d, 0xea, - 0xbe, 0x25, 0x6e, 0x53, 0xfe, 0x3a, 0xde, 0x79, 0xb1, 0x87, 0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, 0x61, 0xf2, 0xd3, 0xe2, 0x4c, 0x15, 0x09, 0x8c, 0xa0, 0x04, 0x2b, 0xed, 0x97, + 0x05, 0x98, 0x97, 0x40, 0x8e, 0x21, 0x64, 0xde, 0x96, 0x42, 0xa6, 0x99, 0xe7, 0x98, 0x59, 0xb1, + 0x72, 0x2b, 0x11, 0x2b, 0x17, 0xf2, 0x10, 0x1d, 0x1d, 0x24, 0x03, 0x05, 0x6a, 0x12, 0xfc, 0x55, + 0xd7, 0x21, 0xbd, 0x8e, 0xdf, 0xb2, 0xde, 0xc6, 0x1e, 0xf6, 0x2b, 0xca, 0x06, 0x94, 0x8d, 0xae, + 0x75, 0xdd, 0x73, 0x7b, 0xdd, 0x64, 0xce, 0xbd, 0xb2, 0xb3, 0xcd, 0xd6, 0x51, 0x08, 0xe1, 0x43, + 0x07, 0x12, 0x31, 0x69, 0x67, 0xe2, 0x9d, 0xa0, 0x68, 0x11, 0x43, 0x88, 0xb0, 0x5a, 0x95, 0x32, + 0xab, 0x95, 0x0e, 0xc5, 0x9e, 0x65, 0x8a, 0x9a, 0xff, 0xa2, 0x00, 0x28, 0xde, 0xdc, 0xde, 0xfa, + 0x6f, 0xbf, 0xfe, 0x42, 0xd6, 0x3d, 0x92, 0xde, 0xef, 0x62, 0xd2, 0xb8, 0xb9, 0xbd, 0x85, 0x7c, + 0x64, 0xed, 0x63, 0x05, 0x4e, 0x49, 0x87, 0x3c, 0x86, 0x14, 0xb0, 0x23, 0xa7, 0x80, 0x2f, 0xe5, + 0x30, 0x59, 0x46, 0xec, 0x0f, 0x0a, 0xb0, 0x2a, 0xc1, 0xc5, 0xda, 0xf5, 0x27, 0xef, 0xd6, 0x1f, + 0xc0, 0x7c, 0x78, 0x1d, 0xbf, 0xe6, 0xb9, 0x1d, 0xe1, 0xdf, 0x5f, 0xcd, 0x71, 0xae, 0xd8, 0x85, + 0x23, 0x70, 0x2e, 0xde, 0xf2, 0x5d, 0x8f, 0x13, 0x46, 0x32, 0x1f,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0x42, 0x1a, 0xbe, 0xa4, 0xb3, 0x92, 0x1c, 0xb7, 0x74, 0xa4, 0xe3, + 0x7e, 0x17, 0xa6, 0x3d, 0x36, 0x10, 0xf1, 0xef, 0x05, 0x63, 0xbc, 0x3b, 0xa6, 0xff, 0xcf, 0x4d, + 0xd4, 0xab, 0xf1, 0x6f, 0x82, 0x02, 0xaa, 0xda, 0xaf, 0x15, 0x18, 0xca, 0x79, 0x13, 0x55, 0x2e, + 0x03, 0xa0, 0xfb, 0x7f, 0x2a, 0x34, 0x64, 0x11, 0xd3, 0x62, 0x8c, 0xa8, 0xae, 0x3f, 0x7c, 0x5c, + 0x9b, 0x7a, 0xf4, 0xb8, 0x36, 0xf5, 0xe9, 0xe3, 0xda, 0xd4, 0x83, 0x41, 0x4d, 0x79, 0x38, 0xa8, + 0x29, 0x8f, 0x06, 0x35, 0xe5, 0xd3, 0x41, 0x4d, 0xf9, 0xc7, 0xa0, 0xa6, 0x7c, 0xf4, 0xcf, 0xda, + 0xd4, 0x7b, 0x6b, 0xa3, 0xfe, 0xd9, 0xee, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x58, 0xf5, 0xc9, + 0x1c, 0x8b, 0x27, 0x00, 0x00, } func (m *AllocationResult) Marshal() (dAtA []byte, err error) { @@ -1493,14 +1492,6 @@ func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - i-- - if m.Shareable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 if m.AvailableOnNodes != nil { { size, err := m.AvailableOnNodes.MarshalToSizedBuffer(dAtA[:i]) @@ -2362,14 +2353,6 @@ func (m *ResourceClaimParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) dAtA[i] = 0x22 } } - i-- - if m.Shareable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 if m.GeneratedFrom != nil { { size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) @@ -3492,7 +3475,6 @@ func (m *AllocationResult) Size() (n int) { l = m.AvailableOnNodes.Size() n += 1 + l + sovGenerated(uint64(l)) } - n += 2 return n } @@ -3808,7 +3790,6 @@ func (m *ResourceClaimParameters) Size() (n int) { l = m.GeneratedFrom.Size() n += 1 + l + sovGenerated(uint64(l)) } - n += 2 if len(m.DriverRequests) > 0 { for _, e := range m.DriverRequests { l = e.Size() @@ -4217,7 +4198,6 @@ func (this *AllocationResult) String() string { s := strings.Join([]string{`&AllocationResult{`, `ResourceHandles:` + repeatedStringForResourceHandles + `,`, `AvailableOnNodes:` + strings.Replace(fmt.Sprintf("%v", this.AvailableOnNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, `}`, }, "") return s @@ -4475,7 +4455,6 @@ func (this *ResourceClaimParameters) String() string { s := strings.Join([]string{`&ResourceClaimParameters{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, - `Shareable:` + fmt.Sprintf("%v", this.Shareable) + `,`, `DriverRequests:` + repeatedStringForDriverRequests + `,`, `}`, }, "") @@ -4898,26 +4877,6 @@ func (m *AllocationResult) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Shareable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Shareable = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7330,26 +7289,6 @@ func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Shareable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Shareable = bool(v != 0) case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DriverRequests", wireType) diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto b/staging/src/k8s.io/api/resource/v1alpha2/generated.proto index 25727d8fe4afb..1037c64661f4c 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto +++ b/staging/src/k8s.io/api/resource/v1alpha2/generated.proto @@ -57,11 +57,6 @@ message AllocationResult { // everywhere. // +optional optional .k8s.io.api.core.v1.NodeSelector availableOnNodes = 2; - - // Shareable determines whether the resource supports more - // than one consumer at a time. - // +optional - optional bool shareable = 3; } // AllocationResultModel must have one and only one field set. @@ -334,11 +329,6 @@ message ResourceClaimParameters { // +optional optional ResourceClaimParametersReference generatedFrom = 2; - // Shareable indicates whether the allocated claim is meant to be shareable - // by multiple consumers at the same time. - // +optional - optional bool shareable = 3; - // DriverRequests describes all resources that are needed for the // allocated claim. A single claim may use resources coming from // different drivers. For each driver, this array has at most one diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types.go b/staging/src/k8s.io/api/resource/v1alpha2/types.go index 1915391209c88..ae293638246bb 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/types.go @@ -145,11 +145,6 @@ type AllocationResult struct { // everywhere. // +optional AvailableOnNodes *v1.NodeSelector `json:"availableOnNodes,omitempty" protobuf:"bytes,2,opt,name=availableOnNodes"` - - // Shareable determines whether the resource supports more - // than one consumer at a time. - // +optional - Shareable bool `json:"shareable,omitempty" protobuf:"varint,3,opt,name=shareable"` } // AllocationResultResourceHandlesMaxSize represents the maximum number of @@ -573,11 +568,6 @@ type ResourceClaimParameters struct { // +optional GeneratedFrom *ResourceClaimParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` - // Shareable indicates whether the allocated claim is meant to be shareable - // by multiple consumers at the same time. - // +optional - Shareable bool `json:"shareable,omitempty" protobuf:"bytes,3,opt,name=shareable"` - // DriverRequests describes all resources that are needed for the // allocated claim. A single claim may use resources coming from // different drivers. For each driver, this array has at most one diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go index 7799e3ca68430..3e27cd13d8aa9 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go @@ -31,7 +31,6 @@ var map_AllocationResult = map[string]string{ "": "AllocationResult contains attributes of an allocated resource.", "resourceHandles": "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.", "availableOnNodes": "This field will get set by the resource driver after it has allocated the resource to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere.", - "shareable": "Shareable determines whether the resource supports more than one consumer at a time.", } func (AllocationResult) SwaggerDoc() map[string]string { @@ -144,7 +143,6 @@ var map_ResourceClaimParameters = map[string]string{ "": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", "metadata": "Standard object metadata", "generatedFrom": "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.", - "shareable": "Shareable indicates whether the allocated claim is meant to be shareable by multiple consumers at the same time.", "driverRequests": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", } diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json index 811ee6ee80c9b..387ce389ddd79 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json @@ -123,8 +123,7 @@ ] } ] - }, - "shareable": true + } }, "reservedFor": [ { diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb index 9bb22e33b60428b528e440ce270f6eabe8da9f01..ab2a9cf9b78531d17490338b9569c2c68c528d73 100644 GIT binary patch delta 43 zcmeyw{(*gh0pqTXhRYa5C$n(zrxazDr55=m=B9=v=9H!io!I<_@g(Eq?abByX44Rm delta 46 zcmeys{)v5p0pp&HhRYa5r?PPIrxazDr55=m=B9=v=9H!io!b0{@gyUY1monb%+>&v CE)cH( diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml index d3e59e6a65b13..be2cc8e78cbbb 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml @@ -81,7 +81,6 @@ status: replicas: 1 status: available: 1 - shareable: true deallocationRequested: true driverName: driverNameValue reservedFor: diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json index aa801a2f5d26c..cef440794e80e 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json @@ -48,7 +48,6 @@ "kind": "kindValue", "name": "nameValue" }, - "shareable": true, "driverRequests": [ { "driverName": "driverNameValue", diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.pb index 33f11f498f18839aa542b918254547a7d25a895c..6a34b90e2f4fed1fcc388cfd402e492bcec5fa7c 100644 GIT binary patch delta 17 ZcmX@ex}SA|71Mu~jW%73lTR@I1OPnk2PXgk delta 20 ccmdnbdXRO36;mVYMw>21CJDyL#~6PC07aq(!vFvP diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml index 9af4582f12817..09f901e9ac3e0 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml @@ -55,4 +55,3 @@ metadata: resourceVersion: resourceVersionValue selfLink: selfLinkValue uid: uidValue -shareable: true diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json index 3f080977f6814..29283a7214a46 100644 --- a/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json +++ b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json @@ -83,8 +83,7 @@ ] } ] - }, - "shareable": true + } }, "reservedFor": [ { diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb index 6cf204607a8e27e0d5912fc8d896ef3086db4ddd..9ae171eb5caa96865bb104784f8cc86a36570964 100644 GIT binary patch delta 42 ycmbQuI+JyR0psJ1hRYa5_b_ttrxazDr55=m=B9=v=9H!i6-|D_STs3-$r=DYbq@ys delta 45 zcmbQqI-7NZ0prt+hRYa5_c3zurxazDr55=m=B9=v=9H!il}vuaSi~g3I602V8USfG B4<-Nr diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml index 008cd1f975cdf..4234746be09ee 100644 --- a/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml +++ b/staging/src/k8s.io/api/testdata/v1.29.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml @@ -55,7 +55,6 @@ status: resourceHandles: - data: dataValue driverName: driverNameValue - shareable: true deallocationRequested: true driverName: driverNameValue reservedFor: diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json index 811ee6ee80c9b..387ce389ddd79 100644 --- a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json +++ b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.json @@ -123,8 +123,7 @@ ] } ] - }, - "shareable": true + } }, "reservedFor": [ { diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.pb index 9bb22e33b60428b528e440ce270f6eabe8da9f01..ab2a9cf9b78531d17490338b9569c2c68c528d73 100644 GIT binary patch delta 43 zcmeyw{(*gh0pqTXhRYa5C$n(zrxazDr55=m=B9=v=9H!io!I<_@g(Eq?abByX44Rm delta 46 zcmeys{)v5p0pp&HhRYa5r?PPIrxazDr55=m=B9=v=9H!io!b0{@gyUY1monb%+>&v CE)cH( diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml index d3e59e6a65b13..be2cc8e78cbbb 100644 --- a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml +++ b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaim.after_roundtrip.yaml @@ -81,7 +81,6 @@ status: replicas: 1 status: available: 1 - shareable: true deallocationRequested: true driverName: driverNameValue reservedFor: diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.json b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.json new file mode 100644 index 0000000000000..cef440794e80e --- /dev/null +++ b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.json @@ -0,0 +1,83 @@ +{ + "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" + }, + "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" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceClaimParameters.after_roundtrip.pb new file mode 100644 index 0000000000000000000000000000000000000000..6a34b90e2f4fed1fcc388cfd402e492bcec5fa7c GIT binary patch literal 703 zcmcgq%}yIJ5Z*wfCT_{ksuF0Ambf4kAP6bS5e`VSsv=Zz=xug0fE%xE*}D-T$_wxo zoOy)40TS;}ao}9_1;VVi2?+Jf?ejO|Z@&5LQO^ZzpKVxlI=2aSMm^UNdS|=`(p*9} zTtEF+Ig%jK0a!>eL+iqMmHl2}bw%ehkU56!3sh(!!*2^JY7|vxASqk;nnQX1Rj84_ zu~o~((4+3>#r!jp7Fv0>_u;Tsd$@i2Rc!?)gzo;_6B@7|8>}uNM(MubB>Y%He Date: Fri, 14 Jun 2024 12:40:48 +0200 Subject: [PATCH 10/20] DRA: bump API v1alpha2 -> v1alpha3 Repeating the version in the import 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. --- api/api-rules/violation_exceptions.list | 14 +- api/discovery/aggregated_v2.json | 2 +- api/discovery/aggregated_v2beta1.json | 2 +- api/discovery/apis.json | 8 +- api/discovery/apis__resource.k8s.io.json | 8 +- ...n => apis__resource.k8s.io__v1alpha3.json} | 16 +- api/openapi-spec/swagger.json | 958 ++++----- api/openapi-spec/v3/api__v1_openapi.json | 6 +- ...issionregistration.k8s.io__v1_openapi.json | 6 +- ...registration.k8s.io__v1alpha1_openapi.json | 6 +- ...nregistration.k8s.io__v1beta1_openapi.json | 6 +- ...pis__apiextensions.k8s.io__v1_openapi.json | 6 +- ...s__apiregistration.k8s.io__v1_openapi.json | 6 +- .../v3/apis__apps__v1_openapi.json | 6 +- .../v3/apis__autoscaling__v1_openapi.json | 6 +- .../v3/apis__autoscaling__v2_openapi.json | 6 +- .../v3/apis__batch__v1_openapi.json | 6 +- ...apis__certificates.k8s.io__v1_openapi.json | 6 +- ...certificates.k8s.io__v1alpha1_openapi.json | 6 +- ...apis__coordination.k8s.io__v1_openapi.json | 6 +- .../apis__discovery.k8s.io__v1_openapi.json | 6 +- .../v3/apis__events.k8s.io__v1_openapi.json | 6 +- ...wcontrol.apiserver.k8s.io__v1_openapi.json | 6 +- ...rol.apiserver.k8s.io__v1beta3_openapi.json | 6 +- ...al.apiserver.k8s.io__v1alpha1_openapi.json | 6 +- .../apis__networking.k8s.io__v1_openapi.json | 6 +- ...s__networking.k8s.io__v1beta1_openapi.json | 6 +- .../v3/apis__node.k8s.io__v1_openapi.json | 6 +- .../v3/apis__policy__v1_openapi.json | 6 +- ...rbac.authorization.k8s.io__v1_openapi.json | 6 +- ...s__resource.k8s.io__v1alpha3_openapi.json} | 1374 ++++++------- .../apis__scheduling.k8s.io__v1_openapi.json | 6 +- .../v3/apis__storage.k8s.io__v1_openapi.json | 6 +- ...pis__storage.k8s.io__v1alpha1_openapi.json | 6 +- ...agemigration.k8s.io__v1alpha1_openapi.json | 6 +- cmd/kube-controller-manager/app/core.go | 6 +- hack/lib/init.sh | 2 +- pkg/apis/resource/install/install.go | 6 +- pkg/apis/resource/install/install_test.go | 4 +- .../v1alpha2/zz_generated.conversion.go | 1743 ----------------- .../{v1alpha2 => v1alpha3}/conversion.go | 2 +- .../{v1alpha2 => v1alpha3}/defaults.go | 2 +- .../resource/{v1alpha2 => v1alpha3}/doc.go | 8 +- .../{v1alpha2 => v1alpha3}/register.go | 8 +- .../v1alpha3/zz_generated.conversion.go | 1743 +++++++++++++++++ .../zz_generated.defaults.go | 2 +- pkg/controller/resourceclaim/controller.go | 62 +- .../resourceclaim/controller_test.go | 172 +- pkg/controlplane/apiserver/aggregator.go | 2 +- pkg/controlplane/instance.go | 4 +- pkg/generated/openapi/zz_generated.openapi.go | 324 +-- pkg/kubeapiserver/authorizer/config.go | 6 +- pkg/kubectl/.import-restrictions | 2 +- pkg/kubelet/cm/dra/claiminfo.go | 6 +- pkg/kubelet/cm/dra/claiminfo_test.go | 28 +- pkg/kubelet/cm/dra/manager.go | 4 +- pkg/kubelet/cm/dra/manager_test.go | 138 +- pkg/kubelet/cm/dra/plugin/plugin.go | 2 +- pkg/kubelet/cm/dra/state/state_checkpoint.go | 4 +- .../cm/dra/state/state_checkpoint_test.go | 14 +- .../cm/dra/state/zz_generated.deepcopy.go | 4 +- pkg/printers/internalversion/printers.go | 18 +- .../resource/podschedulingcontext/strategy.go | 4 +- .../resource/resourceclaim/strategy.go | 4 +- .../resource/rest/storage_resource.go | 22 +- pkg/scheduler/eventhandlers.go | 8 +- pkg/scheduler/eventhandlers_test.go | 14 +- .../dynamicresources/dynamicresources.go | 158 +- .../dynamicresources/dynamicresources_test.go | 340 ++-- .../namedresources/namedresourcesmodel.go | 2 +- .../namedresourcesmodel_test.go | 2 +- .../dynamicresources/structuredparameters.go | 34 +- .../structuredparameters_test.go | 2 +- pkg/scheduler/scheduler.go | 2 +- pkg/scheduler/testing/wrappers.go | 80 +- .../auth/authorizer/node/graph_populator.go | 10 +- .../authorizer/node/node_authorizer_test.go | 10 +- .../resource/{v1alpha2 => v1alpha3}/doc.go | 4 +- .../{v1alpha2 => v1alpha3}/generated.pb.go | 444 ++--- .../{v1alpha2 => v1alpha3}/generated.proto | 4 +- .../{v1alpha2 => v1alpha3}/namedresources.go | 2 +- .../{v1alpha2 => v1alpha3}/register.go | 4 +- .../resource/{v1alpha2 => v1alpha3}/types.go | 2 +- .../types_swagger_doc_generated.go | 2 +- .../zz_generated.deepcopy.go | 2 +- staging/src/k8s.io/api/roundtrip_test.go | 4 +- ...k8s.io.v1alpha3.PodSchedulingContext.json} | 2 +- ...e.k8s.io.v1alpha3.PodSchedulingContext.pb} | Bin 495 -> 495 bytes ...k8s.io.v1alpha3.PodSchedulingContext.yaml} | 2 +- ...source.k8s.io.v1alpha3.ResourceClaim.json} | 2 +- ...resource.k8s.io.v1alpha3.ResourceClaim.pb} | Bin 1008 -> 1008 bytes ...source.k8s.io.v1alpha3.ResourceClaim.yaml} | 2 +- ....io.v1alpha3.ResourceClaimParameters.json} | 2 +- ...8s.io.v1alpha3.ResourceClaimParameters.pb} | Bin 703 -> 703 bytes ....io.v1alpha3.ResourceClaimParameters.yaml} | 2 +- ...8s.io.v1alpha3.ResourceClaimTemplate.json} | 2 +- ....k8s.io.v1alpha3.ResourceClaimTemplate.pb} | Bin 840 -> 840 bytes ...8s.io.v1alpha3.ResourceClaimTemplate.yaml} | 2 +- ...source.k8s.io.v1alpha3.ResourceClass.json} | 2 +- ...resource.k8s.io.v1alpha3.ResourceClass.pb} | Bin 567 -> 567 bytes ...source.k8s.io.v1alpha3.ResourceClass.yaml} | 2 +- ....io.v1alpha3.ResourceClassParameters.json} | 2 +- ...8s.io.v1alpha3.ResourceClassParameters.pb} | Bin 633 -> 633 bytes ....io.v1alpha3.ResourceClassParameters.yaml} | 2 +- ...source.k8s.io.v1alpha3.ResourceSlice.json} | 2 +- ...resource.k8s.io.v1alpha3.ResourceSlice.pb} | Bin 529 -> 529 bytes ...source.k8s.io.v1alpha3.ResourceSlice.yaml} | 2 +- ...n => resource.k8s.io.v1alpha3.Status.json} | 2 +- ....pb => resource.k8s.io.v1alpha3.Status.pb} | Bin 234 -> 234 bytes ...l => resource.k8s.io.v1alpha3.Status.yaml} | 2 +- .../swagger-with-shared-parameters.json | 98 +- .../applyconfigurations/internal/internal.go | 120 +- .../allocationresult.go | 2 +- .../allocationresultmodel.go | 2 +- .../driverallocationresult.go | 2 +- .../{v1alpha2 => v1alpha3}/driverrequests.go | 2 +- .../namedresourcesallocationresult.go | 2 +- .../namedresourcesattribute.go | 2 +- .../namedresourcesattributevalue.go | 2 +- .../namedresourcesfilter.go | 2 +- .../namedresourcesinstance.go | 2 +- .../namedresourcesintslice.go | 2 +- .../namedresourcesrequest.go | 2 +- .../namedresourcesresources.go | 2 +- .../namedresourcesstringslice.go | 2 +- .../podschedulingcontext.go | 16 +- .../podschedulingcontextspec.go | 2 +- .../podschedulingcontextstatus.go | 2 +- .../{v1alpha2 => v1alpha3}/resourceclaim.go | 16 +- .../resourceclaimconsumerreference.go | 2 +- .../resourceclaimparameters.go | 16 +- .../resourceclaimparametersreference.go | 2 +- .../resourceclaimschedulingstatus.go | 2 +- .../resourceclaimspec.go | 2 +- .../resourceclaimstatus.go | 2 +- .../resourceclaimtemplate.go | 16 +- .../resourceclaimtemplatespec.go | 2 +- .../{v1alpha2 => v1alpha3}/resourceclass.go | 16 +- .../resourceclassparameters.go | 16 +- .../resourceclassparametersreference.go | 2 +- .../{v1alpha2 => v1alpha3}/resourcefilter.go | 2 +- .../resourcefiltermodel.go | 2 +- .../{v1alpha2 => v1alpha3}/resourcehandle.go | 2 +- .../{v1alpha2 => v1alpha3}/resourcemodel.go | 2 +- .../{v1alpha2 => v1alpha3}/resourcerequest.go | 2 +- .../resourcerequestmodel.go | 2 +- .../{v1alpha2 => v1alpha3}/resourceslice.go | 16 +- .../structuredresourcehandle.go | 2 +- .../vendorparameters.go | 2 +- .../client-go/applyconfigurations/utils.go | 154 +- .../src/k8s.io/client-go/informers/generic.go | 32 +- .../client-go/informers/resource/interface.go | 12 +- .../{v1alpha2 => v1alpha3}/interface.go | 2 +- .../podschedulingcontext.go | 20 +- .../{v1alpha2 => v1alpha3}/resourceclaim.go | 20 +- .../resourceclaimparameters.go | 20 +- .../resourceclaimtemplate.go | 20 +- .../{v1alpha2 => v1alpha3}/resourceclass.go | 20 +- .../resourceclassparameters.go | 20 +- .../{v1alpha2 => v1alpha3}/resourceslice.go | 20 +- .../k8s.io/client-go/kubernetes/clientset.go | 16 +- .../kubernetes/fake/clientset_generated.go | 10 +- .../client-go/kubernetes/fake/register.go | 4 +- .../client-go/kubernetes/scheme/register.go | 4 +- .../resource/{v1alpha2 => v1alpha3}/doc.go | 2 +- .../{v1alpha2 => v1alpha3}/fake/doc.go | 0 .../fake/fake_podschedulingcontext.go | 64 +- .../fake/fake_resource_client.go | 20 +- .../fake/fake_resourceclaim.go | 64 +- .../fake/fake_resourceclaimparameters.go | 52 +- .../fake/fake_resourceclaimtemplate.go | 52 +- .../fake/fake_resourceclass.go | 52 +- .../fake/fake_resourceclassparameters.go | 52 +- .../fake/fake_resourceslice.go | 52 +- .../generated_expansion.go | 2 +- .../podschedulingcontext.go | 32 +- .../{v1alpha2 => v1alpha3}/resource_client.go | 48 +- .../{v1alpha2 => v1alpha3}/resourceclaim.go | 32 +- .../resourceclaimparameters.go | 28 +- .../resourceclaimtemplate.go | 28 +- .../{v1alpha2 => v1alpha3}/resourceclass.go | 28 +- .../resourceclassparameters.go | 28 +- .../{v1alpha2 => v1alpha3}/resourceslice.go | 28 +- .../expansion_generated.go | 2 +- .../podschedulingcontext.go | 18 +- .../{v1alpha2 => v1alpha3}/resourceclaim.go | 18 +- .../resourceclaimparameters.go | 18 +- .../resourceclaimtemplate.go | 18 +- .../{v1alpha2 => v1alpha3}/resourceclass.go | 12 +- .../resourceclassparameters.go | 18 +- .../{v1alpha2 => v1alpha3}/resourceslice.go | 12 +- .../controller/controller.go | 66 +- .../controller/controller_test.go | 86 +- .../kubeletplugin/draplugin.go | 2 +- .../resourceclaim/resourceclaim.go | 10 +- .../resourceclaim/resourceclaim_test.go | 10 +- .../resourceslice/noderesources.go | 10 +- .../structured/namedresources/cel/compile.go | 2 +- .../namedresources/cel/compile_test.go | 2 +- test/e2e/dra/deploy.go | 20 +- test/e2e/dra/dra.go | 130 +- test/e2e/dra/kind.yaml | 2 +- test/e2e/dra/test-driver/README.md | 2 +- test/e2e/dra/test-driver/app/controller.go | 16 +- test/e2e/dra/test-driver/app/kubeletplugin.go | 4 +- .../deploy/example/broken-resourceclass.yaml | 2 +- .../deploy/example/pod-external.yaml | 2 +- .../deploy/example/pod-inline-multiple.yaml | 2 +- .../deploy/example/pod-inline.yaml | 2 +- .../deploy/example/pod-shared.yaml | 2 +- .../deploy/example/resourceclaim.yaml | 2 +- .../deploy/example/resourceclass.yaml | 2 +- test/e2e_node/dra_test.go | 44 +- .../apiserver/apply/reset_fields_test.go | 12 +- .../apiserver/apply/status_test.go | 4 +- test/integration/auth/node_test.go | 22 +- test/integration/etcd/data.go | 16 +- test/integration/scheduler/scheduler_test.go | 22 +- .../config/dra/resourceclaim-structured.yaml | 2 +- .../config/dra/resourceclaim.yaml | 2 +- .../config/dra/resourceclaimparameters.yaml | 2 +- .../dra/resourceclaimtemplate-structured.yaml | 2 +- .../config/dra/resourceclaimtemplate.yaml | 2 +- .../config/dra/resourceclass-structured.yaml | 2 +- .../config/dra/resourceclass.yaml | 2 +- test/integration/scheduler_perf/dra.go | 20 +- test/integration/scheduler_perf/util.go | 2 +- test/integration/util/util.go | 10 +- 228 files changed, 5069 insertions(+), 5069 deletions(-) rename api/discovery/{apis__resource.k8s.io__v1alpha2.json => apis__resource.k8s.io__v1alpha3.json} (88%) rename api/openapi-spec/v3/{apis__resource.k8s.io__v1alpha2_openapi.json => apis__resource.k8s.io__v1alpha3_openapi.json} (95%) delete mode 100644 pkg/apis/resource/v1alpha2/zz_generated.conversion.go rename pkg/apis/resource/{v1alpha2 => v1alpha3}/conversion.go (98%) rename pkg/apis/resource/{v1alpha2 => v1alpha3}/defaults.go (97%) rename pkg/apis/resource/{v1alpha2 => v1alpha3}/doc.go (78%) rename pkg/apis/resource/{v1alpha2 => v1alpha3}/register.go (92%) create mode 100644 pkg/apis/resource/v1alpha3/zz_generated.conversion.go rename pkg/apis/resource/{v1alpha2 => v1alpha3}/zz_generated.defaults.go (98%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/doc.go (84%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/generated.pb.go (93%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/generated.proto (99%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/namedresources.go (99%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/register.go (98%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/types.go (99%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/types_swagger_doc_generated.go (99%) rename staging/src/k8s.io/api/resource/{v1alpha2 => v1alpha3}/zz_generated.deepcopy.go (99%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.PodSchedulingContext.json => resource.k8s.io.v1alpha3.PodSchedulingContext.json} (96%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.PodSchedulingContext.pb => resource.k8s.io.v1alpha3.PodSchedulingContext.pb} (89%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.PodSchedulingContext.yaml => resource.k8s.io.v1alpha3.PodSchedulingContext.yaml} (96%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaim.json => resource.k8s.io.v1alpha3.ResourceClaim.json} (98%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaim.pb => resource.k8s.io.v1alpha3.ResourceClaim.pb} (95%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaim.yaml => resource.k8s.io.v1alpha3.ResourceClaim.yaml} (98%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaimParameters.json => resource.k8s.io.v1alpha3.ResourceClaimParameters.json} (97%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaimParameters.pb => resource.k8s.io.v1alpha3.ResourceClaimParameters.pb} (92%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaimParameters.yaml => resource.k8s.io.v1alpha3.ResourceClaimParameters.yaml} (97%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaimTemplate.json => resource.k8s.io.v1alpha3.ResourceClaimTemplate.json} (98%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaimTemplate.pb => resource.k8s.io.v1alpha3.ResourceClaimTemplate.pb} (93%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClaimTemplate.yaml => resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml} (98%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClass.json => resource.k8s.io.v1alpha3.ResourceClass.json} (97%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClass.pb => resource.k8s.io.v1alpha3.ResourceClass.pb} (92%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClass.yaml => resource.k8s.io.v1alpha3.ResourceClass.yaml} (97%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClassParameters.json => resource.k8s.io.v1alpha3.ResourceClassParameters.json} (97%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClassParameters.pb => resource.k8s.io.v1alpha3.ResourceClassParameters.pb} (91%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceClassParameters.yaml => resource.k8s.io.v1alpha3.ResourceClassParameters.yaml} (97%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceSlice.json => resource.k8s.io.v1alpha3.ResourceSlice.json} (97%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceSlice.pb => resource.k8s.io.v1alpha3.ResourceSlice.pb} (91%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.ResourceSlice.yaml => resource.k8s.io.v1alpha3.ResourceSlice.yaml} (96%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.Status.json => resource.k8s.io.v1alpha3.Status.json} (92%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.Status.pb => resource.k8s.io.v1alpha3.Status.pb} (84%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha2.Status.yaml => resource.k8s.io.v1alpha3.Status.yaml} (91%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/allocationresult.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/allocationresultmodel.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/driverallocationresult.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/driverrequests.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesallocationresult.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesattribute.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesattributevalue.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesfilter.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesinstance.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesintslice.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesrequest.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesresources.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/namedresourcesstringslice.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/podschedulingcontext.go (96%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/podschedulingcontextspec.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/podschedulingcontextstatus.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaim.go (96%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimconsumerreference.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimparameters.go (97%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimparametersreference.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimschedulingstatus.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimspec.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimstatus.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimtemplate.go (96%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclaimtemplatespec.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclass.go (97%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclassparameters.go (97%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceclassparametersreference.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourcefilter.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourcefiltermodel.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourcehandle.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourcemodel.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourcerequest.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourcerequestmodel.go (98%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/resourceslice.go (96%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/structuredresourcehandle.go (99%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/{v1alpha2 => v1alpha3}/vendorparameters.go (99%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/interface.go (99%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/podschedulingcontext.go (86%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/resourceclaim.go (85%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/resourceclaimparameters.go (86%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/resourceclaimtemplate.go (86%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/resourceclass.go (85%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/resourceclassparameters.go (86%) rename staging/src/k8s.io/client-go/informers/resource/{v1alpha2 => v1alpha3}/resourceslice.go (85%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/doc.go (97%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/doc.go (100%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_podschedulingcontext.go (74%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_resource_client.go (59%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_resourceclaim.go (75%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_resourceclaimparameters.go (75%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_resourceclaimtemplate.go (75%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_resourceclass.go (76%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_resourceclassparameters.go (75%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/fake/fake_resourceslice.go (75%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/generated_expansion.go (98%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/podschedulingcontext.go (66%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/resource_client.go (69%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/resourceclaim.go (63%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/resourceclaimparameters.go (66%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/resourceclaimtemplate.go (67%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/resourceclass.go (65%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/resourceclassparameters.go (66%) rename staging/src/k8s.io/client-go/kubernetes/typed/resource/{v1alpha2 => v1alpha3}/resourceslice.go (65%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/expansion_generated.go (99%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/podschedulingcontext.go (81%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/resourceclaim.go (81%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/resourceclaimparameters.go (82%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/resourceclaimtemplate.go (82%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/resourceclass.go (80%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/resourceclassparameters.go (82%) rename staging/src/k8s.io/client-go/listers/resource/{v1alpha2 => v1alpha3}/resourceslice.go (80%) diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index af559e0e0333c..4940563397f13 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -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/networking/v1alpha1,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/v1alpha2,NamedResourcesAttributeValue,IntSliceValue -API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,IntValue -API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,QuantityValue -API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,StringSliceValue -API rule violation: names_match,k8s.io/api/resource/v1alpha2,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,BoolValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,IntSliceValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,IntValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,QuantityValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,StringSliceValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,StringValue +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,Schema API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XEmbeddedResource diff --git a/api/discovery/aggregated_v2.json b/api/discovery/aggregated_v2.json index b710275edd8a3..a142fb394c17a 100644 --- a/api/discovery/aggregated_v2.json +++ b/api/discovery/aggregated_v2.json @@ -2062,7 +2062,7 @@ ] } ], - "version": "v1alpha2" + "version": "v1alpha3" } ] }, diff --git a/api/discovery/aggregated_v2beta1.json b/api/discovery/aggregated_v2beta1.json index f4ee9917bc541..2f703476bccc6 100644 --- a/api/discovery/aggregated_v2beta1.json +++ b/api/discovery/aggregated_v2beta1.json @@ -2062,7 +2062,7 @@ ] } ], - "version": "v1alpha2" + "version": "v1alpha3" } ] }, diff --git a/api/discovery/apis.json b/api/discovery/apis.json index 1a4d60b3ad85c..725b3fc350b4e 100644 --- a/api/discovery/apis.json +++ b/api/discovery/apis.json @@ -300,13 +300,13 @@ { "name": "resource.k8s.io", "preferredVersion": { - "groupVersion": "resource.k8s.io/v1alpha2", - "version": "v1alpha2" + "groupVersion": "resource.k8s.io/v1alpha3", + "version": "v1alpha3" }, "versions": [ { - "groupVersion": "resource.k8s.io/v1alpha2", - "version": "v1alpha2" + "groupVersion": "resource.k8s.io/v1alpha3", + "version": "v1alpha3" } ] }, diff --git a/api/discovery/apis__resource.k8s.io.json b/api/discovery/apis__resource.k8s.io.json index 5dd7e0820e537..85333d70e425e 100644 --- a/api/discovery/apis__resource.k8s.io.json +++ b/api/discovery/apis__resource.k8s.io.json @@ -3,13 +3,13 @@ "kind": "APIGroup", "name": "resource.k8s.io", "preferredVersion": { - "groupVersion": "resource.k8s.io/v1alpha2", - "version": "v1alpha2" + "groupVersion": "resource.k8s.io/v1alpha3", + "version": "v1alpha3" }, "versions": [ { - "groupVersion": "resource.k8s.io/v1alpha2", - "version": "v1alpha2" + "groupVersion": "resource.k8s.io/v1alpha3", + "version": "v1alpha3" } ] } diff --git a/api/discovery/apis__resource.k8s.io__v1alpha2.json b/api/discovery/apis__resource.k8s.io__v1alpha3.json similarity index 88% rename from api/discovery/apis__resource.k8s.io__v1alpha2.json rename to api/discovery/apis__resource.k8s.io__v1alpha3.json index 5c5643952713d..cbb3d46e8d97c 100644 --- a/api/discovery/apis__resource.k8s.io__v1alpha2.json +++ b/api/discovery/apis__resource.k8s.io__v1alpha3.json @@ -1,6 +1,6 @@ { "apiVersion": "v1", - "groupVersion": "resource.k8s.io/v1alpha2", + "groupVersion": "resource.k8s.io/v1alpha3", "kind": "APIResourceList", "resources": [ { @@ -8,7 +8,7 @@ "name": "podschedulingcontexts", "namespaced": true, "singularName": "podschedulingcontext", - "storageVersionHash": "qtdNX2rnDEA=", + "storageVersionHash": "SkSsa067T7g=", "verbs": [ "create", "delete", @@ -36,7 +36,7 @@ "name": "resourceclaimparameters", "namespaced": true, "singularName": "resourceclaimparameters", - "storageVersionHash": "DWM408h+ZHE=", + "storageVersionHash": "42WVd9cucrU=", "verbs": [ "create", "delete", @@ -53,7 +53,7 @@ "name": "resourceclaims", "namespaced": true, "singularName": "resourceclaim", - "storageVersionHash": "sMQbgChfibk=", + "storageVersionHash": "ozQSw6/HyJ4=", "verbs": [ "create", "delete", @@ -81,7 +81,7 @@ "name": "resourceclaimtemplates", "namespaced": true, "singularName": "resourceclaimtemplate", - "storageVersionHash": "1o2b66bFoGM=", + "storageVersionHash": "lbw3G0J+kqQ=", "verbs": [ "create", "delete", @@ -98,7 +98,7 @@ "name": "resourceclasses", "namespaced": false, "singularName": "resourceclass", - "storageVersionHash": "wkt0Tpte++U=", + "storageVersionHash": "gv35DluSP3c=", "verbs": [ "create", "delete", @@ -115,7 +115,7 @@ "name": "resourceclassparameters", "namespaced": true, "singularName": "resourceclassparameters", - "storageVersionHash": "MDq5XoTnXWQ=", + "storageVersionHash": "369PrU9Yi/E=", "verbs": [ "create", "delete", @@ -132,7 +132,7 @@ "name": "resourceslices", "namespaced": false, "singularName": "resourceslice", - "storageVersionHash": "IECvOcO76kw=", + "storageVersionHash": "8Uqm6frD4H0=", "verbs": [ "create", "delete", diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 605a7266251e2..d88d8ac157196 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -14949,7 +14949,7 @@ "type": "object", "x-kubernetes-map-type": "atomic" }, - "io.k8s.api.resource.v1alpha2.AllocationResult": { + "io.k8s.api.resource.v1alpha3.AllocationResult": { "description": "AllocationResult contains attributes of an allocated resource.", "properties": { "availableOnNodes": { @@ -14959,7 +14959,7 @@ "resourceHandles": { "description": "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceHandle" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceHandle" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -14967,11 +14967,11 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.DriverAllocationResult": { + "io.k8s.api.resource.v1alpha3.DriverAllocationResult": { "description": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", "properties": { "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult", "description": "NamedResources describes the allocation result when using the named resources model." }, "vendorRequestParameters": { @@ -14981,7 +14981,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.DriverRequests": { + "io.k8s.api.resource.v1alpha3.DriverRequests": { "description": "DriverRequests describes all resources that are needed from one particular driver.", "properties": { "driverName": { @@ -14991,7 +14991,7 @@ "requests": { "description": "Requests describes all resources that are needed from the driver.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceRequest" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceRequest" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15003,7 +15003,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult": { + "io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult": { "description": "NamedResourcesAllocationResult is used in AllocationResultModel.", "properties": { "name": { @@ -15016,7 +15016,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesAttribute": { + "io.k8s.api.resource.v1alpha3.NamedResourcesAttribute": { "description": "NamedResourcesAttribute is a combination of an attribute name and its value.", "properties": { "bool": { @@ -15029,7 +15029,7 @@ "type": "integer" }, "intSlice": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice", "description": "IntSliceValue is an array of 64-bit integers." }, "name": { @@ -15045,7 +15045,7 @@ "type": "string" }, "stringSlice": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice", "description": "StringSliceValue is an array of strings." }, "version": { @@ -15058,7 +15058,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesFilter": { + "io.k8s.api.resource.v1alpha3.NamedResourcesFilter": { "description": "NamedResourcesFilter is used in ResourceFilterModel.", "properties": { "selector": { @@ -15071,13 +15071,13 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesInstance": { + "io.k8s.api.resource.v1alpha3.NamedResourcesInstance": { "description": "NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.", "properties": { "attributes": { "description": "Attributes defines the attributes of this resource instance. The name of each attribute must be unique.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesAttribute" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesAttribute" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15092,7 +15092,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice": { + "io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice": { "description": "NamedResourcesIntSlice contains a slice of 64-bit integers.", "properties": { "ints": { @@ -15110,7 +15110,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesRequest": { + "io.k8s.api.resource.v1alpha3.NamedResourcesRequest": { "description": "NamedResourcesRequest is used in ResourceRequestModel.", "properties": { "selector": { @@ -15123,13 +15123,13 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesResources": { + "io.k8s.api.resource.v1alpha3.NamedResourcesResources": { "description": "NamedResourcesResources is used in ResourceModel.", "properties": { "instances": { "description": "The list of all individual resources instances currently available.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesInstance" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesInstance" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15140,7 +15140,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice": { + "io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice": { "description": "NamedResourcesStringSlice contains a slice of strings.", "properties": { "strings": { @@ -15157,7 +15157,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContext": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContext": { "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15173,11 +15173,11 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec", "description": "Spec describes where resources for the Pod are needed." }, "status": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus", "description": "Status describes where resources for the Pod can be allocated." } }, @@ -15189,11 +15189,11 @@ { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContextList": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContextList": { "description": "PodSchedulingContextList is a collection of Pod scheduling objects.", "properties": { "apiVersion": { @@ -15203,7 +15203,7 @@ "items": { "description": "Items is the list of PodSchedulingContext objects.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" }, "type": "array" }, @@ -15224,11 +15224,11 @@ { "group": "resource.k8s.io", "kind": "PodSchedulingContextList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec": { "description": "PodSchedulingContextSpec describes where resources for the Pod are needed.", "properties": { "potentialNodes": { @@ -15246,13 +15246,13 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus": { "description": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", "properties": { "resourceClaims": { "description": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus" }, "type": "array", "x-kubernetes-list-map-keys": [ @@ -15263,7 +15263,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaim": { + "io.k8s.api.resource.v1alpha3.ResourceClaim": { "description": "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15279,11 +15279,11 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec", "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." }, "status": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimStatus", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimStatus", "description": "Status describes whether the resource is available and with which attributes." } }, @@ -15295,11 +15295,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference": { + "io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference": { "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", "properties": { "apiGroup": { @@ -15326,7 +15326,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimList": { + "io.k8s.api.resource.v1alpha3.ResourceClaimList": { "description": "ResourceClaimList is a collection of claims.", "properties": { "apiVersion": { @@ -15336,7 +15336,7 @@ "items": { "description": "Items is the list of resource claims.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" }, "type": "array" }, @@ -15357,11 +15357,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimParameters": { + "io.k8s.api.resource.v1alpha3.ResourceClaimParameters": { "description": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", "properties": { "apiVersion": { @@ -15371,13 +15371,13 @@ "driverRequests": { "description": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.DriverRequests" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DriverRequests" }, "type": "array", "x-kubernetes-list-type": "atomic" }, "generatedFrom": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference", "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." }, "kind": { @@ -15394,11 +15394,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimParametersList": { + "io.k8s.api.resource.v1alpha3.ResourceClaimParametersList": { "description": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", "properties": { "apiVersion": { @@ -15408,7 +15408,7 @@ "items": { "description": "Items is the list of node resource capacity objects.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" }, "type": "array" }, @@ -15429,11 +15429,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimParametersList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference": { + "io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference": { "description": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", "properties": { "apiGroup": { @@ -15455,7 +15455,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus": { + "io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus": { "description": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", "properties": { "name": { @@ -15473,11 +15473,11 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimSpec": { + "io.k8s.api.resource.v1alpha3.ResourceClaimSpec": { "description": "ResourceClaimSpec defines how a resource is to be allocated.", "properties": { "parametersRef": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference", "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." }, "resourceClassName": { @@ -15490,11 +15490,11 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimStatus": { + "io.k8s.api.resource.v1alpha3.ResourceClaimStatus": { "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.", "properties": { "allocation": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.AllocationResult", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.AllocationResult", "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." }, "deallocationRequested": { @@ -15508,7 +15508,7 @@ "reservedFor": { "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference" }, "type": "array", "x-kubernetes-list-map-keys": [ @@ -15521,7 +15521,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimTemplate": { + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplate": { "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.", "properties": { "apiVersion": { @@ -15537,7 +15537,7 @@ "description": "Standard object metadata" }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec", "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." } }, @@ -15549,11 +15549,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList": { + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList": { "description": "ResourceClaimTemplateList is a collection of claim templates.", "properties": { "apiVersion": { @@ -15563,7 +15563,7 @@ "items": { "description": "Items is the list of resource claim templates.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" }, "type": "array" }, @@ -15584,11 +15584,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplateList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec": { + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec": { "description": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", "properties": { "metadata": { @@ -15596,7 +15596,7 @@ "description": "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation." }, "spec": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimSpec", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec", "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." } }, @@ -15605,7 +15605,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClass": { + "io.k8s.api.resource.v1alpha3.ResourceClass": { "description": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -15625,7 +15625,7 @@ "description": "Standard object metadata" }, "parametersRef": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference", "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." }, "structuredParameters": { @@ -15645,11 +15645,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassList": { + "io.k8s.api.resource.v1alpha3.ResourceClassList": { "description": "ResourceClassList is a collection of classes.", "properties": { "apiVersion": { @@ -15659,7 +15659,7 @@ "items": { "description": "Items is the list of resource classes.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" }, "type": "array" }, @@ -15680,11 +15680,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClassList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassParameters": { + "io.k8s.api.resource.v1alpha3.ResourceClassParameters": { "description": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", "properties": { "apiVersion": { @@ -15694,13 +15694,13 @@ "filters": { "description": "Filters describes additional contraints that must be met when using the class.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceFilter" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceFilter" }, "type": "array", "x-kubernetes-list-type": "atomic" }, "generatedFrom": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference", "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." }, "kind": { @@ -15714,7 +15714,7 @@ "vendorParameters": { "description": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.VendorParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.VendorParameters" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15725,11 +15725,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassParametersList": { + "io.k8s.api.resource.v1alpha3.ResourceClassParametersList": { "description": "ResourceClassParametersList is a collection of ResourceClassParameters.", "properties": { "apiVersion": { @@ -15739,7 +15739,7 @@ "items": { "description": "Items is the list of node resource capacity objects.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" }, "type": "array" }, @@ -15760,11 +15760,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClassParametersList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassParametersReference": { + "io.k8s.api.resource.v1alpha3.ResourceClassParametersReference": { "description": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", "properties": { "apiGroup": { @@ -15790,7 +15790,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceFilter": { + "io.k8s.api.resource.v1alpha3.ResourceFilter": { "description": "ResourceFilter is a filter for resources from one particular driver.", "properties": { "driverName": { @@ -15798,13 +15798,13 @@ "type": "string" }, "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesFilter", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesFilter", "description": "NamedResources describes a resource filter using the named resources model." } }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceHandle": { + "io.k8s.api.resource.v1alpha3.ResourceHandle": { "description": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", "properties": { "data": { @@ -15816,7 +15816,7 @@ "type": "string" }, "structuredData": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.StructuredResourceHandle", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.StructuredResourceHandle", "description": "If StructuredData is set, then it needs to be used instead of Data." } }, @@ -15825,11 +15825,11 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceRequest": { + "io.k8s.api.resource.v1alpha3.ResourceRequest": { "description": "ResourceRequest is a request for resources from one particular driver.", "properties": { "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesRequest", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesRequest", "description": "NamedResources describes a request for resources with the named resources model." }, "vendorParameters": { @@ -15839,7 +15839,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceSlice": { + "io.k8s.api.resource.v1alpha3.ResourceSlice": { "description": "ResourceSlice provides information about available resources on individual nodes.", "properties": { "apiVersion": { @@ -15859,7 +15859,7 @@ "description": "Standard object metadata" }, "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.NamedResourcesResources", + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesResources", "description": "NamedResources describes available resources using the named resources model." }, "nodeName": { @@ -15875,11 +15875,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceSliceList": { + "io.k8s.api.resource.v1alpha3.ResourceSliceList": { "description": "ResourceSliceList is a collection of ResourceSlices.", "properties": { "apiVersion": { @@ -15889,7 +15889,7 @@ "items": { "description": "Items is the list of node resource capacity objects.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" }, "type": "array" }, @@ -15910,11 +15910,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSliceList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.StructuredResourceHandle": { + "io.k8s.api.resource.v1alpha3.StructuredResourceHandle": { "description": "StructuredResourceHandle is the in-tree representation of the allocation result.", "properties": { "nodeName": { @@ -15924,7 +15924,7 @@ "results": { "description": "Results lists all allocated driver resources.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.DriverAllocationResult" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DriverAllocationResult" }, "type": "array", "x-kubernetes-list-type": "atomic" @@ -15943,7 +15943,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.VendorParameters": { + "io.k8s.api.resource.v1alpha3.VendorParameters": { "description": "VendorParameters are opaque parameters for one particular driver.", "properties": { "driverName": { @@ -18135,7 +18135,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -18519,7 +18519,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -18856,7 +18856,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -70412,7 +70412,7 @@ ] } }, - "/apis/resource.k8s.io/v1alpha2/": { + "/apis/resource.k8s.io/v1alpha3/": { "get": { "consumes": [ "application/json", @@ -70420,7 +70420,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get available resources", - "operationId": "getResourceV1alpha2APIResources", + "operationId": "getResourceV1alpha3APIResources", "produces": [ "application/json", "application/yaml", @@ -70441,17 +70441,17 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ] } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of PodSchedulingContext", - "operationId": "deleteResourceV1alpha2CollectionNamespacedPodSchedulingContext", + "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -70517,13 +70517,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -70531,7 +70531,7 @@ "*/*" ], "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -70575,7 +70575,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "401": { @@ -70586,13 +70586,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -70608,14 +70608,14 @@ "*/*" ], "description": "create a PodSchedulingContext", - "operationId": "createResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, { @@ -70645,19 +70645,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -70668,23 +70668,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a PodSchedulingContext", - "operationId": "deleteResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -70715,13 +70715,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -70732,13 +70732,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -70746,7 +70746,7 @@ "*/*" ], "description": "read the specified PodSchedulingContext", - "operationId": "readResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", "produces": [ "application/json", "application/yaml", @@ -70756,7 +70756,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -70767,13 +70767,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -70800,7 +70800,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -70835,13 +70835,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -70852,13 +70852,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -70866,14 +70866,14 @@ "*/*" ], "description": "replace the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, { @@ -70903,13 +70903,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -70920,23 +70920,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { "get": { "consumes": [ "*/*" ], "description": "read status of the specified PodSchedulingContext", - "operationId": "readResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", "produces": [ "application/json", "application/yaml", @@ -70946,7 +70946,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -70957,13 +70957,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -70990,7 +70990,7 @@ "application/apply-patch+yaml" ], "description": "partially update status of the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -71025,13 +71025,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71042,13 +71042,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -71056,14 +71056,14 @@ "*/*" ], "description": "replace status of the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, { @@ -71093,13 +71093,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71110,23 +71110,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceClaimParameters", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaimParameters", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimParameters", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -71192,13 +71192,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -71206,7 +71206,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "listResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -71250,7 +71250,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "401": { @@ -71261,13 +71261,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -71283,14 +71283,14 @@ "*/*" ], "description": "create ResourceClaimParameters", - "operationId": "createResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "createResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, { @@ -71320,19 +71320,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "401": { @@ -71343,23 +71343,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete ResourceClaimParameters", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -71390,13 +71390,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "401": { @@ -71407,13 +71407,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -71421,7 +71421,7 @@ "*/*" ], "description": "read the specified ResourceClaimParameters", - "operationId": "readResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "readResourceV1alpha3NamespacedResourceClaimParameters", "produces": [ "application/json", "application/yaml", @@ -71431,7 +71431,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "401": { @@ -71442,13 +71442,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -71475,7 +71475,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClaimParameters", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -71510,13 +71510,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "401": { @@ -71527,13 +71527,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -71541,14 +71541,14 @@ "*/*" ], "description": "replace the specified ResourceClaimParameters", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, { @@ -71578,13 +71578,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "401": { @@ -71595,23 +71595,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceClaim", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaim", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -71677,13 +71677,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -71691,7 +71691,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha2NamespacedResourceClaim", + "operationId": "listResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -71735,7 +71735,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "401": { @@ -71746,13 +71746,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -71768,14 +71768,14 @@ "*/*" ], "description": "create a ResourceClaim", - "operationId": "createResourceV1alpha2NamespacedResourceClaim", + "operationId": "createResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, { @@ -71805,19 +71805,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -71828,23 +71828,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ResourceClaim", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaim", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -71875,13 +71875,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -71892,13 +71892,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -71906,7 +71906,7 @@ "*/*" ], "description": "read the specified ResourceClaim", - "operationId": "readResourceV1alpha2NamespacedResourceClaim", + "operationId": "readResourceV1alpha3NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", @@ -71916,7 +71916,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -71927,13 +71927,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -71960,7 +71960,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClaim", - "operationId": "patchResourceV1alpha2NamespacedResourceClaim", + "operationId": "patchResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -71995,13 +71995,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -72012,13 +72012,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -72026,14 +72026,14 @@ "*/*" ], "description": "replace the specified ResourceClaim", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaim", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, { @@ -72063,13 +72063,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -72080,23 +72080,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { "get": { "consumes": [ "*/*" ], "description": "read status of the specified ResourceClaim", - "operationId": "readResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "readResourceV1alpha3NamespacedResourceClaimStatus", "produces": [ "application/json", "application/yaml", @@ -72106,7 +72106,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -72117,13 +72117,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -72150,7 +72150,7 @@ "application/apply-patch+yaml" ], "description": "partially update status of the specified ResourceClaim", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -72185,13 +72185,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -72202,13 +72202,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -72216,14 +72216,14 @@ "*/*" ], "description": "replace status of the specified ResourceClaim", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, { @@ -72253,13 +72253,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "401": { @@ -72270,23 +72270,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -72352,13 +72352,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -72366,7 +72366,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "listResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -72410,7 +72410,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "401": { @@ -72421,13 +72421,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -72443,14 +72443,14 @@ "*/*" ], "description": "create a ResourceClaimTemplate", - "operationId": "createResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "createResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, { @@ -72480,19 +72480,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -72503,23 +72503,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -72550,13 +72550,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -72567,13 +72567,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -72581,7 +72581,7 @@ "*/*" ], "description": "read the specified ResourceClaimTemplate", - "operationId": "readResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "readResourceV1alpha3NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", @@ -72591,7 +72591,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -72602,13 +72602,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -72635,7 +72635,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClaimTemplate", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -72670,13 +72670,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -72687,13 +72687,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -72701,14 +72701,14 @@ "*/*" ], "description": "replace the specified ResourceClaimTemplate", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, { @@ -72738,13 +72738,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "401": { @@ -72755,23 +72755,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceClassParameters", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClassParameters", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClassParameters", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -72837,13 +72837,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -72851,7 +72851,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "listResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -72895,7 +72895,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "401": { @@ -72906,13 +72906,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -72928,14 +72928,14 @@ "*/*" ], "description": "create ResourceClassParameters", - "operationId": "createResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "createResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, { @@ -72965,19 +72965,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "401": { @@ -72988,23 +72988,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete ResourceClassParameters", - "operationId": "deleteResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "deleteResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -73035,13 +73035,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "401": { @@ -73052,13 +73052,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -73066,7 +73066,7 @@ "*/*" ], "description": "read the specified ResourceClassParameters", - "operationId": "readResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "readResourceV1alpha3NamespacedResourceClassParameters", "produces": [ "application/json", "application/yaml", @@ -73076,7 +73076,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "401": { @@ -73087,13 +73087,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -73120,7 +73120,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClassParameters", - "operationId": "patchResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "patchResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -73155,13 +73155,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "401": { @@ -73172,13 +73172,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -73186,14 +73186,14 @@ "*/*" ], "description": "replace the specified ResourceClassParameters", - "operationId": "replaceResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "replaceResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, { @@ -73223,13 +73223,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "401": { @@ -73240,23 +73240,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha2PodSchedulingContextForAllNamespaces", + "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -73268,7 +73268,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "401": { @@ -73279,13 +73279,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -73324,13 +73324,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/resourceclaimparameters": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha2ResourceClaimParametersForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimParametersForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -73342,7 +73342,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "401": { @@ -73353,13 +73353,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -73398,13 +73398,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/resourceclaims": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha2ResourceClaimForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -73416,7 +73416,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "401": { @@ -73427,13 +73427,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -73472,13 +73472,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha2ResourceClaimTemplateForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -73490,7 +73490,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "401": { @@ -73501,13 +73501,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -73546,13 +73546,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclasses": { + "/apis/resource.k8s.io/v1alpha3/resourceclasses": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceClass", - "operationId": "deleteResourceV1alpha2CollectionResourceClass", + "operationId": "deleteResourceV1alpha3CollectionResourceClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -73618,13 +73618,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -73632,7 +73632,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClass", - "operationId": "listResourceV1alpha2ResourceClass", + "operationId": "listResourceV1alpha3ResourceClass", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -73676,7 +73676,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassList" } }, "401": { @@ -73687,13 +73687,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -73706,14 +73706,14 @@ "*/*" ], "description": "create a ResourceClass", - "operationId": "createResourceV1alpha2ResourceClass", + "operationId": "createResourceV1alpha3ResourceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, { @@ -73743,19 +73743,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "401": { @@ -73766,23 +73766,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}": { + "/apis/resource.k8s.io/v1alpha3/resourceclasses/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ResourceClass", - "operationId": "deleteResourceV1alpha2ResourceClass", + "operationId": "deleteResourceV1alpha3ResourceClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -73813,13 +73813,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "401": { @@ -73830,13 +73830,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -73844,7 +73844,7 @@ "*/*" ], "description": "read the specified ResourceClass", - "operationId": "readResourceV1alpha2ResourceClass", + "operationId": "readResourceV1alpha3ResourceClass", "produces": [ "application/json", "application/yaml", @@ -73854,7 +73854,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "401": { @@ -73865,13 +73865,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -73895,7 +73895,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClass", - "operationId": "patchResourceV1alpha2ResourceClass", + "operationId": "patchResourceV1alpha3ResourceClass", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -73930,13 +73930,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "401": { @@ -73947,13 +73947,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -73961,14 +73961,14 @@ "*/*" ], "description": "replace the specified ResourceClass", - "operationId": "replaceResourceV1alpha2ResourceClass", + "operationId": "replaceResourceV1alpha3ResourceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, { @@ -73998,13 +73998,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "401": { @@ -74015,23 +74015,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/resourceclassparameters": { "get": { "consumes": [ "*/*" ], "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha2ResourceClassParametersForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClassParametersForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -74043,7 +74043,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "401": { @@ -74054,13 +74054,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74099,13 +74099,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceslices": { + "/apis/resource.k8s.io/v1alpha3/resourceslices": { "delete": { "consumes": [ "*/*" ], "description": "delete collection of ResourceSlice", - "operationId": "deleteResourceV1alpha2CollectionResourceSlice", + "operationId": "deleteResourceV1alpha3CollectionResourceSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -74171,13 +74171,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -74185,7 +74185,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceSlice", - "operationId": "listResourceV1alpha2ResourceSlice", + "operationId": "listResourceV1alpha3ResourceSlice", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -74229,7 +74229,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSliceList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "401": { @@ -74240,13 +74240,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74259,14 +74259,14 @@ "*/*" ], "description": "create a ResourceSlice", - "operationId": "createResourceV1alpha2ResourceSlice", + "operationId": "createResourceV1alpha3ResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, { @@ -74296,19 +74296,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -74319,23 +74319,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/resourceslices/{name}": { + "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { "delete": { "consumes": [ "*/*" ], "description": "delete a ResourceSlice", - "operationId": "deleteResourceV1alpha2ResourceSlice", + "operationId": "deleteResourceV1alpha3ResourceSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -74366,13 +74366,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -74383,13 +74383,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { @@ -74397,7 +74397,7 @@ "*/*" ], "description": "read the specified ResourceSlice", - "operationId": "readResourceV1alpha2ResourceSlice", + "operationId": "readResourceV1alpha3ResourceSlice", "produces": [ "application/json", "application/yaml", @@ -74407,7 +74407,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -74418,13 +74418,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74448,7 +74448,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceSlice", - "operationId": "patchResourceV1alpha2ResourceSlice", + "operationId": "patchResourceV1alpha3ResourceSlice", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -74483,13 +74483,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -74500,13 +74500,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { @@ -74514,14 +74514,14 @@ "*/*" ], "description": "replace the specified ResourceSlice", - "operationId": "replaceResourceV1alpha2ResourceSlice", + "operationId": "replaceResourceV1alpha3ResourceSlice", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, { @@ -74551,13 +74551,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "401": { @@ -74568,23 +74568,23 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedPodSchedulingContextList", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", "produces": [ "application/json", "application/yaml", @@ -74607,13 +74607,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74655,13 +74655,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", "produces": [ "application/json", "application/yaml", @@ -74684,13 +74684,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74740,13 +74740,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimParametersList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimParametersList", "produces": [ "application/json", "application/yaml", @@ -74769,13 +74769,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74817,13 +74817,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimParameters", "produces": [ "application/json", "application/yaml", @@ -74846,13 +74846,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74902,13 +74902,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", "produces": [ "application/json", "application/yaml", @@ -74931,13 +74931,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -74979,13 +74979,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaim", + "operationId": "watchResourceV1alpha3NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", @@ -75008,13 +75008,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75064,13 +75064,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimTemplateList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", "produces": [ "application/json", "application/yaml", @@ -75093,13 +75093,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75141,13 +75141,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", @@ -75170,13 +75170,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75226,13 +75226,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClassParametersList", + "operationId": "watchResourceV1alpha3NamespacedResourceClassParametersList", "produces": [ "application/json", "application/yaml", @@ -75255,13 +75255,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75303,13 +75303,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "watchResourceV1alpha3NamespacedResourceClassParameters", "produces": [ "application/json", "application/yaml", @@ -75332,13 +75332,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75388,13 +75388,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2PodSchedulingContextListForAllNamespaces", + "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75417,13 +75417,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75462,13 +75462,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimparameters": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimParametersListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimParametersListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75491,13 +75491,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75536,13 +75536,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75565,13 +75565,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75610,13 +75610,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimTemplateListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75639,13 +75639,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75684,13 +75684,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclasses": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClassList", + "operationId": "watchResourceV1alpha3ResourceClassList", "produces": [ "application/json", "application/yaml", @@ -75713,13 +75713,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75758,13 +75758,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclasses/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ResourceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2ResourceClass", + "operationId": "watchResourceV1alpha3ResourceClass", "produces": [ "application/json", "application/yaml", @@ -75787,13 +75787,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75840,13 +75840,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclassparameters": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClassParametersListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClassParametersListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75869,13 +75869,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75914,13 +75914,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceslices": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices": { "get": { "consumes": [ "*/*" ], "description": "watch individual changes to a list of ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceSliceList", + "operationId": "watchResourceV1alpha3ResourceSliceList", "produces": [ "application/json", "application/yaml", @@ -75943,13 +75943,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -75988,13 +75988,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceslices/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices/{name}": { "get": { "consumes": [ "*/*" ], "description": "watch changes to an object of kind ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2ResourceSlice", + "operationId": "watchResourceV1alpha3ResourceSlice", "produces": [ "application/json", "application/yaml", @@ -76017,13 +76017,13 @@ "https" ], "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index c974fc0b87f78..c0fa289668ab2 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -8960,7 +8960,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -9359,7 +9359,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -9706,7 +9706,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json index b769eefeefd42..9bd51f953705a 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1_openapi.json @@ -1555,7 +1555,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1949,7 +1949,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -2296,7 +2296,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json index 88173bb896824..7600ba179c0f5 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1alpha1_openapi.json @@ -1067,7 +1067,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1461,7 +1461,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1808,7 +1808,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json index ead9b882f569d..7b4a7d735ec5c 100644 --- a/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__admissionregistration.k8s.io__v1beta1_openapi.json @@ -1069,7 +1069,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1463,7 +1463,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1810,7 +1810,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json index fe414447ae30e..c27c46c411a7b 100644 --- a/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apiextensions.k8s.io__v1_openapi.json @@ -1284,7 +1284,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1621,7 +1621,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1968,7 +1968,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json index cfd09f0406bd4..bac6e66592999 100644 --- a/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apiregistration.k8s.io__v1_openapi.json @@ -417,7 +417,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -754,7 +754,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1101,7 +1101,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__apps__v1_openapi.json b/api/openapi-spec/v3/apis__apps__v1_openapi.json index 5d7ee38038fb3..c36f1511d637e 100644 --- a/api/openapi-spec/v3/apis__apps__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apps__v1_openapi.json @@ -5755,7 +5755,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -6149,7 +6149,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -6496,7 +6496,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json index 47bfcfa89b61f..c4c5de1371a73 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v1_openapi.json @@ -610,7 +610,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -947,7 +947,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1294,7 +1294,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json index 2329392ee0344..54a03a41c4c91 100644 --- a/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json +++ b/api/openapi-spec/v3/apis__autoscaling__v2_openapi.json @@ -1262,7 +1262,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1656,7 +1656,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -2003,7 +2003,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index 7885d315946b4..0afe53ed612bf 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -4959,7 +4959,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -5353,7 +5353,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -5700,7 +5700,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json index db7c780a2259e..67c90503e0ea7 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1_openapi.json @@ -646,7 +646,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -983,7 +983,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1330,7 +1330,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json index 1c5fa179825ec..2d26fcf3be388 100644 --- a/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__certificates.k8s.io__v1alpha1_openapi.json @@ -522,7 +522,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -859,7 +859,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1206,7 +1206,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json index d0bb9ff249e4a..3938d6e619c11 100644 --- a/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__coordination.k8s.io__v1_openapi.json @@ -537,7 +537,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -879,7 +879,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1226,7 +1226,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json index b04950e2ff863..6f41f5fd326e3 100644 --- a/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__discovery.k8s.io__v1_openapi.json @@ -700,7 +700,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1037,7 +1037,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1384,7 +1384,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json index 4f40ca344f5eb..c0df343418d0b 100644 --- a/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__events.k8s.io__v1_openapi.json @@ -655,7 +655,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -997,7 +997,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1344,7 +1344,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json index a8a5f7cf492b2..34c70daea9b53 100644 --- a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1_openapi.json @@ -1146,7 +1146,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1483,7 +1483,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1830,7 +1830,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta3_openapi.json b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta3_openapi.json index b05112078966e..6c69e0c92b848 100644 --- a/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta3_openapi.json +++ b/api/openapi-spec/v3/apis__flowcontrol.apiserver.k8s.io__v1beta3_openapi.json @@ -1147,7 +1147,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1484,7 +1484,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1831,7 +1831,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json index e580ce3acf04c..6d0959b0d421e 100644 --- a/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__internal.apiserver.k8s.io__v1alpha1_openapi.json @@ -636,7 +636,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -973,7 +973,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1320,7 +1320,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json index b33cc9dae024f..79089323f4e62 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1_openapi.json @@ -1217,7 +1217,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1611,7 +1611,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1958,7 +1958,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json index 5e385fde4f75c..c6e357f24d459 100644 --- a/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json +++ b/api/openapi-spec/v3/apis__networking.k8s.io__v1beta1_openapi.json @@ -722,7 +722,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1059,7 +1059,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1406,7 +1406,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json index ef99a634b7daa..9862438545b54 100644 --- a/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__node.k8s.io__v1_openapi.json @@ -595,7 +595,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -932,7 +932,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1279,7 +1279,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__policy__v1_openapi.json b/api/openapi-spec/v3/apis__policy__v1_openapi.json index 85d83be73d19d..789cf20ab651f 100644 --- a/api/openapi-spec/v3/apis__policy__v1_openapi.json +++ b/api/openapi-spec/v3/apis__policy__v1_openapi.json @@ -657,7 +657,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1051,7 +1051,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1398,7 +1398,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json index 23a0779239e42..35ee1cfd3abc5 100644 --- a/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__rbac.authorization.k8s.io__v1_openapi.json @@ -930,7 +930,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -1324,7 +1324,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1671,7 +1671,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json similarity index 95% rename from api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json rename to api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json index 1b0b07cafff87..6ee5610bdce55 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha2_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json @@ -86,7 +86,7 @@ "type": "object", "x-kubernetes-map-type": "atomic" }, - "io.k8s.api.resource.v1alpha2.AllocationResult": { + "io.k8s.api.resource.v1alpha3.AllocationResult": { "description": "AllocationResult contains attributes of an allocated resource.", "properties": { "availableOnNodes": { @@ -102,7 +102,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceHandle" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceHandle" } ], "default": {} @@ -113,13 +113,13 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.DriverAllocationResult": { + "io.k8s.api.resource.v1alpha3.DriverAllocationResult": { "description": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", "properties": { "namedResources": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult" } ], "description": "NamedResources describes the allocation result when using the named resources model." @@ -135,7 +135,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.DriverRequests": { + "io.k8s.api.resource.v1alpha3.DriverRequests": { "description": "DriverRequests describes all resources that are needed from one particular driver.", "properties": { "driverName": { @@ -147,7 +147,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceRequest" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceRequest" } ], "default": {} @@ -166,7 +166,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult": { + "io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult": { "description": "NamedResourcesAllocationResult is used in AllocationResultModel.", "properties": { "name": { @@ -180,7 +180,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesAttribute": { + "io.k8s.api.resource.v1alpha3.NamedResourcesAttribute": { "description": "NamedResourcesAttribute is a combination of an attribute name and its value.", "properties": { "bool": { @@ -195,7 +195,7 @@ "intSlice": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice" } ], "description": "IntSliceValue is an array of 64-bit integers." @@ -220,7 +220,7 @@ "stringSlice": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice" } ], "description": "StringSliceValue is an array of strings." @@ -235,7 +235,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesFilter": { + "io.k8s.api.resource.v1alpha3.NamedResourcesFilter": { "description": "NamedResourcesFilter is used in ResourceFilterModel.", "properties": { "selector": { @@ -249,7 +249,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesInstance": { + "io.k8s.api.resource.v1alpha3.NamedResourcesInstance": { "description": "NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.", "properties": { "attributes": { @@ -257,7 +257,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesAttribute" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesAttribute" } ], "default": {} @@ -276,7 +276,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice": { + "io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice": { "description": "NamedResourcesIntSlice contains a slice of 64-bit integers.", "properties": { "ints": { @@ -295,7 +295,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesRequest": { + "io.k8s.api.resource.v1alpha3.NamedResourcesRequest": { "description": "NamedResourcesRequest is used in ResourceRequestModel.", "properties": { "selector": { @@ -309,7 +309,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesResources": { + "io.k8s.api.resource.v1alpha3.NamedResourcesResources": { "description": "NamedResourcesResources is used in ResourceModel.", "properties": { "instances": { @@ -317,7 +317,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesInstance" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesInstance" } ], "default": {} @@ -331,7 +331,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice": { + "io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice": { "description": "NamedResourcesStringSlice contains a slice of strings.", "properties": { "strings": { @@ -349,7 +349,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContext": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContext": { "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -372,7 +372,7 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec" } ], "default": {}, @@ -381,7 +381,7 @@ "status": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus" } ], "default": {}, @@ -396,11 +396,11 @@ { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContextList": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContextList": { "description": "PodSchedulingContextList is a collection of Pod scheduling objects.", "properties": { "apiVersion": { @@ -412,7 +412,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } ], "default": {} @@ -441,11 +441,11 @@ { "group": "resource.k8s.io", "kind": "PodSchedulingContextList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec": { "description": "PodSchedulingContextSpec describes where resources for the Pod are needed.", "properties": { "potentialNodes": { @@ -464,7 +464,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus": { + "io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus": { "description": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", "properties": { "resourceClaims": { @@ -472,7 +472,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus" } ], "default": {} @@ -486,7 +486,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaim": { + "io.k8s.api.resource.v1alpha3.ResourceClaim": { "description": "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -509,7 +509,7 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimSpec" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimSpec" } ], "default": {}, @@ -518,7 +518,7 @@ "status": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimStatus" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimStatus" } ], "default": {}, @@ -533,11 +533,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference": { + "io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference": { "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", "properties": { "apiGroup": { @@ -567,7 +567,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimList": { + "io.k8s.api.resource.v1alpha3.ResourceClaimList": { "description": "ResourceClaimList is a collection of claims.", "properties": { "apiVersion": { @@ -579,7 +579,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } ], "default": {} @@ -608,11 +608,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimParameters": { + "io.k8s.api.resource.v1alpha3.ResourceClaimParameters": { "description": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", "properties": { "apiVersion": { @@ -624,7 +624,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.DriverRequests" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DriverRequests" } ], "default": {} @@ -635,7 +635,7 @@ "generatedFrom": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference" } ], "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." @@ -659,11 +659,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimParametersList": { + "io.k8s.api.resource.v1alpha3.ResourceClaimParametersList": { "description": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", "properties": { "apiVersion": { @@ -675,7 +675,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } ], "default": {} @@ -704,11 +704,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimParametersList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference": { + "io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference": { "description": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", "properties": { "apiGroup": { @@ -732,7 +732,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus": { + "io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus": { "description": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", "properties": { "name": { @@ -751,13 +751,13 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimSpec": { + "io.k8s.api.resource.v1alpha3.ResourceClaimSpec": { "description": "ResourceClaimSpec defines how a resource is to be allocated.", "properties": { "parametersRef": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference" } ], "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." @@ -773,13 +773,13 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimStatus": { + "io.k8s.api.resource.v1alpha3.ResourceClaimStatus": { "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.", "properties": { "allocation": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.AllocationResult" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.AllocationResult" } ], "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." @@ -797,7 +797,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference" } ], "default": {} @@ -813,7 +813,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClaimTemplate": { + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplate": { "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.", "properties": { "apiVersion": { @@ -836,7 +836,7 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec" } ], "default": {}, @@ -851,11 +851,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList": { + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList": { "description": "ResourceClaimTemplateList is a collection of claim templates.", "properties": { "apiVersion": { @@ -867,7 +867,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } ], "default": {} @@ -896,11 +896,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClaimTemplateList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec": { + "io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec": { "description": "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", "properties": { "metadata": { @@ -915,7 +915,7 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimSpec" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimSpec" } ], "default": {}, @@ -927,7 +927,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceClass": { + "io.k8s.api.resource.v1alpha3.ResourceClass": { "description": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { @@ -955,7 +955,7 @@ "parametersRef": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference" } ], "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." @@ -981,11 +981,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassList": { + "io.k8s.api.resource.v1alpha3.ResourceClassList": { "description": "ResourceClassList is a collection of classes.", "properties": { "apiVersion": { @@ -997,7 +997,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } ], "default": {} @@ -1026,11 +1026,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClassList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassParameters": { + "io.k8s.api.resource.v1alpha3.ResourceClassParameters": { "description": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", "properties": { "apiVersion": { @@ -1042,7 +1042,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceFilter" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceFilter" } ], "default": {} @@ -1053,7 +1053,7 @@ "generatedFrom": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersReference" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference" } ], "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." @@ -1076,7 +1076,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.VendorParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.VendorParameters" } ], "default": {} @@ -1090,11 +1090,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassParametersList": { + "io.k8s.api.resource.v1alpha3.ResourceClassParametersList": { "description": "ResourceClassParametersList is a collection of ResourceClassParameters.", "properties": { "apiVersion": { @@ -1106,7 +1106,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } ], "default": {} @@ -1135,11 +1135,11 @@ { "group": "resource.k8s.io", "kind": "ResourceClassParametersList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceClassParametersReference": { + "io.k8s.api.resource.v1alpha3.ResourceClassParametersReference": { "description": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", "properties": { "apiGroup": { @@ -1167,7 +1167,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceFilter": { + "io.k8s.api.resource.v1alpha3.ResourceFilter": { "description": "ResourceFilter is a filter for resources from one particular driver.", "properties": { "driverName": { @@ -1177,7 +1177,7 @@ "namedResources": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesFilter" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesFilter" } ], "description": "NamedResources describes a resource filter using the named resources model." @@ -1185,7 +1185,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceHandle": { + "io.k8s.api.resource.v1alpha3.ResourceHandle": { "description": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", "properties": { "data": { @@ -1200,7 +1200,7 @@ "structuredData": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.StructuredResourceHandle" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.StructuredResourceHandle" } ], "description": "If StructuredData is set, then it needs to be used instead of Data." @@ -1211,13 +1211,13 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceRequest": { + "io.k8s.api.resource.v1alpha3.ResourceRequest": { "description": "ResourceRequest is a request for resources from one particular driver.", "properties": { "namedResources": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesRequest" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesRequest" } ], "description": "NamedResources describes a request for resources with the named resources model." @@ -1233,7 +1233,7 @@ }, "type": "object" }, - "io.k8s.api.resource.v1alpha2.ResourceSlice": { + "io.k8s.api.resource.v1alpha3.ResourceSlice": { "description": "ResourceSlice provides information about available resources on individual nodes.", "properties": { "apiVersion": { @@ -1261,7 +1261,7 @@ "namedResources": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.NamedResourcesResources" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesResources" } ], "description": "NamedResources describes available resources using the named resources model." @@ -1279,11 +1279,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.ResourceSliceList": { + "io.k8s.api.resource.v1alpha3.ResourceSliceList": { "description": "ResourceSliceList is a collection of ResourceSlices.", "properties": { "apiVersion": { @@ -1295,7 +1295,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } ], "default": {} @@ -1324,11 +1324,11 @@ { "group": "resource.k8s.io", "kind": "ResourceSliceList", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha2.StructuredResourceHandle": { + "io.k8s.api.resource.v1alpha3.StructuredResourceHandle": { "description": "StructuredResourceHandle is the in-tree representation of the allocation result.", "properties": { "nodeName": { @@ -1340,7 +1340,7 @@ "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.DriverAllocationResult" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DriverAllocationResult" } ], "default": {} @@ -1370,7 +1370,7 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha2.VendorParameters": { + "io.k8s.api.resource.v1alpha3.VendorParameters": { "description": "VendorParameters are opaque parameters for one particular driver.", "properties": { "driverName": { @@ -1815,7 +1815,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -2152,7 +2152,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -2499,7 +2499,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -2558,10 +2558,10 @@ }, "openapi": "3.0.0", "paths": { - "/apis/resource.k8s.io/v1alpha2/": { + "/apis/resource.k8s.io/v1alpha3/": { "get": { "description": "get available resources", - "operationId": "getResourceV1alpha2APIResources", + "operationId": "getResourceV1alpha3APIResources", "responses": { "200": { "content": { @@ -2588,14 +2588,14 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ] } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { "delete": { "description": "delete collection of PodSchedulingContext", - "operationId": "deleteResourceV1alpha2CollectionNamespacedPodSchedulingContext", + "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -2741,18 +2741,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -2850,27 +2850,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } } }, @@ -2881,13 +2881,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -2913,7 +2913,7 @@ ], "post": { "description": "create a PodSchedulingContext", - "operationId": "createResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2947,7 +2947,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -2958,17 +2958,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -2978,17 +2978,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -2998,17 +2998,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3019,20 +3019,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { "delete": { "description": "delete a PodSchedulingContext", - "operationId": "deleteResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3085,17 +3085,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3105,17 +3105,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3126,34 +3126,34 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "read the specified PodSchedulingContext", - "operationId": "readResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3164,13 +3164,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -3206,7 +3206,7 @@ ], "patch": { "description": "partially update the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3275,17 +3275,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3295,17 +3295,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3316,18 +3316,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3361,7 +3361,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3372,17 +3372,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3392,17 +3392,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3413,36 +3413,36 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/podschedulingcontexts/{name}/status": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { "get": { "description": "read status of the specified PodSchedulingContext", - "operationId": "readResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3453,13 +3453,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -3495,7 +3495,7 @@ ], "patch": { "description": "partially update status of the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3564,17 +3564,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3584,17 +3584,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3605,18 +3605,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace status of the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3650,7 +3650,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3661,17 +3661,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3681,17 +3681,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -3702,20 +3702,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters": { "delete": { "description": "delete collection of ResourceClaimParameters", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaimParameters", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimParameters", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -3861,18 +3861,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "listResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -3970,27 +3970,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } } }, @@ -4001,13 +4001,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -4033,7 +4033,7 @@ ], "post": { "description": "create ResourceClaimParameters", - "operationId": "createResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "createResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4067,7 +4067,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4078,17 +4078,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4098,17 +4098,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4118,17 +4118,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4139,20 +4139,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters/{name}": { "delete": { "description": "delete ResourceClaimParameters", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4205,17 +4205,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4225,17 +4225,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4246,34 +4246,34 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "read the specified ResourceClaimParameters", - "operationId": "readResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "readResourceV1alpha3NamespacedResourceClaimParameters", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4284,13 +4284,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -4326,7 +4326,7 @@ ], "patch": { "description": "partially update the specified ResourceClaimParameters", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4395,17 +4395,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4415,17 +4415,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4436,18 +4436,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace the specified ResourceClaimParameters", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4481,7 +4481,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4492,17 +4492,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4512,17 +4512,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" } } }, @@ -4533,20 +4533,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { "delete": { "description": "delete collection of ResourceClaim", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaim", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaim", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -4692,18 +4692,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha2NamespacedResourceClaim", + "operationId": "listResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -4801,27 +4801,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } } }, @@ -4832,13 +4832,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -4864,7 +4864,7 @@ ], "post": { "description": "create a ResourceClaim", - "operationId": "createResourceV1alpha2NamespacedResourceClaim", + "operationId": "createResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4898,7 +4898,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -4909,17 +4909,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -4929,17 +4929,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -4949,17 +4949,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -4970,20 +4970,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { "delete": { "description": "delete a ResourceClaim", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaim", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5036,17 +5036,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5056,17 +5056,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5077,34 +5077,34 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "read the specified ResourceClaim", - "operationId": "readResourceV1alpha2NamespacedResourceClaim", + "operationId": "readResourceV1alpha3NamespacedResourceClaim", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5115,13 +5115,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -5157,7 +5157,7 @@ ], "patch": { "description": "partially update the specified ResourceClaim", - "operationId": "patchResourceV1alpha2NamespacedResourceClaim", + "operationId": "patchResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5226,17 +5226,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5246,17 +5246,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5267,18 +5267,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace the specified ResourceClaim", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaim", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5312,7 +5312,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5323,17 +5323,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5343,17 +5343,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5364,36 +5364,36 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaims/{name}/status": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { "get": { "description": "read status of the specified ResourceClaim", - "operationId": "readResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "readResourceV1alpha3NamespacedResourceClaimStatus", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5404,13 +5404,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -5446,7 +5446,7 @@ ], "patch": { "description": "partially update status of the specified ResourceClaim", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5515,17 +5515,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5535,17 +5535,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5556,18 +5556,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace status of the specified ResourceClaim", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5601,7 +5601,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5612,17 +5612,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5632,17 +5632,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5653,20 +5653,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { "delete": { "description": "delete collection of ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimTemplate", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -5812,18 +5812,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "listResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -5921,27 +5921,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } } }, @@ -5952,13 +5952,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -5984,7 +5984,7 @@ ], "post": { "description": "create a ResourceClaimTemplate", - "operationId": "createResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "createResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6018,7 +6018,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6029,17 +6029,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6049,17 +6049,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6069,17 +6069,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6090,20 +6090,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { "delete": { "description": "delete a ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6156,17 +6156,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6176,17 +6176,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6197,34 +6197,34 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "read the specified ResourceClaimTemplate", - "operationId": "readResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "readResourceV1alpha3NamespacedResourceClaimTemplate", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6235,13 +6235,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -6277,7 +6277,7 @@ ], "patch": { "description": "partially update the specified ResourceClaimTemplate", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6346,17 +6346,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6366,17 +6366,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6387,18 +6387,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace the specified ResourceClaimTemplate", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6432,7 +6432,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6443,17 +6443,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6463,17 +6463,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6484,20 +6484,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters": { "delete": { "description": "delete collection of ResourceClassParameters", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClassParameters", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClassParameters", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -6643,18 +6643,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "listResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -6752,27 +6752,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } } }, @@ -6783,13 +6783,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -6815,7 +6815,7 @@ ], "post": { "description": "create ResourceClassParameters", - "operationId": "createResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "createResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6849,7 +6849,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -6860,17 +6860,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -6880,17 +6880,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -6900,17 +6900,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -6921,20 +6921,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/namespaces/{namespace}/resourceclassparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters/{name}": { "delete": { "description": "delete ResourceClassParameters", - "operationId": "deleteResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "deleteResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6987,17 +6987,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7007,17 +7007,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7028,34 +7028,34 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "read the specified ResourceClassParameters", - "operationId": "readResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "readResourceV1alpha3NamespacedResourceClassParameters", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7066,13 +7066,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -7108,7 +7108,7 @@ ], "patch": { "description": "partially update the specified ResourceClassParameters", - "operationId": "patchResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "patchResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -7177,17 +7177,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7197,17 +7197,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7218,18 +7218,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace the specified ResourceClassParameters", - "operationId": "replaceResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "replaceResourceV1alpha3NamespacedResourceClassParameters", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -7263,7 +7263,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7274,17 +7274,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7294,17 +7294,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" } } }, @@ -7315,46 +7315,46 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { "get": { "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha2PodSchedulingContextForAllNamespaces", + "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } } }, @@ -7365,13 +7365,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -7476,36 +7476,36 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/resourceclaimparameters": { "get": { "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha2ResourceClaimParametersForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimParametersForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" } } }, @@ -7516,13 +7516,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -7627,36 +7627,36 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/resourceclaims": { "get": { "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha2ResourceClaimForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } } }, @@ -7667,13 +7667,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -7778,36 +7778,36 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { "get": { "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha2ResourceClaimTemplateForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } } }, @@ -7818,13 +7818,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -7929,10 +7929,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceclasses": { + "/apis/resource.k8s.io/v1alpha3/resourceclasses": { "delete": { "description": "delete collection of ResourceClass", - "operationId": "deleteResourceV1alpha2CollectionResourceClass", + "operationId": "deleteResourceV1alpha3CollectionResourceClass", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -8078,18 +8078,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "list or watch objects of kind ResourceClass", - "operationId": "listResourceV1alpha2ResourceClass", + "operationId": "listResourceV1alpha3ResourceClass", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -8187,27 +8187,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" } } }, @@ -8218,13 +8218,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -8240,7 +8240,7 @@ ], "post": { "description": "create a ResourceClass", - "operationId": "createResourceV1alpha2ResourceClass", + "operationId": "createResourceV1alpha3ResourceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -8274,7 +8274,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8285,17 +8285,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8305,17 +8305,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8325,17 +8325,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8346,20 +8346,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/resourceclasses/{name}": { + "/apis/resource.k8s.io/v1alpha3/resourceclasses/{name}": { "delete": { "description": "delete a ResourceClass", - "operationId": "deleteResourceV1alpha2ResourceClass", + "operationId": "deleteResourceV1alpha3ResourceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -8412,17 +8412,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8432,17 +8432,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8453,34 +8453,34 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "read the specified ResourceClass", - "operationId": "readResourceV1alpha2ResourceClass", + "operationId": "readResourceV1alpha3ResourceClass", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8491,13 +8491,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -8523,7 +8523,7 @@ ], "patch": { "description": "partially update the specified ResourceClass", - "operationId": "patchResourceV1alpha2ResourceClass", + "operationId": "patchResourceV1alpha3ResourceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -8592,17 +8592,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8612,17 +8612,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8633,18 +8633,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace the specified ResourceClass", - "operationId": "replaceResourceV1alpha2ResourceClass", + "operationId": "replaceResourceV1alpha3ResourceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -8678,7 +8678,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8689,17 +8689,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8709,17 +8709,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" } } }, @@ -8730,46 +8730,46 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/resourceclassparameters": { "get": { "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha2ResourceClassParametersForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClassParametersForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceClassParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" } } }, @@ -8780,13 +8780,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -8891,10 +8891,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/resourceslices": { + "/apis/resource.k8s.io/v1alpha3/resourceslices": { "delete": { "description": "delete collection of ResourceSlice", - "operationId": "deleteResourceV1alpha2CollectionResourceSlice", + "operationId": "deleteResourceV1alpha3CollectionResourceSlice", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -9040,18 +9040,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "list or watch objects of kind ResourceSlice", - "operationId": "listResourceV1alpha2ResourceSlice", + "operationId": "listResourceV1alpha3ResourceSlice", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -9149,27 +9149,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSliceList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSliceList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSliceList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSliceList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSliceList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } } }, @@ -9180,13 +9180,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -9202,7 +9202,7 @@ ], "post": { "description": "create a ResourceSlice", - "operationId": "createResourceV1alpha2ResourceSlice", + "operationId": "createResourceV1alpha3ResourceSlice", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -9236,7 +9236,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9247,17 +9247,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9267,17 +9267,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9287,17 +9287,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9308,20 +9308,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/resourceslices/{name}": { + "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { "delete": { "description": "delete a ResourceSlice", - "operationId": "deleteResourceV1alpha2ResourceSlice", + "operationId": "deleteResourceV1alpha3ResourceSlice", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -9374,17 +9374,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9394,17 +9394,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9415,34 +9415,34 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "get": { "description": "read the specified ResourceSlice", - "operationId": "readResourceV1alpha2ResourceSlice", + "operationId": "readResourceV1alpha3ResourceSlice", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9453,13 +9453,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -9485,7 +9485,7 @@ ], "patch": { "description": "partially update the specified ResourceSlice", - "operationId": "patchResourceV1alpha2ResourceSlice", + "operationId": "patchResourceV1alpha3ResourceSlice", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -9554,17 +9554,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9574,17 +9574,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9595,18 +9595,18 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "put": { "description": "replace the specified ResourceSlice", - "operationId": "replaceResourceV1alpha2ResourceSlice", + "operationId": "replaceResourceV1alpha3ResourceSlice", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -9640,7 +9640,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9651,17 +9651,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9671,17 +9671,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha2.ResourceSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -9692,20 +9692,20 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { "get": { "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedPodSchedulingContextList", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", "responses": { "200": { "content": { @@ -9742,13 +9742,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -9863,10 +9863,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { "get": { "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", "responses": { "200": { "content": { @@ -9903,13 +9903,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -10034,10 +10034,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters": { "get": { "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimParametersList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimParametersList", "responses": { "200": { "content": { @@ -10074,13 +10074,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -10195,10 +10195,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { "get": { "description": "watch changes to an object of kind ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimParameters", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimParameters", "responses": { "200": { "content": { @@ -10235,13 +10235,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -10366,10 +10366,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { "get": { "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", "responses": { "200": { "content": { @@ -10406,13 +10406,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -10527,10 +10527,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { "get": { "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaim", + "operationId": "watchResourceV1alpha3NamespacedResourceClaim", "responses": { "200": { "content": { @@ -10567,13 +10567,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -10698,10 +10698,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { "get": { "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimTemplateList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", "responses": { "200": { "content": { @@ -10738,13 +10738,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -10859,10 +10859,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "get": { "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", "responses": { "200": { "content": { @@ -10899,13 +10899,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -11030,10 +11030,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters": { "get": { "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClassParametersList", + "operationId": "watchResourceV1alpha3NamespacedResourceClassParametersList", "responses": { "200": { "content": { @@ -11070,13 +11070,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -11191,10 +11191,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/namespaces/{namespace}/resourceclassparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters/{name}": { "get": { "description": "watch changes to an object of kind ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClassParameters", + "operationId": "watchResourceV1alpha3NamespacedResourceClassParameters", "responses": { "200": { "content": { @@ -11231,13 +11231,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -11362,10 +11362,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { "get": { "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2PodSchedulingContextListForAllNamespaces", + "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", "responses": { "200": { "content": { @@ -11402,13 +11402,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -11513,10 +11513,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimparameters": { "get": { "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimParametersListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimParametersListForAllNamespaces", "responses": { "200": { "content": { @@ -11553,13 +11553,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -11664,10 +11664,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { "get": { "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", "responses": { "200": { "content": { @@ -11704,13 +11704,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -11815,10 +11815,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { "get": { "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimTemplateListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", "responses": { "200": { "content": { @@ -11855,13 +11855,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -11966,10 +11966,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclasses": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses": { "get": { "description": "watch individual changes to a list of ResourceClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClassList", + "operationId": "watchResourceV1alpha3ResourceClassList", "responses": { "200": { "content": { @@ -12006,13 +12006,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -12117,10 +12117,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclasses/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses/{name}": { "get": { "description": "watch changes to an object of kind ResourceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2ResourceClass", + "operationId": "watchResourceV1alpha3ResourceClass", "responses": { "200": { "content": { @@ -12157,13 +12157,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClass", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -12278,10 +12278,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclassparameters": { "get": { "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClassParametersListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClassParametersListForAllNamespaces", "responses": { "200": { "content": { @@ -12318,13 +12318,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClassParameters", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -12429,10 +12429,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceslices": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices": { "get": { "description": "watch individual changes to a list of ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceSliceList", + "operationId": "watchResourceV1alpha3ResourceSliceList", "responses": { "200": { "content": { @@ -12469,13 +12469,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ @@ -12580,10 +12580,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha2/watch/resourceslices/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceslices/{name}": { "get": { "description": "watch changes to an object of kind ResourceSlice. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2ResourceSlice", + "operationId": "watchResourceV1alpha3ResourceSlice", "responses": { "200": { "content": { @@ -12620,13 +12620,13 @@ } }, "tags": [ - "resource_v1alpha2" + "resource_v1alpha3" ], "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceSlice", - "version": "v1alpha2" + "version": "v1alpha3" } }, "parameters": [ diff --git a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json index e6c656ef143c8..511c4adc1bc95 100644 --- a/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__scheduling.k8s.io__v1_openapi.json @@ -513,7 +513,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -850,7 +850,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1197,7 +1197,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json index d08ac408ec2a1..5d519c93c3a9b 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1_openapi.json @@ -2375,7 +2375,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -2769,7 +2769,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -3116,7 +3116,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json index ba9a32166e68a..5704af3b2a442 100644 --- a/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__storage.k8s.io__v1alpha1_openapi.json @@ -508,7 +508,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -845,7 +845,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1192,7 +1192,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json b/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json index 297efef20fd8a..e04a7c7ce7a63 100644 --- a/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json +++ b/api/openapi-spec/v3/apis__storagemigration.k8s.io__v1alpha1_openapi.json @@ -620,7 +620,7 @@ { "group": "resource.k8s.io", "kind": "DeleteOptions", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", @@ -957,7 +957,7 @@ { "group": "resource.k8s.io", "kind": "Status", - "version": "v1alpha2" + "version": "v1alpha3" } ] }, @@ -1304,7 +1304,7 @@ { "group": "resource.k8s.io", "kind": "WatchEvent", - "version": "v1alpha2" + "version": "v1alpha3" }, { "group": "scheduling.k8s.io", diff --git a/cmd/kube-controller-manager/app/core.go b/cmd/kube-controller-manager/app/core.go index 5f34bff5edbe3..41ea747071557 100644 --- a/cmd/kube-controller-manager/app/core.go +++ b/cmd/kube-controller-manager/app/core.go @@ -467,9 +467,9 @@ func startResourceClaimController(ctx context.Context, controllerContext Control klog.FromContext(ctx), controllerContext.ClientBuilder.ClientOrDie("resource-claim-controller"), controllerContext.InformerFactory.Core().V1().Pods(), - controllerContext.InformerFactory.Resource().V1alpha2().PodSchedulingContexts(), - controllerContext.InformerFactory.Resource().V1alpha2().ResourceClaims(), - controllerContext.InformerFactory.Resource().V1alpha2().ResourceClaimTemplates()) + controllerContext.InformerFactory.Resource().V1alpha3().PodSchedulingContexts(), + controllerContext.InformerFactory.Resource().V1alpha3().ResourceClaims(), + controllerContext.InformerFactory.Resource().V1alpha3().ResourceClaimTemplates()) if err != nil { return nil, true, fmt.Errorf("failed to start resource claim controller: %v", err) } diff --git a/hack/lib/init.sh b/hack/lib/init.sh index 1122395122b6a..8ed24eb091753 100755 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -93,7 +93,7 @@ coordination.k8s.io/v1beta1 \ coordination.k8s.io/v1 \ discovery.k8s.io/v1 \ discovery.k8s.io/v1beta1 \ -resource.k8s.io/v1alpha2 \ +resource.k8s.io/v1alpha3 \ extensions/v1beta1 \ events.k8s.io/v1 \ events.k8s.io/v1beta1 \ diff --git a/pkg/apis/resource/install/install.go b/pkg/apis/resource/install/install.go index 578797a1b5f37..eea8fe21e8510 100644 --- a/pkg/apis/resource/install/install.go +++ b/pkg/apis/resource/install/install.go @@ -23,7 +23,7 @@ import ( utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/kubernetes/pkg/apis/resource/v1alpha2" + "k8s.io/kubernetes/pkg/apis/resource/v1alpha3" ) func init() { @@ -33,6 +33,6 @@ func init() { // Install registers the API group and adds types to a scheme func Install(scheme *runtime.Scheme) { utilruntime.Must(resource.AddToScheme(scheme)) - utilruntime.Must(v1alpha2.AddToScheme(scheme)) - utilruntime.Must(scheme.SetVersionPriority(v1alpha2.SchemeGroupVersion)) + utilruntime.Must(v1alpha3.AddToScheme(scheme)) + utilruntime.Must(scheme.SetVersionPriority(v1alpha3.SchemeGroupVersion)) } diff --git a/pkg/apis/resource/install/install_test.go b/pkg/apis/resource/install/install_test.go index ca726e9503848..7a8b9a2875cb5 100644 --- a/pkg/apis/resource/install/install_test.go +++ b/pkg/apis/resource/install/install_test.go @@ -51,7 +51,7 @@ func TestResourceVersioner(t *testing.T) { func TestCodec(t *testing.T) { 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 { t.Fatalf("unexpected error: %v", err) } @@ -59,7 +59,7 @@ func TestCodec(t *testing.T) { if err := json.Unmarshal(data, &other); err != nil { 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) } } diff --git a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go b/pkg/apis/resource/v1alpha2/zz_generated.conversion.go deleted file mode 100644 index 9d618a0db6884..0000000000000 --- a/pkg/apis/resource/v1alpha2/zz_generated.conversion.go +++ /dev/null @@ -1,1743 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - unsafe "unsafe" - - v1 "k8s.io/api/core/v1" - v1alpha2 "k8s.io/api/resource/v1alpha2" - apiresource "k8s.io/apimachinery/pkg/api/resource" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - types "k8s.io/apimachinery/pkg/types" - core "k8s.io/kubernetes/pkg/apis/core" - resource "k8s.io/kubernetes/pkg/apis/resource" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*v1alpha2.AllocationResult)(nil), (*resource.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_AllocationResult_To_resource_AllocationResult(a.(*v1alpha2.AllocationResult), b.(*resource.AllocationResult), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.AllocationResult)(nil), (*v1alpha2.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_AllocationResult_To_v1alpha2_AllocationResult(a.(*resource.AllocationResult), b.(*v1alpha2.AllocationResult), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.AllocationResultModel)(nil), (*resource.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(a.(*v1alpha2.AllocationResultModel), b.(*resource.AllocationResultModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.AllocationResultModel)(nil), (*v1alpha2.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(a.(*resource.AllocationResultModel), b.(*v1alpha2.AllocationResultModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.DriverAllocationResult)(nil), (*resource.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(a.(*v1alpha2.DriverAllocationResult), b.(*resource.DriverAllocationResult), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.DriverAllocationResult)(nil), (*v1alpha2.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(a.(*resource.DriverAllocationResult), b.(*v1alpha2.DriverAllocationResult), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.DriverRequests)(nil), (*resource.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_DriverRequests_To_resource_DriverRequests(a.(*v1alpha2.DriverRequests), b.(*resource.DriverRequests), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.DriverRequests)(nil), (*v1alpha2.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_DriverRequests_To_v1alpha2_DriverRequests(a.(*resource.DriverRequests), b.(*v1alpha2.DriverRequests), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesAllocationResult)(nil), (*resource.NamedResourcesAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(a.(*v1alpha2.NamedResourcesAllocationResult), b.(*resource.NamedResourcesAllocationResult), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAllocationResult)(nil), (*v1alpha2.NamedResourcesAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesAllocationResult_To_v1alpha2_NamedResourcesAllocationResult(a.(*resource.NamedResourcesAllocationResult), b.(*v1alpha2.NamedResourcesAllocationResult), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesAttribute)(nil), (*resource.NamedResourcesAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(a.(*v1alpha2.NamedResourcesAttribute), b.(*resource.NamedResourcesAttribute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAttribute)(nil), (*v1alpha2.NamedResourcesAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesAttribute_To_v1alpha2_NamedResourcesAttribute(a.(*resource.NamedResourcesAttribute), b.(*v1alpha2.NamedResourcesAttribute), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesAttributeValue)(nil), (*resource.NamedResourcesAttributeValue)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(a.(*v1alpha2.NamedResourcesAttributeValue), b.(*resource.NamedResourcesAttributeValue), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAttributeValue)(nil), (*v1alpha2.NamedResourcesAttributeValue)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesAttributeValue_To_v1alpha2_NamedResourcesAttributeValue(a.(*resource.NamedResourcesAttributeValue), b.(*v1alpha2.NamedResourcesAttributeValue), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesFilter)(nil), (*resource.NamedResourcesFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesFilter_To_resource_NamedResourcesFilter(a.(*v1alpha2.NamedResourcesFilter), b.(*resource.NamedResourcesFilter), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesFilter)(nil), (*v1alpha2.NamedResourcesFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesFilter_To_v1alpha2_NamedResourcesFilter(a.(*resource.NamedResourcesFilter), b.(*v1alpha2.NamedResourcesFilter), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesInstance)(nil), (*resource.NamedResourcesInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesInstance_To_resource_NamedResourcesInstance(a.(*v1alpha2.NamedResourcesInstance), b.(*resource.NamedResourcesInstance), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesInstance)(nil), (*v1alpha2.NamedResourcesInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesInstance_To_v1alpha2_NamedResourcesInstance(a.(*resource.NamedResourcesInstance), b.(*v1alpha2.NamedResourcesInstance), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesIntSlice)(nil), (*resource.NamedResourcesIntSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(a.(*v1alpha2.NamedResourcesIntSlice), b.(*resource.NamedResourcesIntSlice), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesIntSlice)(nil), (*v1alpha2.NamedResourcesIntSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesIntSlice_To_v1alpha2_NamedResourcesIntSlice(a.(*resource.NamedResourcesIntSlice), b.(*v1alpha2.NamedResourcesIntSlice), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesRequest)(nil), (*resource.NamedResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesRequest_To_resource_NamedResourcesRequest(a.(*v1alpha2.NamedResourcesRequest), b.(*resource.NamedResourcesRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesRequest)(nil), (*v1alpha2.NamedResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesRequest_To_v1alpha2_NamedResourcesRequest(a.(*resource.NamedResourcesRequest), b.(*v1alpha2.NamedResourcesRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesResources)(nil), (*resource.NamedResourcesResources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesResources_To_resource_NamedResourcesResources(a.(*v1alpha2.NamedResourcesResources), b.(*resource.NamedResourcesResources), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesResources)(nil), (*v1alpha2.NamedResourcesResources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesResources_To_v1alpha2_NamedResourcesResources(a.(*resource.NamedResourcesResources), b.(*v1alpha2.NamedResourcesResources), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.NamedResourcesStringSlice)(nil), (*resource.NamedResourcesStringSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(a.(*v1alpha2.NamedResourcesStringSlice), b.(*resource.NamedResourcesStringSlice), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesStringSlice)(nil), (*v1alpha2.NamedResourcesStringSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesStringSlice_To_v1alpha2_NamedResourcesStringSlice(a.(*resource.NamedResourcesStringSlice), b.(*v1alpha2.NamedResourcesStringSlice), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingContext)(nil), (*resource.PodSchedulingContext)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_PodSchedulingContext_To_resource_PodSchedulingContext(a.(*v1alpha2.PodSchedulingContext), b.(*resource.PodSchedulingContext), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContext)(nil), (*v1alpha2.PodSchedulingContext)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_PodSchedulingContext_To_v1alpha2_PodSchedulingContext(a.(*resource.PodSchedulingContext), b.(*v1alpha2.PodSchedulingContext), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingContextList)(nil), (*resource.PodSchedulingContextList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_PodSchedulingContextList_To_resource_PodSchedulingContextList(a.(*v1alpha2.PodSchedulingContextList), b.(*resource.PodSchedulingContextList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContextList)(nil), (*v1alpha2.PodSchedulingContextList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_PodSchedulingContextList_To_v1alpha2_PodSchedulingContextList(a.(*resource.PodSchedulingContextList), b.(*v1alpha2.PodSchedulingContextList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingContextSpec)(nil), (*resource.PodSchedulingContextSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(a.(*v1alpha2.PodSchedulingContextSpec), b.(*resource.PodSchedulingContextSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContextSpec)(nil), (*v1alpha2.PodSchedulingContextSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_PodSchedulingContextSpec_To_v1alpha2_PodSchedulingContextSpec(a.(*resource.PodSchedulingContextSpec), b.(*v1alpha2.PodSchedulingContextSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingContextStatus)(nil), (*resource.PodSchedulingContextStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(a.(*v1alpha2.PodSchedulingContextStatus), b.(*resource.PodSchedulingContextStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContextStatus)(nil), (*v1alpha2.PodSchedulingContextStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_PodSchedulingContextStatus_To_v1alpha2_PodSchedulingContextStatus(a.(*resource.PodSchedulingContextStatus), b.(*v1alpha2.PodSchedulingContextStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaim)(nil), (*resource.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(a.(*v1alpha2.ResourceClaim), b.(*resource.ResourceClaim), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaim)(nil), (*v1alpha2.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(a.(*resource.ResourceClaim), b.(*v1alpha2.ResourceClaim), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimConsumerReference)(nil), (*resource.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(a.(*v1alpha2.ResourceClaimConsumerReference), b.(*resource.ResourceClaimConsumerReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimConsumerReference)(nil), (*v1alpha2.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(a.(*resource.ResourceClaimConsumerReference), b.(*v1alpha2.ResourceClaimConsumerReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimList)(nil), (*resource.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(a.(*v1alpha2.ResourceClaimList), b.(*resource.ResourceClaimList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimList)(nil), (*v1alpha2.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(a.(*resource.ResourceClaimList), b.(*v1alpha2.ResourceClaimList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimParameters)(nil), (*resource.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(a.(*v1alpha2.ResourceClaimParameters), b.(*resource.ResourceClaimParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParameters)(nil), (*v1alpha2.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(a.(*resource.ResourceClaimParameters), b.(*v1alpha2.ResourceClaimParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimParametersList)(nil), (*resource.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(a.(*v1alpha2.ResourceClaimParametersList), b.(*resource.ResourceClaimParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersList)(nil), (*v1alpha2.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(a.(*resource.ResourceClaimParametersList), b.(*v1alpha2.ResourceClaimParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimParametersReference)(nil), (*resource.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(a.(*v1alpha2.ResourceClaimParametersReference), b.(*resource.ResourceClaimParametersReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersReference)(nil), (*v1alpha2.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(a.(*resource.ResourceClaimParametersReference), b.(*v1alpha2.ResourceClaimParametersReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimSchedulingStatus)(nil), (*resource.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(a.(*v1alpha2.ResourceClaimSchedulingStatus), b.(*resource.ResourceClaimSchedulingStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSchedulingStatus)(nil), (*v1alpha2.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(a.(*resource.ResourceClaimSchedulingStatus), b.(*v1alpha2.ResourceClaimSchedulingStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimSpec)(nil), (*resource.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(a.(*v1alpha2.ResourceClaimSpec), b.(*resource.ResourceClaimSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSpec)(nil), (*v1alpha2.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(a.(*resource.ResourceClaimSpec), b.(*v1alpha2.ResourceClaimSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimStatus)(nil), (*resource.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(a.(*v1alpha2.ResourceClaimStatus), b.(*resource.ResourceClaimStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimStatus)(nil), (*v1alpha2.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(a.(*resource.ResourceClaimStatus), b.(*v1alpha2.ResourceClaimStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimTemplate)(nil), (*resource.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(a.(*v1alpha2.ResourceClaimTemplate), b.(*resource.ResourceClaimTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplate)(nil), (*v1alpha2.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(a.(*resource.ResourceClaimTemplate), b.(*v1alpha2.ResourceClaimTemplate), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimTemplateList)(nil), (*resource.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(a.(*v1alpha2.ResourceClaimTemplateList), b.(*resource.ResourceClaimTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateList)(nil), (*v1alpha2.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(a.(*resource.ResourceClaimTemplateList), b.(*v1alpha2.ResourceClaimTemplateList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimTemplateSpec)(nil), (*resource.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(a.(*v1alpha2.ResourceClaimTemplateSpec), b.(*resource.ResourceClaimTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateSpec)(nil), (*v1alpha2.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(a.(*resource.ResourceClaimTemplateSpec), b.(*v1alpha2.ResourceClaimTemplateSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClass)(nil), (*resource.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClass_To_resource_ResourceClass(a.(*v1alpha2.ResourceClass), b.(*resource.ResourceClass), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClass)(nil), (*v1alpha2.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClass_To_v1alpha2_ResourceClass(a.(*resource.ResourceClass), b.(*v1alpha2.ResourceClass), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassList)(nil), (*resource.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(a.(*v1alpha2.ResourceClassList), b.(*resource.ResourceClassList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassList)(nil), (*v1alpha2.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(a.(*resource.ResourceClassList), b.(*v1alpha2.ResourceClassList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassParameters)(nil), (*resource.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(a.(*v1alpha2.ResourceClassParameters), b.(*resource.ResourceClassParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParameters)(nil), (*v1alpha2.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(a.(*resource.ResourceClassParameters), b.(*v1alpha2.ResourceClassParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassParametersList)(nil), (*resource.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(a.(*v1alpha2.ResourceClassParametersList), b.(*resource.ResourceClassParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersList)(nil), (*v1alpha2.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(a.(*resource.ResourceClassParametersList), b.(*v1alpha2.ResourceClassParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassParametersReference)(nil), (*resource.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(a.(*v1alpha2.ResourceClassParametersReference), b.(*resource.ResourceClassParametersReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersReference)(nil), (*v1alpha2.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(a.(*resource.ResourceClassParametersReference), b.(*v1alpha2.ResourceClassParametersReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceFilter)(nil), (*resource.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(a.(*v1alpha2.ResourceFilter), b.(*resource.ResourceFilter), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceFilter)(nil), (*v1alpha2.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(a.(*resource.ResourceFilter), b.(*v1alpha2.ResourceFilter), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceFilterModel)(nil), (*resource.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(a.(*v1alpha2.ResourceFilterModel), b.(*resource.ResourceFilterModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceFilterModel)(nil), (*v1alpha2.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(a.(*resource.ResourceFilterModel), b.(*v1alpha2.ResourceFilterModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceHandle)(nil), (*resource.ResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(a.(*v1alpha2.ResourceHandle), b.(*resource.ResourceHandle), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceHandle)(nil), (*v1alpha2.ResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(a.(*resource.ResourceHandle), b.(*v1alpha2.ResourceHandle), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceModel)(nil), (*resource.ResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceModel_To_resource_ResourceModel(a.(*v1alpha2.ResourceModel), b.(*resource.ResourceModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceModel)(nil), (*v1alpha2.ResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceModel_To_v1alpha2_ResourceModel(a.(*resource.ResourceModel), b.(*v1alpha2.ResourceModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceRequest)(nil), (*resource.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(a.(*v1alpha2.ResourceRequest), b.(*resource.ResourceRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceRequest)(nil), (*v1alpha2.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(a.(*resource.ResourceRequest), b.(*v1alpha2.ResourceRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceRequestModel)(nil), (*resource.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(a.(*v1alpha2.ResourceRequestModel), b.(*resource.ResourceRequestModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceRequestModel)(nil), (*v1alpha2.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(a.(*resource.ResourceRequestModel), b.(*v1alpha2.ResourceRequestModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceSlice)(nil), (*resource.ResourceSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceSlice_To_resource_ResourceSlice(a.(*v1alpha2.ResourceSlice), b.(*resource.ResourceSlice), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceSlice)(nil), (*v1alpha2.ResourceSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceSlice_To_v1alpha2_ResourceSlice(a.(*resource.ResourceSlice), b.(*v1alpha2.ResourceSlice), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceSliceList)(nil), (*resource.ResourceSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_ResourceSliceList_To_resource_ResourceSliceList(a.(*v1alpha2.ResourceSliceList), b.(*resource.ResourceSliceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceSliceList)(nil), (*v1alpha2.ResourceSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceSliceList_To_v1alpha2_ResourceSliceList(a.(*resource.ResourceSliceList), b.(*v1alpha2.ResourceSliceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.StructuredResourceHandle)(nil), (*resource.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(a.(*v1alpha2.StructuredResourceHandle), b.(*resource.StructuredResourceHandle), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.StructuredResourceHandle)(nil), (*v1alpha2.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(a.(*resource.StructuredResourceHandle), b.(*v1alpha2.StructuredResourceHandle), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha2.VendorParameters)(nil), (*resource.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha2_VendorParameters_To_resource_VendorParameters(a.(*v1alpha2.VendorParameters), b.(*resource.VendorParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.VendorParameters)(nil), (*v1alpha2.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_VendorParameters_To_v1alpha2_VendorParameters(a.(*resource.VendorParameters), b.(*v1alpha2.VendorParameters), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1alpha2_AllocationResult_To_resource_AllocationResult(in *v1alpha2.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error { - if in.ResourceHandles != nil { - in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]resource.ResourceHandle, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.ResourceHandles = nil - } - out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) - return nil -} - -// Convert_v1alpha2_AllocationResult_To_resource_AllocationResult is an autogenerated conversion function. -func Convert_v1alpha2_AllocationResult_To_resource_AllocationResult(in *v1alpha2.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error { - return autoConvert_v1alpha2_AllocationResult_To_resource_AllocationResult(in, out, s) -} - -func autoConvert_resource_AllocationResult_To_v1alpha2_AllocationResult(in *resource.AllocationResult, out *v1alpha2.AllocationResult, s conversion.Scope) error { - if in.ResourceHandles != nil { - in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]v1alpha2.ResourceHandle, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.ResourceHandles = nil - } - out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) - return nil -} - -// Convert_resource_AllocationResult_To_v1alpha2_AllocationResult is an autogenerated conversion function. -func Convert_resource_AllocationResult_To_v1alpha2_AllocationResult(in *resource.AllocationResult, out *v1alpha2.AllocationResult, s conversion.Scope) error { - return autoConvert_resource_AllocationResult_To_v1alpha2_AllocationResult(in, out, s) -} - -func autoConvert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha2.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesAllocationResult)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel is an autogenerated conversion function. -func Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha2.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { - return autoConvert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(in, out, s) -} - -func autoConvert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha2.AllocationResultModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha2.NamedResourcesAllocationResult)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel is an autogenerated conversion function. -func Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha2.AllocationResultModel, s conversion.Scope) error { - return autoConvert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(in, out, s) -} - -func autoConvert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha2.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { - return err - } - if err := Convert_v1alpha2_AllocationResultModel_To_resource_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult is an autogenerated conversion function. -func Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha2.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { - return autoConvert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(in, out, s) -} - -func autoConvert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha2.DriverAllocationResult, s conversion.Scope) error { - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { - return err - } - if err := Convert_resource_AllocationResultModel_To_v1alpha2_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { - return err - } - return nil -} - -// Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult is an autogenerated conversion function. -func Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha2.DriverAllocationResult, s conversion.Scope) error { - return autoConvert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(in, out, s) -} - -func autoConvert_v1alpha2_DriverRequests_To_resource_DriverRequests(in *v1alpha2.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { - return err - } - if in.Requests != nil { - in, out := &in.Requests, &out.Requests - *out = make([]resource.ResourceRequest, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Requests = nil - } - return nil -} - -// Convert_v1alpha2_DriverRequests_To_resource_DriverRequests is an autogenerated conversion function. -func Convert_v1alpha2_DriverRequests_To_resource_DriverRequests(in *v1alpha2.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { - return autoConvert_v1alpha2_DriverRequests_To_resource_DriverRequests(in, out, s) -} - -func autoConvert_resource_DriverRequests_To_v1alpha2_DriverRequests(in *resource.DriverRequests, out *v1alpha2.DriverRequests, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { - return err - } - if in.Requests != nil { - in, out := &in.Requests, &out.Requests - *out = make([]v1alpha2.ResourceRequest, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Requests = nil - } - return nil -} - -// Convert_resource_DriverRequests_To_v1alpha2_DriverRequests is an autogenerated conversion function. -func Convert_resource_DriverRequests_To_v1alpha2_DriverRequests(in *resource.DriverRequests, out *v1alpha2.DriverRequests, s conversion.Scope) error { - return autoConvert_resource_DriverRequests_To_v1alpha2_DriverRequests(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in *v1alpha2.NamedResourcesAllocationResult, out *resource.NamedResourcesAllocationResult, s conversion.Scope) error { - out.Name = in.Name - return nil -} - -// Convert_v1alpha2_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in *v1alpha2.NamedResourcesAllocationResult, out *resource.NamedResourcesAllocationResult, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in, out, s) -} - -func autoConvert_resource_NamedResourcesAllocationResult_To_v1alpha2_NamedResourcesAllocationResult(in *resource.NamedResourcesAllocationResult, out *v1alpha2.NamedResourcesAllocationResult, s conversion.Scope) error { - out.Name = in.Name - return nil -} - -// Convert_resource_NamedResourcesAllocationResult_To_v1alpha2_NamedResourcesAllocationResult is an autogenerated conversion function. -func Convert_resource_NamedResourcesAllocationResult_To_v1alpha2_NamedResourcesAllocationResult(in *resource.NamedResourcesAllocationResult, out *v1alpha2.NamedResourcesAllocationResult, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesAllocationResult_To_v1alpha2_NamedResourcesAllocationResult(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in *v1alpha2.NamedResourcesAttribute, out *resource.NamedResourcesAttribute, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1alpha2_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(&in.NamedResourcesAttributeValue, &out.NamedResourcesAttributeValue, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_NamedResourcesAttribute_To_resource_NamedResourcesAttribute is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in *v1alpha2.NamedResourcesAttribute, out *resource.NamedResourcesAttribute, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in, out, s) -} - -func autoConvert_resource_NamedResourcesAttribute_To_v1alpha2_NamedResourcesAttribute(in *resource.NamedResourcesAttribute, out *v1alpha2.NamedResourcesAttribute, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_resource_NamedResourcesAttributeValue_To_v1alpha2_NamedResourcesAttributeValue(&in.NamedResourcesAttributeValue, &out.NamedResourcesAttributeValue, s); err != nil { - return err - } - return nil -} - -// Convert_resource_NamedResourcesAttribute_To_v1alpha2_NamedResourcesAttribute is an autogenerated conversion function. -func Convert_resource_NamedResourcesAttribute_To_v1alpha2_NamedResourcesAttribute(in *resource.NamedResourcesAttribute, out *v1alpha2.NamedResourcesAttribute, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesAttribute_To_v1alpha2_NamedResourcesAttribute(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in *v1alpha2.NamedResourcesAttributeValue, out *resource.NamedResourcesAttributeValue, s conversion.Scope) error { - out.QuantityValue = (*apiresource.Quantity)(unsafe.Pointer(in.QuantityValue)) - out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) - out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) - out.IntSliceValue = (*resource.NamedResourcesIntSlice)(unsafe.Pointer(in.IntSliceValue)) - out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) - out.StringSliceValue = (*resource.NamedResourcesStringSlice)(unsafe.Pointer(in.StringSliceValue)) - out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) - return nil -} - -// Convert_v1alpha2_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in *v1alpha2.NamedResourcesAttributeValue, out *resource.NamedResourcesAttributeValue, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in, out, s) -} - -func autoConvert_resource_NamedResourcesAttributeValue_To_v1alpha2_NamedResourcesAttributeValue(in *resource.NamedResourcesAttributeValue, out *v1alpha2.NamedResourcesAttributeValue, s conversion.Scope) error { - out.QuantityValue = (*apiresource.Quantity)(unsafe.Pointer(in.QuantityValue)) - out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) - out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) - out.IntSliceValue = (*v1alpha2.NamedResourcesIntSlice)(unsafe.Pointer(in.IntSliceValue)) - out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) - out.StringSliceValue = (*v1alpha2.NamedResourcesStringSlice)(unsafe.Pointer(in.StringSliceValue)) - out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) - return nil -} - -// Convert_resource_NamedResourcesAttributeValue_To_v1alpha2_NamedResourcesAttributeValue is an autogenerated conversion function. -func Convert_resource_NamedResourcesAttributeValue_To_v1alpha2_NamedResourcesAttributeValue(in *resource.NamedResourcesAttributeValue, out *v1alpha2.NamedResourcesAttributeValue, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesAttributeValue_To_v1alpha2_NamedResourcesAttributeValue(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesFilter_To_resource_NamedResourcesFilter(in *v1alpha2.NamedResourcesFilter, out *resource.NamedResourcesFilter, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_v1alpha2_NamedResourcesFilter_To_resource_NamedResourcesFilter is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesFilter_To_resource_NamedResourcesFilter(in *v1alpha2.NamedResourcesFilter, out *resource.NamedResourcesFilter, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesFilter_To_resource_NamedResourcesFilter(in, out, s) -} - -func autoConvert_resource_NamedResourcesFilter_To_v1alpha2_NamedResourcesFilter(in *resource.NamedResourcesFilter, out *v1alpha2.NamedResourcesFilter, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_resource_NamedResourcesFilter_To_v1alpha2_NamedResourcesFilter is an autogenerated conversion function. -func Convert_resource_NamedResourcesFilter_To_v1alpha2_NamedResourcesFilter(in *resource.NamedResourcesFilter, out *v1alpha2.NamedResourcesFilter, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesFilter_To_v1alpha2_NamedResourcesFilter(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesInstance_To_resource_NamedResourcesInstance(in *v1alpha2.NamedResourcesInstance, out *resource.NamedResourcesInstance, s conversion.Scope) error { - out.Name = in.Name - out.Attributes = *(*[]resource.NamedResourcesAttribute)(unsafe.Pointer(&in.Attributes)) - return nil -} - -// Convert_v1alpha2_NamedResourcesInstance_To_resource_NamedResourcesInstance is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesInstance_To_resource_NamedResourcesInstance(in *v1alpha2.NamedResourcesInstance, out *resource.NamedResourcesInstance, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesInstance_To_resource_NamedResourcesInstance(in, out, s) -} - -func autoConvert_resource_NamedResourcesInstance_To_v1alpha2_NamedResourcesInstance(in *resource.NamedResourcesInstance, out *v1alpha2.NamedResourcesInstance, s conversion.Scope) error { - out.Name = in.Name - out.Attributes = *(*[]v1alpha2.NamedResourcesAttribute)(unsafe.Pointer(&in.Attributes)) - return nil -} - -// Convert_resource_NamedResourcesInstance_To_v1alpha2_NamedResourcesInstance is an autogenerated conversion function. -func Convert_resource_NamedResourcesInstance_To_v1alpha2_NamedResourcesInstance(in *resource.NamedResourcesInstance, out *v1alpha2.NamedResourcesInstance, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesInstance_To_v1alpha2_NamedResourcesInstance(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in *v1alpha2.NamedResourcesIntSlice, out *resource.NamedResourcesIntSlice, s conversion.Scope) error { - out.Ints = *(*[]int64)(unsafe.Pointer(&in.Ints)) - return nil -} - -// Convert_v1alpha2_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in *v1alpha2.NamedResourcesIntSlice, out *resource.NamedResourcesIntSlice, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in, out, s) -} - -func autoConvert_resource_NamedResourcesIntSlice_To_v1alpha2_NamedResourcesIntSlice(in *resource.NamedResourcesIntSlice, out *v1alpha2.NamedResourcesIntSlice, s conversion.Scope) error { - out.Ints = *(*[]int64)(unsafe.Pointer(&in.Ints)) - return nil -} - -// Convert_resource_NamedResourcesIntSlice_To_v1alpha2_NamedResourcesIntSlice is an autogenerated conversion function. -func Convert_resource_NamedResourcesIntSlice_To_v1alpha2_NamedResourcesIntSlice(in *resource.NamedResourcesIntSlice, out *v1alpha2.NamedResourcesIntSlice, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesIntSlice_To_v1alpha2_NamedResourcesIntSlice(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesRequest_To_resource_NamedResourcesRequest(in *v1alpha2.NamedResourcesRequest, out *resource.NamedResourcesRequest, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_v1alpha2_NamedResourcesRequest_To_resource_NamedResourcesRequest is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesRequest_To_resource_NamedResourcesRequest(in *v1alpha2.NamedResourcesRequest, out *resource.NamedResourcesRequest, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesRequest_To_resource_NamedResourcesRequest(in, out, s) -} - -func autoConvert_resource_NamedResourcesRequest_To_v1alpha2_NamedResourcesRequest(in *resource.NamedResourcesRequest, out *v1alpha2.NamedResourcesRequest, s conversion.Scope) error { - out.Selector = in.Selector - return nil -} - -// Convert_resource_NamedResourcesRequest_To_v1alpha2_NamedResourcesRequest is an autogenerated conversion function. -func Convert_resource_NamedResourcesRequest_To_v1alpha2_NamedResourcesRequest(in *resource.NamedResourcesRequest, out *v1alpha2.NamedResourcesRequest, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesRequest_To_v1alpha2_NamedResourcesRequest(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesResources_To_resource_NamedResourcesResources(in *v1alpha2.NamedResourcesResources, out *resource.NamedResourcesResources, s conversion.Scope) error { - out.Instances = *(*[]resource.NamedResourcesInstance)(unsafe.Pointer(&in.Instances)) - return nil -} - -// Convert_v1alpha2_NamedResourcesResources_To_resource_NamedResourcesResources is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesResources_To_resource_NamedResourcesResources(in *v1alpha2.NamedResourcesResources, out *resource.NamedResourcesResources, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesResources_To_resource_NamedResourcesResources(in, out, s) -} - -func autoConvert_resource_NamedResourcesResources_To_v1alpha2_NamedResourcesResources(in *resource.NamedResourcesResources, out *v1alpha2.NamedResourcesResources, s conversion.Scope) error { - out.Instances = *(*[]v1alpha2.NamedResourcesInstance)(unsafe.Pointer(&in.Instances)) - return nil -} - -// Convert_resource_NamedResourcesResources_To_v1alpha2_NamedResourcesResources is an autogenerated conversion function. -func Convert_resource_NamedResourcesResources_To_v1alpha2_NamedResourcesResources(in *resource.NamedResourcesResources, out *v1alpha2.NamedResourcesResources, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesResources_To_v1alpha2_NamedResourcesResources(in, out, s) -} - -func autoConvert_v1alpha2_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in *v1alpha2.NamedResourcesStringSlice, out *resource.NamedResourcesStringSlice, s conversion.Scope) error { - out.Strings = *(*[]string)(unsafe.Pointer(&in.Strings)) - return nil -} - -// Convert_v1alpha2_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice is an autogenerated conversion function. -func Convert_v1alpha2_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in *v1alpha2.NamedResourcesStringSlice, out *resource.NamedResourcesStringSlice, s conversion.Scope) error { - return autoConvert_v1alpha2_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in, out, s) -} - -func autoConvert_resource_NamedResourcesStringSlice_To_v1alpha2_NamedResourcesStringSlice(in *resource.NamedResourcesStringSlice, out *v1alpha2.NamedResourcesStringSlice, s conversion.Scope) error { - out.Strings = *(*[]string)(unsafe.Pointer(&in.Strings)) - return nil -} - -// Convert_resource_NamedResourcesStringSlice_To_v1alpha2_NamedResourcesStringSlice is an autogenerated conversion function. -func Convert_resource_NamedResourcesStringSlice_To_v1alpha2_NamedResourcesStringSlice(in *resource.NamedResourcesStringSlice, out *v1alpha2.NamedResourcesStringSlice, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesStringSlice_To_v1alpha2_NamedResourcesStringSlice(in, out, s) -} - -func autoConvert_v1alpha2_PodSchedulingContext_To_resource_PodSchedulingContext(in *v1alpha2.PodSchedulingContext, out *resource.PodSchedulingContext, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_PodSchedulingContext_To_resource_PodSchedulingContext is an autogenerated conversion function. -func Convert_v1alpha2_PodSchedulingContext_To_resource_PodSchedulingContext(in *v1alpha2.PodSchedulingContext, out *resource.PodSchedulingContext, s conversion.Scope) error { - return autoConvert_v1alpha2_PodSchedulingContext_To_resource_PodSchedulingContext(in, out, s) -} - -func autoConvert_resource_PodSchedulingContext_To_v1alpha2_PodSchedulingContext(in *resource.PodSchedulingContext, out *v1alpha2.PodSchedulingContext, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_resource_PodSchedulingContextSpec_To_v1alpha2_PodSchedulingContextSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_resource_PodSchedulingContextStatus_To_v1alpha2_PodSchedulingContextStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_resource_PodSchedulingContext_To_v1alpha2_PodSchedulingContext is an autogenerated conversion function. -func Convert_resource_PodSchedulingContext_To_v1alpha2_PodSchedulingContext(in *resource.PodSchedulingContext, out *v1alpha2.PodSchedulingContext, s conversion.Scope) error { - return autoConvert_resource_PodSchedulingContext_To_v1alpha2_PodSchedulingContext(in, out, s) -} - -func autoConvert_v1alpha2_PodSchedulingContextList_To_resource_PodSchedulingContextList(in *v1alpha2.PodSchedulingContextList, out *resource.PodSchedulingContextList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]resource.PodSchedulingContext)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha2_PodSchedulingContextList_To_resource_PodSchedulingContextList is an autogenerated conversion function. -func Convert_v1alpha2_PodSchedulingContextList_To_resource_PodSchedulingContextList(in *v1alpha2.PodSchedulingContextList, out *resource.PodSchedulingContextList, s conversion.Scope) error { - return autoConvert_v1alpha2_PodSchedulingContextList_To_resource_PodSchedulingContextList(in, out, s) -} - -func autoConvert_resource_PodSchedulingContextList_To_v1alpha2_PodSchedulingContextList(in *resource.PodSchedulingContextList, out *v1alpha2.PodSchedulingContextList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha2.PodSchedulingContext)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_resource_PodSchedulingContextList_To_v1alpha2_PodSchedulingContextList is an autogenerated conversion function. -func Convert_resource_PodSchedulingContextList_To_v1alpha2_PodSchedulingContextList(in *resource.PodSchedulingContextList, out *v1alpha2.PodSchedulingContextList, s conversion.Scope) error { - return autoConvert_resource_PodSchedulingContextList_To_v1alpha2_PodSchedulingContextList(in, out, s) -} - -func autoConvert_v1alpha2_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(in *v1alpha2.PodSchedulingContextSpec, out *resource.PodSchedulingContextSpec, s conversion.Scope) error { - out.SelectedNode = in.SelectedNode - out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes)) - return nil -} - -// Convert_v1alpha2_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec is an autogenerated conversion function. -func Convert_v1alpha2_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(in *v1alpha2.PodSchedulingContextSpec, out *resource.PodSchedulingContextSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(in, out, s) -} - -func autoConvert_resource_PodSchedulingContextSpec_To_v1alpha2_PodSchedulingContextSpec(in *resource.PodSchedulingContextSpec, out *v1alpha2.PodSchedulingContextSpec, s conversion.Scope) error { - out.SelectedNode = in.SelectedNode - out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes)) - return nil -} - -// Convert_resource_PodSchedulingContextSpec_To_v1alpha2_PodSchedulingContextSpec is an autogenerated conversion function. -func Convert_resource_PodSchedulingContextSpec_To_v1alpha2_PodSchedulingContextSpec(in *resource.PodSchedulingContextSpec, out *v1alpha2.PodSchedulingContextSpec, s conversion.Scope) error { - return autoConvert_resource_PodSchedulingContextSpec_To_v1alpha2_PodSchedulingContextSpec(in, out, s) -} - -func autoConvert_v1alpha2_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(in *v1alpha2.PodSchedulingContextStatus, out *resource.PodSchedulingContextStatus, s conversion.Scope) error { - out.ResourceClaims = *(*[]resource.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims)) - return nil -} - -// Convert_v1alpha2_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus is an autogenerated conversion function. -func Convert_v1alpha2_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(in *v1alpha2.PodSchedulingContextStatus, out *resource.PodSchedulingContextStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(in, out, s) -} - -func autoConvert_resource_PodSchedulingContextStatus_To_v1alpha2_PodSchedulingContextStatus(in *resource.PodSchedulingContextStatus, out *v1alpha2.PodSchedulingContextStatus, s conversion.Scope) error { - out.ResourceClaims = *(*[]v1alpha2.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims)) - return nil -} - -// Convert_resource_PodSchedulingContextStatus_To_v1alpha2_PodSchedulingContextStatus is an autogenerated conversion function. -func Convert_resource_PodSchedulingContextStatus_To_v1alpha2_PodSchedulingContextStatus(in *resource.PodSchedulingContextStatus, out *v1alpha2.PodSchedulingContextStatus, s conversion.Scope) error { - return autoConvert_resource_PodSchedulingContextStatus_To_v1alpha2_PodSchedulingContextStatus(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(in *v1alpha2.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(in *v1alpha2.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(in, out, s) -} - -func autoConvert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(in *resource.ResourceClaim, out *v1alpha2.ResourceClaim, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim is an autogenerated conversion function. -func Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(in *resource.ResourceClaim, out *v1alpha2.ResourceClaim, s conversion.Scope) error { - return autoConvert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha2.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Resource = in.Resource - out.Name = in.Name - out.UID = types.UID(in.UID) - return nil -} - -// Convert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha2.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in, out, s) -} - -func autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha2.ResourceClaimConsumerReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Resource = in.Resource - out.Name = in.Name - out.UID = types.UID(in.UID) - return nil -} - -// Convert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference is an autogenerated conversion function. -func Convert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha2.ResourceClaimConsumerReference, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha2.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]resource.ResourceClaim, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha2.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in, out, s) -} - -func autoConvert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha2.ResourceClaimList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha2.ResourceClaim, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList is an autogenerated conversion function. -func Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha2.ResourceClaimList, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha2.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.DriverRequests != nil { - in, out := &in.DriverRequests, &out.DriverRequests - *out = make([]resource.DriverRequests, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_DriverRequests_To_resource_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.DriverRequests = nil - } - return nil -} - -// Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha2.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(in, out, s) -} - -func autoConvert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha2.ResourceClaimParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*v1alpha2.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.DriverRequests != nil { - in, out := &in.DriverRequests, &out.DriverRequests - *out = make([]v1alpha2.DriverRequests, len(*in)) - for i := range *in { - if err := Convert_resource_DriverRequests_To_v1alpha2_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.DriverRequests = nil - } - return nil -} - -// Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters is an autogenerated conversion function. -func Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha2.ResourceClaimParameters, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha2.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]resource.ResourceClaimParameters, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ResourceClaimParameters_To_resource_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha2.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in, out, s) -} - -func autoConvert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha2.ResourceClaimParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha2.ResourceClaimParameters, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceClaimParameters_To_v1alpha2_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList is an autogenerated conversion function. -func Convert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha2.ResourceClaimParametersList, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimParametersList_To_v1alpha2_ResourceClaimParametersList(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha2.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name - return nil -} - -// Convert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha2.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in, out, s) -} - -func autoConvert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha2.ResourceClaimParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name - return nil -} - -// Convert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference is an autogenerated conversion function. -func Convert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha2.ResourceClaimParametersReference, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha2.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error { - out.Name = in.Name - out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes)) - return nil -} - -// Convert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha2.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in, out, s) -} - -func autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha2.ResourceClaimSchedulingStatus, s conversion.Scope) error { - out.Name = in.Name - out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes)) - return nil -} - -// Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus is an autogenerated conversion function. -func Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha2.ResourceClaimSchedulingStatus, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha2.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error { - out.ResourceClassName = in.ResourceClassName - out.ParametersRef = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) - return nil -} - -// Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha2.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in, out, s) -} - -func autoConvert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha2.ResourceClaimSpec, s conversion.Scope) error { - out.ResourceClassName = in.ResourceClassName - out.ParametersRef = (*v1alpha2.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) - return nil -} - -// Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec is an autogenerated conversion function. -func Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha2.ResourceClaimSpec, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha2.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error { - out.DriverName = in.DriverName - if in.Allocation != nil { - in, out := &in.Allocation, &out.Allocation - *out = new(resource.AllocationResult) - if err := Convert_v1alpha2_AllocationResult_To_resource_AllocationResult(*in, *out, s); err != nil { - return err - } - } else { - out.Allocation = nil - } - out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) - out.DeallocationRequested = in.DeallocationRequested - return nil -} - -// Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha2.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in, out, s) -} - -func autoConvert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha2.ResourceClaimStatus, s conversion.Scope) error { - out.DriverName = in.DriverName - if in.Allocation != nil { - in, out := &in.Allocation, &out.Allocation - *out = new(v1alpha2.AllocationResult) - if err := Convert_resource_AllocationResult_To_v1alpha2_AllocationResult(*in, *out, s); err != nil { - return err - } - } else { - out.Allocation = nil - } - out.ReservedFor = *(*[]v1alpha2.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) - out.DeallocationRequested = in.DeallocationRequested - return nil -} - -// Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus is an autogenerated conversion function. -func Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha2.ResourceClaimStatus, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha2.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha2.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in, out, s) -} - -func autoConvert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha2.ResourceClaimTemplate, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate is an autogenerated conversion function. -func Convert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha2.ResourceClaimTemplate, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha2.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]resource.ResourceClaimTemplate)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha2.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in, out, s) -} - -func autoConvert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha2.ResourceClaimTemplateList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha2.ResourceClaimTemplate)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList is an autogenerated conversion function. -func Convert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha2.ResourceClaimTemplateList, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha2.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha2.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in, out, s) -} - -func autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha2.ResourceClaimTemplateSpec, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec is an autogenerated conversion function. -func Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha2.ResourceClaimTemplateSpec, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClass_To_resource_ResourceClass(in *v1alpha2.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.DriverName = in.DriverName - out.ParametersRef = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) - out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) - out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) - return nil -} - -// Convert_v1alpha2_ResourceClass_To_resource_ResourceClass is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClass_To_resource_ResourceClass(in *v1alpha2.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClass_To_resource_ResourceClass(in, out, s) -} - -func autoConvert_resource_ResourceClass_To_v1alpha2_ResourceClass(in *resource.ResourceClass, out *v1alpha2.ResourceClass, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.DriverName = in.DriverName - out.ParametersRef = (*v1alpha2.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) - out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) - out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) - return nil -} - -// Convert_resource_ResourceClass_To_v1alpha2_ResourceClass is an autogenerated conversion function. -func Convert_resource_ResourceClass_To_v1alpha2_ResourceClass(in *resource.ResourceClass, out *v1alpha2.ResourceClass, s conversion.Scope) error { - return autoConvert_resource_ResourceClass_To_v1alpha2_ResourceClass(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(in *v1alpha2.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]resource.ResourceClass)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha2_ResourceClassList_To_resource_ResourceClassList is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(in *v1alpha2.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(in, out, s) -} - -func autoConvert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in *resource.ResourceClassList, out *v1alpha2.ResourceClassList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha2.ResourceClass)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_resource_ResourceClassList_To_v1alpha2_ResourceClassList is an autogenerated conversion function. -func Convert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in *resource.ResourceClassList, out *v1alpha2.ResourceClassList, s conversion.Scope) error { - return autoConvert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha2.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.VendorParameters != nil { - in, out := &in.VendorParameters, &out.VendorParameters - *out = make([]resource.VendorParameters, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_VendorParameters_To_resource_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.VendorParameters = nil - } - out.Filters = *(*[]resource.ResourceFilter)(unsafe.Pointer(&in.Filters)) - return nil -} - -// Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha2.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(in, out, s) -} - -func autoConvert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha2.ResourceClassParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*v1alpha2.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.VendorParameters != nil { - in, out := &in.VendorParameters, &out.VendorParameters - *out = make([]v1alpha2.VendorParameters, len(*in)) - for i := range *in { - if err := Convert_resource_VendorParameters_To_v1alpha2_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.VendorParameters = nil - } - out.Filters = *(*[]v1alpha2.ResourceFilter)(unsafe.Pointer(&in.Filters)) - return nil -} - -// Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters is an autogenerated conversion function. -func Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha2.ResourceClassParameters, s conversion.Scope) error { - return autoConvert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha2.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]resource.ResourceClassParameters, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_ResourceClassParameters_To_resource_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha2.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClassParametersList_To_resource_ResourceClassParametersList(in, out, s) -} - -func autoConvert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha2.ResourceClassParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha2.ResourceClassParameters, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceClassParameters_To_v1alpha2_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList is an autogenerated conversion function. -func Convert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha2.ResourceClassParametersList, s conversion.Scope) error { - return autoConvert_resource_ResourceClassParametersList_To_v1alpha2_ResourceClassParametersList(in, out, s) -} - -func autoConvert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha2.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name - out.Namespace = in.Namespace - return nil -} - -// Convert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference is an autogenerated conversion function. -func Convert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha2.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in, out, s) -} - -func autoConvert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha2.ResourceClassParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name - out.Namespace = in.Namespace - return nil -} - -// Convert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference is an autogenerated conversion function. -func Convert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha2.ResourceClassParametersReference, s conversion.Scope) error { - return autoConvert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(in, out, s) -} - -func autoConvert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(in *v1alpha2.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ResourceFilter_To_resource_ResourceFilter is an autogenerated conversion function. -func Convert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(in *v1alpha2.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceFilter_To_resource_ResourceFilter(in, out, s) -} - -func autoConvert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(in *resource.ResourceFilter, out *v1alpha2.ResourceFilter, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceFilter_To_v1alpha2_ResourceFilter is an autogenerated conversion function. -func Convert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(in *resource.ResourceFilter, out *v1alpha2.ResourceFilter, s conversion.Scope) error { - return autoConvert_resource_ResourceFilter_To_v1alpha2_ResourceFilter(in, out, s) -} - -func autoConvert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha2.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesFilter)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel is an autogenerated conversion function. -func Convert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha2.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceFilterModel_To_resource_ResourceFilterModel(in, out, s) -} - -func autoConvert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha2.ResourceFilterModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha2.NamedResourcesFilter)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel is an autogenerated conversion function. -func Convert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha2.ResourceFilterModel, s conversion.Scope) error { - return autoConvert_resource_ResourceFilterModel_To_v1alpha2_ResourceFilterModel(in, out, s) -} - -func autoConvert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(in *v1alpha2.ResourceHandle, out *resource.ResourceHandle, s conversion.Scope) error { - out.DriverName = in.DriverName - out.Data = in.Data - if in.StructuredData != nil { - in, out := &in.StructuredData, &out.StructuredData - *out = new(resource.StructuredResourceHandle) - if err := Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(*in, *out, s); err != nil { - return err - } - } else { - out.StructuredData = nil - } - return nil -} - -// Convert_v1alpha2_ResourceHandle_To_resource_ResourceHandle is an autogenerated conversion function. -func Convert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(in *v1alpha2.ResourceHandle, out *resource.ResourceHandle, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceHandle_To_resource_ResourceHandle(in, out, s) -} - -func autoConvert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(in *resource.ResourceHandle, out *v1alpha2.ResourceHandle, s conversion.Scope) error { - out.DriverName = in.DriverName - out.Data = in.Data - if in.StructuredData != nil { - in, out := &in.StructuredData, &out.StructuredData - *out = new(v1alpha2.StructuredResourceHandle) - if err := Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(*in, *out, s); err != nil { - return err - } - } else { - out.StructuredData = nil - } - return nil -} - -// Convert_resource_ResourceHandle_To_v1alpha2_ResourceHandle is an autogenerated conversion function. -func Convert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(in *resource.ResourceHandle, out *v1alpha2.ResourceHandle, s conversion.Scope) error { - return autoConvert_resource_ResourceHandle_To_v1alpha2_ResourceHandle(in, out, s) -} - -func autoConvert_v1alpha2_ResourceModel_To_resource_ResourceModel(in *v1alpha2.ResourceModel, out *resource.ResourceModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesResources)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_v1alpha2_ResourceModel_To_resource_ResourceModel is an autogenerated conversion function. -func Convert_v1alpha2_ResourceModel_To_resource_ResourceModel(in *v1alpha2.ResourceModel, out *resource.ResourceModel, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceModel_To_resource_ResourceModel(in, out, s) -} - -func autoConvert_resource_ResourceModel_To_v1alpha2_ResourceModel(in *resource.ResourceModel, out *v1alpha2.ResourceModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha2.NamedResourcesResources)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_resource_ResourceModel_To_v1alpha2_ResourceModel is an autogenerated conversion function. -func Convert_resource_ResourceModel_To_v1alpha2_ResourceModel(in *resource.ResourceModel, out *v1alpha2.ResourceModel, s conversion.Scope) error { - return autoConvert_resource_ResourceModel_To_v1alpha2_ResourceModel(in, out, s) -} - -func autoConvert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(in *v1alpha2.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { - return err - } - if err := Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest is an autogenerated conversion function. -func Convert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(in *v1alpha2.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceRequest_To_resource_ResourceRequest(in, out, s) -} - -func autoConvert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(in *resource.ResourceRequest, out *v1alpha2.ResourceRequest, s conversion.Scope) error { - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { - return err - } - if err := Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest is an autogenerated conversion function. -func Convert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(in *resource.ResourceRequest, out *v1alpha2.ResourceRequest, s conversion.Scope) error { - return autoConvert_resource_ResourceRequest_To_v1alpha2_ResourceRequest(in, out, s) -} - -func autoConvert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha2.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesRequest)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel is an autogenerated conversion function. -func Convert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha2.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceRequestModel_To_resource_ResourceRequestModel(in, out, s) -} - -func autoConvert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha2.ResourceRequestModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha2.NamedResourcesRequest)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel is an autogenerated conversion function. -func Convert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha2.ResourceRequestModel, s conversion.Scope) error { - return autoConvert_resource_ResourceRequestModel_To_v1alpha2_ResourceRequestModel(in, out, s) -} - -func autoConvert_v1alpha2_ResourceSlice_To_resource_ResourceSlice(in *v1alpha2.ResourceSlice, out *resource.ResourceSlice, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.NodeName = in.NodeName - out.DriverName = in.DriverName - if err := Convert_v1alpha2_ResourceModel_To_resource_ResourceModel(&in.ResourceModel, &out.ResourceModel, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_ResourceSlice_To_resource_ResourceSlice is an autogenerated conversion function. -func Convert_v1alpha2_ResourceSlice_To_resource_ResourceSlice(in *v1alpha2.ResourceSlice, out *resource.ResourceSlice, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceSlice_To_resource_ResourceSlice(in, out, s) -} - -func autoConvert_resource_ResourceSlice_To_v1alpha2_ResourceSlice(in *resource.ResourceSlice, out *v1alpha2.ResourceSlice, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.NodeName = in.NodeName - out.DriverName = in.DriverName - if err := Convert_resource_ResourceModel_To_v1alpha2_ResourceModel(&in.ResourceModel, &out.ResourceModel, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceSlice_To_v1alpha2_ResourceSlice is an autogenerated conversion function. -func Convert_resource_ResourceSlice_To_v1alpha2_ResourceSlice(in *resource.ResourceSlice, out *v1alpha2.ResourceSlice, s conversion.Scope) error { - return autoConvert_resource_ResourceSlice_To_v1alpha2_ResourceSlice(in, out, s) -} - -func autoConvert_v1alpha2_ResourceSliceList_To_resource_ResourceSliceList(in *v1alpha2.ResourceSliceList, out *resource.ResourceSliceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]resource.ResourceSlice)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha2_ResourceSliceList_To_resource_ResourceSliceList is an autogenerated conversion function. -func Convert_v1alpha2_ResourceSliceList_To_resource_ResourceSliceList(in *v1alpha2.ResourceSliceList, out *resource.ResourceSliceList, s conversion.Scope) error { - return autoConvert_v1alpha2_ResourceSliceList_To_resource_ResourceSliceList(in, out, s) -} - -func autoConvert_resource_ResourceSliceList_To_v1alpha2_ResourceSliceList(in *resource.ResourceSliceList, out *v1alpha2.ResourceSliceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha2.ResourceSlice)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_resource_ResourceSliceList_To_v1alpha2_ResourceSliceList is an autogenerated conversion function. -func Convert_resource_ResourceSliceList_To_v1alpha2_ResourceSliceList(in *resource.ResourceSliceList, out *v1alpha2.ResourceSliceList, s conversion.Scope) error { - return autoConvert_resource_ResourceSliceList_To_v1alpha2_ResourceSliceList(in, out, s) -} - -func autoConvert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha2.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { - return err - } - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { - return err - } - out.NodeName = in.NodeName - if in.Results != nil { - in, out := &in.Results, &out.Results - *out = make([]resource.DriverAllocationResult, len(*in)) - for i := range *in { - if err := Convert_v1alpha2_DriverAllocationResult_To_resource_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Results = nil - } - return nil -} - -// Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle is an autogenerated conversion function. -func Convert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha2.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { - return autoConvert_v1alpha2_StructuredResourceHandle_To_resource_StructuredResourceHandle(in, out, s) -} - -func autoConvert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha2.StructuredResourceHandle, s conversion.Scope) error { - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { - return err - } - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { - return err - } - out.NodeName = in.NodeName - if in.Results != nil { - in, out := &in.Results, &out.Results - *out = make([]v1alpha2.DriverAllocationResult, len(*in)) - for i := range *in { - if err := Convert_resource_DriverAllocationResult_To_v1alpha2_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Results = nil - } - return nil -} - -// Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle is an autogenerated conversion function. -func Convert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha2.StructuredResourceHandle, s conversion.Scope) error { - return autoConvert_resource_StructuredResourceHandle_To_v1alpha2_StructuredResourceHandle(in, out, s) -} - -func autoConvert_v1alpha2_VendorParameters_To_resource_VendorParameters(in *v1alpha2.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Parameters, &out.Parameters, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha2_VendorParameters_To_resource_VendorParameters is an autogenerated conversion function. -func Convert_v1alpha2_VendorParameters_To_resource_VendorParameters(in *v1alpha2.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { - return autoConvert_v1alpha2_VendorParameters_To_resource_VendorParameters(in, out, s) -} - -func autoConvert_resource_VendorParameters_To_v1alpha2_VendorParameters(in *resource.VendorParameters, out *v1alpha2.VendorParameters, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Parameters, &out.Parameters, s); err != nil { - return err - } - return nil -} - -// Convert_resource_VendorParameters_To_v1alpha2_VendorParameters is an autogenerated conversion function. -func Convert_resource_VendorParameters_To_v1alpha2_VendorParameters(in *resource.VendorParameters, out *v1alpha2.VendorParameters, s conversion.Scope) error { - return autoConvert_resource_VendorParameters_To_v1alpha2_VendorParameters(in, out, s) -} diff --git a/pkg/apis/resource/v1alpha2/conversion.go b/pkg/apis/resource/v1alpha3/conversion.go similarity index 98% rename from pkg/apis/resource/v1alpha2/conversion.go rename to pkg/apis/resource/v1alpha3/conversion.go index 456a8b243e117..0ca264a883a45 100644 --- a/pkg/apis/resource/v1alpha2/conversion.go +++ b/pkg/apis/resource/v1alpha3/conversion.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1alpha3 import ( "fmt" diff --git a/pkg/apis/resource/v1alpha2/defaults.go b/pkg/apis/resource/v1alpha3/defaults.go similarity index 97% rename from pkg/apis/resource/v1alpha2/defaults.go rename to pkg/apis/resource/v1alpha3/defaults.go index 8682b9a2a88f8..84851c3dbb26d 100644 --- a/pkg/apis/resource/v1alpha2/defaults.go +++ b/pkg/apis/resource/v1alpha3/defaults.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1alpha3 import ( "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/apis/resource/v1alpha2/doc.go b/pkg/apis/resource/v1alpha3/doc.go similarity index 78% rename from pkg/apis/resource/v1alpha2/doc.go rename to pkg/apis/resource/v1alpha3/doc.go index 442bddf8e0f48..9538510c7ba56 100644 --- a/pkg/apis/resource/v1alpha2/doc.go +++ b/pkg/apis/resource/v1alpha3/doc.go @@ -15,9 +15,9 @@ limitations under the License. */ // +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-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 v1alpha2 // import "k8s.io/kubernetes/pkg/apis/resource/v1alpha2" +// Package v1alpha3 is the v1alpha3 version of the resource API. +package v1alpha3 // import "k8s.io/kubernetes/pkg/apis/resource/v1alpha3" diff --git a/pkg/apis/resource/v1alpha2/register.go b/pkg/apis/resource/v1alpha3/register.go similarity index 92% rename from pkg/apis/resource/v1alpha2/register.go rename to pkg/apis/resource/v1alpha3/register.go index 403cb75aad7c2..0cf36e3af5afb 100644 --- a/pkg/apis/resource/v1alpha2/register.go +++ b/pkg/apis/resource/v1alpha3/register.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1alpha3 import ( - "k8s.io/api/resource/v1alpha2" + "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/runtime/schema" ) var ( - localSchemeBuilder = &v1alpha2.SchemeBuilder + localSchemeBuilder = &v1alpha3.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) @@ -38,7 +38,7 @@ func init() { const GroupName = "resource.k8s.io" // 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 func Resource(resource string) schema.GroupResource { diff --git a/pkg/apis/resource/v1alpha3/zz_generated.conversion.go b/pkg/apis/resource/v1alpha3/zz_generated.conversion.go new file mode 100644 index 0000000000000..bf7b5af9c597a --- /dev/null +++ b/pkg/apis/resource/v1alpha3/zz_generated.conversion.go @@ -0,0 +1,1743 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by conversion-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + unsafe "unsafe" + + v1 "k8s.io/api/core/v1" + v1alpha3 "k8s.io/api/resource/v1alpha3" + apiresource "k8s.io/apimachinery/pkg/api/resource" + conversion "k8s.io/apimachinery/pkg/conversion" + runtime "k8s.io/apimachinery/pkg/runtime" + types "k8s.io/apimachinery/pkg/types" + core "k8s.io/kubernetes/pkg/apis/core" + resource "k8s.io/kubernetes/pkg/apis/resource" +) + +func init() { + localSchemeBuilder.Register(RegisterConversions) +} + +// RegisterConversions adds conversion functions to the given scheme. +// Public to allow building arbitrary schemes. +func RegisterConversions(s *runtime.Scheme) error { + if err := s.AddGeneratedConversionFunc((*v1alpha3.AllocationResult)(nil), (*resource.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_AllocationResult_To_resource_AllocationResult(a.(*v1alpha3.AllocationResult), b.(*resource.AllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.AllocationResult)(nil), (*v1alpha3.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_AllocationResult_To_v1alpha3_AllocationResult(a.(*resource.AllocationResult), b.(*v1alpha3.AllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.AllocationResultModel)(nil), (*resource.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(a.(*v1alpha3.AllocationResultModel), b.(*resource.AllocationResultModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.AllocationResultModel)(nil), (*v1alpha3.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(a.(*resource.AllocationResultModel), b.(*v1alpha3.AllocationResultModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.DriverAllocationResult)(nil), (*resource.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(a.(*v1alpha3.DriverAllocationResult), b.(*resource.DriverAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DriverAllocationResult)(nil), (*v1alpha3.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(a.(*resource.DriverAllocationResult), b.(*v1alpha3.DriverAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.DriverRequests)(nil), (*resource.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DriverRequests_To_resource_DriverRequests(a.(*v1alpha3.DriverRequests), b.(*resource.DriverRequests), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DriverRequests)(nil), (*v1alpha3.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DriverRequests_To_v1alpha3_DriverRequests(a.(*resource.DriverRequests), b.(*v1alpha3.DriverRequests), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesAllocationResult)(nil), (*resource.NamedResourcesAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(a.(*v1alpha3.NamedResourcesAllocationResult), b.(*resource.NamedResourcesAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAllocationResult)(nil), (*v1alpha3.NamedResourcesAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(a.(*resource.NamedResourcesAllocationResult), b.(*v1alpha3.NamedResourcesAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesAttribute)(nil), (*resource.NamedResourcesAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(a.(*v1alpha3.NamedResourcesAttribute), b.(*resource.NamedResourcesAttribute), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAttribute)(nil), (*v1alpha3.NamedResourcesAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(a.(*resource.NamedResourcesAttribute), b.(*v1alpha3.NamedResourcesAttribute), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesAttributeValue)(nil), (*resource.NamedResourcesAttributeValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(a.(*v1alpha3.NamedResourcesAttributeValue), b.(*resource.NamedResourcesAttributeValue), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAttributeValue)(nil), (*v1alpha3.NamedResourcesAttributeValue)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(a.(*resource.NamedResourcesAttributeValue), b.(*v1alpha3.NamedResourcesAttributeValue), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesFilter)(nil), (*resource.NamedResourcesFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(a.(*v1alpha3.NamedResourcesFilter), b.(*resource.NamedResourcesFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesFilter)(nil), (*v1alpha3.NamedResourcesFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(a.(*resource.NamedResourcesFilter), b.(*v1alpha3.NamedResourcesFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesInstance)(nil), (*resource.NamedResourcesInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(a.(*v1alpha3.NamedResourcesInstance), b.(*resource.NamedResourcesInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesInstance)(nil), (*v1alpha3.NamedResourcesInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(a.(*resource.NamedResourcesInstance), b.(*v1alpha3.NamedResourcesInstance), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesIntSlice)(nil), (*resource.NamedResourcesIntSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(a.(*v1alpha3.NamedResourcesIntSlice), b.(*resource.NamedResourcesIntSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesIntSlice)(nil), (*v1alpha3.NamedResourcesIntSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(a.(*resource.NamedResourcesIntSlice), b.(*v1alpha3.NamedResourcesIntSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesRequest)(nil), (*resource.NamedResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(a.(*v1alpha3.NamedResourcesRequest), b.(*resource.NamedResourcesRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesRequest)(nil), (*v1alpha3.NamedResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(a.(*resource.NamedResourcesRequest), b.(*v1alpha3.NamedResourcesRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesResources)(nil), (*resource.NamedResourcesResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(a.(*v1alpha3.NamedResourcesResources), b.(*resource.NamedResourcesResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesResources)(nil), (*v1alpha3.NamedResourcesResources)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(a.(*resource.NamedResourcesResources), b.(*v1alpha3.NamedResourcesResources), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesStringSlice)(nil), (*resource.NamedResourcesStringSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(a.(*v1alpha3.NamedResourcesStringSlice), b.(*resource.NamedResourcesStringSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesStringSlice)(nil), (*v1alpha3.NamedResourcesStringSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(a.(*resource.NamedResourcesStringSlice), b.(*v1alpha3.NamedResourcesStringSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.PodSchedulingContext)(nil), (*resource.PodSchedulingContext)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_PodSchedulingContext_To_resource_PodSchedulingContext(a.(*v1alpha3.PodSchedulingContext), b.(*resource.PodSchedulingContext), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContext)(nil), (*v1alpha3.PodSchedulingContext)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_PodSchedulingContext_To_v1alpha3_PodSchedulingContext(a.(*resource.PodSchedulingContext), b.(*v1alpha3.PodSchedulingContext), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.PodSchedulingContextList)(nil), (*resource.PodSchedulingContextList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_PodSchedulingContextList_To_resource_PodSchedulingContextList(a.(*v1alpha3.PodSchedulingContextList), b.(*resource.PodSchedulingContextList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContextList)(nil), (*v1alpha3.PodSchedulingContextList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_PodSchedulingContextList_To_v1alpha3_PodSchedulingContextList(a.(*resource.PodSchedulingContextList), b.(*v1alpha3.PodSchedulingContextList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.PodSchedulingContextSpec)(nil), (*resource.PodSchedulingContextSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(a.(*v1alpha3.PodSchedulingContextSpec), b.(*resource.PodSchedulingContextSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContextSpec)(nil), (*v1alpha3.PodSchedulingContextSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_PodSchedulingContextSpec_To_v1alpha3_PodSchedulingContextSpec(a.(*resource.PodSchedulingContextSpec), b.(*v1alpha3.PodSchedulingContextSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.PodSchedulingContextStatus)(nil), (*resource.PodSchedulingContextStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(a.(*v1alpha3.PodSchedulingContextStatus), b.(*resource.PodSchedulingContextStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingContextStatus)(nil), (*v1alpha3.PodSchedulingContextStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_PodSchedulingContextStatus_To_v1alpha3_PodSchedulingContextStatus(a.(*resource.PodSchedulingContextStatus), b.(*v1alpha3.PodSchedulingContextStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaim)(nil), (*resource.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaim_To_resource_ResourceClaim(a.(*v1alpha3.ResourceClaim), b.(*resource.ResourceClaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaim)(nil), (*v1alpha3.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaim_To_v1alpha3_ResourceClaim(a.(*resource.ResourceClaim), b.(*v1alpha3.ResourceClaim), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimConsumerReference)(nil), (*resource.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(a.(*v1alpha3.ResourceClaimConsumerReference), b.(*resource.ResourceClaimConsumerReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimConsumerReference)(nil), (*v1alpha3.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimConsumerReference_To_v1alpha3_ResourceClaimConsumerReference(a.(*resource.ResourceClaimConsumerReference), b.(*v1alpha3.ResourceClaimConsumerReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimList)(nil), (*resource.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimList_To_resource_ResourceClaimList(a.(*v1alpha3.ResourceClaimList), b.(*resource.ResourceClaimList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimList)(nil), (*v1alpha3.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList(a.(*resource.ResourceClaimList), b.(*v1alpha3.ResourceClaimList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimParameters)(nil), (*resource.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(a.(*v1alpha3.ResourceClaimParameters), b.(*resource.ResourceClaimParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParameters)(nil), (*v1alpha3.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(a.(*resource.ResourceClaimParameters), b.(*v1alpha3.ResourceClaimParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimParametersList)(nil), (*resource.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(a.(*v1alpha3.ResourceClaimParametersList), b.(*resource.ResourceClaimParametersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersList)(nil), (*v1alpha3.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(a.(*resource.ResourceClaimParametersList), b.(*v1alpha3.ResourceClaimParametersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimParametersReference)(nil), (*resource.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(a.(*v1alpha3.ResourceClaimParametersReference), b.(*resource.ResourceClaimParametersReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersReference)(nil), (*v1alpha3.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(a.(*resource.ResourceClaimParametersReference), b.(*v1alpha3.ResourceClaimParametersReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimSchedulingStatus)(nil), (*resource.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(a.(*v1alpha3.ResourceClaimSchedulingStatus), b.(*resource.ResourceClaimSchedulingStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSchedulingStatus)(nil), (*v1alpha3.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha3_ResourceClaimSchedulingStatus(a.(*resource.ResourceClaimSchedulingStatus), b.(*v1alpha3.ResourceClaimSchedulingStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimSpec)(nil), (*resource.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(a.(*v1alpha3.ResourceClaimSpec), b.(*resource.ResourceClaimSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSpec)(nil), (*v1alpha3.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(a.(*resource.ResourceClaimSpec), b.(*v1alpha3.ResourceClaimSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimStatus)(nil), (*resource.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(a.(*v1alpha3.ResourceClaimStatus), b.(*resource.ResourceClaimStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimStatus)(nil), (*v1alpha3.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus(a.(*resource.ResourceClaimStatus), b.(*v1alpha3.ResourceClaimStatus), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimTemplate)(nil), (*resource.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(a.(*v1alpha3.ResourceClaimTemplate), b.(*resource.ResourceClaimTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplate)(nil), (*v1alpha3.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimTemplate_To_v1alpha3_ResourceClaimTemplate(a.(*resource.ResourceClaimTemplate), b.(*v1alpha3.ResourceClaimTemplate), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimTemplateList)(nil), (*resource.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(a.(*v1alpha3.ResourceClaimTemplateList), b.(*resource.ResourceClaimTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateList)(nil), (*v1alpha3.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimTemplateList_To_v1alpha3_ResourceClaimTemplateList(a.(*resource.ResourceClaimTemplateList), b.(*v1alpha3.ResourceClaimTemplateList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimTemplateSpec)(nil), (*resource.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(a.(*v1alpha3.ResourceClaimTemplateSpec), b.(*resource.ResourceClaimTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateSpec)(nil), (*v1alpha3.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplateSpec(a.(*resource.ResourceClaimTemplateSpec), b.(*v1alpha3.ResourceClaimTemplateSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClass)(nil), (*resource.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClass_To_resource_ResourceClass(a.(*v1alpha3.ResourceClass), b.(*resource.ResourceClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClass)(nil), (*v1alpha3.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClass_To_v1alpha3_ResourceClass(a.(*resource.ResourceClass), b.(*v1alpha3.ResourceClass), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassList)(nil), (*resource.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(a.(*v1alpha3.ResourceClassList), b.(*resource.ResourceClassList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClassList)(nil), (*v1alpha3.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(a.(*resource.ResourceClassList), b.(*v1alpha3.ResourceClassList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassParameters)(nil), (*resource.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(a.(*v1alpha3.ResourceClassParameters), b.(*resource.ResourceClassParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParameters)(nil), (*v1alpha3.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(a.(*resource.ResourceClassParameters), b.(*v1alpha3.ResourceClassParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassParametersList)(nil), (*resource.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(a.(*v1alpha3.ResourceClassParametersList), b.(*resource.ResourceClassParametersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersList)(nil), (*v1alpha3.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(a.(*resource.ResourceClassParametersList), b.(*v1alpha3.ResourceClassParametersList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassParametersReference)(nil), (*resource.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(a.(*v1alpha3.ResourceClassParametersReference), b.(*resource.ResourceClassParametersReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersReference)(nil), (*v1alpha3.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(a.(*resource.ResourceClassParametersReference), b.(*v1alpha3.ResourceClassParametersReference), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceFilter)(nil), (*resource.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(a.(*v1alpha3.ResourceFilter), b.(*resource.ResourceFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceFilter)(nil), (*v1alpha3.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(a.(*resource.ResourceFilter), b.(*v1alpha3.ResourceFilter), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceFilterModel)(nil), (*resource.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(a.(*v1alpha3.ResourceFilterModel), b.(*resource.ResourceFilterModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceFilterModel)(nil), (*v1alpha3.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(a.(*resource.ResourceFilterModel), b.(*v1alpha3.ResourceFilterModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceHandle)(nil), (*resource.ResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(a.(*v1alpha3.ResourceHandle), b.(*resource.ResourceHandle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceHandle)(nil), (*v1alpha3.ResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(a.(*resource.ResourceHandle), b.(*v1alpha3.ResourceHandle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceModel)(nil), (*resource.ResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceModel_To_resource_ResourceModel(a.(*v1alpha3.ResourceModel), b.(*resource.ResourceModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceModel)(nil), (*v1alpha3.ResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceModel_To_v1alpha3_ResourceModel(a.(*resource.ResourceModel), b.(*v1alpha3.ResourceModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceRequest)(nil), (*resource.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(a.(*v1alpha3.ResourceRequest), b.(*resource.ResourceRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceRequest)(nil), (*v1alpha3.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(a.(*resource.ResourceRequest), b.(*v1alpha3.ResourceRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceRequestModel)(nil), (*resource.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(a.(*v1alpha3.ResourceRequestModel), b.(*resource.ResourceRequestModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceRequestModel)(nil), (*v1alpha3.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(a.(*resource.ResourceRequestModel), b.(*v1alpha3.ResourceRequestModel), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceSlice)(nil), (*resource.ResourceSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceSlice_To_resource_ResourceSlice(a.(*v1alpha3.ResourceSlice), b.(*resource.ResourceSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceSlice)(nil), (*v1alpha3.ResourceSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceSlice_To_v1alpha3_ResourceSlice(a.(*resource.ResourceSlice), b.(*v1alpha3.ResourceSlice), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceSliceList)(nil), (*resource.ResourceSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList(a.(*v1alpha3.ResourceSliceList), b.(*resource.ResourceSliceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.ResourceSliceList)(nil), (*v1alpha3.ResourceSliceList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(a.(*resource.ResourceSliceList), b.(*v1alpha3.ResourceSliceList), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.StructuredResourceHandle)(nil), (*resource.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(a.(*v1alpha3.StructuredResourceHandle), b.(*resource.StructuredResourceHandle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.StructuredResourceHandle)(nil), (*v1alpha3.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(a.(*resource.StructuredResourceHandle), b.(*v1alpha3.StructuredResourceHandle), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.VendorParameters)(nil), (*resource.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_VendorParameters_To_resource_VendorParameters(a.(*v1alpha3.VendorParameters), b.(*resource.VendorParameters), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.VendorParameters)(nil), (*v1alpha3.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_VendorParameters_To_v1alpha3_VendorParameters(a.(*resource.VendorParameters), b.(*v1alpha3.VendorParameters), scope) + }); err != nil { + return err + } + return nil +} + +func autoConvert_v1alpha3_AllocationResult_To_resource_AllocationResult(in *v1alpha3.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error { + if in.ResourceHandles != nil { + in, out := &in.ResourceHandles, &out.ResourceHandles + *out = make([]resource.ResourceHandle, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.ResourceHandles = nil + } + out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) + return nil +} + +// Convert_v1alpha3_AllocationResult_To_resource_AllocationResult is an autogenerated conversion function. +func Convert_v1alpha3_AllocationResult_To_resource_AllocationResult(in *v1alpha3.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error { + return autoConvert_v1alpha3_AllocationResult_To_resource_AllocationResult(in, out, s) +} + +func autoConvert_resource_AllocationResult_To_v1alpha3_AllocationResult(in *resource.AllocationResult, out *v1alpha3.AllocationResult, s conversion.Scope) error { + if in.ResourceHandles != nil { + in, out := &in.ResourceHandles, &out.ResourceHandles + *out = make([]v1alpha3.ResourceHandle, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.ResourceHandles = nil + } + out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) + return nil +} + +// Convert_resource_AllocationResult_To_v1alpha3_AllocationResult is an autogenerated conversion function. +func Convert_resource_AllocationResult_To_v1alpha3_AllocationResult(in *resource.AllocationResult, out *v1alpha3.AllocationResult, s conversion.Scope) error { + return autoConvert_resource_AllocationResult_To_v1alpha3_AllocationResult(in, out, s) +} + +func autoConvert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha3.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { + out.NamedResources = (*resource.NamedResourcesAllocationResult)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel is an autogenerated conversion function. +func Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha3.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { + return autoConvert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(in, out, s) +} + +func autoConvert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha3.AllocationResultModel, s conversion.Scope) error { + out.NamedResources = (*v1alpha3.NamedResourcesAllocationResult)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel is an autogenerated conversion function. +func Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha3.AllocationResultModel, s conversion.Scope) error { + return autoConvert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(in, out, s) +} + +func autoConvert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha3.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { + return err + } + if err := Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult is an autogenerated conversion function. +func Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha3.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { + return autoConvert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(in, out, s) +} + +func autoConvert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha3.DriverAllocationResult, s conversion.Scope) error { + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { + return err + } + if err := Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult is an autogenerated conversion function. +func Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha3.DriverAllocationResult, s conversion.Scope) error { + return autoConvert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(in, out, s) +} + +func autoConvert_v1alpha3_DriverRequests_To_resource_DriverRequests(in *v1alpha3.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]resource.ResourceRequest, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Requests = nil + } + return nil +} + +// Convert_v1alpha3_DriverRequests_To_resource_DriverRequests is an autogenerated conversion function. +func Convert_v1alpha3_DriverRequests_To_resource_DriverRequests(in *v1alpha3.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { + return autoConvert_v1alpha3_DriverRequests_To_resource_DriverRequests(in, out, s) +} + +func autoConvert_resource_DriverRequests_To_v1alpha3_DriverRequests(in *resource.DriverRequests, out *v1alpha3.DriverRequests, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]v1alpha3.ResourceRequest, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Requests = nil + } + return nil +} + +// Convert_resource_DriverRequests_To_v1alpha3_DriverRequests is an autogenerated conversion function. +func Convert_resource_DriverRequests_To_v1alpha3_DriverRequests(in *resource.DriverRequests, out *v1alpha3.DriverRequests, s conversion.Scope) error { + return autoConvert_resource_DriverRequests_To_v1alpha3_DriverRequests(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in *v1alpha3.NamedResourcesAllocationResult, out *resource.NamedResourcesAllocationResult, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in *v1alpha3.NamedResourcesAllocationResult, out *resource.NamedResourcesAllocationResult, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in, out, s) +} + +func autoConvert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(in *resource.NamedResourcesAllocationResult, out *v1alpha3.NamedResourcesAllocationResult, s conversion.Scope) error { + out.Name = in.Name + return nil +} + +// Convert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult is an autogenerated conversion function. +func Convert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(in *resource.NamedResourcesAllocationResult, out *v1alpha3.NamedResourcesAllocationResult, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in *v1alpha3.NamedResourcesAttribute, out *resource.NamedResourcesAttribute, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(&in.NamedResourcesAttributeValue, &out.NamedResourcesAttributeValue, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in *v1alpha3.NamedResourcesAttribute, out *resource.NamedResourcesAttribute, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in, out, s) +} + +func autoConvert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(in *resource.NamedResourcesAttribute, out *v1alpha3.NamedResourcesAttribute, s conversion.Scope) error { + out.Name = in.Name + if err := Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(&in.NamedResourcesAttributeValue, &out.NamedResourcesAttributeValue, s); err != nil { + return err + } + return nil +} + +// Convert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute is an autogenerated conversion function. +func Convert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(in *resource.NamedResourcesAttribute, out *v1alpha3.NamedResourcesAttribute, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in *v1alpha3.NamedResourcesAttributeValue, out *resource.NamedResourcesAttributeValue, s conversion.Scope) error { + out.QuantityValue = (*apiresource.Quantity)(unsafe.Pointer(in.QuantityValue)) + out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) + out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) + out.IntSliceValue = (*resource.NamedResourcesIntSlice)(unsafe.Pointer(in.IntSliceValue)) + out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) + out.StringSliceValue = (*resource.NamedResourcesStringSlice)(unsafe.Pointer(in.StringSliceValue)) + out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) + return nil +} + +// Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in *v1alpha3.NamedResourcesAttributeValue, out *resource.NamedResourcesAttributeValue, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in, out, s) +} + +func autoConvert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(in *resource.NamedResourcesAttributeValue, out *v1alpha3.NamedResourcesAttributeValue, s conversion.Scope) error { + out.QuantityValue = (*apiresource.Quantity)(unsafe.Pointer(in.QuantityValue)) + out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) + out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) + out.IntSliceValue = (*v1alpha3.NamedResourcesIntSlice)(unsafe.Pointer(in.IntSliceValue)) + out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) + out.StringSliceValue = (*v1alpha3.NamedResourcesStringSlice)(unsafe.Pointer(in.StringSliceValue)) + out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) + return nil +} + +// Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue is an autogenerated conversion function. +func Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(in *resource.NamedResourcesAttributeValue, out *v1alpha3.NamedResourcesAttributeValue, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(in *v1alpha3.NamedResourcesFilter, out *resource.NamedResourcesFilter, s conversion.Scope) error { + out.Selector = in.Selector + return nil +} + +// Convert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(in *v1alpha3.NamedResourcesFilter, out *resource.NamedResourcesFilter, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(in, out, s) +} + +func autoConvert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(in *resource.NamedResourcesFilter, out *v1alpha3.NamedResourcesFilter, s conversion.Scope) error { + out.Selector = in.Selector + return nil +} + +// Convert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter is an autogenerated conversion function. +func Convert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(in *resource.NamedResourcesFilter, out *v1alpha3.NamedResourcesFilter, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(in *v1alpha3.NamedResourcesInstance, out *resource.NamedResourcesInstance, s conversion.Scope) error { + out.Name = in.Name + out.Attributes = *(*[]resource.NamedResourcesAttribute)(unsafe.Pointer(&in.Attributes)) + return nil +} + +// Convert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(in *v1alpha3.NamedResourcesInstance, out *resource.NamedResourcesInstance, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(in, out, s) +} + +func autoConvert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(in *resource.NamedResourcesInstance, out *v1alpha3.NamedResourcesInstance, s conversion.Scope) error { + out.Name = in.Name + out.Attributes = *(*[]v1alpha3.NamedResourcesAttribute)(unsafe.Pointer(&in.Attributes)) + return nil +} + +// Convert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance is an autogenerated conversion function. +func Convert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(in *resource.NamedResourcesInstance, out *v1alpha3.NamedResourcesInstance, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in *v1alpha3.NamedResourcesIntSlice, out *resource.NamedResourcesIntSlice, s conversion.Scope) error { + out.Ints = *(*[]int64)(unsafe.Pointer(&in.Ints)) + return nil +} + +// Convert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in *v1alpha3.NamedResourcesIntSlice, out *resource.NamedResourcesIntSlice, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in, out, s) +} + +func autoConvert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(in *resource.NamedResourcesIntSlice, out *v1alpha3.NamedResourcesIntSlice, s conversion.Scope) error { + out.Ints = *(*[]int64)(unsafe.Pointer(&in.Ints)) + return nil +} + +// Convert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice is an autogenerated conversion function. +func Convert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(in *resource.NamedResourcesIntSlice, out *v1alpha3.NamedResourcesIntSlice, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(in *v1alpha3.NamedResourcesRequest, out *resource.NamedResourcesRequest, s conversion.Scope) error { + out.Selector = in.Selector + return nil +} + +// Convert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(in *v1alpha3.NamedResourcesRequest, out *resource.NamedResourcesRequest, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(in, out, s) +} + +func autoConvert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(in *resource.NamedResourcesRequest, out *v1alpha3.NamedResourcesRequest, s conversion.Scope) error { + out.Selector = in.Selector + return nil +} + +// Convert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest is an autogenerated conversion function. +func Convert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(in *resource.NamedResourcesRequest, out *v1alpha3.NamedResourcesRequest, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(in *v1alpha3.NamedResourcesResources, out *resource.NamedResourcesResources, s conversion.Scope) error { + out.Instances = *(*[]resource.NamedResourcesInstance)(unsafe.Pointer(&in.Instances)) + return nil +} + +// Convert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(in *v1alpha3.NamedResourcesResources, out *resource.NamedResourcesResources, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(in, out, s) +} + +func autoConvert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(in *resource.NamedResourcesResources, out *v1alpha3.NamedResourcesResources, s conversion.Scope) error { + out.Instances = *(*[]v1alpha3.NamedResourcesInstance)(unsafe.Pointer(&in.Instances)) + return nil +} + +// Convert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources is an autogenerated conversion function. +func Convert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(in *resource.NamedResourcesResources, out *v1alpha3.NamedResourcesResources, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(in, out, s) +} + +func autoConvert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in *v1alpha3.NamedResourcesStringSlice, out *resource.NamedResourcesStringSlice, s conversion.Scope) error { + out.Strings = *(*[]string)(unsafe.Pointer(&in.Strings)) + return nil +} + +// Convert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice is an autogenerated conversion function. +func Convert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in *v1alpha3.NamedResourcesStringSlice, out *resource.NamedResourcesStringSlice, s conversion.Scope) error { + return autoConvert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in, out, s) +} + +func autoConvert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(in *resource.NamedResourcesStringSlice, out *v1alpha3.NamedResourcesStringSlice, s conversion.Scope) error { + out.Strings = *(*[]string)(unsafe.Pointer(&in.Strings)) + return nil +} + +// Convert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice is an autogenerated conversion function. +func Convert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(in *resource.NamedResourcesStringSlice, out *v1alpha3.NamedResourcesStringSlice, s conversion.Scope) error { + return autoConvert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(in, out, s) +} + +func autoConvert_v1alpha3_PodSchedulingContext_To_resource_PodSchedulingContext(in *v1alpha3.PodSchedulingContext, out *resource.PodSchedulingContext, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_PodSchedulingContext_To_resource_PodSchedulingContext is an autogenerated conversion function. +func Convert_v1alpha3_PodSchedulingContext_To_resource_PodSchedulingContext(in *v1alpha3.PodSchedulingContext, out *resource.PodSchedulingContext, s conversion.Scope) error { + return autoConvert_v1alpha3_PodSchedulingContext_To_resource_PodSchedulingContext(in, out, s) +} + +func autoConvert_resource_PodSchedulingContext_To_v1alpha3_PodSchedulingContext(in *resource.PodSchedulingContext, out *v1alpha3.PodSchedulingContext, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_resource_PodSchedulingContextSpec_To_v1alpha3_PodSchedulingContextSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_resource_PodSchedulingContextStatus_To_v1alpha3_PodSchedulingContextStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_resource_PodSchedulingContext_To_v1alpha3_PodSchedulingContext is an autogenerated conversion function. +func Convert_resource_PodSchedulingContext_To_v1alpha3_PodSchedulingContext(in *resource.PodSchedulingContext, out *v1alpha3.PodSchedulingContext, s conversion.Scope) error { + return autoConvert_resource_PodSchedulingContext_To_v1alpha3_PodSchedulingContext(in, out, s) +} + +func autoConvert_v1alpha3_PodSchedulingContextList_To_resource_PodSchedulingContextList(in *v1alpha3.PodSchedulingContextList, out *resource.PodSchedulingContextList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]resource.PodSchedulingContext)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_PodSchedulingContextList_To_resource_PodSchedulingContextList is an autogenerated conversion function. +func Convert_v1alpha3_PodSchedulingContextList_To_resource_PodSchedulingContextList(in *v1alpha3.PodSchedulingContextList, out *resource.PodSchedulingContextList, s conversion.Scope) error { + return autoConvert_v1alpha3_PodSchedulingContextList_To_resource_PodSchedulingContextList(in, out, s) +} + +func autoConvert_resource_PodSchedulingContextList_To_v1alpha3_PodSchedulingContextList(in *resource.PodSchedulingContextList, out *v1alpha3.PodSchedulingContextList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha3.PodSchedulingContext)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_resource_PodSchedulingContextList_To_v1alpha3_PodSchedulingContextList is an autogenerated conversion function. +func Convert_resource_PodSchedulingContextList_To_v1alpha3_PodSchedulingContextList(in *resource.PodSchedulingContextList, out *v1alpha3.PodSchedulingContextList, s conversion.Scope) error { + return autoConvert_resource_PodSchedulingContextList_To_v1alpha3_PodSchedulingContextList(in, out, s) +} + +func autoConvert_v1alpha3_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(in *v1alpha3.PodSchedulingContextSpec, out *resource.PodSchedulingContextSpec, s conversion.Scope) error { + out.SelectedNode = in.SelectedNode + out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes)) + return nil +} + +// Convert_v1alpha3_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec is an autogenerated conversion function. +func Convert_v1alpha3_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(in *v1alpha3.PodSchedulingContextSpec, out *resource.PodSchedulingContextSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_PodSchedulingContextSpec_To_resource_PodSchedulingContextSpec(in, out, s) +} + +func autoConvert_resource_PodSchedulingContextSpec_To_v1alpha3_PodSchedulingContextSpec(in *resource.PodSchedulingContextSpec, out *v1alpha3.PodSchedulingContextSpec, s conversion.Scope) error { + out.SelectedNode = in.SelectedNode + out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes)) + return nil +} + +// Convert_resource_PodSchedulingContextSpec_To_v1alpha3_PodSchedulingContextSpec is an autogenerated conversion function. +func Convert_resource_PodSchedulingContextSpec_To_v1alpha3_PodSchedulingContextSpec(in *resource.PodSchedulingContextSpec, out *v1alpha3.PodSchedulingContextSpec, s conversion.Scope) error { + return autoConvert_resource_PodSchedulingContextSpec_To_v1alpha3_PodSchedulingContextSpec(in, out, s) +} + +func autoConvert_v1alpha3_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(in *v1alpha3.PodSchedulingContextStatus, out *resource.PodSchedulingContextStatus, s conversion.Scope) error { + out.ResourceClaims = *(*[]resource.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims)) + return nil +} + +// Convert_v1alpha3_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus is an autogenerated conversion function. +func Convert_v1alpha3_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(in *v1alpha3.PodSchedulingContextStatus, out *resource.PodSchedulingContextStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_PodSchedulingContextStatus_To_resource_PodSchedulingContextStatus(in, out, s) +} + +func autoConvert_resource_PodSchedulingContextStatus_To_v1alpha3_PodSchedulingContextStatus(in *resource.PodSchedulingContextStatus, out *v1alpha3.PodSchedulingContextStatus, s conversion.Scope) error { + out.ResourceClaims = *(*[]v1alpha3.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims)) + return nil +} + +// Convert_resource_PodSchedulingContextStatus_To_v1alpha3_PodSchedulingContextStatus is an autogenerated conversion function. +func Convert_resource_PodSchedulingContextStatus_To_v1alpha3_PodSchedulingContextStatus(in *resource.PodSchedulingContextStatus, out *v1alpha3.PodSchedulingContextStatus, s conversion.Scope) error { + return autoConvert_resource_PodSchedulingContextStatus_To_v1alpha3_PodSchedulingContextStatus(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaim_To_resource_ResourceClaim(in *v1alpha3.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_ResourceClaim_To_resource_ResourceClaim is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaim_To_resource_ResourceClaim(in *v1alpha3.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaim_To_resource_ResourceClaim(in, out, s) +} + +func autoConvert_resource_ResourceClaim_To_v1alpha3_ResourceClaim(in *resource.ResourceClaim, out *v1alpha3.ResourceClaim, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + if err := Convert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceClaim_To_v1alpha3_ResourceClaim is an autogenerated conversion function. +func Convert_resource_ResourceClaim_To_v1alpha3_ResourceClaim(in *resource.ResourceClaim, out *v1alpha3.ResourceClaim, s conversion.Scope) error { + return autoConvert_resource_ResourceClaim_To_v1alpha3_ResourceClaim(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha3.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Resource = in.Resource + out.Name = in.Name + out.UID = types.UID(in.UID) + return nil +} + +// Convert_v1alpha3_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha3.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in, out, s) +} + +func autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha3_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha3.ResourceClaimConsumerReference, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Resource = in.Resource + out.Name = in.Name + out.UID = types.UID(in.UID) + return nil +} + +// Convert_resource_ResourceClaimConsumerReference_To_v1alpha3_ResourceClaimConsumerReference is an autogenerated conversion function. +func Convert_resource_ResourceClaimConsumerReference_To_v1alpha3_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha3.ResourceClaimConsumerReference, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha3_ResourceClaimConsumerReference(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha3.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]resource.ResourceClaim, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ResourceClaim_To_resource_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_ResourceClaimList_To_resource_ResourceClaimList is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha3.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimList_To_resource_ResourceClaimList(in, out, s) +} + +func autoConvert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha3.ResourceClaimList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha3.ResourceClaim, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceClaim_To_v1alpha3_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList is an autogenerated conversion function. +func Convert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha3.ResourceClaimList, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha3.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]resource.DriverRequests, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_DriverRequests_To_resource_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.DriverRequests = nil + } + return nil +} + +// Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha3.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(in, out, s) +} + +func autoConvert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha3.ResourceClaimParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*v1alpha3.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + if in.DriverRequests != nil { + in, out := &in.DriverRequests, &out.DriverRequests + *out = make([]v1alpha3.DriverRequests, len(*in)) + for i := range *in { + if err := Convert_resource_DriverRequests_To_v1alpha3_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.DriverRequests = nil + } + return nil +} + +// Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters is an autogenerated conversion function. +func Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha3.ResourceClaimParameters, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha3.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]resource.ResourceClaimParameters, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha3.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in, out, s) +} + +func autoConvert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha3.ResourceClaimParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha3.ResourceClaimParameters, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList is an autogenerated conversion function. +func Convert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha3.ResourceClaimParametersList, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha3.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +// Convert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha3.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in, out, s) +} + +func autoConvert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha3.ResourceClaimParametersReference, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + return nil +} + +// Convert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference is an autogenerated conversion function. +func Convert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha3.ResourceClaimParametersReference, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha3.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error { + out.Name = in.Name + out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes)) + return nil +} + +// Convert_v1alpha3_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha3.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in, out, s) +} + +func autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha3_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha3.ResourceClaimSchedulingStatus, s conversion.Scope) error { + out.Name = in.Name + out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes)) + return nil +} + +// Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha3_ResourceClaimSchedulingStatus is an autogenerated conversion function. +func Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha3_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha3.ResourceClaimSchedulingStatus, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha3_ResourceClaimSchedulingStatus(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha3.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error { + out.ResourceClassName = in.ResourceClassName + out.ParametersRef = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) + return nil +} + +// Convert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha3.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(in, out, s) +} + +func autoConvert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha3.ResourceClaimSpec, s conversion.Scope) error { + out.ResourceClassName = in.ResourceClassName + out.ParametersRef = (*v1alpha3.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) + return nil +} + +// Convert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec is an autogenerated conversion function. +func Convert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha3.ResourceClaimSpec, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha3.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error { + out.DriverName = in.DriverName + if in.Allocation != nil { + in, out := &in.Allocation, &out.Allocation + *out = new(resource.AllocationResult) + if err := Convert_v1alpha3_AllocationResult_To_resource_AllocationResult(*in, *out, s); err != nil { + return err + } + } else { + out.Allocation = nil + } + out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) + out.DeallocationRequested = in.DeallocationRequested + return nil +} + +// Convert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha3.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(in, out, s) +} + +func autoConvert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha3.ResourceClaimStatus, s conversion.Scope) error { + out.DriverName = in.DriverName + if in.Allocation != nil { + in, out := &in.Allocation, &out.Allocation + *out = new(v1alpha3.AllocationResult) + if err := Convert_resource_AllocationResult_To_v1alpha3_AllocationResult(*in, *out, s); err != nil { + return err + } + } else { + out.Allocation = nil + } + out.ReservedFor = *(*[]v1alpha3.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) + out.DeallocationRequested = in.DeallocationRequested + return nil +} + +// Convert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus is an autogenerated conversion function. +func Convert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha3.ResourceClaimStatus, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha3.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_ResourceClaimTemplate_To_resource_ResourceClaimTemplate is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha3.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in, out, s) +} + +func autoConvert_resource_ResourceClaimTemplate_To_v1alpha3_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha3.ResourceClaimTemplate, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceClaimTemplate_To_v1alpha3_ResourceClaimTemplate is an autogenerated conversion function. +func Convert_resource_ResourceClaimTemplate_To_v1alpha3_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha3.ResourceClaimTemplate, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimTemplate_To_v1alpha3_ResourceClaimTemplate(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha3.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]resource.ResourceClaimTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha3.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in, out, s) +} + +func autoConvert_resource_ResourceClaimTemplateList_To_v1alpha3_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha3.ResourceClaimTemplateList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha3.ResourceClaimTemplate)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_resource_ResourceClaimTemplateList_To_v1alpha3_ResourceClaimTemplateList is an autogenerated conversion function. +func Convert_resource_ResourceClaimTemplateList_To_v1alpha3_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha3.ResourceClaimTemplateList, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimTemplateList_To_v1alpha3_ResourceClaimTemplateList(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha3.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha3.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in, out, s) +} + +func autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha3.ResourceClaimTemplateSpec, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplateSpec is an autogenerated conversion function. +func Convert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha3.ResourceClaimTemplateSpec, s conversion.Scope) error { + return autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplateSpec(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClass_To_resource_ResourceClass(in *v1alpha3.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DriverName = in.DriverName + out.ParametersRef = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) + out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) + out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) + return nil +} + +// Convert_v1alpha3_ResourceClass_To_resource_ResourceClass is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClass_To_resource_ResourceClass(in *v1alpha3.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClass_To_resource_ResourceClass(in, out, s) +} + +func autoConvert_resource_ResourceClass_To_v1alpha3_ResourceClass(in *resource.ResourceClass, out *v1alpha3.ResourceClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.DriverName = in.DriverName + out.ParametersRef = (*v1alpha3.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) + out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) + out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) + return nil +} + +// Convert_resource_ResourceClass_To_v1alpha3_ResourceClass is an autogenerated conversion function. +func Convert_resource_ResourceClass_To_v1alpha3_ResourceClass(in *resource.ResourceClass, out *v1alpha3.ResourceClass, s conversion.Scope) error { + return autoConvert_resource_ResourceClass_To_v1alpha3_ResourceClass(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(in *v1alpha3.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]resource.ResourceClass)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_ResourceClassList_To_resource_ResourceClassList is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(in *v1alpha3.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(in, out, s) +} + +func autoConvert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(in *resource.ResourceClassList, out *v1alpha3.ResourceClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha3.ResourceClass)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_resource_ResourceClassList_To_v1alpha3_ResourceClassList is an autogenerated conversion function. +func Convert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(in *resource.ResourceClassList, out *v1alpha3.ResourceClassList, s conversion.Scope) error { + return autoConvert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha3.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]resource.VendorParameters, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_VendorParameters_To_resource_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VendorParameters = nil + } + out.Filters = *(*[]resource.ResourceFilter)(unsafe.Pointer(&in.Filters)) + return nil +} + +// Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha3.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(in, out, s) +} + +func autoConvert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha3.ResourceClassParameters, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.GeneratedFrom = (*v1alpha3.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) + if in.VendorParameters != nil { + in, out := &in.VendorParameters, &out.VendorParameters + *out = make([]v1alpha3.VendorParameters, len(*in)) + for i := range *in { + if err := Convert_resource_VendorParameters_To_v1alpha3_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.VendorParameters = nil + } + out.Filters = *(*[]v1alpha3.ResourceFilter)(unsafe.Pointer(&in.Filters)) + return nil +} + +// Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters is an autogenerated conversion function. +func Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha3.ResourceClassParameters, s conversion.Scope) error { + return autoConvert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha3.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]resource.ResourceClassParameters, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha3.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(in, out, s) +} + +func autoConvert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha3.ResourceClassParametersList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]v1alpha3.ResourceClassParameters, len(*in)) + for i := range *in { + if err := Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Items = nil + } + return nil +} + +// Convert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList is an autogenerated conversion function. +func Convert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha3.ResourceClassParametersList, s conversion.Scope) error { + return autoConvert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(in, out, s) +} + +func autoConvert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha3.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +// Convert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference is an autogenerated conversion function. +func Convert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha3.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in, out, s) +} + +func autoConvert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha3.ResourceClassParametersReference, s conversion.Scope) error { + out.APIGroup = in.APIGroup + out.Kind = in.Kind + out.Name = in.Name + out.Namespace = in.Namespace + return nil +} + +// Convert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference is an autogenerated conversion function. +func Convert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha3.ResourceClassParametersReference, s conversion.Scope) error { + return autoConvert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(in, out, s) +} + +func autoConvert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(in *v1alpha3.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_ResourceFilter_To_resource_ResourceFilter is an autogenerated conversion function. +func Convert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(in *v1alpha3.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(in, out, s) +} + +func autoConvert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(in *resource.ResourceFilter, out *v1alpha3.ResourceFilter, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceFilter_To_v1alpha3_ResourceFilter is an autogenerated conversion function. +func Convert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(in *resource.ResourceFilter, out *v1alpha3.ResourceFilter, s conversion.Scope) error { + return autoConvert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(in, out, s) +} + +func autoConvert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha3.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { + out.NamedResources = (*resource.NamedResourcesFilter)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel is an autogenerated conversion function. +func Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha3.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(in, out, s) +} + +func autoConvert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha3.ResourceFilterModel, s conversion.Scope) error { + out.NamedResources = (*v1alpha3.NamedResourcesFilter)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel is an autogenerated conversion function. +func Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha3.ResourceFilterModel, s conversion.Scope) error { + return autoConvert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(in, out, s) +} + +func autoConvert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(in *v1alpha3.ResourceHandle, out *resource.ResourceHandle, s conversion.Scope) error { + out.DriverName = in.DriverName + out.Data = in.Data + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(resource.StructuredResourceHandle) + if err := Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(*in, *out, s); err != nil { + return err + } + } else { + out.StructuredData = nil + } + return nil +} + +// Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle is an autogenerated conversion function. +func Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(in *v1alpha3.ResourceHandle, out *resource.ResourceHandle, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(in, out, s) +} + +func autoConvert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(in *resource.ResourceHandle, out *v1alpha3.ResourceHandle, s conversion.Scope) error { + out.DriverName = in.DriverName + out.Data = in.Data + if in.StructuredData != nil { + in, out := &in.StructuredData, &out.StructuredData + *out = new(v1alpha3.StructuredResourceHandle) + if err := Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(*in, *out, s); err != nil { + return err + } + } else { + out.StructuredData = nil + } + return nil +} + +// Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle is an autogenerated conversion function. +func Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(in *resource.ResourceHandle, out *v1alpha3.ResourceHandle, s conversion.Scope) error { + return autoConvert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(in, out, s) +} + +func autoConvert_v1alpha3_ResourceModel_To_resource_ResourceModel(in *v1alpha3.ResourceModel, out *resource.ResourceModel, s conversion.Scope) error { + out.NamedResources = (*resource.NamedResourcesResources)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_v1alpha3_ResourceModel_To_resource_ResourceModel is an autogenerated conversion function. +func Convert_v1alpha3_ResourceModel_To_resource_ResourceModel(in *v1alpha3.ResourceModel, out *resource.ResourceModel, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceModel_To_resource_ResourceModel(in, out, s) +} + +func autoConvert_resource_ResourceModel_To_v1alpha3_ResourceModel(in *resource.ResourceModel, out *v1alpha3.ResourceModel, s conversion.Scope) error { + out.NamedResources = (*v1alpha3.NamedResourcesResources)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_resource_ResourceModel_To_v1alpha3_ResourceModel is an autogenerated conversion function. +func Convert_resource_ResourceModel_To_v1alpha3_ResourceModel(in *resource.ResourceModel, out *v1alpha3.ResourceModel, s conversion.Scope) error { + return autoConvert_resource_ResourceModel_To_v1alpha3_ResourceModel(in, out, s) +} + +func autoConvert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(in *v1alpha3.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if err := Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest is an autogenerated conversion function. +func Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(in *v1alpha3.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(in, out, s) +} + +func autoConvert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(in *resource.ResourceRequest, out *v1alpha3.ResourceRequest, s conversion.Scope) error { + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { + return err + } + if err := Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest is an autogenerated conversion function. +func Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(in *resource.ResourceRequest, out *v1alpha3.ResourceRequest, s conversion.Scope) error { + return autoConvert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(in, out, s) +} + +func autoConvert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha3.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { + out.NamedResources = (*resource.NamedResourcesRequest)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel is an autogenerated conversion function. +func Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha3.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(in, out, s) +} + +func autoConvert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha3.ResourceRequestModel, s conversion.Scope) error { + out.NamedResources = (*v1alpha3.NamedResourcesRequest)(unsafe.Pointer(in.NamedResources)) + return nil +} + +// Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel is an autogenerated conversion function. +func Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha3.ResourceRequestModel, s conversion.Scope) error { + return autoConvert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(in, out, s) +} + +func autoConvert_v1alpha3_ResourceSlice_To_resource_ResourceSlice(in *v1alpha3.ResourceSlice, out *resource.ResourceSlice, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.NodeName = in.NodeName + out.DriverName = in.DriverName + if err := Convert_v1alpha3_ResourceModel_To_resource_ResourceModel(&in.ResourceModel, &out.ResourceModel, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_ResourceSlice_To_resource_ResourceSlice is an autogenerated conversion function. +func Convert_v1alpha3_ResourceSlice_To_resource_ResourceSlice(in *v1alpha3.ResourceSlice, out *resource.ResourceSlice, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceSlice_To_resource_ResourceSlice(in, out, s) +} + +func autoConvert_resource_ResourceSlice_To_v1alpha3_ResourceSlice(in *resource.ResourceSlice, out *v1alpha3.ResourceSlice, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + out.NodeName = in.NodeName + out.DriverName = in.DriverName + if err := Convert_resource_ResourceModel_To_v1alpha3_ResourceModel(&in.ResourceModel, &out.ResourceModel, s); err != nil { + return err + } + return nil +} + +// Convert_resource_ResourceSlice_To_v1alpha3_ResourceSlice is an autogenerated conversion function. +func Convert_resource_ResourceSlice_To_v1alpha3_ResourceSlice(in *resource.ResourceSlice, out *v1alpha3.ResourceSlice, s conversion.Scope) error { + return autoConvert_resource_ResourceSlice_To_v1alpha3_ResourceSlice(in, out, s) +} + +func autoConvert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList(in *v1alpha3.ResourceSliceList, out *resource.ResourceSliceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]resource.ResourceSlice)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList is an autogenerated conversion function. +func Convert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList(in *v1alpha3.ResourceSliceList, out *resource.ResourceSliceList, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceSliceList_To_resource_ResourceSliceList(in, out, s) +} + +func autoConvert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(in *resource.ResourceSliceList, out *v1alpha3.ResourceSliceList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha3.ResourceSlice)(unsafe.Pointer(&in.Items)) + return nil +} + +// Convert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList is an autogenerated conversion function. +func Convert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(in *resource.ResourceSliceList, out *v1alpha3.ResourceSliceList, s conversion.Scope) error { + return autoConvert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(in, out, s) +} + +func autoConvert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha3.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { + return err + } + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { + return err + } + out.NodeName = in.NodeName + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]resource.DriverAllocationResult, len(*in)) + for i := range *in { + if err := Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Results = nil + } + return nil +} + +// Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle is an autogenerated conversion function. +func Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha3.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { + return autoConvert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(in, out, s) +} + +func autoConvert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha3.StructuredResourceHandle, s conversion.Scope) error { + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { + return err + } + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { + return err + } + out.NodeName = in.NodeName + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]v1alpha3.DriverAllocationResult, len(*in)) + for i := range *in { + if err := Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Results = nil + } + return nil +} + +// Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle is an autogenerated conversion function. +func Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha3.StructuredResourceHandle, s conversion.Scope) error { + return autoConvert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(in, out, s) +} + +func autoConvert_v1alpha3_VendorParameters_To_resource_VendorParameters(in *v1alpha3.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Parameters, &out.Parameters, s); err != nil { + return err + } + return nil +} + +// Convert_v1alpha3_VendorParameters_To_resource_VendorParameters is an autogenerated conversion function. +func Convert_v1alpha3_VendorParameters_To_resource_VendorParameters(in *v1alpha3.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { + return autoConvert_v1alpha3_VendorParameters_To_resource_VendorParameters(in, out, s) +} + +func autoConvert_resource_VendorParameters_To_v1alpha3_VendorParameters(in *resource.VendorParameters, out *v1alpha3.VendorParameters, s conversion.Scope) error { + out.DriverName = in.DriverName + if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Parameters, &out.Parameters, s); err != nil { + return err + } + return nil +} + +// Convert_resource_VendorParameters_To_v1alpha3_VendorParameters is an autogenerated conversion function. +func Convert_resource_VendorParameters_To_v1alpha3_VendorParameters(in *resource.VendorParameters, out *v1alpha3.VendorParameters, s conversion.Scope) error { + return autoConvert_resource_VendorParameters_To_v1alpha3_VendorParameters(in, out, s) +} diff --git a/pkg/apis/resource/v1alpha2/zz_generated.defaults.go b/pkg/apis/resource/v1alpha3/zz_generated.defaults.go similarity index 98% rename from pkg/apis/resource/v1alpha2/zz_generated.defaults.go rename to pkg/apis/resource/v1alpha3/zz_generated.defaults.go index 7e0a05edc9500..8b3ec1e1c4aa6 100644 --- a/pkg/apis/resource/v1alpha2/zz_generated.defaults.go +++ b/pkg/apis/resource/v1alpha3/zz_generated.defaults.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by defaulter-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/controller/resourceclaim/controller.go b/pkg/controller/resourceclaim/controller.go index e9da966f85ad4..596113b17d26e 100644 --- a/pkg/controller/resourceclaim/controller.go +++ b/pkg/controller/resourceclaim/controller.go @@ -25,7 +25,7 @@ import ( "time" 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" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -33,12 +33,12 @@ import ( "k8s.io/apimachinery/pkg/util/wait" corev1apply "k8s.io/client-go/applyconfigurations/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" "k8s.io/client-go/kubernetes/scheme" v1core "k8s.io/client-go/kubernetes/typed/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/record" "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 // objects from the API server. It is shared with other controllers and // therefore the ResourceClaim objects in its store should be treated as immutable. - claimLister resourcev1alpha2listers.ResourceClaimLister + claimLister resourcelisters.ResourceClaimLister claimsSynced cache.InformerSynced claimCache cache.MutationCache @@ -92,14 +92,14 @@ type Controller struct { // fetch scheduling objects from the API server. It is shared with other // controllers and therefore the objects in its store should be treated // as immutable. - podSchedulingLister resourcev1alpha2listers.PodSchedulingContextLister + podSchedulingLister resourcelisters.PodSchedulingContextLister podSchedulingSynced cache.InformerSynced // templateLister is the shared ResourceClaimTemplate lister used to // fetch template objects from the API server. It is shared with other // controllers and therefore the objects in its store should be treated // as immutable. - templateLister resourcev1alpha2listers.ResourceClaimTemplateLister + templateLister resourcelisters.ResourceClaimTemplateLister templatesSynced cache.InformerSynced // podIndexer has the common PodResourceClaim indexer installed To @@ -127,9 +127,9 @@ func NewController( logger klog.Logger, kubeClient clientset.Interface, podInformer v1informers.PodInformer, - podSchedulingInformer resourcev1alpha2informers.PodSchedulingContextInformer, - claimInformer resourcev1alpha2informers.ResourceClaimInformer, - templateInformer resourcev1alpha2informers.ResourceClaimTemplateInformer) (*Controller, error) { + podSchedulingInformer resourceinformers.PodSchedulingContextInformer, + claimInformer resourceinformers.ResourceClaimInformer, + templateInformer resourceinformers.ResourceClaimTemplateInformer) (*Controller, error) { ec := &Controller{ kubeClient: kubeClient, @@ -358,7 +358,7 @@ func (ec *Controller) enqueueResourceClaim(logger klog.Logger, obj interface{}, if d, ok := obj.(cache.DeletedFinalStateUnknown); ok { obj = d.Obj } - claim, ok := obj.(*resourcev1alpha2.ResourceClaim) + claim, ok := obj.(*resourceapi.ResourceClaim) if !ok { return } @@ -631,7 +631,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1. "-" + podClaim.Name[0:len(podClaim.Name)*maxBaseLen/len(generateName)] } - claim = &resourcev1alpha2.ResourceClaim{ + claim = &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ GenerateName: generateName, OwnerReferences: []metav1.OwnerReference{ @@ -651,7 +651,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1. } metrics.ResourceClaimCreateAttempts.Inc() 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 { metrics.ResourceClaimCreateFailures.Inc() return fmt.Errorf("create ResourceClaim %s: %v", claimName, err) @@ -672,7 +672,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1. // findPodResourceClaim looks for an existing ResourceClaim with the right // annotation (ties it to the pod claim) and the right ownership (ties it to // 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. claims, err := ec.claimCache.ByIndex(claimPodOwnerIndex, string(pod.UID)) if err != nil { @@ -680,7 +680,7 @@ func (ec *Controller) findPodResourceClaim(pod *v1.Pod, podClaim v1.PodResourceC } deterministicName := pod.Name + "-" + podClaim.Name // Kubernetes <= 1.27 behavior. for _, claimObj := range claims { - claim, ok := claimObj.(*resourcev1alpha2.ResourceClaim) + claim, ok := claimObj.(*resourceapi.ResourceClaim) if !ok { return nil, fmt.Errorf("unexpected object of type %T returned by claim cache", claimObj) } @@ -712,7 +712,7 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po return fmt.Errorf("retrieve PodSchedulingContext: %v", err) } if scheduling == nil { - scheduling = &resourcev1alpha2.PodSchedulingContext{ + scheduling = &resourceapi.PodSchedulingContext{ ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: pod.Namespace, @@ -726,14 +726,14 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po }, }, }, - Spec: resourcev1alpha2.PodSchedulingContextSpec{ + Spec: resourceapi.PodSchedulingContextSpec{ SelectedNode: pod.Spec.NodeName, // There is no need for negotiation about // potential and suitable nodes anymore, so // 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 nil @@ -742,7 +742,7 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po if scheduling.Spec.SelectedNode != pod.Spec.NodeName { scheduling := scheduling.DeepCopy() 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) } } @@ -750,15 +750,15 @@ func (ec *Controller) ensurePodSchedulingContext(ctx context.Context, pod *v1.Po 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.Status.ReservedFor = append(claim.Status.ReservedFor, - resourcev1alpha2.ResourceClaimConsumerReference{ + resourceapi.ResourceClaimConsumerReference{ Resource: "pods", Name: pod.Name, 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 nil @@ -777,7 +777,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err } // 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 { if reservedFor.APIGroup == "" && reservedFor.Resource == "pods" { @@ -836,7 +836,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err 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) if len(valid) < len(claim.Status.ReservedFor) { // This is not using a patch because we want the update to fail if anything @@ -872,17 +872,17 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err } } - 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 { return err } // 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. - builtinControllerFinalizer := slices.Index(claim.Finalizers, resourcev1alpha2.Finalizer) + builtinControllerFinalizer := slices.Index(claim.Finalizers, resourceapi.Finalizer) if builtinControllerFinalizer >= 0 && claim.Status.Allocation == nil { 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 } } @@ -894,14 +894,14 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err // deleted. As above we then need to clear the allocation. claim.Status.Allocation = nil 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 { return err } } // Whether it was allocated or not, remove the finalizer to unblock removal. 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 { return err } @@ -922,7 +922,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err // We are certain that the owning pod is not going to need // the claim and therefore remove the claim. 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 { return fmt.Errorf("delete claim %s: %w", klog.KObj(claim), err) } @@ -944,7 +944,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err return nil } -func owningPod(claim *resourcev1alpha2.ResourceClaim) (string, types.UID) { +func owningPod(claim *resourceapi.ResourceClaim) (string, types.UID) { for _, owner := range claim.OwnerReferences { if ptr.Deref(owner.Controller, false) && owner.APIVersion == "v1" && @@ -986,7 +986,7 @@ func isPodDone(pod *v1.Pod) bool { // claimPodOwnerIndexFunc is an index function that returns the pod UIDs of // all pods which own the resource claim. Should only be one, though. func claimPodOwnerIndexFunc(obj interface{}) ([]string, error) { - claim, ok := obj.(*resourcev1alpha2.ResourceClaim) + claim, ok := obj.(*resourceapi.ResourceClaim) if !ok { return nil, nil } diff --git a/pkg/controller/resourceclaim/controller_test.go b/pkg/controller/resourceclaim/controller_test.go index 4e16a640dea3d..789f0cd401947 100644 --- a/pkg/controller/resourceclaim/controller_test.go +++ b/pkg/controller/resourceclaim/controller_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/assert" 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" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -79,7 +79,7 @@ var ( return pod }() - podSchedulingContext = resourcev1alpha2.PodSchedulingContext{ + podSchedulingContext = resourceapi.PodSchedulingContext{ ObjectMeta: metav1.ObjectMeta{ Name: testPodName, Namespace: testNamespace, @@ -93,7 +93,7 @@ var ( }, }, }, - Spec: resourcev1alpha2.PodSchedulingContextSpec{ + Spec: resourceapi.PodSchedulingContextSpec{ SelectedNode: nodeName, }, } @@ -107,13 +107,13 @@ func TestSyncHandler(t *testing.T) { tests := []struct { name string key string - claims []*resourcev1alpha2.ResourceClaim - claimsInCache []*resourcev1alpha2.ResourceClaim + claims []*resourceapi.ResourceClaim + claimsInCache []*resourceapi.ResourceClaim pods []*v1.Pod podsLater []*v1.Pod - templates []*resourcev1alpha2.ResourceClaimTemplate - expectedClaims []resourcev1alpha2.ResourceClaim - expectedPodSchedulingContexts []resourcev1alpha2.PodSchedulingContext + templates []*resourceapi.ResourceClaimTemplate + expectedClaims []resourceapi.ResourceClaim + expectedPodSchedulingContexts []resourceapi.PodSchedulingContext expectedStatuses map[string][]v1.PodResourceClaimStatus expectedError bool expectedMetrics expectedMetrics @@ -121,9 +121,9 @@ func TestSyncHandler(t *testing.T) { { name: "create", pods: []*v1.Pod{testPodWithResource}, - templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, + templates: []*resourceapi.ResourceClaimTemplate{template}, key: podKey(testPodWithResource), - expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, + expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithResource.Name: { {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, @@ -140,10 +140,10 @@ func TestSyncHandler(t *testing.T) { } return pod }()}, - templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, + templates: []*resourceapi.ResourceClaimTemplate{template}, key: podKey(testPodWithResource), - claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, + claims: []*resourceapi.ResourceClaim{generatedTestClaim}, + expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithResource.Name: { {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, @@ -160,9 +160,9 @@ func TestSyncHandler(t *testing.T) { } return pod }()}, - templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, + templates: []*resourceapi.ResourceClaimTemplate{template}, key: podKey(testPodWithResource), - expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, + expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithResource.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", pods: []*v1.Pod{testPodWithResource}, key: podKey(testPodWithResource), - claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, + claims: []*resourceapi.ResourceClaim{generatedTestClaim}, + expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithResource.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", pods: []*v1.Pod{testPodWithResource}, key: podKey(testPodWithResource), - claims: []*resourcev1alpha2.ResourceClaim{testClaim}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaim}, + claims: []*resourceapi.ResourceClaim{testClaim}, + expectedClaims: []resourceapi.ResourceClaim{*testClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithResource.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", pods: []*v1.Pod{testPodWithResource}, key: podKey(testPodWithResource), - claimsInCache: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, + claimsInCache: []*resourceapi.ResourceClaim{generatedTestClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithResource.Name: { {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, @@ -237,10 +237,10 @@ func TestSyncHandler(t *testing.T) { { name: "create-with-other-claim", pods: []*v1.Pod{testPodWithResource}, - templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, + templates: []*resourceapi.ResourceClaimTemplate{template}, key: podKey(testPodWithResource), - claims: []*resourcev1alpha2.ResourceClaim{otherNamespaceClaim}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*otherNamespaceClaim, *generatedTestClaim}, + claims: []*resourceapi.ResourceClaim{otherNamespaceClaim}, + expectedClaims: []resourceapi.ResourceClaim{*otherNamespaceClaim, *generatedTestClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithResource.Name: { {Name: testPodWithResource.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, @@ -252,14 +252,14 @@ func TestSyncHandler(t *testing.T) { name: "wrong-claim-owner", pods: []*v1.Pod{testPodWithResource}, key: podKey(testPodWithResource), - claims: []*resourcev1alpha2.ResourceClaim{conflictingClaim}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*conflictingClaim}, + claims: []*resourceapi.ResourceClaim{conflictingClaim}, + expectedClaims: []resourceapi.ResourceClaim{*conflictingClaim}, expectedError: true, }, { name: "create-conflict", pods: []*v1.Pod{testPodWithResource}, - templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, + templates: []*resourceapi.ResourceClaimTemplate{template}, key: podKey(testPodWithResource), expectedMetrics: expectedMetrics{1, 1}, expectedError: true, @@ -268,27 +268,27 @@ func TestSyncHandler(t *testing.T) { name: "stay-reserved-seen", pods: []*v1.Pod{testPodWithResource}, key: claimKey(testClaimReserved), - claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved}, + claims: []*resourceapi.ResourceClaim{testClaimReserved}, + expectedClaims: []resourceapi.ResourceClaim{*testClaimReserved}, expectedMetrics: expectedMetrics{0, 0}, }, { name: "stay-reserved-not-seen", podsLater: []*v1.Pod{testPodWithResource}, key: claimKey(testClaimReserved), - claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved}, + claims: []*resourceapi.ResourceClaim{testClaimReserved}, + expectedClaims: []resourceapi.ResourceClaim{*testClaimReserved}, expectedMetrics: expectedMetrics{0, 0}, }, { name: "clear-reserved", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), - claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, - expectedClaims: func() []resourcev1alpha2.ResourceClaim { + claims: []*resourceapi.ResourceClaim{testClaimReserved}, + expectedClaims: func() []resourceapi.ResourceClaim { claim := testClaimAllocated.DeepCopy() claim.Status.DeallocationRequested = true - return []resourcev1alpha2.ResourceClaim{*claim} + return []resourceapi.ResourceClaim{*claim} }(), expectedMetrics: expectedMetrics{0, 0}, }, @@ -296,12 +296,12 @@ func TestSyncHandler(t *testing.T) { name: "clear-reserved-structured", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), - claims: []*resourcev1alpha2.ResourceClaim{structuredParameters(testClaimReserved)}, - expectedClaims: func() []resourcev1alpha2.ResourceClaim { + claims: []*resourceapi.ResourceClaim{structuredParameters(testClaimReserved)}, + expectedClaims: func() []resourceapi.ResourceClaim { claim := testClaimAllocated.DeepCopy() claim.Finalizers = []string{} claim.Status.Allocation = nil - return []resourcev1alpha2.ResourceClaim{*claim} + return []resourceapi.ResourceClaim{*claim} }(), expectedMetrics: expectedMetrics{0, 0}, }, @@ -309,29 +309,29 @@ func TestSyncHandler(t *testing.T) { name: "dont-clear-reserved-structured", pods: []*v1.Pod{testPodWithResource}, key: claimKey(testClaimReserved), - claims: func() []*resourcev1alpha2.ResourceClaim { + claims: func() []*resourceapi.ResourceClaim { claim := structuredParameters(testClaimReserved) 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}, }, { name: "clear-reserved-structured-deleted", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), - claims: func() []*resourcev1alpha2.ResourceClaim { + claims: func() []*resourceapi.ResourceClaim { claim := structuredParameters(testClaimReserved.DeepCopy()) 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.DeletionTimestamp = &metav1.Time{} claim.Finalizers = []string{} claim.Status.Allocation = nil - return []resourcev1alpha2.ResourceClaim{*claim} + return []resourceapi.ResourceClaim{*claim} }(), expectedMetrics: expectedMetrics{0, 0}, }, @@ -339,17 +339,17 @@ func TestSyncHandler(t *testing.T) { name: "structured-deleted", pods: []*v1.Pod{}, key: claimKey(testClaimReserved), - claims: func() []*resourcev1alpha2.ResourceClaim { + claims: func() []*resourceapi.ResourceClaim { claim := structuredParameters(testClaimAllocated.DeepCopy()) 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.DeletionTimestamp = &metav1.Time{} claim.Finalizers = []string{} claim.Status.Allocation = nil - return []resourcev1alpha2.ResourceClaim{*claim} + return []resourceapi.ResourceClaim{*claim} }(), expectedMetrics: expectedMetrics{0, 0}, }, @@ -361,13 +361,13 @@ func TestSyncHandler(t *testing.T) { return pods }(), key: claimKey(testClaimReserved), - claims: func() []*resourcev1alpha2.ResourceClaim { - claims := []*resourcev1alpha2.ResourceClaim{testClaimReserved.DeepCopy()} + claims: func() []*resourceapi.ResourceClaim { + claims := []*resourceapi.ResourceClaim{testClaimReserved.DeepCopy()} claims[0].OwnerReferences = nil return claims }(), - expectedClaims: func() []resourcev1alpha2.ResourceClaim { - claims := []resourcev1alpha2.ResourceClaim{*testClaimAllocated.DeepCopy()} + expectedClaims: func() []resourceapi.ResourceClaim { + claims := []resourceapi.ResourceClaim{*testClaimAllocated.DeepCopy()} claims[0].OwnerReferences = nil claims[0].Status.DeallocationRequested = true return claims @@ -378,8 +378,8 @@ func TestSyncHandler(t *testing.T) { name: "remove-reserved", pods: []*v1.Pod{testPod}, key: claimKey(testClaimReservedTwice), - claims: []*resourcev1alpha2.ResourceClaim{testClaimReservedTwice}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved}, + claims: []*resourceapi.ResourceClaim{testClaimReservedTwice}, + expectedClaims: []resourceapi.ResourceClaim{*testClaimReserved}, expectedMetrics: expectedMetrics{0, 0}, }, { @@ -390,7 +390,7 @@ func TestSyncHandler(t *testing.T) { return pods }(), key: claimKey(testClaimReserved), - claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved}, + claims: []*resourceapi.ResourceClaim{testClaimReserved}, expectedClaims: nil, expectedMetrics: expectedMetrics{0, 0}, }, @@ -398,24 +398,24 @@ func TestSyncHandler(t *testing.T) { name: "trigger-allocation", pods: []*v1.Pod{testPodWithNodeName}, key: podKey(testPodWithNodeName), - templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, - claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaim}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaim}, + templates: []*resourceapi.ResourceClaimTemplate{template}, + claims: []*resourceapi.ResourceClaim{generatedTestClaim}, + expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaim}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithNodeName.Name: { {Name: testPodWithNodeName.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, }, }, - expectedPodSchedulingContexts: []resourcev1alpha2.PodSchedulingContext{podSchedulingContext}, + expectedPodSchedulingContexts: []resourceapi.PodSchedulingContext{podSchedulingContext}, expectedMetrics: expectedMetrics{0, 0}, }, { name: "add-reserved", pods: []*v1.Pod{testPodWithNodeName}, key: podKey(testPodWithNodeName), - templates: []*resourcev1alpha2.ResourceClaimTemplate{template}, - claims: []*resourcev1alpha2.ResourceClaim{generatedTestClaimAllocated}, - expectedClaims: []resourcev1alpha2.ResourceClaim{*generatedTestClaimReserved}, + templates: []*resourceapi.ResourceClaimTemplate{template}, + claims: []*resourceapi.ResourceClaim{generatedTestClaimAllocated}, + expectedClaims: []resourceapi.ResourceClaim{*generatedTestClaimReserved}, expectedStatuses: map[string][]v1.PodResourceClaimStatus{ testPodWithNodeName.Name: { {Name: testPodWithNodeName.Spec.ResourceClaims[0].Name, ResourceClaimName: &generatedTestClaim.Name}, @@ -451,9 +451,9 @@ func TestSyncHandler(t *testing.T) { setupMetrics() informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, controller.NoResyncPeriodFunc()) podInformer := informerFactory.Core().V1().Pods() - podSchedulingInformer := informerFactory.Resource().V1alpha2().PodSchedulingContexts() - claimInformer := informerFactory.Resource().V1alpha2().ResourceClaims() - templateInformer := informerFactory.Resource().V1alpha2().ResourceClaimTemplates() + podSchedulingInformer := informerFactory.Resource().V1alpha3().PodSchedulingContexts() + claimInformer := informerFactory.Resource().V1alpha3().ResourceClaims() + templateInformer := informerFactory.Resource().V1alpha3().ResourceClaimTemplates() ec, err := NewController(klog.FromContext(ctx), fakeKubeClient, podInformer, podSchedulingInformer, claimInformer, templateInformer) if err != nil { @@ -491,7 +491,7 @@ func TestSyncHandler(t *testing.T) { 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 { t.Fatalf("unexpected error while listing claims: %v", err) } @@ -513,7 +513,7 @@ func TestSyncHandler(t *testing.T) { } 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 { t.Fatalf("unexpected error while listing claims: %v", err) } @@ -524,10 +524,10 @@ func TestSyncHandler(t *testing.T) { } } -func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourcev1alpha2.ResourceClaim { - claim := &resourcev1alpha2.ResourceClaim{ +func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourceapi.ResourceClaim { + claim := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: classname, }, } @@ -538,15 +538,15 @@ func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) return claim } -func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, createCounter int, owner *metav1.OwnerReference) *resourcev1alpha2.ResourceClaim { - claim := &resourcev1alpha2.ResourceClaim{ +func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, createCounter int, owner *metav1.OwnerReference) *resourceapi.ResourceClaim { + claim := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("%s-%d", generateName, createCounter), GenerateName: generateName, Namespace: namespace, Annotations: map[string]string{"resource.kubernetes.io/pod-claim-name": podClaimName}, }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: classname, }, } @@ -557,24 +557,24 @@ func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, return claim } -func allocateClaim(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { +func allocateClaim(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { claim = claim.DeepCopy() - claim.Status.Allocation = &resourcev1alpha2.AllocationResult{} + claim.Status.Allocation = &resourceapi.AllocationResult{} return claim } -func structuredParameters(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { +func structuredParameters(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { claim = claim.DeepCopy() // 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. - claim.Finalizers = append(claim.Finalizers, resourcev1alpha2.Finalizer) + claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer) 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.Status.ReservedFor = append(claim.Status.ReservedFor, - resourcev1alpha2.ResourceClaimConsumerReference{ + resourceapi.ResourceClaimConsumerReference{ Resource: "pods", Name: pod.Name, UID: pod.UID, @@ -601,11 +601,11 @@ func makePod(name, namespace string, uid types.UID, podClaims ...v1.PodResourceC return pod } -func makeTemplate(name, namespace, classname string) *resourcev1alpha2.ResourceClaimTemplate { - template := &resourcev1alpha2.ResourceClaimTemplate{ +func makeTemplate(name, namespace, classname string) *resourceapi.ResourceClaimTemplate { + template := &resourceapi.ResourceClaimTemplate{ ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, - Spec: resourcev1alpha2.ResourceClaimTemplateSpec{ - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimTemplateSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: classname, }, }, @@ -617,7 +617,7 @@ func podKey(pod *v1.Pod) string { return podKeyPrefix + pod.Namespace + "/" + pod.Name } -func claimKey(claim *resourcev1alpha2.ResourceClaim) string { +func claimKey(claim *resourceapi.ResourceClaim) string { return claimKeyPrefix + claim.Namespace + "/" + claim.Name } @@ -633,7 +633,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 { if claims[i].Namespace < claims[j].Namespace { return true @@ -651,7 +651,7 @@ func normalizeClaims(claims []resourcev1alpha2.ResourceClaim) []resourcev1alpha2 return claims } -func normalizeScheduling(scheduling []resourcev1alpha2.PodSchedulingContext) []resourcev1alpha2.PodSchedulingContext { +func normalizeScheduling(scheduling []resourceapi.PodSchedulingContext) []resourceapi.PodSchedulingContext { sort.Slice(scheduling, func(i, j int) bool { return scheduling[i].Namespace < scheduling[j].Namespace || scheduling[i].Name < scheduling[j].Name @@ -673,7 +673,7 @@ func createResourceClaimReactor() func(action k8stesting.Action) (handled bool, return func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { mutex.Lock() defer mutex.Unlock() - claim := action.(k8stesting.CreateAction).GetObject().(*resourcev1alpha2.ResourceClaim) + claim := action.(k8stesting.CreateAction).GetObject().(*resourceapi.ResourceClaim) if claim.Name == "" && claim.GenerateName != "" { claim.Name = fmt.Sprintf("%s-%d", claim.GenerateName, nameCounter) } diff --git a/pkg/controlplane/apiserver/aggregator.go b/pkg/controlplane/apiserver/aggregator.go index 61acedb4b734d..ef3b58871b8d5 100644 --- a/pkg/controlplane/apiserver/aggregator.go +++ b/pkg/controlplane/apiserver/aggregator.go @@ -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: "v1alpha1"}: {Group: 16100, 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}, // 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. diff --git a/pkg/controlplane/instance.go b/pkg/controlplane/instance.go index 205162b2f35d3..e52b901a2c189 100644 --- a/pkg/controlplane/instance.go +++ b/pkg/controlplane/instance.go @@ -47,7 +47,7 @@ import ( nodev1 "k8s.io/api/node/v1" policyapiv1 "k8s.io/api/policy/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" storageapiv1 "k8s.io/api/storage/v1" storageapiv1alpha1 "k8s.io/api/storage/v1alpha1" @@ -475,7 +475,7 @@ var ( admissionregistrationv1alpha1.SchemeGroupVersion, apiserverinternalv1alpha1.SchemeGroupVersion, authenticationv1alpha1.SchemeGroupVersion, - resourcev1alpha2.SchemeGroupVersion, + resourceapi.SchemeGroupVersion, certificatesv1alpha1.SchemeGroupVersion, networkingapiv1alpha1.SchemeGroupVersion, storageapiv1alpha1.SchemeGroupVersion, diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index beba83b00a856..d6165814a398c 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -882,50 +882,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.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(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/v1alpha2.AllocationResultModel": schema_k8sio_api_resource_v1alpha2_AllocationResultModel(ref), - "k8s.io/api/resource/v1alpha2.DriverAllocationResult": schema_k8sio_api_resource_v1alpha2_DriverAllocationResult(ref), - "k8s.io/api/resource/v1alpha2.DriverRequests": schema_k8sio_api_resource_v1alpha2_DriverRequests(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesAllocationResult": schema_k8sio_api_resource_v1alpha2_NamedResourcesAllocationResult(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesAttribute": schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesAttributeValue": schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesFilter": schema_k8sio_api_resource_v1alpha2_NamedResourcesFilter(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesInstance": schema_k8sio_api_resource_v1alpha2_NamedResourcesInstance(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesIntSlice": schema_k8sio_api_resource_v1alpha2_NamedResourcesIntSlice(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesRequest": schema_k8sio_api_resource_v1alpha2_NamedResourcesRequest(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesResources": schema_k8sio_api_resource_v1alpha2_NamedResourcesResources(ref), - "k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice": schema_k8sio_api_resource_v1alpha2_NamedResourcesStringSlice(ref), - "k8s.io/api/resource/v1alpha2.PodSchedulingContext": schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref), - "k8s.io/api/resource/v1alpha2.PodSchedulingContextList": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref), - "k8s.io/api/resource/v1alpha2.PodSchedulingContextSpec": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextSpec(ref), - "k8s.io/api/resource/v1alpha2.PodSchedulingContextStatus": schema_k8sio_api_resource_v1alpha2_PodSchedulingContextStatus(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaim": schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimConsumerReference(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimList": schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimParameters": schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimParametersList": schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha2_ResourceClaimSchedulingStatus(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimStatus": schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimTemplate": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimTemplateList": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref), - "k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref), - "k8s.io/api/resource/v1alpha2.ResourceClass": schema_k8sio_api_resource_v1alpha2_ResourceClass(ref), - "k8s.io/api/resource/v1alpha2.ResourceClassList": schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref), - "k8s.io/api/resource/v1alpha2.ResourceClassParameters": schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref), - "k8s.io/api/resource/v1alpha2.ResourceClassParametersList": schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref), - "k8s.io/api/resource/v1alpha2.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref), - "k8s.io/api/resource/v1alpha2.ResourceFilter": schema_k8sio_api_resource_v1alpha2_ResourceFilter(ref), - "k8s.io/api/resource/v1alpha2.ResourceFilterModel": schema_k8sio_api_resource_v1alpha2_ResourceFilterModel(ref), - "k8s.io/api/resource/v1alpha2.ResourceHandle": schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref), - "k8s.io/api/resource/v1alpha2.ResourceModel": schema_k8sio_api_resource_v1alpha2_ResourceModel(ref), - "k8s.io/api/resource/v1alpha2.ResourceRequest": schema_k8sio_api_resource_v1alpha2_ResourceRequest(ref), - "k8s.io/api/resource/v1alpha2.ResourceRequestModel": schema_k8sio_api_resource_v1alpha2_ResourceRequestModel(ref), - "k8s.io/api/resource/v1alpha2.ResourceSlice": schema_k8sio_api_resource_v1alpha2_ResourceSlice(ref), - "k8s.io/api/resource/v1alpha2.ResourceSliceList": schema_k8sio_api_resource_v1alpha2_ResourceSliceList(ref), - "k8s.io/api/resource/v1alpha2.StructuredResourceHandle": schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref), - "k8s.io/api/resource/v1alpha2.VendorParameters": schema_k8sio_api_resource_v1alpha2_VendorParameters(ref), + "k8s.io/api/resource/v1alpha3.AllocationResult": schema_k8sio_api_resource_v1alpha3_AllocationResult(ref), + "k8s.io/api/resource/v1alpha3.AllocationResultModel": schema_k8sio_api_resource_v1alpha3_AllocationResultModel(ref), + "k8s.io/api/resource/v1alpha3.DriverAllocationResult": schema_k8sio_api_resource_v1alpha3_DriverAllocationResult(ref), + "k8s.io/api/resource/v1alpha3.DriverRequests": schema_k8sio_api_resource_v1alpha3_DriverRequests(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult": schema_k8sio_api_resource_v1alpha3_NamedResourcesAllocationResult(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesAttribute": schema_k8sio_api_resource_v1alpha3_NamedResourcesAttribute(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesAttributeValue": schema_k8sio_api_resource_v1alpha3_NamedResourcesAttributeValue(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesFilter": schema_k8sio_api_resource_v1alpha3_NamedResourcesFilter(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesInstance": schema_k8sio_api_resource_v1alpha3_NamedResourcesInstance(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice": schema_k8sio_api_resource_v1alpha3_NamedResourcesIntSlice(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesRequest": schema_k8sio_api_resource_v1alpha3_NamedResourcesRequest(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesResources": schema_k8sio_api_resource_v1alpha3_NamedResourcesResources(ref), + "k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice": schema_k8sio_api_resource_v1alpha3_NamedResourcesStringSlice(ref), + "k8s.io/api/resource/v1alpha3.PodSchedulingContext": schema_k8sio_api_resource_v1alpha3_PodSchedulingContext(ref), + "k8s.io/api/resource/v1alpha3.PodSchedulingContextList": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref), + "k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextSpec(ref), + "k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextStatus(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaim": schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha3_ResourceClaimConsumerReference(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimList": schema_k8sio_api_resource_v1alpha3_ResourceClaimList(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimParameters": schema_k8sio_api_resource_v1alpha3_ResourceClaimParameters(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimParametersList": schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersList(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersReference(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha3_ResourceClaimSchedulingStatus(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha3_ResourceClaimSpec(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimStatus": schema_k8sio_api_resource_v1alpha3_ResourceClaimStatus(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimTemplate": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplate(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateList": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateList(ref), + "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateSpec(ref), + "k8s.io/api/resource/v1alpha3.ResourceClass": schema_k8sio_api_resource_v1alpha3_ResourceClass(ref), + "k8s.io/api/resource/v1alpha3.ResourceClassList": schema_k8sio_api_resource_v1alpha3_ResourceClassList(ref), + "k8s.io/api/resource/v1alpha3.ResourceClassParameters": schema_k8sio_api_resource_v1alpha3_ResourceClassParameters(ref), + "k8s.io/api/resource/v1alpha3.ResourceClassParametersList": schema_k8sio_api_resource_v1alpha3_ResourceClassParametersList(ref), + "k8s.io/api/resource/v1alpha3.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha3_ResourceClassParametersReference(ref), + "k8s.io/api/resource/v1alpha3.ResourceFilter": schema_k8sio_api_resource_v1alpha3_ResourceFilter(ref), + "k8s.io/api/resource/v1alpha3.ResourceFilterModel": schema_k8sio_api_resource_v1alpha3_ResourceFilterModel(ref), + "k8s.io/api/resource/v1alpha3.ResourceHandle": schema_k8sio_api_resource_v1alpha3_ResourceHandle(ref), + "k8s.io/api/resource/v1alpha3.ResourceModel": schema_k8sio_api_resource_v1alpha3_ResourceModel(ref), + "k8s.io/api/resource/v1alpha3.ResourceRequest": schema_k8sio_api_resource_v1alpha3_ResourceRequest(ref), + "k8s.io/api/resource/v1alpha3.ResourceRequestModel": schema_k8sio_api_resource_v1alpha3_ResourceRequestModel(ref), + "k8s.io/api/resource/v1alpha3.ResourceSlice": schema_k8sio_api_resource_v1alpha3_ResourceSlice(ref), + "k8s.io/api/resource/v1alpha3.ResourceSliceList": schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref), + "k8s.io/api/resource/v1alpha3.StructuredResourceHandle": schema_k8sio_api_resource_v1alpha3_StructuredResourceHandle(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.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), @@ -45341,7 +45341,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45361,7 +45361,7 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCal Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceHandle"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceHandle"), }, }, }, @@ -45377,11 +45377,11 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCal }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45391,18 +45391,18 @@ func schema_k8sio_api_resource_v1alpha2_AllocationResultModel(ref common.Referen "namedResources": { SchemaProps: spec.SchemaProps{ 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{ - "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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45418,18 +45418,18 @@ func schema_k8sio_api_resource_v1alpha2_DriverAllocationResult(ref common.Refere "namedResources": { SchemaProps: spec.SchemaProps{ 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{ - "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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45462,7 +45462,7 @@ func schema_k8sio_api_resource_v1alpha2_DriverRequests(ref common.ReferenceCallb Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceRequest"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceRequest"), }, }, }, @@ -45472,11 +45472,11 @@ func schema_k8sio_api_resource_v1alpha2_DriverRequests(ref common.ReferenceCallb }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45498,7 +45498,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45536,7 +45536,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref common.Refer "intSlice": { SchemaProps: spec.SchemaProps{ 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": { @@ -45549,7 +45549,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref common.Refer "stringSlice": { SchemaProps: spec.SchemaProps{ Description: "StringSliceValue is an array of strings.", - Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice"), + Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice"), }, }, "version": { @@ -45564,11 +45564,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttribute(ref common.Refer }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45598,7 +45598,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref common. "intSlice": { SchemaProps: spec.SchemaProps{ 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": { @@ -45611,7 +45611,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref common. "stringSlice": { SchemaProps: spec.SchemaProps{ Description: "StringSliceValue is an array of strings.", - Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesStringSlice"), + Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice"), }, }, "version": { @@ -45625,11 +45625,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesAttributeValue(ref common. }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45651,7 +45651,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45679,7 +45679,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesInstance(ref common.Refere Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesAttribute"), + Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesAttribute"), }, }, }, @@ -45690,11 +45690,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesInstance(ref common.Refere }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45728,7 +45728,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45750,7 +45750,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45770,7 +45770,7 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesResources(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.NamedResourcesInstance"), + Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesInstance"), }, }, }, @@ -45781,11 +45781,11 @@ func schema_k8sio_api_resource_v1alpha2_NamedResourcesResources(ref common.Refer }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45819,7 +45819,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45851,14 +45851,14 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref common.Referenc SchemaProps: spec.SchemaProps{ Description: "Spec describes where resources for the Pod are needed.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingContextSpec"), + Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes where resources for the Pod can be allocated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingContextStatus"), + Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus"), }, }, }, @@ -45866,11 +45866,11 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContext(ref common.Referenc }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45906,7 +45906,7 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingContext"), + Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContext"), }, }, }, @@ -45917,11 +45917,11 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextList(ref common.Refe }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45961,7 +45961,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -45984,7 +45984,7 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextStatus(ref common.Re Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus"), }, }, }, @@ -45994,11 +45994,11 @@ func schema_k8sio_api_resource_v1alpha2_PodSchedulingContextStatus(ref common.Re }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46030,14 +46030,14 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref common.ReferenceCallba 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.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSpec"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ Description: "Status describes whether the resource is available and with which attributes.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimStatus"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimStatus"), }, }, }, @@ -46045,11 +46045,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref common.ReferenceCallba }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46094,7 +46094,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46130,7 +46130,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaim"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaim"), }, }, }, @@ -46141,11 +46141,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref common.ReferenceCa }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46176,7 +46176,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.Refer "generatedFrom": { 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.", - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"), }, }, "driverRequests": { @@ -46192,7 +46192,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.DriverRequests"), + Ref: ref("k8s.io/api/resource/v1alpha3.DriverRequests"), }, }, }, @@ -46202,11 +46202,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParameters(ref common.Refer }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46242,7 +46242,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParameters"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParameters"), }, }, }, @@ -46253,11 +46253,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersList(ref common.R }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46294,7 +46294,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46334,7 +46334,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46352,7 +46352,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref common.ReferenceCa "parametersRef": { 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.", - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"), }, }, }, @@ -46360,11 +46360,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref common.ReferenceCa }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46381,7 +46381,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.Reference "allocation": { 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.", - Ref: ref("k8s.io/api/resource/v1alpha2.AllocationResult"), + Ref: ref("k8s.io/api/resource/v1alpha3.AllocationResult"), }, }, "reservedFor": { @@ -46402,7 +46402,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.Reference Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"), }, }, }, @@ -46419,11 +46419,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.Reference }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46455,7 +46455,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref common.Referen 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.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec"), }, }, }, @@ -46463,11 +46463,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref common.Referen }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46503,7 +46503,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref common.Ref Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimTemplate"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplate"), }, }, }, @@ -46514,11 +46514,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref common.Ref }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46536,7 +46536,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref common.Ref 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.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSpec"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"), }, }, }, @@ -46544,11 +46544,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref common.Ref }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46587,7 +46587,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClass(ref common.ReferenceCallba "parametersRef": { 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.", - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParametersReference"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParametersReference"), }, }, "suitableNodes": { @@ -46608,11 +46608,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClass(ref common.ReferenceCallba }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46648,7 +46648,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClass"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClass"), }, }, }, @@ -46659,11 +46659,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref common.ReferenceCa }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46694,7 +46694,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer "generatedFrom": { 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.", - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParametersReference"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParametersReference"), }, }, "vendorParameters": { @@ -46710,7 +46710,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.VendorParameters"), + Ref: ref("k8s.io/api/resource/v1alpha3.VendorParameters"), }, }, }, @@ -46729,7 +46729,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceFilter"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceFilter"), }, }, }, @@ -46739,11 +46739,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParameters(ref common.Refer }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46779,7 +46779,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref common.R Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParameters"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParameters"), }, }, }, @@ -46790,11 +46790,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersList(ref common.R }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46838,7 +46838,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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46855,18 +46855,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceFilter(ref common.ReferenceCallb "namedResources": { SchemaProps: spec.SchemaProps{ 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{ - "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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46876,18 +46876,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceFilterModel(ref common.Reference "namedResources": { SchemaProps: spec.SchemaProps{ 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{ - "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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46912,7 +46912,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallb "structuredData": { SchemaProps: spec.SchemaProps{ 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"), }, }, }, @@ -46920,11 +46920,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceHandle(ref common.ReferenceCallb }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46934,18 +46934,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceModel(ref common.ReferenceCallba "namedResources": { SchemaProps: spec.SchemaProps{ 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{ - "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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46961,18 +46961,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceRequest(ref common.ReferenceCall "namedResources": { SchemaProps: spec.SchemaProps{ 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{ - "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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -46982,18 +46982,18 @@ func schema_k8sio_api_resource_v1alpha2_ResourceRequestModel(ref common.Referenc "namedResources": { SchemaProps: spec.SchemaProps{ 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{ - "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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -47039,7 +47039,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSlice(ref common.ReferenceCallba "namedResources": { SchemaProps: spec.SchemaProps{ 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"), }, }, }, @@ -47047,11 +47047,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSlice(ref common.ReferenceCallba }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -47087,7 +47087,7 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSliceList(ref common.ReferenceCa Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.ResourceSlice"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceSlice"), }, }, }, @@ -47098,11 +47098,11 @@ func schema_k8sio_api_resource_v1alpha2_ResourceSliceList(ref common.ReferenceCa }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -47141,7 +47141,7 @@ func schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref common.Refe Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha2.DriverAllocationResult"), + Ref: ref("k8s.io/api/resource/v1alpha3.DriverAllocationResult"), }, }, }, @@ -47152,11 +47152,11 @@ func schema_k8sio_api_resource_v1alpha2_StructuredResourceHandle(ref common.Refe }, }, 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{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ diff --git a/pkg/kubeapiserver/authorizer/config.go b/pkg/kubeapiserver/authorizer/config.go index 5a74fa7c74813..e654ed317f69d 100644 --- a/pkg/kubeapiserver/authorizer/config.go +++ b/pkg/kubeapiserver/authorizer/config.go @@ -33,7 +33,7 @@ import ( "k8s.io/apiserver/pkg/authorization/authorizer" utilfeature "k8s.io/apiserver/pkg/util/feature" 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/nodeidentifier" "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. switch configuredAuthorizer.Type { case authzconfig.AuthorizerType(modes.ModeNode): - var slices resourcev1alpha2informers.ResourceSliceInformer + var slices resourceinformers.ResourceSliceInformer if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { - slices = config.VersionedInformerFactory.Resource().V1alpha2().ResourceSlices() + slices = config.VersionedInformerFactory.Resource().V1alpha3().ResourceSlices() } node.RegisterMetrics() graph := node.NewGraph() diff --git a/pkg/kubectl/.import-restrictions b/pkg/kubectl/.import-restrictions index da3f3c6f36242..67a3ce0ef8135 100644 --- a/pkg/kubectl/.import-restrictions +++ b/pkg/kubectl/.import-restrictions @@ -80,7 +80,7 @@ rules: - k8s.io/kubernetes/pkg/apis/rbac/v1beta1 - k8s.io/kubernetes/pkg/apis/resource - 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/install - k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1 diff --git a/pkg/kubelet/cm/dra/claiminfo.go b/pkg/kubelet/cm/dra/claiminfo.go index 5602707a0a4d3..4ff46d7a976a8 100644 --- a/pkg/kubelet/cm/dra/claiminfo.go +++ b/pkg/kubelet/cm/dra/claiminfo.go @@ -20,7 +20,7 @@ import ( "fmt" "sync" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "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. -func newClaimInfoFromClaim(claim *resourcev1alpha2.ResourceClaim) *ClaimInfo { +func newClaimInfoFromClaim(claim *resourceapi.ResourceClaim) *ClaimInfo { // Grab the allocation.resourceHandles. If there are no // allocation.resourceHandles, create a single resourceHandle with no // content. This will trigger processing of this claim by a single // kubelet plugin whose name matches resourceClaim.Status.DriverName. resourceHandles := claim.Status.Allocation.ResourceHandles if len(resourceHandles) == 0 { - resourceHandles = make([]resourcev1alpha2.ResourceHandle, 1) + resourceHandles = make([]resourceapi.ResourceHandle, 1) } claimInfoState := state.ClaimInfoState{ DriverName: claim.Status.DriverName, diff --git a/pkg/kubelet/cm/dra/claiminfo_test.go b/pkg/kubelet/cm/dra/claiminfo_test.go index ffa2ce74aa11a..b6bb619d71d7f 100644 --- a/pkg/kubelet/cm/dra/claiminfo_test.go +++ b/pkg/kubelet/cm/dra/claiminfo_test.go @@ -25,7 +25,7 @@ import ( "testing" "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" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -44,24 +44,24 @@ func TestNewClaimInfoFromClaim(t *testing.T) { for _, test := range []struct { description string - claim *resourcev1alpha2.ResourceClaim + claim *resourceapi.ResourceClaim expectedResult *ClaimInfo }{ { description: "successfully created object", - claim: &resourcev1alpha2.ResourceClaim{ + claim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ UID: claimUID, Name: claimName, Namespace: namespace, }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{}, + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{}, }, }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: className, }, }, @@ -73,7 +73,7 @@ func TestNewClaimInfoFromClaim(t *testing.T) { ClaimName: claimName, Namespace: claimName, PodUIDs: sets.New[string](), - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ {}, }, CDIDevices: make(map[string][]string), @@ -82,17 +82,17 @@ func TestNewClaimInfoFromClaim(t *testing.T) { }, { description: "successfully created object with empty allocation", - claim: &resourcev1alpha2.ResourceClaim{ + claim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ UID: claimUID, Name: claimName, Namespace: namespace, }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{}, + Allocation: &resourceapi.AllocationResult{}, }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: className, }, }, @@ -104,7 +104,7 @@ func TestNewClaimInfoFromClaim(t *testing.T) { ClaimName: claimName, Namespace: claimName, PodUIDs: sets.New[string](), - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ {}, }, CDIDevices: make(map[string][]string), @@ -136,7 +136,7 @@ func TestNewClaimInfoFromState(t *testing.T) { ClaimName: "test-claim", Namespace: "test-namespace", PodUIDs: sets.New[string]("test-pod-uid"), - ResourceHandles: []resourcev1alpha2.ResourceHandle{}, + ResourceHandles: []resourceapi.ResourceHandle{}, CDIDevices: map[string][]string{}, }, }, diff --git a/pkg/kubelet/cm/dra/manager.go b/pkg/kubelet/cm/dra/manager.go index 55c1925470986..c226bb35b2285 100644 --- a/pkg/kubelet/cm/dra/manager.go +++ b/pkg/kubelet/cm/dra/manager.go @@ -22,7 +22,7 @@ import ( "time" 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" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -165,7 +165,7 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { continue } // 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(), *claimName, metav1.GetOptions{}) diff --git a/pkg/kubelet/cm/dra/manager_test.go b/pkg/kubelet/cm/dra/manager_test.go index 279669a841c80..848ef76b6ba56 100644 --- a/pkg/kubelet/cm/dra/manager_test.go +++ b/pkg/kubelet/cm/dra/manager_test.go @@ -30,7 +30,7 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/grpc" 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" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" @@ -344,7 +344,7 @@ func TestPrepareResources(t *testing.T) { driverName string pod *v1.Pod claimInfo *ClaimInfo - resourceClaim *resourcev1alpha2.ResourceClaim + resourceClaim *resourceapi.ResourceClaim resp *drapb.NodePrepareResourcesResponse wantErr bool wantTimeout bool @@ -408,23 +408,23 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-1", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -463,23 +463,23 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-nil", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -520,23 +520,23 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-empty", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -566,19 +566,19 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-2", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, @@ -607,23 +607,23 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-3", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -671,23 +671,23 @@ func TestPrepareResources(t *testing.T) { }, prepared: true, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-4", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -727,23 +727,23 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-5", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -789,23 +789,23 @@ func TestPrepareResources(t *testing.T) { }, }, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim-6", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -858,28 +858,28 @@ func TestPrepareResources(t *testing.T) { ClaimUID: "test-reserved", Namespace: "test-namespace", 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), prepared: false, }, - resourceClaim: &resourcev1alpha2.ResourceClaim{ + resourceClaim: &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "test-pod-claim", Namespace: "test-namespace", UID: "test-reserved", }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {UID: "test-reserved"}, }, }, @@ -905,7 +905,7 @@ func TestPrepareResources(t *testing.T) { } 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) } } @@ -1020,7 +1020,7 @@ func TestUnprepareResources(t *testing.T) { DriverName: driverName, ClaimName: "another-claim-test", Namespace: "test-namespace", - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: driverName, Data: "test data", @@ -1109,7 +1109,7 @@ func TestUnprepareResources(t *testing.T) { DriverName: driverName, ClaimName: "test-pod-claim-2", Namespace: "test-namespace", - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: driverName, Data: "test data", @@ -1159,7 +1159,7 @@ func TestUnprepareResources(t *testing.T) { DriverName: driverName, ClaimName: "test-pod-claim-3", Namespace: "test-namespace", - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: driverName, Data: "test data", @@ -1208,7 +1208,7 @@ func TestUnprepareResources(t *testing.T) { DriverName: driverName, ClaimName: "test-pod-claim", Namespace: "test-namespace", - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: driverName, Data: "test data", @@ -1258,7 +1258,7 @@ func TestUnprepareResources(t *testing.T) { ClaimName: "test-pod-claim-nil", Namespace: "test-namespace", ClaimUID: "test-reserved", - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: driverName, Data: "test data", @@ -1508,29 +1508,29 @@ func TestParallelPrepareUnprepareResources(t *testing.T) { }, }, } - resourceClaim := &resourcev1alpha2.ResourceClaim{ + resourceClaim := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: claimName, Namespace: nameSpace, UID: types.UID(fmt.Sprintf("claim-%d", goRoutineNum)), }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: "test-class", }, - Status: resourcev1alpha2.ResourceClaimStatus{ + Status: resourceapi.ResourceClaimStatus{ DriverName: driverName, - Allocation: &resourcev1alpha2.AllocationResult{ - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + Allocation: &resourceapi.AllocationResult{ + ResourceHandles: []resourceapi.ResourceHandle{ {Data: "test-data", DriverName: driverName}, }, }, - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {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) return } diff --git a/pkg/kubelet/cm/dra/plugin/plugin.go b/pkg/kubelet/cm/dra/plugin/plugin.go index e3f03d3bf7fb3..cab052089d33c 100644 --- a/pkg/kubelet/cm/dra/plugin/plugin.go +++ b/pkg/kubelet/cm/dra/plugin/plugin.go @@ -102,7 +102,7 @@ func (h *RegistrationHandler) wipeResourceSlices(pluginName string) { 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 { case err == nil: logger.V(3).Info("Deleted ResourceSlices", "fieldSelector", fieldSelector) diff --git a/pkg/kubelet/cm/dra/state/state_checkpoint.go b/pkg/kubelet/cm/dra/state/state_checkpoint.go index a82f6b11bb433..9728151d253c5 100644 --- a/pkg/kubelet/cm/dra/state/state_checkpoint.go +++ b/pkg/kubelet/cm/dra/state/state_checkpoint.go @@ -20,7 +20,7 @@ import ( "fmt" "sync" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" @@ -57,7 +57,7 @@ type ClaimInfoState struct { PodUIDs sets.Set[string] // 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 // GRPC API call NodePrepareResource diff --git a/pkg/kubelet/cm/dra/state/state_checkpoint_test.go b/pkg/kubelet/cm/dra/state/state_checkpoint_test.go index a5ff86eed17fd..cf2e30870ce89 100644 --- a/pkg/kubelet/cm/dra/state/state_checkpoint_test.go +++ b/pkg/kubelet/cm/dra/state/state_checkpoint_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" testutil "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/testing" @@ -39,7 +39,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. // -// 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 // for API types). That breaks checksuming with pkg/util/hash because it is based on spew output. // That output includes those new fields. @@ -69,7 +69,7 @@ func TestCheckpointGetOrCreate(t *testing.T) { ClaimName: "example", Namespace: "default", PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: "test-driver.cdi.k8s.io", Data: `{"a": "b"}`, @@ -93,7 +93,7 @@ func TestCheckpointGetOrCreate(t *testing.T) { ClaimName: "example", Namespace: "default", PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: "test-driver-1.cdi.k8s.io", Data: `{"a": "b"}`, @@ -122,7 +122,7 @@ func TestCheckpointGetOrCreate(t *testing.T) { ClaimName: "example-1", Namespace: "default", PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: "test-driver.cdi.k8s.io", Data: `{"a": "b"}`, @@ -139,7 +139,7 @@ func TestCheckpointGetOrCreate(t *testing.T) { ClaimName: "example-2", Namespace: "default", PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: "test-driver.cdi.k8s.io", Data: `{"c": "d"}`, @@ -214,7 +214,7 @@ func TestCheckpointStateStore(t *testing.T) { ClaimName: "example", Namespace: "default", PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourcev1alpha2.ResourceHandle{ + ResourceHandles: []resourceapi.ResourceHandle{ { DriverName: "test-driver.cdi.k8s.io", Data: `{"a": "b"}`, diff --git a/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go b/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go index d27ecf6088351..84a96f2059377 100644 --- a/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go +++ b/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go @@ -22,7 +22,7 @@ limitations under the License. package state import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" sets "k8s.io/apimachinery/pkg/util/sets" ) @@ -38,7 +38,7 @@ func (in *ClaimInfoState) DeepCopyInto(out *ClaimInfoState) { } if in.ResourceHandles != nil { in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]v1alpha2.ResourceHandle, len(*in)) + *out = make([]v1alpha3.ResourceHandle, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index 2dcff139b00d1..ddd0fc83ea7cb 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -40,7 +40,7 @@ import ( flowcontrolv1 "k8s.io/api/flowcontrol/v1" networkingv1beta1 "k8s.io/api/networking/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" storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" @@ -625,7 +625,7 @@ func AddHandlers(h printers.PrintHandler) { resourceClassColumnDefinitions := []metav1.TableColumnDefinition{ {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"]}, } _ = h.TableHandler(resourceClassColumnDefinitions, printResourceClass) @@ -633,7 +633,7 @@ func AddHandlers(h printers.PrintHandler) { resourceClaimColumnDefinitions := []metav1.TableColumnDefinition{ {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: "State", Type: "string", Description: "A summary of the current state (allocated, pending, reserved, etc.)."}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } @@ -642,7 +642,7 @@ func AddHandlers(h printers.PrintHandler) { resourceClaimTemplateColumnDefinitions := []metav1.TableColumnDefinition{ {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: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } _ = h.TableHandler(resourceClaimTemplateColumnDefinitions, printResourceClaimTemplate) @@ -650,7 +650,7 @@ func AddHandlers(h printers.PrintHandler) { podSchedulingCtxColumnDefinitions := []metav1.TableColumnDefinition{ {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"]}, } _ = h.TableHandler(podSchedulingCtxColumnDefinitions, printPodSchedulingContext) @@ -658,7 +658,7 @@ func AddHandlers(h printers.PrintHandler) { resourceClaimParametersColumnDefinitions := []metav1.TableColumnDefinition{ {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"]}, } _ = h.TableHandler(resourceClaimParametersColumnDefinitions, printResourceClaimParameters) @@ -666,7 +666,7 @@ func AddHandlers(h printers.PrintHandler) { resourceClassParametersColumnDefinitions := []metav1.TableColumnDefinition{ {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"]}, } _ = h.TableHandler(resourceClassParametersColumnDefinitions, printResourceClassParameters) @@ -674,8 +674,8 @@ func AddHandlers(h printers.PrintHandler) { nodeResourceCapacityColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "Node", Type: "string", Description: resourcev1alpha2.ResourceSlice{}.SwaggerDoc()["nodeName"]}, - {Name: "Driver", Type: "string", Description: resourcev1alpha2.ResourceSlice{}.SwaggerDoc()["driverName"]}, + {Name: "Node", Type: "string", Description: resourceapi.ResourceSlice{}.SwaggerDoc()["nodeName"]}, + {Name: "Driver", Type: "string", Description: resourceapi.ResourceSlice{}.SwaggerDoc()["driverName"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } _ = h.TableHandler(nodeResourceCapacityColumnDefinitions, printResourceSlice) diff --git a/pkg/registry/resource/podschedulingcontext/strategy.go b/pkg/registry/resource/podschedulingcontext/strategy.go index 16d23baf628c2..5e26cafb47b6f 100644 --- a/pkg/registry/resource/podschedulingcontext/strategy.go +++ b/pkg/registry/resource/podschedulingcontext/strategy.go @@ -53,7 +53,7 @@ func (podSchedulingStrategy) NamespaceScoped() bool { // status. func (podSchedulingStrategy) GetResetFields() 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"), ), } @@ -114,7 +114,7 @@ var StatusStrategy = podSchedulingStatusStrategy{Strategy} // should not be modified by the user. For a status update that is the spec. func (podSchedulingStatusStrategy) GetResetFields() 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"), ), } diff --git a/pkg/registry/resource/resourceclaim/strategy.go b/pkg/registry/resource/resourceclaim/strategy.go index 75f4c7be73ca8..c787bcf8e6bd8 100644 --- a/pkg/registry/resource/resourceclaim/strategy.go +++ b/pkg/registry/resource/resourceclaim/strategy.go @@ -53,7 +53,7 @@ func (resourceclaimStrategy) NamespaceScoped() bool { // status. func (resourceclaimStrategy) GetResetFields() 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"), ), } @@ -114,7 +114,7 @@ var StatusStrategy = resourceclaimStatusStrategy{Strategy} // should not be modified by the user. For a status update that is the spec. func (resourceclaimStatusStrategy) GetResetFields() 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"), ), } diff --git a/pkg/registry/resource/rest/storage_resource.go b/pkg/registry/resource/rest/storage_resource.go index b13e7f0227bf9..88d180d8407d9 100644 --- a/pkg/registry/resource/rest/storage_resource.go +++ b/pkg/registry/resource/rest/storage_resource.go @@ -17,7 +17,7 @@ limitations under the License. package rest import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/rest" 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. // 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 } else if len(storageMap) > 0 { - apiGroupInfo.VersionedResourcesStorageMap[resourcev1alpha2.SchemeGroupVersion.Version] = storageMap + apiGroupInfo.VersionedResourcesStorageMap[resourcev1alpha3.SchemeGroupVersion.Version] = storageMap } 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{} - if resource := "resourceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) { + if resource := "resourceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) { resourceClassStorage, err := resourceclassstore.NewREST(restOptionsGetter) if err != nil { return nil, err @@ -60,7 +60,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora 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) if err != nil { return nil, err @@ -69,7 +69,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora 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) if err != nil { return nil, err @@ -77,7 +77,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora 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) if err != nil { return nil, err @@ -86,7 +86,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora 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) if err != nil { return nil, err @@ -94,7 +94,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora 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) if err != nil { return nil, err @@ -102,7 +102,7 @@ func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstora 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) if err != nil { return nil, err diff --git a/pkg/scheduler/eventhandlers.go b/pkg/scheduler/eventhandlers.go index 2001b9ed91e3b..575bae33d9e7d 100644 --- a/pkg/scheduler/eventhandlers.go +++ b/pkg/scheduler/eventhandlers.go @@ -475,7 +475,7 @@ func addAllEventHandlers( handlers = append(handlers, handlerRegistration) case framework.PodSchedulingContext: 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"), ); err != nil { return err @@ -491,7 +491,7 @@ func addAllEventHandlers( } case framework.ResourceClass: 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"), ); err != nil { return err @@ -500,7 +500,7 @@ func addAllEventHandlers( } case framework.ResourceClaimParameters: 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"), ); err != nil { return err @@ -509,7 +509,7 @@ func addAllEventHandlers( } case framework.ResourceClassParameters: 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"), ); err != nil { return err diff --git a/pkg/scheduler/eventhandlers_test.go b/pkg/scheduler/eventhandlers_test.go index a99146cf567fc..15a545e0cc8bf 100644 --- a/pkg/scheduler/eventhandlers_test.go +++ b/pkg/scheduler/eventhandlers_test.go @@ -26,7 +26,7 @@ import ( appsv1 "k8s.io/api/apps/v1" batchv1 "k8s.io/api/batch/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" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -411,11 +411,11 @@ func TestAddAllEventHandlers(t *testing.T) { reflect.TypeOf(&v1.Pod{}): true, reflect.TypeOf(&v1.Node{}): true, reflect.TypeOf(&v1.Namespace{}): true, - reflect.TypeOf(&resourcev1alpha2.PodSchedulingContext{}): true, - reflect.TypeOf(&resourcev1alpha2.ResourceClaim{}): true, - reflect.TypeOf(&resourcev1alpha2.ResourceClaimParameters{}): true, - reflect.TypeOf(&resourcev1alpha2.ResourceClass{}): true, - reflect.TypeOf(&resourcev1alpha2.ResourceClassParameters{}): true, + reflect.TypeOf(&resourceapi.PodSchedulingContext{}): true, + reflect.TypeOf(&resourceapi.ResourceClaim{}): true, + reflect.TypeOf(&resourceapi.ResourceClaimParameters{}): true, + reflect.TypeOf(&resourceapi.ResourceClass{}): true, + reflect.TypeOf(&resourceapi.ResourceClassParameters{}): true, }, expectDynamicInformers: map[schema.GroupVersionResource]bool{}, }, @@ -494,7 +494,7 @@ func TestAddAllEventHandlers(t *testing.T) { dynInformerFactory := dynamicinformer.NewDynamicSharedInformerFactory(dynclient, 0) var resourceClaimCache *assumecache.AssumeCache 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) } diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go index 46d8bb9bc20d5..9fd43ec8e45eb 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go @@ -27,7 +27,7 @@ import ( "github.com/google/go-cmp/cmp" 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" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -35,9 +35,9 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "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" - 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/util/retry" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" @@ -76,7 +76,7 @@ type stateData struct { // the plugin itself successfully does an Update. // // Empty if the Pod has no claims. - claims []*resourcev1alpha2.ResourceClaim + claims []*resourceapi.ResourceClaim // podSchedulingState keeps track of the PodSchedulingContext // (if one exists) and the changes made to it. @@ -114,7 +114,7 @@ type informationForClaim struct { // The status of the claim got from the // schedulingCtx by PreFilter for repeated // 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 // controller. @@ -122,7 +122,7 @@ type informationForClaim struct { controller *claimController // Set by Reserved, published by PreBind. - allocation *resourcev1alpha2.AllocationResult + allocation *resourceapi.AllocationResult allocationDriverName string } @@ -134,7 +134,7 @@ type podSchedulingState struct { // where it might get shared by different plugins. But in practice, // it is currently only used by dynamic provisioning and thus // managed entirely here. - schedulingCtx *resourcev1alpha2.PodSchedulingContext + schedulingCtx *resourceapi.PodSchedulingContext // selectedNode is set if (and only if) a node has been selected. selectedNode *string @@ -151,7 +151,7 @@ func (p *podSchedulingState) isDirty() bool { // init checks whether there is already a PodSchedulingContext object. // 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) switch { case apierrors.IsNotFound(err): @@ -192,7 +192,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset } else { 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) { // We don't use SSA by default for performance reasons // (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 // there is no delay for the Get. SSA is safe because only // the scheduler updates these fields. - spec := resourcev1alpha2apply.PodSchedulingContextSpec() + spec := resourceapiapply.PodSchedulingContextSpec() spec.SelectedNode = p.selectedNode if p.potentialNodes != nil { spec.PotentialNodes = *p.potentialNodes @@ -217,7 +217,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset // the list would clear it. 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() { // 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 { 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 { // Create it. - schedulingCtx := &resourcev1alpha2.PodSchedulingContext{ + schedulingCtx := &resourceapi.PodSchedulingContext{ ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: pod.Namespace, @@ -249,7 +249,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset } else { 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 { return err @@ -259,7 +259,7 @@ func (p *podSchedulingState) publish(ctx context.Context, pod *v1.Pod, clientset return nil } -func statusForClaim(schedulingCtx *resourcev1alpha2.PodSchedulingContext, podClaimName string) *resourcev1alpha2.ResourceClaimSchedulingStatus { +func statusForClaim(schedulingCtx *resourceapi.PodSchedulingContext, podClaimName string) *resourceapi.ResourceClaimSchedulingStatus { if schedulingCtx == nil { return nil } @@ -276,11 +276,11 @@ type dynamicResources struct { enabled bool fh framework.Handle clientset kubernetes.Interface - classLister resourcev1alpha2listers.ResourceClassLister - podSchedulingContextLister resourcev1alpha2listers.PodSchedulingContextLister - claimParametersLister resourcev1alpha2listers.ResourceClaimParametersLister - classParametersLister resourcev1alpha2listers.ResourceClassParametersLister - resourceSliceLister resourcev1alpha2listers.ResourceSliceLister + classLister resourcelisters.ResourceClassLister + podSchedulingContextLister resourcelisters.PodSchedulingContextLister + claimParametersLister resourcelisters.ResourceClaimParametersLister + classParametersLister resourcelisters.ResourceClassParametersLister + resourceSliceLister resourcelisters.ResourceSliceLister claimNameLookup *resourceclaim.Lookup // 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, fh: fh, clientset: fh.ClientSet(), - classLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClasses().Lister(), - podSchedulingContextLister: fh.SharedInformerFactory().Resource().V1alpha2().PodSchedulingContexts().Lister(), - claimParametersLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClaimParameters().Lister(), - claimParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClaimParameters().Informer().GetIndexer(), - classParametersLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClassParameters().Lister(), - classParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClassParameters().Informer().GetIndexer(), - resourceSliceLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceSlices().Lister(), + classLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClasses().Lister(), + podSchedulingContextLister: fh.SharedInformerFactory().Resource().V1alpha3().PodSchedulingContexts().Lister(), + claimParametersLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClaimParameters().Lister(), + claimParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClaimParameters().Informer().GetIndexer(), + classParametersLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClassParameters().Lister(), + classParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClassParameters().Informer().GetIndexer(), + resourceSliceLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceSlices().Lister(), claimNameLookup: resourceclaim.NewNameLookup(fh.ClientSet()), claimAssumeCache: fh.ResourceClaimCache(), } @@ -378,14 +378,14 @@ func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts fe 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 } // claimParametersGeneratedFromIndexFunc is an index function that returns other resource keys // (= apiGroup/kind/namespace/name) for ResourceClaimParametersReference in a given claim parameters. func claimParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) { - parameters, ok := obj.(*resourcev1alpha2.ResourceClaimParameters) + parameters, ok := obj.(*resourceapi.ResourceClaimParameters) if !ok { return nil, nil } @@ -395,14 +395,14 @@ func claimParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) { 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 } // classParametersGeneratedFromIndexFunc is an index function that returns other resource keys // (= apiGroup/kind/namespace/name) for ResourceClassParametersReference in a given class parameters. func classParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) { - parameters, ok := obj.(*resourcev1alpha2.ResourceClassParameters) + parameters, ok := obj.(*resourceapi.ResourceClassParameters) if !ok { 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 // 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) { - originalParameters, modifiedParameters, err := schedutil.As[*resourcev1alpha2.ResourceClaimParameters](oldObj, newObj) + originalParameters, modifiedParameters, err := schedutil.As[*resourceapi.ResourceClaimParameters](oldObj, newObj) if err != nil { // Shouldn't happen. return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClaimParametersChange: %w", err) } 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 if ref == nil { return } // Using in-tree parameters directly? - if ref.APIGroup == resourcev1alpha2.SchemeGroupVersion.Group && + if ref.APIGroup == resourceapi.SchemeGroupVersion.Group && ref.Kind == "ResourceClaimParameters" { if modifiedParameters.Name == ref.Name { 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 // 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) { - originalParameters, modifiedParameters, err := schedutil.As[*resourcev1alpha2.ResourceClassParameters](oldObj, newObj) + originalParameters, modifiedParameters, err := schedutil.As[*resourceapi.ResourceClassParameters](oldObj, newObj) if err != nil { // Shouldn't happen. return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClassParametersChange: %w", err) } 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) if err != nil { if !apierrors.IsNotFound(err) { @@ -567,7 +567,7 @@ func (pl *dynamicResources) isSchedulableAfterClassParametersChange(logger klog. } // Using in-tree parameters directly? - if ref.APIGroup == resourcev1alpha2.SchemeGroupVersion.Group && + if ref.APIGroup == resourceapi.SchemeGroupVersion.Group && ref.Kind == "ResourceClassParameters" { if modifiedParameters.Name == ref.Name { 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 // 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) { - originalClaim, modifiedClaim, err := schedutil.As[*resourcev1alpha2.ResourceClaim](oldObj, newObj) + originalClaim, modifiedClaim, err := schedutil.As[*resourceapi.ResourceClaim](oldObj, newObj) if err != nil { // Shouldn't happen. return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClaimChange: %w", err) } 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 { usesClaim = true } @@ -694,7 +694,7 @@ func (pl *dynamicResources) isSchedulableAfterPodSchedulingContextChange(logger 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 { // Shouldn't happen. return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterPodSchedulingContextChange: %w", err) @@ -712,7 +712,7 @@ func (pl *dynamicResources) isSchedulableAfterPodSchedulingContextChange(logger // immediately if this occurred for the first time, otherwise // we allow backoff. 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.Status.Allocation == nil && !podSchedulingHasClaimInfo(podScheduling, podResourceName) { pendingDelayedClaims++ @@ -795,7 +795,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 { if claimStatus.Name == podResourceName { return true @@ -805,9 +805,9 @@ func podSchedulingHasClaimInfo(podScheduling *resourcev1alpha2.PodSchedulingCont } // podResourceClaims returns the ResourceClaims for all pod.Spec.PodResourceClaims. -func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourcev1alpha2.ResourceClaim, error) { - claims := make([]*resourcev1alpha2.ResourceClaim, 0, len(pod.Spec.ResourceClaims)) - if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourcev1alpha2.ResourceClaim) { +func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourceapi.ResourceClaim, error) { + claims := make([]*resourceapi.ResourceClaim, 0, len(pod.Spec.ResourceClaims)) + if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourceapi.ResourceClaim) { // We store the pointer as returned by the lister. The // assumption is that if a claim gets modified while our code // runs, the cache will store a new pointer, not mutate the @@ -821,7 +821,7 @@ func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourcev1alpha2. // foreachPodResourceClaim checks that each ResourceClaim for the pod exists. // 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 { claimName, mustCheckOwner, err := pl.claimNameLookup.Name(pod, &resource) if err != nil { @@ -838,7 +838,7 @@ func (pl *dynamicResources) foreachPodResourceClaim(pod *v1.Pod, cb func(podReso return err } - claim, ok := obj.(*resourcev1alpha2.ResourceClaim) + claim, ok := obj.(*resourceapi.ResourceClaim) if !ok { return fmt.Errorf("unexpected object type %T for assumed object %s/%s", obj, pod.Namespace, *claimName) } @@ -917,7 +917,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 // reserved for Kubernetes. - s.informationsForClaim[index].structuredParameters = slices.Contains(claim.Finalizers, resourcev1alpha2.Finalizer) + s.informationsForClaim[index].structuredParameters = slices.Contains(claim.Finalizers, resourceapi.Finalizer) } else { // The ResourceClass might have a node filter. This is // useful for trimming the initial set of potential @@ -995,7 +995,7 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl 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) if status != nil { return @@ -1004,14 +1004,14 @@ func (pl *dynamicResources) lookupParameters(logger klog.Logger, class *resource return } -func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *resourcev1alpha2.ResourceClass) (*resourcev1alpha2.ResourceClassParameters, *framework.Status) { - defaultClassParameters := resourcev1alpha2.ResourceClassParameters{} +func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *resourceapi.ResourceClass) (*resourceapi.ResourceClassParameters, *framework.Status) { + defaultClassParameters := resourceapi.ResourceClassParameters{} if class.ParametersRef == nil { return &defaultClassParameters, nil } - if class.ParametersRef.APIGroup == resourcev1alpha2.SchemeGroupVersion.Group && + if class.ParametersRef.APIGroup == resourceapi.SchemeGroupVersion.Group && class.ParametersRef.Kind == "ResourceClassParameters" { // Use the parameters which were referenced directly. parameters, err := pl.classParametersLister.ResourceClassParameters(class.ParametersRef.Namespace).Get(class.ParametersRef.Name) @@ -1032,14 +1032,14 @@ func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *res 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))) case 1: - parameters, ok := objs[0].(*resourcev1alpha2.ResourceClassParameters) + parameters, ok := objs[0].(*resourceapi.ResourceClassParameters) if !ok { return nil, statusError(logger, fmt.Errorf("unexpected object in class parameters index: %T", objs[0])) } return parameters, nil default: 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 { return false } @@ -1049,19 +1049,19 @@ 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) { - defaultClaimParameters := resourcev1alpha2.ResourceClaimParameters{ - DriverRequests: []resourcev1alpha2.DriverRequests{ +func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *resourceapi.ResourceClass, claim *resourceapi.ResourceClaim) (*resourceapi.ResourceClaimParameters, *framework.Status) { + defaultClaimParameters := resourceapi.ResourceClaimParameters{ + DriverRequests: []resourceapi.DriverRequests{ { DriverName: class.DriverName, - Requests: []resourcev1alpha2.ResourceRequest{ + Requests: []resourceapi.ResourceRequest{ { - ResourceRequestModel: resourcev1alpha2.ResourceRequestModel{ + ResourceRequestModel: resourceapi.ResourceRequestModel{ // TODO: This only works because NamedResources is // the only model currently implemented. We need to // match the default to how the resources of this // class are being advertized in a ResourceSlice. - NamedResources: &resourcev1alpha2.NamedResourcesRequest{ + NamedResources: &resourceapi.NamedResourcesRequest{ Selector: "true", }, }, @@ -1074,7 +1074,7 @@ func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *res if claim.Spec.ParametersRef == 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" { // Use the parameters which were referenced directly. parameters, err := pl.claimParametersLister.ResourceClaimParameters(claim.Namespace).Get(claim.Spec.ParametersRef.Name) @@ -1095,14 +1095,14 @@ func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *res 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))) case 1: - parameters, ok := objs[0].(*resourcev1alpha2.ResourceClaimParameters) + parameters, ok := objs[0].(*resourceapi.ResourceClaimParameters) if !ok { return nil, statusError(logger, fmt.Errorf("unexpected object in claim parameters index: %T", objs[0])) } return parameters, nil default: 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 { return false } @@ -1272,7 +1272,7 @@ func (pl *dynamicResources) PostFilter(ctx context.Context, cs *framework.CycleS claim.Status.DeallocationRequested = true } 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, framework.NewStatus(framework.Unschedulable, "deallocation of ResourceClaim completed") @@ -1324,8 +1324,8 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta // is only a single node. logger.V(5).Info("remembering potential nodes", "pod", klog.KObj(pod), "potentialnodes", klog.KObjSlice(nodes)) numNodes := len(nodes) - if numNodes > resourcev1alpha2.PodSchedulingNodeListMaxSize { - numNodes = resourcev1alpha2.PodSchedulingNodeListMaxSize + if numNodes > resourceapi.PodSchedulingNodeListMaxSize { + numNodes = resourceapi.PodSchedulingNodeListMaxSize } potentialNodes := make([]string, 0, numNodes) if numNodes == len(nodes) { @@ -1343,7 +1343,7 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta nodeNames[node.Node().Name] = struct{}{} } for nodeName := range nodeNames { - if len(potentialNodes) >= resourcev1alpha2.PodSchedulingNodeListMaxSize { + if len(potentialNodes) >= resourceapi.PodSchedulingNodeListMaxSize { break } potentialNodes = append(potentialNodes, nodeName) @@ -1354,7 +1354,7 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta return nil } -func haveAllPotentialNodes(schedulingCtx *resourcev1alpha2.PodSchedulingContext, nodes []*framework.NodeInfo) bool { +func haveAllPotentialNodes(schedulingCtx *resourceapi.PodSchedulingContext, nodes []*framework.NodeInfo) bool { if schedulingCtx == nil { return false } @@ -1444,8 +1444,8 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat // The allocation would be enough. The full object is useful for // debugging and testing, so let's make it realistic. claim = claim.DeepCopy() - if !slices.Contains(claim.Finalizers, resourcev1alpha2.Finalizer) { - claim.Finalizers = append(claim.Finalizers, resourcev1alpha2.Finalizer) + if !slices.Contains(claim.Finalizers, resourceapi.Finalizer) { + claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer) } claim.Status.DriverName = driverName claim.Status.Allocation = allocation @@ -1546,7 +1546,7 @@ func (pl *dynamicResources) Unreserve(ctx context.Context, cs *framework.CycleSt pod.UID, ) 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 { // We will get here again when pod scheduling is retried. logger.Error(err, "unreserve", "resourceclaim", klog.KObj(claim)) @@ -1603,7 +1603,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. // It might not even be allocated. bindClaim then ensures that the allocation // 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) claim := state.claims[index].DeepCopy() allocation := state.informationsForClaim[index].allocation @@ -1630,7 +1630,7 @@ func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, ind refreshClaim := false retryErr := retry.RetryOnConflict(retry.DefaultRetry, func() error { 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 { return fmt.Errorf("get updated claim %s after conflict: %w", klog.KObj(claim), err) } @@ -1653,9 +1653,9 @@ func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, ind // 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 !slices.Contains(claim.Finalizers, resourcev1alpha2.Finalizer) { - claim.Finalizers = append(claim.Finalizers, resourcev1alpha2.Finalizer) - updatedClaim, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) + if !slices.Contains(claim.Finalizers, resourceapi.Finalizer) { + claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer) + updatedClaim, err := pl.clientset.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) if err != nil { return fmt.Errorf("add finalizer to claim %s: %w", klog.KObj(claim), err) } @@ -1669,8 +1669,8 @@ func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, ind // We can simply try to add the pod here without checking // preconditions. The apiserver will tell us with a // 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}) - updatedClaim, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) + claim.Status.ReservedFor = append(claim.Status.ReservedFor, resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: pod.Name, UID: pod.UID}) + updatedClaim, err := pl.clientset.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) if err != nil { if allocation != nil { return fmt.Errorf("add allocation and reservation to claim %s: %w", klog.KObj(claim), err) @@ -1711,7 +1711,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 // on the safe side. 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 { case apierrors.IsNotFound(err): logger.V(5).Info("no PodSchedulingContext object to delete") diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go index d7a87f946be70..59385b3cb31df 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go @@ -31,7 +31,7 @@ import ( "github.com/stretchr/testify/require" 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" apiruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -61,39 +61,39 @@ var ( className = "my-resource-class" namespace = "default" - resourceClass = &resourcev1alpha2.ResourceClass{ + resourceClass = &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, DriverName: "some-driver", } - structuredResourceClass = &resourcev1alpha2.ResourceClass{ + structuredResourceClass = &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, DriverName: "some-driver", StructuredParameters: ptr.To(true), } - structuredResourceClassWithParams = &resourcev1alpha2.ResourceClass{ + structuredResourceClassWithParams = &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, DriverName: "some-driver", StructuredParameters: ptr.To(true), - ParametersRef: &resourcev1alpha2.ResourceClassParametersReference{ + ParametersRef: &resourceapi.ResourceClassParametersReference{ Name: className, Namespace: namespace, Kind: "ResourceClassParameters", APIGroup: "resource.k8s.io", }, } - structuredResourceClassWithCRD = &resourcev1alpha2.ResourceClass{ + structuredResourceClassWithCRD = &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, DriverName: "some-driver", StructuredParameters: ptr.To(true), - ParametersRef: &resourcev1alpha2.ResourceClassParametersReference{ + ParametersRef: &resourceapi.ResourceClassParametersReference{ Name: className, Namespace: namespace, Kind: "ResourceClassParameters", @@ -130,7 +130,7 @@ var ( claimParameters = st.MakeClaimParameters().Name(claimName).Namespace(namespace). NamedResourcesRequests("some-driver", "true"). - GeneratedFrom(&resourcev1alpha2.ResourceClaimParametersReference{ + GeneratedFrom(&resourceapi.ResourceClaimParametersReference{ Name: claimName, Kind: "ResourceClaimParameters", APIGroup: "example.com", @@ -138,7 +138,7 @@ var ( Obj() claimParametersOtherNamespace = st.MakeClaimParameters().Name(claimName).Namespace(namespace+"-2"). NamedResourcesRequests("some-driver", "true"). - GeneratedFrom(&resourcev1alpha2.ResourceClaimParametersReference{ + GeneratedFrom(&resourceapi.ResourceClaimParametersReference{ Name: claimName, Kind: "ResourceClaimParameters", APIGroup: "example.com", @@ -146,7 +146,7 @@ var ( Obj() classParameters = st.MakeClassParameters().Name(className).Namespace(namespace). NamedResourcesFilters("some-driver", "true"). - GeneratedFrom(&resourcev1alpha2.ResourceClassParametersReference{ + GeneratedFrom(&resourceapi.ResourceClassParametersReference{ Name: className, Namespace: namespace, Kind: "ResourceClassParameters", @@ -166,18 +166,18 @@ var ( Name(claimName2). Obj() deallocatingClaim = st.FromResourceClaim(pendingClaim). - Allocation("some-driver", &resourcev1alpha2.AllocationResult{}). + Allocation("some-driver", &resourceapi.AllocationResult{}). DeallocationRequested(true). Obj() inUseClaim = st.FromResourceClaim(pendingClaim). - Allocation("some-driver", &resourcev1alpha2.AllocationResult{}). + Allocation("some-driver", &resourceapi.AllocationResult{}). ReservedForPod(podName, types.UID(podUID)). Obj() structuredInUseClaim = st.FromResourceClaim(inUseClaim). Structured("worker", "instance-1"). Obj() allocatedClaim = st.FromResourceClaim(pendingClaim). - Allocation("some-driver", &resourcev1alpha2.AllocationResult{}). + Allocation("some-driver", &resourceapi.AllocationResult{}). Obj() pendingClaimWithParams = st.FromResourceClaim(pendingClaim).ParametersRef(claimName).Obj() @@ -187,13 +187,13 @@ var ( otherStructuredAllocatedClaim = st.FromResourceClaim(structuredAllocatedClaim).Name(structuredAllocatedClaim.Name + "-other").Obj() allocatedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaim). - Allocation("some-driver", &resourcev1alpha2.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}). + Allocation("some-driver", &resourceapi.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}). Obj() structuredAllocatedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaimWithWrongTopology). Structured("worker-2", "instance-1"). Obj() allocatedClaimWithGoodTopology = st.FromResourceClaim(allocatedClaim). - Allocation("some-driver", &resourcev1alpha2.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("kubernetes.io/hostname", []string{"worker"}).Obj()}). + Allocation("some-driver", &resourceapi.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("kubernetes.io/hostname", []string{"worker"}).Obj()}). Obj() structuredAllocatedClaimWithGoodTopology = st.FromResourceClaim(allocatedClaimWithGoodTopology). Structured("worker", "instance-1"). @@ -214,32 +214,32 @@ var ( SelectedNode(workerNode.Name). Obj() schedulingInfo = st.FromPodSchedulingContexts(schedulingPotential). - ResourceClaims(resourcev1alpha2.ResourceClaimSchedulingStatus{Name: resourceName}, - resourcev1alpha2.ResourceClaimSchedulingStatus{Name: resourceName2}). + ResourceClaims(resourceapi.ResourceClaimSchedulingStatus{Name: resourceName}, + resourceapi.ResourceClaimSchedulingStatus{Name: resourceName2}). Obj() ) -func reserve(claim *resourcev1alpha2.ResourceClaim, pod *v1.Pod) *resourcev1alpha2.ResourceClaim { +func reserve(claim *resourceapi.ResourceClaim, pod *v1.Pod) *resourceapi.ResourceClaim { return st.FromResourceClaim(claim). ReservedForPod(pod.Name, types.UID(pod.UID)). Obj() } // claimWithCRD replaces the in-tree group with "example.com". -func claimWithCRD(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { +func claimWithCRD(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { claim = claim.DeepCopy() claim.Spec.ParametersRef.APIGroup = "example.com" return claim } // classWithCRD replaces the in-tree group with "example.com". -func classWithCRD(class *resourcev1alpha2.ResourceClass) *resourcev1alpha2.ResourceClass { +func classWithCRD(class *resourceapi.ResourceClass) *resourceapi.ResourceClass { class = class.DeepCopy() class.ParametersRef.APIGroup = "example.com" return class } -func breakCELInClaimParameters(parameters *resourcev1alpha2.ResourceClaimParameters) *resourcev1alpha2.ResourceClaimParameters { +func breakCELInClaimParameters(parameters *resourceapi.ResourceClaimParameters) *resourceapi.ResourceClaimParameters { parameters = parameters.DeepCopy() for i := range parameters.DriverRequests { for e := range parameters.DriverRequests[i].Requests { @@ -249,7 +249,7 @@ func breakCELInClaimParameters(parameters *resourcev1alpha2.ResourceClaimParamet return parameters } -func breakCELInClassParameters(parameters *resourcev1alpha2.ResourceClassParameters) *resourcev1alpha2.ResourceClassParameters { +func breakCELInClassParameters(parameters *resourceapi.ResourceClassParameters) *resourceapi.ResourceClassParameters { parameters = parameters.DeepCopy() for i := range parameters.Filters { parameters.Filters[i].NamedResources.Selector = `attributes.bool["no-such-attribute"]` @@ -274,19 +274,19 @@ type result struct { // assumedClaim is the one claim which is expected to be assumed, // nil if none. - assumedClaim *resourcev1alpha2.ResourceClaim + assumedClaim *resourceapi.ResourceClaim // inFlightClaim is the one claim which is expected to be tracked as // in flight, nil if none. - inFlightClaim *resourcev1alpha2.ResourceClaim + inFlightClaim *resourceapi.ResourceClaim } // change contains functions for modifying objects of a certain type. These // functions will get called for all objects of that type. If they needs to // make changes only to a particular instance, then it must check the name. type change struct { - scheduling func(*resourcev1alpha2.PodSchedulingContext) *resourcev1alpha2.PodSchedulingContext - claim func(*resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim + scheduling func(*resourceapi.PodSchedulingContext) *resourceapi.PodSchedulingContext + claim func(*resourceapi.ResourceClaim) *resourceapi.ResourceClaim } type perNodeResult map[string]result @@ -337,9 +337,9 @@ func TestPlugin(t *testing.T) { testcases := map[string]struct { nodes []*v1.Node // default if unset is workerNode pod *v1.Pod - claims []*resourcev1alpha2.ResourceClaim - classes []*resourcev1alpha2.ResourceClass - schedulings []*resourcev1alpha2.PodSchedulingContext + claims []*resourceapi.ResourceClaim + classes []*resourceapi.ResourceClass + schedulings []*resourceapi.PodSchedulingContext // objs get stored directly in the fake client, without passing // through reactors, in contrast to the types above. @@ -362,11 +362,11 @@ func TestPlugin(t *testing.T) { }, "claim-reference": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim, otherClaim}, + claims: []*resourceapi.ResourceClaim{allocatedClaim, otherClaim}, want: want{ prebind: result{ changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Status.ReservedFor = inUseClaim.Status.ReservedFor @@ -379,11 +379,11 @@ func TestPlugin(t *testing.T) { }, "claim-reference-structured": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{structuredAllocatedClaim, otherClaim}, + claims: []*resourceapi.ResourceClaim{structuredAllocatedClaim, otherClaim}, want: want{ prebind: result{ changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Status.ReservedFor = inUseClaim.Status.ReservedFor @@ -396,11 +396,11 @@ func TestPlugin(t *testing.T) { }, "claim-template": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim, otherClaim}, + claims: []*resourceapi.ResourceClaim{allocatedClaim, otherClaim}, want: want{ prebind: result{ changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Status.ReservedFor = inUseClaim.Status.ReservedFor @@ -413,11 +413,11 @@ func TestPlugin(t *testing.T) { }, "claim-template-structured": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{structuredAllocatedClaim, otherClaim}, + claims: []*resourceapi.ResourceClaim{structuredAllocatedClaim, otherClaim}, want: want{ prebind: result{ changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Status.ReservedFor = inUseClaim.Status.ReservedFor @@ -430,7 +430,7 @@ func TestPlugin(t *testing.T) { }, "missing-claim": { pod: podWithClaimTemplate, // status not set - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim, otherClaim}, + claims: []*resourceapi.ResourceClaim{allocatedClaim, otherClaim}, want: want{ preenqueue: result{ status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `pod "default/my-pod": ResourceClaim not created yet`), @@ -439,10 +439,10 @@ func TestPlugin(t *testing.T) { }, "deleted-claim": { pod: podWithClaimTemplateInStatus, - claims: func() []*resourcev1alpha2.ResourceClaim { + claims: func() []*resourceapi.ResourceClaim { claim := allocatedClaim.DeepCopy() claim.DeletionTimestamp = &metav1.Time{Time: time.Now()} - return []*resourcev1alpha2.ResourceClaim{claim} + return []*resourceapi.ResourceClaim{claim} }(), want: want{ preenqueue: result{ @@ -452,10 +452,10 @@ func TestPlugin(t *testing.T) { }, "wrong-claim": { pod: podWithClaimTemplateInStatus, - claims: func() []*resourcev1alpha2.ResourceClaim { + claims: func() []*resourceapi.ResourceClaim { claim := allocatedClaim.DeepCopy() claim.OwnerReferences[0].UID += "123" - return []*resourcev1alpha2.ResourceClaim{claim} + return []*resourceapi.ResourceClaim{claim} }(), want: want{ preenqueue: result{ @@ -465,8 +465,8 @@ func TestPlugin(t *testing.T) { }, "structured-no-resources": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, + classes: []*resourceapi.ResourceClass{structuredResourceClass}, want: want{ filter: perNodeResult{ workerNode.Name: { @@ -480,8 +480,8 @@ func TestPlugin(t *testing.T) { }, "structured-with-resources": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, + classes: []*resourceapi.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ reserve: result{ @@ -490,7 +490,7 @@ func TestPlugin(t *testing.T) { prebind: result{ assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers @@ -509,12 +509,12 @@ func TestPlugin(t *testing.T) { // As before. but the finalizer is already set. Could happen if // the scheduler got interrupted. pod: podWithClaimName, - claims: func() []*resourcev1alpha2.ResourceClaim { + claims: func() []*resourceapi.ResourceClaim { claim := pendingClaim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers - return []*resourcev1alpha2.ResourceClaim{claim} + return []*resourceapi.ResourceClaim{claim} }(), - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, + classes: []*resourceapi.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ reserve: result{ @@ -523,7 +523,7 @@ func TestPlugin(t *testing.T) { prebind: result{ assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Status = structuredInUseClaim.Status @@ -541,16 +541,16 @@ func TestPlugin(t *testing.T) { // As before. but the finalizer is already set. Then it gets // removed before the scheduler reaches PreBind. pod: podWithClaimName, - claims: func() []*resourcev1alpha2.ResourceClaim { + claims: func() []*resourceapi.ResourceClaim { claim := pendingClaim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers - return []*resourcev1alpha2.ResourceClaim{claim} + return []*resourceapi.ResourceClaim{claim} }(), - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, + classes: []*resourceapi.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, prepare: prepare{ prebind: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { claim.Finalizers = nil return claim }, @@ -563,7 +563,7 @@ func TestPlugin(t *testing.T) { prebind: result{ assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers @@ -582,12 +582,12 @@ func TestPlugin(t *testing.T) { // No finalizer initially, then it gets added before // the scheduler reaches PreBind. Shouldn't happen? pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, + classes: []*resourceapi.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, prepare: prepare{ prebind: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { claim.Finalizers = structuredAllocatedClaim.Finalizers return claim }, @@ -600,7 +600,7 @@ func TestPlugin(t *testing.T) { prebind: result{ assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Status = structuredInUseClaim.Status @@ -616,8 +616,8 @@ func TestPlugin(t *testing.T) { }, "structured-skip-bind": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, + classes: []*resourceapi.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ reserve: result{ @@ -628,8 +628,8 @@ func TestPlugin(t *testing.T) { }, "structured-exhausted-resources": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, + classes: []*resourceapi.ResourceClass{structuredResourceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ filter: perNodeResult{ @@ -645,8 +645,8 @@ func TestPlugin(t *testing.T) { "with-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, + claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, + classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{claimParameters, classParameters, workerNodeSlice}, want: want{ reserve: result{ @@ -655,7 +655,7 @@ func TestPlugin(t *testing.T) { prebind: result{ assumedClaim: reserve(structuredAllocatedClaimWithParams, podWithClaimName), changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers @@ -673,8 +673,8 @@ func TestPlugin(t *testing.T) { "with-translated-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, + claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, + classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, claimParametersOtherNamespace /* must be ignored */, classParameters, workerNodeSlice}, want: want{ reserve: result{ @@ -683,7 +683,7 @@ func TestPlugin(t *testing.T) { prebind: result{ assumedClaim: reserve(claimWithCRD(structuredAllocatedClaimWithParams), podWithClaimName), changes: change{ - claim: func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() claim.Finalizers = structuredAllocatedClaim.Finalizers @@ -701,8 +701,8 @@ func TestPlugin(t *testing.T) { "missing-class-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, + claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, + classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{claimParameters, workerNodeSlice}, want: want{ prefilter: result{ @@ -716,8 +716,8 @@ func TestPlugin(t *testing.T) { "missing-claim-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, + claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, + classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{classParameters, workerNodeSlice}, want: want{ prefilter: result{ @@ -731,8 +731,8 @@ func TestPlugin(t *testing.T) { "missing-translated-class-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, + claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, + classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, workerNodeSlice}, want: want{ prefilter: result{ @@ -746,8 +746,8 @@ func TestPlugin(t *testing.T) { "missing-translated-claim-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, + claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, + classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{classParameters, workerNodeSlice}, want: want{ prefilter: result{ @@ -761,8 +761,8 @@ func TestPlugin(t *testing.T) { "too-many-translated-class-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, + claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, + classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, classParameters, st.FromClassParameters(classParameters).Name("other").Obj() /* too many */, workerNodeSlice}, want: want{ prefilter: result{ @@ -776,8 +776,8 @@ func TestPlugin(t *testing.T) { "too-many-translated-claim-parameters": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourcev1alpha2.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, + claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, + classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, objs: []apiruntime.Object{claimParameters, st.FromClaimParameters(claimParameters).Name("other").Obj() /* too many */, classParameters, workerNodeSlice}, want: want{ prefilter: result{ @@ -791,8 +791,8 @@ func TestPlugin(t *testing.T) { "claim-parameters-CEL-runtime-error": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, + claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, + classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{breakCELInClaimParameters(claimParameters), classParameters, workerNodeSlice}, want: want{ filter: perNodeResult{ @@ -808,8 +808,8 @@ func TestPlugin(t *testing.T) { "class-parameters-CEL-runtime-error": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaimWithParams}, - classes: []*resourcev1alpha2.ResourceClass{structuredResourceClassWithParams}, + claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, + classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, objs: []apiruntime.Object{claimParameters, breakCELInClassParameters(classParameters), workerNodeSlice}, want: want{ filter: perNodeResult{ @@ -825,7 +825,7 @@ func TestPlugin(t *testing.T) { "waiting-for-deallocation": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{deallocatingClaim}, + claims: []*resourceapi.ResourceClaim{deallocatingClaim}, want: want{ prefilter: result{ status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim must be reallocated`), @@ -837,7 +837,7 @@ func TestPlugin(t *testing.T) { }, "missing-class": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, want: want{ prefilter: result{ status: framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("resource class %s does not exist", className)), @@ -851,8 +851,8 @@ func TestPlugin(t *testing.T) { // Create the PodSchedulingContext object, ask for information // and select a node. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - classes: []*resourcev1alpha2.ResourceClass{resourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, + classes: []*resourceapi.ResourceClass{resourceClass}, want: want{ prebind: result{ status: framework.NewStatus(framework.Pending, `waiting for resource driver`), @@ -865,8 +865,8 @@ func TestPlugin(t *testing.T) { // information, but do not select a node because // there are multiple claims. pod: podWithTwoClaimNames, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim, pendingClaim2}, - classes: []*resourcev1alpha2.ResourceClass{resourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim, pendingClaim2}, + classes: []*resourceapi.ResourceClass{resourceClass}, want: want{ prebind: result{ status: framework.NewStatus(framework.Pending, `waiting for resource driver`), @@ -878,14 +878,14 @@ func TestPlugin(t *testing.T) { // Use the populated PodSchedulingContext object to select a // node. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - schedulings: []*resourcev1alpha2.PodSchedulingContext{schedulingInfo}, - classes: []*resourcev1alpha2.ResourceClass{resourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, + schedulings: []*resourceapi.PodSchedulingContext{schedulingInfo}, + classes: []*resourceapi.ResourceClass{resourceClass}, want: want{ prebind: result{ status: framework.NewStatus(framework.Pending, `waiting for resource driver`), changes: change{ - scheduling: func(in *resourcev1alpha2.PodSchedulingContext) *resourcev1alpha2.PodSchedulingContext { + scheduling: func(in *resourceapi.PodSchedulingContext) *resourceapi.PodSchedulingContext { return st.FromPodSchedulingContexts(in). SelectedNode(workerNode.Name). Obj() @@ -898,12 +898,12 @@ func TestPlugin(t *testing.T) { // Use the populated PodSchedulingContext object to select a // node. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - schedulings: []*resourcev1alpha2.PodSchedulingContext{schedulingInfo}, - classes: []*resourcev1alpha2.ResourceClass{resourceClass}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, + schedulings: []*resourceapi.PodSchedulingContext{schedulingInfo}, + classes: []*resourceapi.ResourceClass{resourceClass}, prepare: prepare{ prebind: change{ - scheduling: func(in *resourcev1alpha2.PodSchedulingContext) *resourcev1alpha2.PodSchedulingContext { + scheduling: func(in *resourceapi.PodSchedulingContext) *resourceapi.PodSchedulingContext { // This does not actually conflict with setting the // selected node, but because the plugin is not using // patching yet, Update nonetheless fails. @@ -922,15 +922,15 @@ func TestPlugin(t *testing.T) { "scheduling-completed": { // Remove PodSchedulingContext object once the pod is scheduled. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim}, - schedulings: []*resourcev1alpha2.PodSchedulingContext{schedulingInfo}, - classes: []*resourcev1alpha2.ResourceClass{resourceClass}, + claims: []*resourceapi.ResourceClaim{allocatedClaim}, + schedulings: []*resourceapi.PodSchedulingContext{schedulingInfo}, + classes: []*resourceapi.ResourceClass{resourceClass}, want: want{ prebind: result{ changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). - ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). + ReservedFor(resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). Obj() }, }, @@ -944,7 +944,7 @@ func TestPlugin(t *testing.T) { // PostFilter tries to get the pod scheduleable by // deallocating the claim. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaimWithWrongTopology}, + claims: []*resourceapi.ResourceClaim{allocatedClaimWithWrongTopology}, want: want{ filter: perNodeResult{ workerNode.Name: { @@ -954,7 +954,7 @@ func TestPlugin(t *testing.T) { postfilter: result{ // Claims with delayed allocation get deallocated. changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). DeallocationRequested(true). Obj() @@ -968,7 +968,7 @@ func TestPlugin(t *testing.T) { // PostFilter tries to get the pod scheduleable by // deallocating the claim. pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{structuredAllocatedClaimWithWrongTopology}, + claims: []*resourceapi.ResourceClaim{structuredAllocatedClaimWithWrongTopology}, want: want{ filter: perNodeResult{ workerNode.Name: { @@ -978,7 +978,7 @@ func TestPlugin(t *testing.T) { postfilter: result{ // Claims with delayed allocation and structured parameters get deallocated immediately. changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). Allocation("", nil). Obj() @@ -990,13 +990,13 @@ func TestPlugin(t *testing.T) { }, "good-topology": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaimWithGoodTopology}, + claims: []*resourceapi.ResourceClaim{allocatedClaimWithGoodTopology}, want: want{ prebind: result{ changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). - ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). + ReservedFor(resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). Obj() }, }, @@ -1005,22 +1005,22 @@ func TestPlugin(t *testing.T) { }, "bind-failure": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaimWithGoodTopology}, + claims: []*resourceapi.ResourceClaim{allocatedClaimWithGoodTopology}, want: want{ prebind: result{ changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). - ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). + ReservedFor(resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). Obj() }, }, }, unreserveAfterBindFailure: &result{ changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { out := in.DeepCopy() - out.Status.ReservedFor = []resourcev1alpha2.ResourceClaimConsumerReference{} + out.Status.ReservedFor = []resourceapi.ResourceClaimConsumerReference{} return out }, }, @@ -1029,22 +1029,22 @@ func TestPlugin(t *testing.T) { }, "bind-failure-structured": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{structuredAllocatedClaimWithGoodTopology}, + claims: []*resourceapi.ResourceClaim{structuredAllocatedClaimWithGoodTopology}, want: want{ prebind: result{ changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). - ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). + ReservedFor(resourceapi.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). Obj() }, }, }, unreserveAfterBindFailure: &result{ changes: change{ - claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { out := in.DeepCopy() - out.Status.ReservedFor = []resourcev1alpha2.ResourceClaimConsumerReference{} + out.Status.ReservedFor = []resourceapi.ResourceClaimConsumerReference{} return out }, }, @@ -1053,11 +1053,11 @@ func TestPlugin(t *testing.T) { }, "reserved-okay": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{inUseClaim}, + claims: []*resourceapi.ResourceClaim{inUseClaim}, }, "disable": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{inUseClaim}, + claims: []*resourceapi.ResourceClaim{inUseClaim}, want: want{ prefilter: result{ status: framework.NewStatus(framework.Skip), @@ -1251,13 +1251,13 @@ func (tc *testContext) verify(t *testing.T, expected result, initialObjects []me func (tc *testContext) listAll(t *testing.T) (objects []metav1.Object) { t.Helper() - claims, err := tc.client.ResourceV1alpha2().ResourceClaims("").List(tc.ctx, metav1.ListOptions{}) + claims, err := tc.client.ResourceV1alpha3().ResourceClaims("").List(tc.ctx, metav1.ListOptions{}) require.NoError(t, err, "list claims") for _, claim := range claims.Items { claim := claim objects = append(objects, &claim) } - schedulings, err := tc.client.ResourceV1alpha2().PodSchedulingContexts("").List(tc.ctx, metav1.ListOptions{}) + schedulings, err := tc.client.ResourceV1alpha3().PodSchedulingContexts("").List(tc.ctx, metav1.ListOptions{}) require.NoError(t, err, "list pod scheduling") for _, scheduling := range schedulings.Items { scheduling := scheduling @@ -1271,7 +1271,7 @@ func (tc *testContext) listAll(t *testing.T) (objects []metav1.Object) { func (tc *testContext) listAssumedClaims() []metav1.Object { var assumedClaims []metav1.Object for _, obj := range tc.p.claimAssumeCache.List(nil) { - claim := obj.(*resourcev1alpha2.ResourceClaim) + claim := obj.(*resourceapi.ResourceClaim) obj, _ := tc.p.claimAssumeCache.Get(claim.Namespace + "/" + claim.Name) apiObj, _ := tc.p.claimAssumeCache.GetAPIObj(claim.Namespace + "/" + claim.Name) if obj != apiObj { @@ -1285,7 +1285,7 @@ func (tc *testContext) listAssumedClaims() []metav1.Object { func (tc *testContext) listInFlightClaims() []metav1.Object { var inFlightClaims []metav1.Object tc.p.inFlightAllocations.Range(func(key, value any) bool { - inFlightClaims = append(inFlightClaims, value.(*resourcev1alpha2.ResourceClaim)) + inFlightClaims = append(inFlightClaims, value.(*resourceapi.ResourceClaim)) return true }) sortObjects(inFlightClaims) @@ -1300,14 +1300,14 @@ func (tc *testContext) updateAPIServer(t *testing.T, objects []metav1.Object, up if diff := cmp.Diff(objects[i], obj); diff != "" { t.Logf("Updating %T %q, diff (-old, +new):\n%s", obj, obj.GetName(), diff) switch obj := obj.(type) { - case *resourcev1alpha2.ResourceClaim: - obj, err := tc.client.ResourceV1alpha2().ResourceClaims(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{}) + case *resourceapi.ResourceClaim: + obj, err := tc.client.ResourceV1alpha3().ResourceClaims(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{}) if err != nil { t.Fatalf("unexpected error during prepare update: %v", err) } modified[i] = obj - case *resourcev1alpha2.PodSchedulingContext: - obj, err := tc.client.ResourceV1alpha2().PodSchedulingContexts(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{}) + case *resourceapi.PodSchedulingContext: + obj, err := tc.client.ResourceV1alpha3().PodSchedulingContexts(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{}) if err != nil { t.Fatalf("unexpected error during prepare update: %v", err) } @@ -1337,11 +1337,11 @@ func update(t *testing.T, objects []metav1.Object, updates change) []metav1.Obje for _, obj := range objects { switch in := obj.(type) { - case *resourcev1alpha2.ResourceClaim: + case *resourceapi.ResourceClaim: if updates.claim != nil { obj = updates.claim(in) } - case *resourcev1alpha2.PodSchedulingContext: + case *resourceapi.PodSchedulingContext: if updates.scheduling != nil { obj = updates.scheduling(in) } @@ -1352,7 +1352,7 @@ func update(t *testing.T, objects []metav1.Object, updates change) []metav1.Obje return updated } -func setup(t *testing.T, nodes []*v1.Node, claims []*resourcev1alpha2.ResourceClaim, classes []*resourcev1alpha2.ResourceClass, schedulings []*resourcev1alpha2.PodSchedulingContext, objs []apiruntime.Object) (result *testContext) { +func setup(t *testing.T, nodes []*v1.Node, claims []*resourceapi.ResourceClaim, classes []*resourceapi.ResourceClass, schedulings []*resourceapi.PodSchedulingContext, objs []apiruntime.Object) (result *testContext) { t.Helper() tc := &testContext{} @@ -1371,7 +1371,7 @@ func setup(t *testing.T, nodes []*v1.Node, claims []*resourcev1alpha2.ResourceCl tc.client.PrependReactor("list", "resourceclassparameters", createListReactor(tc.client.Tracker(), "ResourceClassParameters")) tc.informerFactory = informers.NewSharedInformerFactory(tc.client, 0) - tc.claimAssumeCache = assumecache.NewAssumeCache(tCtx.Logger(), tc.informerFactory.Resource().V1alpha2().ResourceClaims().Informer(), "resource claim", "", nil) + tc.claimAssumeCache = assumecache.NewAssumeCache(tCtx.Logger(), tc.informerFactory.Resource().V1alpha3().ResourceClaims().Informer(), "resource claim", "", nil) opts := []runtime.Option{ runtime.WithClientSet(tc.client), runtime.WithInformerFactory(tc.informerFactory), @@ -1391,15 +1391,15 @@ func setup(t *testing.T, nodes []*v1.Node, claims []*resourcev1alpha2.ResourceCl // The tests use the API to create the objects because then reactors // get triggered. for _, claim := range claims { - _, err := tc.client.ResourceV1alpha2().ResourceClaims(claim.Namespace).Create(tc.ctx, claim, metav1.CreateOptions{}) + _, err := tc.client.ResourceV1alpha3().ResourceClaims(claim.Namespace).Create(tc.ctx, claim, metav1.CreateOptions{}) require.NoError(t, err, "create resource claim") } for _, class := range classes { - _, err := tc.client.ResourceV1alpha2().ResourceClasses().Create(tc.ctx, class, metav1.CreateOptions{}) + _, err := tc.client.ResourceV1alpha3().ResourceClasses().Create(tc.ctx, class, metav1.CreateOptions{}) require.NoError(t, err, "create resource class") } for _, scheduling := range schedulings { - _, err := tc.client.ResourceV1alpha2().PodSchedulingContexts(scheduling.Namespace).Create(tc.ctx, scheduling, metav1.CreateOptions{}) + _, err := tc.client.ResourceV1alpha3().PodSchedulingContexts(scheduling.Namespace).Create(tc.ctx, scheduling, metav1.CreateOptions{}) require.NoError(t, err, "create pod scheduling") } @@ -1499,7 +1499,7 @@ func createListReactor(tracker cgotesting.ObjectTracker, kind string) func(actio func Test_isSchedulableAfterClaimChange(t *testing.T) { testcases := map[string]struct { pod *v1.Pod - claims []*resourcev1alpha2.ResourceClaim + claims []*resourceapi.ResourceClaim oldObj, newObj interface{} expectedHint framework.QueueingHint expectedErr bool @@ -1517,7 +1517,7 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "skip-wrong-claim": { pod: podWithClaimTemplate, - newObj: func() *resourcev1alpha2.ResourceClaim { + newObj: func() *resourceapi.ResourceClaim { claim := allocatedClaim.DeepCopy() claim.OwnerReferences[0].UID += "123" return claim @@ -1526,8 +1526,8 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "skip-unrelated-claim": { pod: podWithClaimTemplate, - claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim}, - newObj: func() *resourcev1alpha2.ResourceClaim { + claims: []*resourceapi.ResourceClaim{allocatedClaim}, + newObj: func() *resourceapi.ResourceClaim { claim := allocatedClaim.DeepCopy() claim.Name += "-foo" claim.UID += "123" @@ -1542,16 +1542,16 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "backoff-wrong-old-object": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, oldObj: "not-a-claim", newObj: pendingClaim, expectedErr: true, }, "skip-adding-finalizer": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, oldObj: pendingClaim, - newObj: func() *resourcev1alpha2.ResourceClaim { + newObj: func() *resourceapi.ResourceClaim { claim := pendingClaim.DeepCopy() claim.Finalizers = append(claim.Finalizers, "foo") return claim @@ -1560,20 +1560,20 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "queue-on-status-change": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, oldObj: pendingClaim, - newObj: func() *resourcev1alpha2.ResourceClaim { + newObj: func() *resourceapi.ResourceClaim { claim := pendingClaim.DeepCopy() - claim.Status.Allocation = &resourcev1alpha2.AllocationResult{} + claim.Status.Allocation = &resourceapi.AllocationResult{} return claim }(), expectedHint: framework.Queue, }, "structured-claim-deallocate": { pod: podWithClaimName, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, oldObj: otherStructuredAllocatedClaim, - newObj: func() *resourcev1alpha2.ResourceClaim { + newObj: func() *resourceapi.ResourceClaim { claim := otherStructuredAllocatedClaim.DeepCopy() claim.Status.Allocation = nil return claim @@ -1590,14 +1590,14 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { testCtx := setup(t, nil, tc.claims, nil, nil, nil) oldObj := tc.oldObj newObj := tc.newObj - if claim, ok := tc.newObj.(*resourcev1alpha2.ResourceClaim); ok { + if claim, ok := tc.newObj.(*resourceapi.ResourceClaim); ok { // Add or update through the client and wait until the event is processed. claimKey := claim.Namespace + "/" + claim.Name if tc.oldObj == nil { // Some test claims already have it. Clear for create. createClaim := claim.DeepCopy() createClaim.UID = "" - storedClaim, err := testCtx.client.ResourceV1alpha2().ResourceClaims(createClaim.Namespace).Create(tCtx, createClaim, metav1.CreateOptions{}) + storedClaim, err := testCtx.client.ResourceV1alpha3().ResourceClaims(createClaim.Namespace).Create(tCtx, createClaim, metav1.CreateOptions{}) require.NoError(t, err, "create claim") claim = storedClaim } else { @@ -1605,10 +1605,10 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { require.NoError(t, err, "retrieve old claim") updateClaim := claim.DeepCopy() // The test claim doesn't have those (generated dynamically), so copy them. - updateClaim.UID = cachedClaim.(*resourcev1alpha2.ResourceClaim).UID - updateClaim.ResourceVersion = cachedClaim.(*resourcev1alpha2.ResourceClaim).ResourceVersion + updateClaim.UID = cachedClaim.(*resourceapi.ResourceClaim).UID + updateClaim.ResourceVersion = cachedClaim.(*resourceapi.ResourceClaim).ResourceVersion - storedClaim, err := testCtx.client.ResourceV1alpha2().ResourceClaims(updateClaim.Namespace).Update(tCtx, updateClaim, metav1.UpdateOptions{}) + storedClaim, err := testCtx.client.ResourceV1alpha3().ResourceClaims(updateClaim.Namespace).Update(tCtx, updateClaim, metav1.UpdateOptions{}) require.NoError(t, err, "update claim") claim = storedClaim } @@ -1617,7 +1617,7 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { require.EventuallyWithT(t, func(t *assert.CollectT) { cachedClaim, err := testCtx.claimAssumeCache.Get(claimKey) require.NoError(t, err, "retrieve claim") - if cachedClaim.(*resourcev1alpha2.ResourceClaim).ResourceVersion != claim.ResourceVersion { + if cachedClaim.(*resourceapi.ResourceClaim).ResourceVersion != claim.ResourceVersion { t.Errorf("cached claim not updated yet") } }, time.Minute, time.Second, "claim assume cache must have new or updated claim") @@ -1642,8 +1642,8 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { testcases := map[string]struct { pod *v1.Pod - schedulings []*resourcev1alpha2.PodSchedulingContext - claims []*resourcev1alpha2.ResourceClaim + schedulings []*resourceapi.PodSchedulingContext + claims []*resourceapi.ResourceClaim oldObj, newObj interface{} expectedHint framework.QueueingHint expectedErr bool @@ -1676,8 +1676,8 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "skip-unrelated-object": { pod: podWithClaimTemplate, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - newObj: func() *resourcev1alpha2.PodSchedulingContext { + claims: []*resourceapi.ResourceClaim{pendingClaim}, + newObj: func() *resourceapi.PodSchedulingContext { scheduling := scheduling.DeepCopy() scheduling.Name += "-foo" return scheduling @@ -1698,27 +1698,27 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "skip-missing-infos": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, oldObj: scheduling, newObj: scheduling, expectedHint: framework.QueueSkip, }, "queue-new-infos": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, oldObj: scheduling, newObj: schedulingInfo, expectedHint: framework.Queue, }, "queue-bad-selected-node": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, - oldObj: func() *resourcev1alpha2.PodSchedulingContext { + claims: []*resourceapi.ResourceClaim{pendingClaim}, + oldObj: func() *resourceapi.PodSchedulingContext { scheduling := schedulingInfo.DeepCopy() scheduling.Spec.SelectedNode = workerNode.Name return scheduling }(), - newObj: func() *resourcev1alpha2.PodSchedulingContext { + newObj: func() *resourceapi.PodSchedulingContext { scheduling := schedulingInfo.DeepCopy() scheduling.Spec.SelectedNode = workerNode.Name scheduling.Status.ResourceClaims[0].UnsuitableNodes = append(scheduling.Status.ResourceClaims[0].UnsuitableNodes, scheduling.Spec.SelectedNode) @@ -1728,9 +1728,9 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "skip-spec-changes": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, oldObj: schedulingInfo, - newObj: func() *resourcev1alpha2.PodSchedulingContext { + newObj: func() *resourceapi.PodSchedulingContext { scheduling := schedulingInfo.DeepCopy() scheduling.Spec.SelectedNode = workerNode.Name return scheduling @@ -1739,9 +1739,9 @@ func Test_isSchedulableAfterPodSchedulingContextChange(t *testing.T) { }, "backoff-other-changes": { pod: podWithClaimTemplateInStatus, - claims: []*resourcev1alpha2.ResourceClaim{pendingClaim}, + claims: []*resourceapi.ResourceClaim{pendingClaim}, oldObj: schedulingInfo, - newObj: func() *resourcev1alpha2.PodSchedulingContext { + newObj: func() *resourceapi.PodSchedulingContext { scheduling := schedulingInfo.DeepCopy() scheduling.Finalizers = append(scheduling.Finalizers, "foo") return scheduling diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go b/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go index c65265c83803e..242013122c1ca 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go @@ -22,7 +22,7 @@ import ( "fmt" "slices" - resourceapi "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apiserver/pkg/cel/environment" "k8s.io/dynamic-resource-allocation/structured/namedresources/cel" ) diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go b/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go index aa920757274b1..d0d8ef602434a 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "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/utils/ptr" ) diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go index 62cc77788bd3d..96880b9448cc1 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go @@ -22,7 +22,7 @@ import ( "sync" 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/runtime" "k8s.io/klog/v2" @@ -39,10 +39,10 @@ type ResourceModels struct { NamedResources namedresourcesmodel.Model } -// resourceSliceLister is the subset of resourcev1alpha2listers.ResourceSliceLister needed by +// resourceSliceLister is the subset of resourcelisters.ResourceSliceLister needed by // newResourceModel. 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. @@ -72,14 +72,14 @@ func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceListe objs := claimAssumeCache.List(nil) for _, obj := range objs { - claim, ok := obj.(*resourcev1alpha2.ResourceClaim) + claim, ok := obj.(*resourceapi.ResourceClaim) if !ok { return nil, fmt.Errorf("got unexpected object of type %T from claim assume cache", obj) } if obj, ok := inFlightAllocations.Load(claim.UID); ok { // If the allocation is in-flight, then we have to use the allocation // from that claim. - claim = obj.(*resourcev1alpha2.ResourceClaim) + claim = obj.(*resourceapi.ResourceClaim) } if claim.Status.Allocation == nil { continue @@ -103,13 +103,13 @@ func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceListe 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 // multiple requests which need to be allocated together, so here // we have to collect them per model. type perDriverRequests struct { parameters []runtime.RawExtension - requests []*resourcev1alpha2.NamedResourcesRequest + requests []*resourceapi.NamedResourcesRequest } namedresourcesRequests := make(map[string]perDriverRequests) 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)), } for driverName, perDriver := range namedresourcesRequests { - var filter *resourcev1alpha2.NamedResourcesFilter + var filter *resourceapi.NamedResourcesFilter for _, f := range classParameters.Filters { if f.DriverName == driverName && f.ResourceFilterModel.NamedResources != nil { filter = f.ResourceFilterModel.NamedResources @@ -158,9 +158,9 @@ func newClaimController(logger klog.Logger, class *resourcev1alpha2.ResourceClas // claimController currently wraps exactly one structured parameter model. type claimController struct { - class *resourcev1alpha2.ResourceClass - classParameters *resourcev1alpha2.ResourceClassParameters - claimParameters *resourcev1alpha2.ResourceClaimParameters + class *resourceapi.ResourceClass + classParameters *resourceapi.ResourceClassParameters + claimParameters *resourceapi.ResourceClaimParameters namedresources map[string]perDriverController } @@ -186,8 +186,8 @@ func (c claimController) nodeIsSuitable(ctx context.Context, nodeName string, re return true, nil } -func (c claimController) allocate(ctx context.Context, nodeName string, resources resources) (string, *resourcev1alpha2.AllocationResult, error) { - allocation := &resourcev1alpha2.AllocationResult{ +func (c claimController) allocate(ctx context.Context, nodeName string, resources resources) (string, *resourceapi.AllocationResult, error) { + allocation := &resourceapi.AllocationResult{ AvailableOnNodes: &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{ { @@ -207,9 +207,9 @@ func (c claimController) allocate(ctx context.Context, nodeName string, resource if err != nil { return "", nil, fmt.Errorf("allocating via named resources structured model: %w", err) } - handle := resourcev1alpha2.ResourceHandle{ + handle := resourceapi.ResourceHandle{ DriverName: driverName, - StructuredData: &resourcev1alpha2.StructuredResourceHandle{ + StructuredData: &resourceapi.StructuredResourceHandle{ NodeName: nodeName, }, } @@ -218,9 +218,9 @@ func (c claimController) allocate(ctx context.Context, nodeName string, resource continue } handle.StructuredData.Results = append(handle.StructuredData.Results, - resourcev1alpha2.DriverAllocationResult{ + resourceapi.DriverAllocationResult{ VendorRequestParameters: perDriver.parameters[i], - AllocationResultModel: resourcev1alpha2.AllocationResultModel{ + AllocationResultModel: resourceapi.AllocationResultModel{ NamedResources: result, }, }, diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go index 2c82fd9f60870..43b33198d19a4 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/require" 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" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 22ac5054d9c17..bc60816d2e4f7 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -297,7 +297,7 @@ func New(ctx context.Context, var resourceClaimCache *assumecache.AssumeCache 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) } diff --git a/pkg/scheduler/testing/wrappers.go b/pkg/scheduler/testing/wrappers.go index d8e651a5047bd..a5bbffaf94865 100644 --- a/pkg/scheduler/testing/wrappers.go +++ b/pkg/scheduler/testing/wrappers.go @@ -21,7 +21,7 @@ import ( "time" v1 "k8s.io/api/core/v1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" @@ -897,20 +897,20 @@ func (p *PersistentVolumeWrapper) NodeAffinityIn(key string, vals []string) *Per } // ResourceClaimWrapper wraps a ResourceClaim inside. -type ResourceClaimWrapper struct{ resourcev1alpha2.ResourceClaim } +type ResourceClaimWrapper struct{ resourceapi.ResourceClaim } // MakeResourceClaim creates a ResourceClaim wrapper. func MakeResourceClaim() *ResourceClaimWrapper { - return &ResourceClaimWrapper{resourcev1alpha2.ResourceClaim{}} + return &ResourceClaimWrapper{resourceapi.ResourceClaim{}} } // 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()} } // Obj returns the inner ResourceClaim. -func (wrapper *ResourceClaimWrapper) Obj() *resourcev1alpha2.ResourceClaim { +func (wrapper *ResourceClaimWrapper) Obj() *resourceapi.ResourceClaim { return &wrapper.ResourceClaim } @@ -948,7 +948,7 @@ func (wrapper *ResourceClaimWrapper) OwnerReference(name, uid string, gvk schema // ParametersRef sets a reference to a ResourceClaimParameters.resource.k8s.io. func (wrapper *ResourceClaimWrapper) ParametersRef(name string) *ResourceClaimWrapper { - wrapper.ResourceClaim.Spec.ParametersRef = &resourcev1alpha2.ResourceClaimParametersReference{ + wrapper.ResourceClaim.Spec.ParametersRef = &resourceapi.ResourceClaimParametersReference{ Name: name, Kind: "ResourceClaimParameters", APIGroup: "resource.k8s.io", @@ -963,7 +963,7 @@ func (wrapper *ResourceClaimWrapper) ResourceClassName(name string) *ResourceCla } // 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.Allocation = allocation return wrapper @@ -975,27 +975,27 @@ func (wrapper *ResourceClaimWrapper) Allocation(driverName string, allocation *r // "named resources" are used. func (wrapper *ResourceClaimWrapper) Structured(nodeName string, namedResourcesInstances ...string) *ResourceClaimWrapper { 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 { resourceHandle.Data = "" - resourceHandle.StructuredData = &resourcev1alpha2.StructuredResourceHandle{ + resourceHandle.StructuredData = &resourceapi.StructuredResourceHandle{ NodeName: nodeName, } wrapper.ResourceClaim.Status.Allocation.ResourceHandles[i] = resourceHandle } 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, - StructuredData: &resourcev1alpha2.StructuredResourceHandle{ + StructuredData: &resourceapi.StructuredResourceHandle{ NodeName: nodeName, }, }} } for _, resourceHandle := range wrapper.ResourceClaim.Status.Allocation.ResourceHandles { for _, name := range namedResourcesInstances { - result := resourcev1alpha2.DriverAllocationResult{ - AllocationResultModel: resourcev1alpha2.AllocationResultModel{ - NamedResources: &resourcev1alpha2.NamedResourcesAllocationResult{ + result := resourceapi.DriverAllocationResult{ + AllocationResultModel: resourceapi.AllocationResultModel{ + NamedResources: &resourceapi.NamedResourcesAllocationResult{ Name: name, }, }, @@ -1023,33 +1023,33 @@ func (wrapper *ResourceClaimWrapper) DeallocationRequested(deallocationRequested } // 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 return wrapper } // ReservedFor sets that field of the inner object given information about one pod. 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. type PodSchedulingWrapper struct { - resourcev1alpha2.PodSchedulingContext + resourceapi.PodSchedulingContext } // MakePodSchedulingContexts creates a PodSchedulingContext wrapper. func MakePodSchedulingContexts() *PodSchedulingWrapper { - return &PodSchedulingWrapper{resourcev1alpha2.PodSchedulingContext{}} + return &PodSchedulingWrapper{resourceapi.PodSchedulingContext{}} } // 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()} } // Obj returns the inner object. -func (wrapper *PodSchedulingWrapper) Obj() *resourcev1alpha2.PodSchedulingContext { +func (wrapper *PodSchedulingWrapper) Obj() *resourceapi.PodSchedulingContext { return &wrapper.PodSchedulingContext } @@ -1108,13 +1108,13 @@ func (wrapper *PodSchedulingWrapper) PotentialNodes(nodes ...string) *PodSchedul } // 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 return wrapper } type ResourceSliceWrapper struct { - resourcev1alpha2.ResourceSlice + resourceapi.ResourceSlice } func MakeResourceSlice(nodeName, driverName string) *ResourceSliceWrapper { @@ -1125,22 +1125,22 @@ func MakeResourceSlice(nodeName, driverName string) *ResourceSliceWrapper { return wrapper } -func (wrapper *ResourceSliceWrapper) Obj() *resourcev1alpha2.ResourceSlice { +func (wrapper *ResourceSliceWrapper) Obj() *resourceapi.ResourceSlice { return &wrapper.ResourceSlice } 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 { wrapper.ResourceModel.NamedResources.Instances = append(wrapper.ResourceModel.NamedResources.Instances, - resourcev1alpha2.NamedResourcesInstance{Name: name}, + resourceapi.NamedResourcesInstance{Name: name}, ) } return wrapper } type ClaimParametersWrapper struct { - resourcev1alpha2.ResourceClaimParameters + resourceapi.ResourceClaimParameters } func MakeClaimParameters() *ClaimParametersWrapper { @@ -1148,11 +1148,11 @@ func MakeClaimParameters() *ClaimParametersWrapper { } // 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()} } -func (wrapper *ClaimParametersWrapper) Obj() *resourcev1alpha2.ResourceClaimParameters { +func (wrapper *ClaimParametersWrapper) Obj() *resourceapi.ResourceClaimParameters { return &wrapper.ResourceClaimParameters } @@ -1171,19 +1171,19 @@ func (wrapper *ClaimParametersWrapper) Namespace(s string) *ClaimParametersWrapp return wrapper } -func (wrapper *ClaimParametersWrapper) GeneratedFrom(value *resourcev1alpha2.ResourceClaimParametersReference) *ClaimParametersWrapper { +func (wrapper *ClaimParametersWrapper) GeneratedFrom(value *resourceapi.ResourceClaimParametersReference) *ClaimParametersWrapper { wrapper.ResourceClaimParameters.GeneratedFrom = value return wrapper } func (wrapper *ClaimParametersWrapper) NamedResourcesRequests(driverName string, selectors ...string) *ClaimParametersWrapper { - requests := resourcev1alpha2.DriverRequests{ + requests := resourceapi.DriverRequests{ DriverName: driverName, } for _, selector := range selectors { - request := resourcev1alpha2.ResourceRequest{ - ResourceRequestModel: resourcev1alpha2.ResourceRequestModel{ - NamedResources: &resourcev1alpha2.NamedResourcesRequest{ + request := resourceapi.ResourceRequest{ + ResourceRequestModel: resourceapi.ResourceRequestModel{ + NamedResources: &resourceapi.NamedResourcesRequest{ Selector: selector, }, }, @@ -1195,7 +1195,7 @@ func (wrapper *ClaimParametersWrapper) NamedResourcesRequests(driverName string, } type ClassParametersWrapper struct { - resourcev1alpha2.ResourceClassParameters + resourceapi.ResourceClassParameters } func MakeClassParameters() *ClassParametersWrapper { @@ -1203,11 +1203,11 @@ func MakeClassParameters() *ClassParametersWrapper { } // 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()} } -func (wrapper *ClassParametersWrapper) Obj() *resourcev1alpha2.ResourceClassParameters { +func (wrapper *ClassParametersWrapper) Obj() *resourceapi.ResourceClassParameters { return &wrapper.ResourceClassParameters } @@ -1226,17 +1226,17 @@ func (wrapper *ClassParametersWrapper) Namespace(s string) *ClassParametersWrapp return wrapper } -func (wrapper *ClassParametersWrapper) GeneratedFrom(value *resourcev1alpha2.ResourceClassParametersReference) *ClassParametersWrapper { +func (wrapper *ClassParametersWrapper) GeneratedFrom(value *resourceapi.ResourceClassParametersReference) *ClassParametersWrapper { wrapper.ResourceClassParameters.GeneratedFrom = value return wrapper } func (wrapper *ClassParametersWrapper) NamedResourcesFilters(driverName string, selectors ...string) *ClassParametersWrapper { for _, selector := range selectors { - filter := resourcev1alpha2.ResourceFilter{ + filter := resourceapi.ResourceFilter{ DriverName: driverName, - ResourceFilterModel: resourcev1alpha2.ResourceFilterModel{ - NamedResources: &resourcev1alpha2.NamedResourcesFilter{ + ResourceFilterModel: resourceapi.ResourceFilterModel{ + NamedResources: &resourceapi.NamedResourcesFilter{ Selector: selector, }, }, diff --git a/plugin/pkg/auth/authorizer/node/graph_populator.go b/plugin/pkg/auth/authorizer/node/graph_populator.go index 0e4fb0764b080..0fcff59bd9667 100644 --- a/plugin/pkg/auth/authorizer/node/graph_populator.go +++ b/plugin/pkg/auth/authorizer/node/graph_populator.go @@ -22,11 +22,11 @@ import ( "k8s.io/klog/v2" corev1 "k8s.io/api/core/v1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" storagev1 "k8s.io/api/storage/v1" "k8s.io/apimachinery/pkg/util/wait" 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" "k8s.io/client-go/tools/cache" ) @@ -41,7 +41,7 @@ func AddGraphEventHandlers( pods corev1informers.PodInformer, pvs corev1informers.PersistentVolumeInformer, attachments storageinformers.VolumeAttachmentInformer, - slices resourcev1alpha2informers.ResourceSliceInformer, + slices resourceinformers.ResourceSliceInformer, ) { g := &graphPopulator{ graph: graph, @@ -201,7 +201,7 @@ func (g *graphPopulator) deleteVolumeAttachment(obj interface{}) { } func (g *graphPopulator) addResourceSlice(obj interface{}) { - slice, ok := obj.(*resourcev1alpha2.ResourceSlice) + slice, ok := obj.(*resourceapi.ResourceSlice) if !ok { klog.Infof("unexpected type %T", obj) return @@ -213,7 +213,7 @@ func (g *graphPopulator) deleteResourceSlice(obj interface{}) { if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { obj = tombstone.Obj } - slice, ok := obj.(*resourcev1alpha2.ResourceSlice) + slice, ok := obj.(*resourceapi.ResourceSlice) if !ok { klog.Infof("unexpected type %T", obj) return diff --git a/plugin/pkg/auth/authorizer/node/node_authorizer_test.go b/plugin/pkg/auth/authorizer/node/node_authorizer_test.go index ac83df0b34473..ce39bde78de9a 100644 --- a/plugin/pkg/auth/authorizer/node/node_authorizer_test.go +++ b/plugin/pkg/auth/authorizer/node/node_authorizer_test.go @@ -28,7 +28,7 @@ import ( "time" corev1 "k8s.io/api/core/v1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" storagev1 "k8s.io/api/storage/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apiserver/pkg/authentication/user" @@ -831,7 +831,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.graph = graph for _, pod := range pods { @@ -859,12 +859,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. // 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. -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) pods := make([]*corev1.Pod, 0, opts.nodes*opts.podsPerNode) pvs := make([]*corev1.PersistentVolume, 0, (opts.nodes*opts.podsPerNode*opts.uniquePVCsPerPod)+(opts.sharedPVCsPerPod*opts.namespaces)) 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) @@ -893,7 +893,7 @@ func generate(opts *sampleDataOpts) ([]*corev1.Node, []*corev1.Pod, []*corev1.Pe for p := 0; p <= opts.nodeResourceCapacitiesPerNode; p++ { name := fmt.Sprintf("slice%d-%s", p, nodeName) - slice := &resourcev1alpha2.ResourceSlice{ + slice := &resourceapi.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{Name: name}, NodeName: nodeName, } diff --git a/staging/src/k8s.io/api/resource/v1alpha2/doc.go b/staging/src/k8s.io/api/resource/v1alpha3/doc.go similarity index 84% rename from staging/src/k8s.io/api/resource/v1alpha2/doc.go rename to staging/src/k8s.io/api/resource/v1alpha3/doc.go index d9c20e089d972..aeb66561fb8a7 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/doc.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/doc.go @@ -20,5 +20,5 @@ limitations under the License. // +groupName=resource.k8s.io -// Package v1alpha2 is the v1alpha2 version of the resource API. -package v1alpha2 // import "k8s.io/api/resource/v1alpha2" +// Package v1alpha3 is the v1alpha3 version of the resource API. +package v1alpha3 // import "k8s.io/api/resource/v1alpha3" diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go b/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go similarity index 93% rename from staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go rename to staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go index 7ac0005432910..0589b6acdaf83 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go @@ -15,9 +15,9 @@ limitations under the License. */ // 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 ( fmt "fmt" @@ -50,7 +50,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AllocationResult) Reset() { *m = AllocationResult{} } func (*AllocationResult) ProtoMessage() {} func (*AllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{0} + return fileDescriptor_66649ee9bbcd89d2, []int{0} } func (m *AllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ var xxx_messageInfo_AllocationResult proto.InternalMessageInfo func (m *AllocationResultModel) Reset() { *m = AllocationResultModel{} } func (*AllocationResultModel) ProtoMessage() {} func (*AllocationResultModel) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{1} + return fileDescriptor_66649ee9bbcd89d2, []int{1} } func (m *AllocationResultModel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ var xxx_messageInfo_AllocationResultModel proto.InternalMessageInfo func (m *DriverAllocationResult) Reset() { *m = DriverAllocationResult{} } func (*DriverAllocationResult) ProtoMessage() {} func (*DriverAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{2} + return fileDescriptor_66649ee9bbcd89d2, []int{2} } func (m *DriverAllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +134,7 @@ var xxx_messageInfo_DriverAllocationResult proto.InternalMessageInfo func (m *DriverRequests) Reset() { *m = DriverRequests{} } func (*DriverRequests) ProtoMessage() {} func (*DriverRequests) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{3} + return fileDescriptor_66649ee9bbcd89d2, []int{3} } func (m *DriverRequests) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -162,7 +162,7 @@ var xxx_messageInfo_DriverRequests proto.InternalMessageInfo func (m *NamedResourcesAllocationResult) Reset() { *m = NamedResourcesAllocationResult{} } func (*NamedResourcesAllocationResult) ProtoMessage() {} func (*NamedResourcesAllocationResult) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{4} + return fileDescriptor_66649ee9bbcd89d2, []int{4} } func (m *NamedResourcesAllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -190,7 +190,7 @@ var xxx_messageInfo_NamedResourcesAllocationResult proto.InternalMessageInfo func (m *NamedResourcesAttribute) Reset() { *m = NamedResourcesAttribute{} } func (*NamedResourcesAttribute) ProtoMessage() {} func (*NamedResourcesAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{5} + return fileDescriptor_66649ee9bbcd89d2, []int{5} } func (m *NamedResourcesAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -218,7 +218,7 @@ var xxx_messageInfo_NamedResourcesAttribute proto.InternalMessageInfo func (m *NamedResourcesAttributeValue) Reset() { *m = NamedResourcesAttributeValue{} } func (*NamedResourcesAttributeValue) ProtoMessage() {} func (*NamedResourcesAttributeValue) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{6} + return fileDescriptor_66649ee9bbcd89d2, []int{6} } func (m *NamedResourcesAttributeValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ var xxx_messageInfo_NamedResourcesAttributeValue proto.InternalMessageInfo func (m *NamedResourcesFilter) Reset() { *m = NamedResourcesFilter{} } func (*NamedResourcesFilter) ProtoMessage() {} func (*NamedResourcesFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{7} + return fileDescriptor_66649ee9bbcd89d2, []int{7} } func (m *NamedResourcesFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -274,7 +274,7 @@ var xxx_messageInfo_NamedResourcesFilter proto.InternalMessageInfo func (m *NamedResourcesInstance) Reset() { *m = NamedResourcesInstance{} } func (*NamedResourcesInstance) ProtoMessage() {} func (*NamedResourcesInstance) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{8} + return fileDescriptor_66649ee9bbcd89d2, []int{8} } func (m *NamedResourcesInstance) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -302,7 +302,7 @@ var xxx_messageInfo_NamedResourcesInstance proto.InternalMessageInfo func (m *NamedResourcesIntSlice) Reset() { *m = NamedResourcesIntSlice{} } func (*NamedResourcesIntSlice) ProtoMessage() {} func (*NamedResourcesIntSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{9} + return fileDescriptor_66649ee9bbcd89d2, []int{9} } func (m *NamedResourcesIntSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -330,7 +330,7 @@ var xxx_messageInfo_NamedResourcesIntSlice proto.InternalMessageInfo func (m *NamedResourcesRequest) Reset() { *m = NamedResourcesRequest{} } func (*NamedResourcesRequest) ProtoMessage() {} func (*NamedResourcesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{10} + return fileDescriptor_66649ee9bbcd89d2, []int{10} } func (m *NamedResourcesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +358,7 @@ var xxx_messageInfo_NamedResourcesRequest proto.InternalMessageInfo func (m *NamedResourcesResources) Reset() { *m = NamedResourcesResources{} } func (*NamedResourcesResources) ProtoMessage() {} func (*NamedResourcesResources) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{11} + return fileDescriptor_66649ee9bbcd89d2, []int{11} } func (m *NamedResourcesResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,7 +386,7 @@ var xxx_messageInfo_NamedResourcesResources proto.InternalMessageInfo func (m *NamedResourcesStringSlice) Reset() { *m = NamedResourcesStringSlice{} } func (*NamedResourcesStringSlice) ProtoMessage() {} func (*NamedResourcesStringSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{12} + return fileDescriptor_66649ee9bbcd89d2, []int{12} } func (m *NamedResourcesStringSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -414,7 +414,7 @@ var xxx_messageInfo_NamedResourcesStringSlice proto.InternalMessageInfo func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} } func (*PodSchedulingContext) ProtoMessage() {} func (*PodSchedulingContext) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{13} + return fileDescriptor_66649ee9bbcd89d2, []int{13} } func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +442,7 @@ var xxx_messageInfo_PodSchedulingContext proto.InternalMessageInfo func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} } func (*PodSchedulingContextList) ProtoMessage() {} func (*PodSchedulingContextList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{14} + return fileDescriptor_66649ee9bbcd89d2, []int{14} } func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +470,7 @@ var xxx_messageInfo_PodSchedulingContextList proto.InternalMessageInfo func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} } func (*PodSchedulingContextSpec) ProtoMessage() {} func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{15} + return fileDescriptor_66649ee9bbcd89d2, []int{15} } func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +498,7 @@ var xxx_messageInfo_PodSchedulingContextSpec proto.InternalMessageInfo func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} } func (*PodSchedulingContextStatus) ProtoMessage() {} func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{16} + return fileDescriptor_66649ee9bbcd89d2, []int{16} } func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +526,7 @@ var xxx_messageInfo_PodSchedulingContextStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{17} + return fileDescriptor_66649ee9bbcd89d2, []int{17} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +554,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{18} + return fileDescriptor_66649ee9bbcd89d2, []int{18} } func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +582,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{19} + return fileDescriptor_66649ee9bbcd89d2, []int{19} } func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo func (m *ResourceClaimParameters) Reset() { *m = ResourceClaimParameters{} } func (*ResourceClaimParameters) ProtoMessage() {} func (*ResourceClaimParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{20} + return fileDescriptor_66649ee9bbcd89d2, []int{20} } func (m *ResourceClaimParameters) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -638,7 +638,7 @@ var xxx_messageInfo_ResourceClaimParameters proto.InternalMessageInfo func (m *ResourceClaimParametersList) Reset() { *m = ResourceClaimParametersList{} } func (*ResourceClaimParametersList) ProtoMessage() {} func (*ResourceClaimParametersList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{21} + return fileDescriptor_66649ee9bbcd89d2, []int{21} } func (m *ResourceClaimParametersList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -666,7 +666,7 @@ var xxx_messageInfo_ResourceClaimParametersList proto.InternalMessageInfo func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} } func (*ResourceClaimParametersReference) ProtoMessage() {} func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{22} + return fileDescriptor_66649ee9bbcd89d2, []int{22} } func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -694,7 +694,7 @@ var xxx_messageInfo_ResourceClaimParametersReference proto.InternalMessageInfo func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } func (*ResourceClaimSchedulingStatus) ProtoMessage() {} func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{23} + return fileDescriptor_66649ee9bbcd89d2, []int{23} } func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -722,7 +722,7 @@ var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{24} + return fileDescriptor_66649ee9bbcd89d2, []int{24} } func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -750,7 +750,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{25} + return fileDescriptor_66649ee9bbcd89d2, []int{25} } func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -778,7 +778,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{26} + return fileDescriptor_66649ee9bbcd89d2, []int{26} } func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -806,7 +806,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{27} + return fileDescriptor_66649ee9bbcd89d2, []int{27} } func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -834,7 +834,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{28} + return fileDescriptor_66649ee9bbcd89d2, []int{28} } func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -862,7 +862,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo func (m *ResourceClass) Reset() { *m = ResourceClass{} } func (*ResourceClass) ProtoMessage() {} func (*ResourceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{29} + return fileDescriptor_66649ee9bbcd89d2, []int{29} } func (m *ResourceClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -890,7 +890,7 @@ var xxx_messageInfo_ResourceClass proto.InternalMessageInfo func (m *ResourceClassList) Reset() { *m = ResourceClassList{} } func (*ResourceClassList) ProtoMessage() {} func (*ResourceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{30} + return fileDescriptor_66649ee9bbcd89d2, []int{30} } func (m *ResourceClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -918,7 +918,7 @@ var xxx_messageInfo_ResourceClassList proto.InternalMessageInfo func (m *ResourceClassParameters) Reset() { *m = ResourceClassParameters{} } func (*ResourceClassParameters) ProtoMessage() {} func (*ResourceClassParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{31} + return fileDescriptor_66649ee9bbcd89d2, []int{31} } func (m *ResourceClassParameters) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -946,7 +946,7 @@ var xxx_messageInfo_ResourceClassParameters proto.InternalMessageInfo func (m *ResourceClassParametersList) Reset() { *m = ResourceClassParametersList{} } func (*ResourceClassParametersList) ProtoMessage() {} func (*ResourceClassParametersList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{32} + return fileDescriptor_66649ee9bbcd89d2, []int{32} } func (m *ResourceClassParametersList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -974,7 +974,7 @@ var xxx_messageInfo_ResourceClassParametersList proto.InternalMessageInfo func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } func (*ResourceClassParametersReference) ProtoMessage() {} func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{33} + return fileDescriptor_66649ee9bbcd89d2, []int{33} } func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1002,7 +1002,7 @@ var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo func (m *ResourceFilter) Reset() { *m = ResourceFilter{} } func (*ResourceFilter) ProtoMessage() {} func (*ResourceFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{34} + return fileDescriptor_66649ee9bbcd89d2, []int{34} } func (m *ResourceFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1030,7 +1030,7 @@ var xxx_messageInfo_ResourceFilter proto.InternalMessageInfo func (m *ResourceFilterModel) Reset() { *m = ResourceFilterModel{} } func (*ResourceFilterModel) ProtoMessage() {} func (*ResourceFilterModel) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{35} + return fileDescriptor_66649ee9bbcd89d2, []int{35} } func (m *ResourceFilterModel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1058,7 +1058,7 @@ var xxx_messageInfo_ResourceFilterModel proto.InternalMessageInfo func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } func (*ResourceHandle) ProtoMessage() {} func (*ResourceHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{36} + return fileDescriptor_66649ee9bbcd89d2, []int{36} } func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1086,7 +1086,7 @@ var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo func (m *ResourceModel) Reset() { *m = ResourceModel{} } func (*ResourceModel) ProtoMessage() {} func (*ResourceModel) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{37} + return fileDescriptor_66649ee9bbcd89d2, []int{37} } func (m *ResourceModel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1114,7 +1114,7 @@ var xxx_messageInfo_ResourceModel proto.InternalMessageInfo func (m *ResourceRequest) Reset() { *m = ResourceRequest{} } func (*ResourceRequest) ProtoMessage() {} func (*ResourceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{38} + return fileDescriptor_66649ee9bbcd89d2, []int{38} } func (m *ResourceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1142,7 +1142,7 @@ var xxx_messageInfo_ResourceRequest proto.InternalMessageInfo func (m *ResourceRequestModel) Reset() { *m = ResourceRequestModel{} } func (*ResourceRequestModel) ProtoMessage() {} func (*ResourceRequestModel) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{39} + return fileDescriptor_66649ee9bbcd89d2, []int{39} } func (m *ResourceRequestModel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1170,7 +1170,7 @@ var xxx_messageInfo_ResourceRequestModel proto.InternalMessageInfo func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } func (*ResourceSlice) ProtoMessage() {} func (*ResourceSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{40} + return fileDescriptor_66649ee9bbcd89d2, []int{40} } func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1198,7 +1198,7 @@ var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } func (*ResourceSliceList) ProtoMessage() {} func (*ResourceSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{41} + return fileDescriptor_66649ee9bbcd89d2, []int{41} } func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1226,7 +1226,7 @@ var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo func (m *StructuredResourceHandle) Reset() { *m = StructuredResourceHandle{} } func (*StructuredResourceHandle) ProtoMessage() {} func (*StructuredResourceHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{42} + return fileDescriptor_66649ee9bbcd89d2, []int{42} } func (m *StructuredResourceHandle) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1254,7 +1254,7 @@ var xxx_messageInfo_StructuredResourceHandle proto.InternalMessageInfo func (m *VendorParameters) Reset() { *m = VendorParameters{} } func (*VendorParameters) ProtoMessage() {} func (*VendorParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_4312f5b44a31ec02, []int{43} + return fileDescriptor_66649ee9bbcd89d2, []int{43} } func (m *VendorParameters) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1280,57 +1280,57 @@ func (m *VendorParameters) XXX_DiscardUnknown() { var xxx_messageInfo_VendorParameters proto.InternalMessageInfo func init() { - proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult") - proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha2.AllocationResultModel") - proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.DriverAllocationResult") - proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha2.DriverRequests") - proto.RegisterType((*NamedResourcesAllocationResult)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAllocationResult") - proto.RegisterType((*NamedResourcesAttribute)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttribute") - proto.RegisterType((*NamedResourcesAttributeValue)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesAttributeValue") - proto.RegisterType((*NamedResourcesFilter)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesFilter") - proto.RegisterType((*NamedResourcesInstance)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesInstance") - proto.RegisterType((*NamedResourcesIntSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesIntSlice") - proto.RegisterType((*NamedResourcesRequest)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesRequest") - proto.RegisterType((*NamedResourcesResources)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesResources") - proto.RegisterType((*NamedResourcesStringSlice)(nil), "k8s.io.api.resource.v1alpha2.NamedResourcesStringSlice") - proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContext") - proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextList") - proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextSpec") - proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingContextStatus") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim") - proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference") - proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList") - proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParameters") - proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersList") - proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference") - proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSchedulingStatus") - proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSpec") - proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimStatus") - proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplate") - proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateList") - proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateSpec") - proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha2.ResourceClass") - proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassList") - proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParameters") - proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersList") - proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersReference") - proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilter") - proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceFilterModel") - proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.ResourceHandle") - proto.RegisterType((*ResourceModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceModel") - proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequest") - proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha2.ResourceRequestModel") - proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha2.ResourceSlice") - proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha2.ResourceSliceList") - proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha2.StructuredResourceHandle") - proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha2.VendorParameters") + proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha3.AllocationResult") + proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha3.AllocationResultModel") + proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DriverAllocationResult") + proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha3.DriverRequests") + proto.RegisterType((*NamedResourcesAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAllocationResult") + proto.RegisterType((*NamedResourcesAttribute)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAttribute") + proto.RegisterType((*NamedResourcesAttributeValue)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAttributeValue") + proto.RegisterType((*NamedResourcesFilter)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesFilter") + proto.RegisterType((*NamedResourcesInstance)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesInstance") + proto.RegisterType((*NamedResourcesIntSlice)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesIntSlice") + proto.RegisterType((*NamedResourcesRequest)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesRequest") + proto.RegisterType((*NamedResourcesResources)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesResources") + proto.RegisterType((*NamedResourcesStringSlice)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesStringSlice") + proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContext") + proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextList") + proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextSpec") + proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextStatus") + proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaim") + proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimConsumerReference") + proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimList") + proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParameters") + proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParametersList") + proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParametersReference") + proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSchedulingStatus") + proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSpec") + proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimStatus") + proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplate") + proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateList") + proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateSpec") + proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha3.ResourceClass") + proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassList") + proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParameters") + proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParametersList") + proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParametersReference") + proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha3.ResourceFilter") + proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceFilterModel") + proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha3.ResourceHandle") + proto.RegisterType((*ResourceModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceModel") + proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha3.ResourceRequest") + proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceRequestModel") + proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha3.ResourceSlice") + proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha3.ResourceSliceList") + proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha3.StructuredResourceHandle") + proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha3.VendorParameters") } 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{ // 2197 bytes of a gzipped FileDescriptorProto 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, 0xba, 0x23, @@ -1340,136 +1340,136 @@ var fileDescriptor_4312f5b44a31ec02 = []byte{ 0x5c, 0x39, 0x55, 0xd0, 0x1c, 0x83, 0x00, 0x51, 0x71, 0x58, 0x91, 0xe5, 0xc0, 0x81, 0x23, 0x37, 0x4e, 0x68, 0xde, 0x7b, 0xf3, 0xf3, 0x66, 0x67, 0xd6, 0x3b, 0x4b, 0x63, 0x25, 0x27, 0xef, 0xbc, 0xf7, 0xfd, 0xbd, 0xef, 0xff, 0x7d, 0xcf, 0xb0, 0x71, 0xe7, 0x32, 0x69, 0x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0xc0, 0xfa, 0x51, 0xe6, 0xc8, 0x19, 0xeb, 0xeb, 0x50, 0xba, 0x63, - 0x39, 0x26, 0x73, 0x85, 0x58, 0xf4, 0x7e, 0xdd, 0x72, 0x4c, 0xc4, 0x76, 0xc2, 0xf8, 0x2e, 0x66, - 0xde, 0xe3, 0x1e, 0x28, 0xf0, 0xfc, 0xc8, 0x64, 0x3f, 0x46, 0x47, 0xfb, 0x15, 0x58, 0xe8, 0x39, - 0xa4, 0x67, 0x51, 0x63, 0xcf, 0xc6, 0xf1, 0xfa, 0xb5, 0x34, 0xe8, 0xd7, 0x17, 0x6e, 0xca, 0x5b, - 0x28, 0x09, 0xab, 0xfd, 0x35, 0x99, 0x1e, 0x58, 0x35, 0xbd, 0x0e, 0xa7, 0x62, 0xd5, 0x84, 0x90, - 0xd8, 0x8d, 0xfd, 0x8c, 0x90, 0x21, 0x8e, 0xc5, 0x01, 0xd0, 0x30, 0x8e, 0x1f, 0x39, 0xdd, 0xb8, - 0xaa, 0x3f, 0xcb, 0xc8, 0x91, 0x36, 0x90, 0xcc, 0x47, 0xfb, 0x4f, 0x01, 0x96, 0x52, 0x6a, 0xc1, - 0x44, 0x43, 0x88, 0xef, 0x00, 0x44, 0x43, 0x0e, 0x71, 0x82, 0x46, 0xbe, 0x51, 0x8a, 0x5e, 0x61, - 0x37, 0x85, 0x68, 0x35, 0x46, 0x51, 0x25, 0x30, 0xeb, 0x61, 0x82, 0xbd, 0x43, 0x6c, 0x5e, 0x73, - 0x3d, 0x31, 0x72, 0x78, 0x2d, 0x87, 0x8a, 0x86, 0xea, 0x96, 0xbe, 0x24, 0x8e, 0x34, 0x8b, 0x22, - 0xc2, 0x28, 0xce, 0x45, 0x6d, 0xc1, 0x8a, 0x89, 0xe3, 0xb3, 0x1b, 0x96, 0x04, 0xb0, 0xc9, 0xca, - 0x51, 0x39, 0x9a, 0xfa, 0x6c, 0xa5, 0x01, 0xa1, 0x74, 0x5c, 0xed, 0x2f, 0x0a, 0xac,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x05, 0x56, 0x78, 0x20, 0x25, 0xca, 0xe6, + 0x64, 0xe1, 0x1a, 0xde, 0xb6, 0x77, 0xd3, 0x68, 0xa2, 0x74, 0x56, 0xb2, 0x10, 0xf1, 0x41, 0xc9, + 0x64, 0xff, 0x22, 0x31, 0x2c, 0x84, 0x34, 0x7c, 0x49, 0x67, 0x25, 0x39, 0x6e, 0xe9, 0x48, 0xc7, + 0xfd, 0x2e, 0x4c, 0x7b, 0x6c, 0x20, 0xe2, 0xdf, 0x0b, 0xc6, 0x78, 0x77, 0x4c, 0xff, 0x9f, 0x9b, + 0xa8, 0x57, 0xe3, 0xdf, 0x04, 0x05, 0x54, 0xb5, 0x5f, 0x2b, 0x30, 0x94, 0xf3, 0x26, 0xaa, 0x5c, + 0x06, 0x40, 0xf7, 0xff, 0x54, 0x68, 0xc8, 0x22, 0xa6, 0xc5, 0x18, 0x51, 0x5d, 0x7f, 0xf8, 0xb8, + 0x36, 0xf5, 0xe8, 0x71, 0x6d, 0xea, 0xd3, 0xc7, 0xb5, 0xa9, 0x07, 0x83, 0x9a, 0xf2, 0x70, 0x50, + 0x53, 0x1e, 0x0d, 0x6a, 0xca, 0xa7, 0x83, 0x9a, 0xf2, 0x8f, 0x41, 0x4d, 0xf9, 0xe8, 0x9f, 0xb5, + 0xa9, 0xf7, 0xd6, 0x46, 0xfd, 0xb3, 0xdd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xfc, 0x4e, + 0xd3, 0x8b, 0x27, 0x00, 0x00, } func (m *AllocationResult) Marshal() (dAtA []byte, err error) { diff --git a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto b/staging/src/k8s.io/api/resource/v1alpha3/generated.proto similarity index 99% rename from staging/src/k8s.io/api/resource/v1alpha2/generated.proto rename to staging/src/k8s.io/api/resource/v1alpha3/generated.proto index 1037c64661f4c..1f864a0edf4fe 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/generated.proto +++ b/staging/src/k8s.io/api/resource/v1alpha3/generated.proto @@ -19,7 +19,7 @@ limitations under the License. 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/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"; // 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. message AllocationResult { diff --git a/staging/src/k8s.io/api/resource/v1alpha2/namedresources.go b/staging/src/k8s.io/api/resource/v1alpha3/namedresources.go similarity index 99% rename from staging/src/k8s.io/api/resource/v1alpha2/namedresources.go rename to staging/src/k8s.io/api/resource/v1alpha3/namedresources.go index 7c255b45cba49..2ce0d3c9e9771 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/namedresources.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/namedresources.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1alpha3 import ( "k8s.io/apimachinery/pkg/api/resource" diff --git a/staging/src/k8s.io/api/resource/v1alpha2/register.go b/staging/src/k8s.io/api/resource/v1alpha3/register.go similarity index 98% rename from staging/src/k8s.io/api/resource/v1alpha2/register.go rename to staging/src/k8s.io/api/resource/v1alpha3/register.go index 893fb4c1e52d8..36357daa389e9 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/register.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/register.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1alpha3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -26,7 +26,7 @@ import ( const GroupName = "resource.k8s.io" // 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 func Resource(resource string) schema.GroupResource { diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types.go b/staging/src/k8s.io/api/resource/v1alpha3/types.go similarity index 99% rename from staging/src/k8s.io/api/resource/v1alpha2/types.go rename to staging/src/k8s.io/api/resource/v1alpha3/types.go index ae293638246bb..bd161eb4ac106 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/types.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1alpha3 import ( v1 "k8s.io/api/core/v1" diff --git a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go similarity index 99% rename from staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go rename to staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go index 3e27cd13d8aa9..9fe49cf748924 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package v1alpha2 +package v1alpha3 // 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 diff --git a/staging/src/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go similarity index 99% rename from staging/src/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go rename to staging/src/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go index 52de8e1ad531c..a9a6de637520f 100644 --- a/staging/src/k8s.io/api/resource/v1alpha2/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by deepcopy-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( v1 "k8s.io/api/core/v1" diff --git a/staging/src/k8s.io/api/roundtrip_test.go b/staging/src/k8s.io/api/roundtrip_test.go index 14d5e34e5b41f..6cf0a70b4c296 100644 --- a/staging/src/k8s.io/api/roundtrip_test.go +++ b/staging/src/k8s.io/api/roundtrip_test.go @@ -68,7 +68,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -134,7 +134,7 @@ var groups = []runtime.SchemeBuilder{ rbacv1alpha1.SchemeBuilder, rbacv1beta1.SchemeBuilder, rbacv1.SchemeBuilder, - resourcev1alpha2.SchemeBuilder, + resourceapi.SchemeBuilder, schedulingv1alpha1.SchemeBuilder, schedulingv1beta1.SchemeBuilder, schedulingv1.SchemeBuilder, diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.json similarity index 96% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.json rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.json index 2829401da3c56..2b46b32ab5a7a 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.json @@ -1,6 +1,6 @@ { "kind": "PodSchedulingContext", - "apiVersion": "resource.k8s.io/v1alpha2", + "apiVersion": "resource.k8s.io/v1alpha3", "metadata": { "name": "nameValue", "generateName": "generateNameValue", diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.pb similarity index 89% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.pb rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.pb index 53cde83228abe3206105858df733bc1d3f65b293..745c7d5f6397a0ded2cdb4a77be90af0efadffa0 100644 GIT binary patch delta 12 TcmaFQ{GNG&JfrbOh4YL6AM*rh delta 12 TcmaFQ{GNG&JfqP@h4YL6AMONb diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.yaml similarity index 96% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.yaml rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.yaml index 5dce1364cc357..ae8c1aa8a6343 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.PodSchedulingContext.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.PodSchedulingContext.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: PodSchedulingContext metadata: annotations: diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.json similarity index 98% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.json index 387ce389ddd79..3a0492258b4cf 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.json @@ -1,6 +1,6 @@ { "kind": "ResourceClaim", - "apiVersion": "resource.k8s.io/v1alpha2", + "apiVersion": "resource.k8s.io/v1alpha3", "metadata": { "name": "nameValue", "generateName": "generateNameValue", diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.pb similarity index 95% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.pb rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.pb index ab2a9cf9b78531d17490338b9569c2c68c528d73..b5a0572e545f0c65c9020514ca154576a565e63c 100644 GIT binary patch delta 12 Tcmeys{(*ghJfrbOg$v98AYBA@ delta 12 Tcmeys{(*ghJfqP@g$v98AXo%- diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.yaml similarity index 98% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.yaml index be2cc8e78cbbb..404c396c5ffcb 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaim.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaim.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaim metadata: annotations: diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimParameters.json similarity index 97% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimParameters.json index cef440794e80e..8cc8d44a41369 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimParameters.json @@ -1,6 +1,6 @@ { "kind": "ResourceClaimParameters", - "apiVersion": "resource.k8s.io/v1alpha2", + "apiVersion": "resource.k8s.io/v1alpha3", "metadata": { "name": "nameValue", "generateName": "generateNameValue", diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimParameters.pb similarity index 92% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceClaimParameters.pb rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimParameters.pb index 6a34b90e2f4fed1fcc388cfd402e492bcec5fa7c..96246a9fc95c9393c45011631fbed7600803e845 100644 GIT binary patch delta 12 Tcmdnbx}SA|JfrbOh51YX8=M2) delta 12 Tcmdnbx}SA|JfqP@h51YX8g;M|;nFKTd diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.Status.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.Status.yaml similarity index 91% rename from staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.Status.yaml rename to staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.Status.yaml index 5507b94519f51..06c2f189067b0 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.Status.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.Status.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 code: 6 details: causes: diff --git a/staging/src/k8s.io/cli-runtime/artifacts/openapi/swagger-with-shared-parameters.json b/staging/src/k8s.io/cli-runtime/artifacts/openapi/swagger-with-shared-parameters.json index 76482347cf0eb..3bfde37e1db84 100644 --- a/staging/src/k8s.io/cli-runtime/artifacts/openapi/swagger-with-shared-parameters.json +++ b/staging/src/k8s.io/cli-runtime/artifacts/openapi/swagger-with-shared-parameters.json @@ -62716,7 +62716,7 @@ "application/vnd.kubernetes.protobuf" ], "description": "get available resources", - "operationId": "getResourceV1alpha2APIResources", + "operationId": "getResourceV1alpha3APIResources", "produces": [ "application/json", "application/yaml", @@ -62747,7 +62747,7 @@ "*/*" ], "description": "delete collection of PodSchedulingContext", - "operationId": "deleteResourceV1alpha2CollectionNamespacedPodSchedulingContext", + "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -62823,7 +62823,7 @@ "*/*" ], "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HTxmzgxC" @@ -62900,7 +62900,7 @@ "*/*" ], "description": "create a PodSchedulingContext", - "operationId": "createResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "in": "body", @@ -62968,7 +62968,7 @@ "*/*" ], "description": "delete a PodSchedulingContext", - "operationId": "deleteResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -63026,7 +63026,7 @@ "*/*" ], "description": "read the specified PodSchedulingContext", - "operationId": "readResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", "produces": [ "application/json", "application/yaml", @@ -63080,7 +63080,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/body-YKtvzQTo" @@ -63138,7 +63138,7 @@ "*/*" ], "description": "replace the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "in": "body", @@ -63200,7 +63200,7 @@ "*/*" ], "description": "read status of the specified PodSchedulingContext", - "operationId": "readResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", "produces": [ "application/json", "application/yaml", @@ -63254,7 +63254,7 @@ "application/apply-patch+yaml" ], "description": "partially update status of the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "$ref": "#/parameters/body-YKtvzQTo" @@ -63312,7 +63312,7 @@ "*/*" ], "description": "replace status of the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha2NamespacedPodSchedulingContextStatus", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "in": "body", @@ -63374,7 +63374,7 @@ "*/*" ], "description": "delete collection of ResourceClaim", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaim", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -63450,7 +63450,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha2NamespacedResourceClaim", + "operationId": "listResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HTxmzgxC" @@ -63527,7 +63527,7 @@ "*/*" ], "description": "create a ResourceClaim", - "operationId": "createResourceV1alpha2NamespacedResourceClaim", + "operationId": "createResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "in": "body", @@ -63595,7 +63595,7 @@ "*/*" ], "description": "delete a ResourceClaim", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaim", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -63653,7 +63653,7 @@ "*/*" ], "description": "read the specified ResourceClaim", - "operationId": "readResourceV1alpha2NamespacedResourceClaim", + "operationId": "readResourceV1alpha3NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", @@ -63707,7 +63707,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClaim", - "operationId": "patchResourceV1alpha2NamespacedResourceClaim", + "operationId": "patchResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "$ref": "#/parameters/body-YKtvzQTo" @@ -63765,7 +63765,7 @@ "*/*" ], "description": "replace the specified ResourceClaim", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaim", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "in": "body", @@ -63827,7 +63827,7 @@ "*/*" ], "description": "read status of the specified ResourceClaim", - "operationId": "readResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "readResourceV1alpha3NamespacedResourceClaimStatus", "produces": [ "application/json", "application/yaml", @@ -63881,7 +63881,7 @@ "application/apply-patch+yaml" ], "description": "partially update status of the specified ResourceClaim", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "$ref": "#/parameters/body-YKtvzQTo" @@ -63939,7 +63939,7 @@ "*/*" ], "description": "replace status of the specified ResourceClaim", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimStatus", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { "in": "body", @@ -64001,7 +64001,7 @@ "*/*" ], "description": "delete collection of ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha2CollectionNamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -64077,7 +64077,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "listResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HTxmzgxC" @@ -64154,7 +64154,7 @@ "*/*" ], "description": "create a ResourceClaimTemplate", - "operationId": "createResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "createResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", @@ -64222,7 +64222,7 @@ "*/*" ], "description": "delete a ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -64280,7 +64280,7 @@ "*/*" ], "description": "read the specified ResourceClaimTemplate", - "operationId": "readResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "readResourceV1alpha3NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", @@ -64334,7 +64334,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClaimTemplate", - "operationId": "patchResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "$ref": "#/parameters/body-YKtvzQTo" @@ -64392,7 +64392,7 @@ "*/*" ], "description": "replace the specified ResourceClaimTemplate", - "operationId": "replaceResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "in": "body", @@ -64454,7 +64454,7 @@ "*/*" ], "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha2PodSchedulingContextForAllNamespaces", + "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -64528,7 +64528,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha2ResourceClaimForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -64602,7 +64602,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha2ResourceClaimTemplateForAllNamespaces", + "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -64676,7 +64676,7 @@ "*/*" ], "description": "delete collection of ResourceClass", - "operationId": "deleteResourceV1alpha2CollectionResourceClass", + "operationId": "deleteResourceV1alpha3CollectionResourceClass", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -64752,7 +64752,7 @@ "*/*" ], "description": "list or watch objects of kind ResourceClass", - "operationId": "listResourceV1alpha2ResourceClass", + "operationId": "listResourceV1alpha3ResourceClass", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HTxmzgxC" @@ -64826,7 +64826,7 @@ "*/*" ], "description": "create a ResourceClass", - "operationId": "createResourceV1alpha2ResourceClass", + "operationId": "createResourceV1alpha3ResourceClass", "parameters": [ { "in": "body", @@ -64894,7 +64894,7 @@ "*/*" ], "description": "delete a ResourceClass", - "operationId": "deleteResourceV1alpha2ResourceClass", + "operationId": "deleteResourceV1alpha3ResourceClass", "parameters": [ { "$ref": "#/parameters/body-jLCaEqdf" @@ -64952,7 +64952,7 @@ "*/*" ], "description": "read the specified ResourceClass", - "operationId": "readResourceV1alpha2ResourceClass", + "operationId": "readResourceV1alpha3ResourceClass", "produces": [ "application/json", "application/yaml", @@ -65003,7 +65003,7 @@ "application/apply-patch+yaml" ], "description": "partially update the specified ResourceClass", - "operationId": "patchResourceV1alpha2ResourceClass", + "operationId": "patchResourceV1alpha3ResourceClass", "parameters": [ { "$ref": "#/parameters/body-YKtvzQTo" @@ -65061,7 +65061,7 @@ "*/*" ], "description": "replace the specified ResourceClass", - "operationId": "replaceResourceV1alpha2ResourceClass", + "operationId": "replaceResourceV1alpha3ResourceClass", "parameters": [ { "in": "body", @@ -65123,7 +65123,7 @@ "*/*" ], "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedPodSchedulingContextList", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", "produces": [ "application/json", "application/yaml", @@ -65200,7 +65200,7 @@ "*/*" ], "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedPodSchedulingContext", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", "produces": [ "application/json", "application/yaml", @@ -65285,7 +65285,7 @@ "*/*" ], "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", "produces": [ "application/json", "application/yaml", @@ -65362,7 +65362,7 @@ "*/*" ], "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaim", + "operationId": "watchResourceV1alpha3NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", @@ -65447,7 +65447,7 @@ "*/*" ], "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimTemplateList", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", "produces": [ "application/json", "application/yaml", @@ -65524,7 +65524,7 @@ "*/*" ], "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2NamespacedResourceClaimTemplate", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", @@ -65609,7 +65609,7 @@ "*/*" ], "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2PodSchedulingContextListForAllNamespaces", + "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -65683,7 +65683,7 @@ "*/*" ], "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -65757,7 +65757,7 @@ "*/*" ], "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClaimTemplateListForAllNamespaces", + "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -65831,7 +65831,7 @@ "*/*" ], "description": "watch individual changes to a list of ResourceClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha2ResourceClassList", + "operationId": "watchResourceV1alpha3ResourceClassList", "produces": [ "application/json", "application/yaml", @@ -65905,7 +65905,7 @@ "*/*" ], "description": "watch changes to an object of kind ResourceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha2ResourceClass", + "operationId": "watchResourceV1alpha3ResourceClass", "produces": [ "application/json", "application/yaml", diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index 9e4e6265e0b0a..c182fc1b2415d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -12127,7 +12127,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: namespace type: scalar: string -- name: io.k8s.api.resource.v1alpha2.AllocationResult +- name: io.k8s.api.resource.v1alpha3.AllocationResult map: fields: - name: availableOnNodes @@ -12137,18 +12137,18 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.ResourceHandle + namedType: io.k8s.api.resource.v1alpha3.ResourceHandle elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha2.DriverAllocationResult +- name: io.k8s.api.resource.v1alpha3.DriverAllocationResult map: fields: - name: namedResources type: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult - name: vendorRequestParameters type: namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha2.DriverRequests +- name: io.k8s.api.resource.v1alpha3.DriverRequests map: fields: - name: driverName @@ -12158,19 +12158,19 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.ResourceRequest + namedType: io.k8s.api.resource.v1alpha3.ResourceRequest elementRelationship: atomic - name: vendorParameters type: namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha2.NamedResourcesAllocationResult +- name: io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult map: fields: - name: name type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute +- name: io.k8s.api.resource.v1alpha3.NamedResourcesAttribute map: fields: - name: bool @@ -12181,7 +12181,7 @@ var schemaYAML = typed.YAMLObject(`types: scalar: numeric - name: intSlice type: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice - name: name type: scalar: string @@ -12194,31 +12194,31 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: stringSlice type: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice - name: version type: scalar: string -- name: io.k8s.api.resource.v1alpha2.NamedResourcesFilter +- name: io.k8s.api.resource.v1alpha3.NamedResourcesFilter map: fields: - name: selector type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha2.NamedResourcesInstance +- name: io.k8s.api.resource.v1alpha3.NamedResourcesInstance map: fields: - name: attributes type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesAttribute + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesAttribute elementRelationship: atomic - name: name type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha2.NamedResourcesIntSlice +- name: io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice map: fields: - name: ints @@ -12227,23 +12227,23 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: numeric elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha2.NamedResourcesRequest +- name: io.k8s.api.resource.v1alpha3.NamedResourcesRequest map: fields: - name: selector type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha2.NamedResourcesResources +- name: io.k8s.api.resource.v1alpha3.NamedResourcesResources map: fields: - name: instances type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesInstance + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesInstance elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha2.NamedResourcesStringSlice +- name: io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice map: fields: - name: strings @@ -12252,7 +12252,7 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha2.PodSchedulingContext +- name: io.k8s.api.resource.v1alpha3.PodSchedulingContext map: fields: - name: apiVersion @@ -12267,13 +12267,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec + namedType: io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec default: {} - name: status type: - namedType: io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus + namedType: io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus default: {} -- name: io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec +- name: io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec map: fields: - name: potentialNodes @@ -12285,18 +12285,18 @@ var schemaYAML = typed.YAMLObject(`types: - name: selectedNode type: scalar: string -- name: io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus +- name: io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus map: fields: - name: resourceClaims type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus elementRelationship: associative keys: - name -- name: io.k8s.api.resource.v1alpha2.ResourceClaim +- name: io.k8s.api.resource.v1alpha3.ResourceClaim map: fields: - name: apiVersion @@ -12311,13 +12311,13 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec default: {} - name: status type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimStatus + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimStatus default: {} -- name: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference +- name: io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference map: fields: - name: apiGroup @@ -12335,7 +12335,7 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha2.ResourceClaimParameters +- name: io.k8s.api.resource.v1alpha3.ResourceClaimParameters map: fields: - name: apiVersion @@ -12345,11 +12345,11 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.DriverRequests + namedType: io.k8s.api.resource.v1alpha3.DriverRequests elementRelationship: atomic - name: generatedFrom type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference - name: kind type: scalar: string @@ -12357,7 +12357,7 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} -- name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference +- name: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference map: fields: - name: apiGroup @@ -12371,7 +12371,7 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus +- name: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus map: fields: - name: name @@ -12383,22 +12383,22 @@ var schemaYAML = typed.YAMLObject(`types: elementType: scalar: string elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha2.ResourceClaimSpec +- name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec map: fields: - name: parametersRef type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference - name: resourceClassName type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha2.ResourceClaimStatus +- name: io.k8s.api.resource.v1alpha3.ResourceClaimStatus map: fields: - name: allocation type: - namedType: io.k8s.api.resource.v1alpha2.AllocationResult + namedType: io.k8s.api.resource.v1alpha3.AllocationResult - name: deallocationRequested type: scalar: boolean @@ -12409,11 +12409,11 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference elementRelationship: associative keys: - uid -- name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplate +- name: io.k8s.api.resource.v1alpha3.ResourceClaimTemplate map: fields: - name: apiVersion @@ -12428,9 +12428,9 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec default: {} -- name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec +- name: io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec map: fields: - name: metadata @@ -12439,9 +12439,9 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: spec type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec + namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec default: {} -- name: io.k8s.api.resource.v1alpha2.ResourceClass +- name: io.k8s.api.resource.v1alpha3.ResourceClass map: fields: - name: apiVersion @@ -12460,14 +12460,14 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: parametersRef type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + namedType: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference - name: structuredParameters type: scalar: boolean - name: suitableNodes type: namedType: io.k8s.api.core.v1.NodeSelector -- name: io.k8s.api.resource.v1alpha2.ResourceClassParameters +- name: io.k8s.api.resource.v1alpha3.ResourceClassParameters map: fields: - name: apiVersion @@ -12477,11 +12477,11 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.ResourceFilter + namedType: io.k8s.api.resource.v1alpha3.ResourceFilter elementRelationship: atomic - name: generatedFrom type: - namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + namedType: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference - name: kind type: scalar: string @@ -12493,9 +12493,9 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.VendorParameters + namedType: io.k8s.api.resource.v1alpha3.VendorParameters elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference +- name: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference map: fields: - name: apiGroup @@ -12512,7 +12512,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: namespace type: scalar: string -- name: io.k8s.api.resource.v1alpha2.ResourceFilter +- name: io.k8s.api.resource.v1alpha3.ResourceFilter map: fields: - name: driverName @@ -12520,8 +12520,8 @@ var schemaYAML = typed.YAMLObject(`types: scalar: string - name: namedResources type: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesFilter -- name: io.k8s.api.resource.v1alpha2.ResourceHandle + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesFilter +- name: io.k8s.api.resource.v1alpha3.ResourceHandle map: fields: - name: data @@ -12533,17 +12533,17 @@ var schemaYAML = typed.YAMLObject(`types: default: "" - name: structuredData type: - namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle -- name: io.k8s.api.resource.v1alpha2.ResourceRequest + namedType: io.k8s.api.resource.v1alpha3.StructuredResourceHandle +- name: io.k8s.api.resource.v1alpha3.ResourceRequest map: fields: - name: namedResources type: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesRequest + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesRequest - name: vendorParameters type: namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha2.ResourceSlice +- name: io.k8s.api.resource.v1alpha3.ResourceSlice map: fields: - name: apiVersion @@ -12562,11 +12562,11 @@ var schemaYAML = typed.YAMLObject(`types: default: {} - name: namedResources type: - namedType: io.k8s.api.resource.v1alpha2.NamedResourcesResources + namedType: io.k8s.api.resource.v1alpha3.NamedResourcesResources - name: nodeName type: scalar: string -- name: io.k8s.api.resource.v1alpha2.StructuredResourceHandle +- name: io.k8s.api.resource.v1alpha3.StructuredResourceHandle map: fields: - name: nodeName @@ -12576,7 +12576,7 @@ var schemaYAML = typed.YAMLObject(`types: type: list: elementType: - namedType: io.k8s.api.resource.v1alpha2.DriverAllocationResult + namedType: io.k8s.api.resource.v1alpha3.DriverAllocationResult elementRelationship: atomic - name: vendorClaimParameters type: @@ -12584,7 +12584,7 @@ var schemaYAML = typed.YAMLObject(`types: - name: vendorClassParameters type: namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha2.VendorParameters +- name: io.k8s.api.resource.v1alpha3.VendorParameters map: fields: - name: driverName diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresult.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresult.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresult.go index df6b157722577..e6d1df8635e11 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresult.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( v1 "k8s.io/client-go/applyconfigurations/core/v1" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresultmodel.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresultmodel.go index 3250fd5d116cb..197f882883fc2 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/allocationresultmodel.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresultmodel.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // AllocationResultModelApplyConfiguration represents a declarative configuration of the AllocationResultModel type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverallocationresult.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverallocationresult.go index f44db7921caa2..787c02660cd0e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverallocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverallocationresult.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverrequests.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverrequests.go index 79cc04c2452f3..f322e7930ac6e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/driverrequests.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverrequests.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesallocationresult.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesallocationresult.go index 7baf9558de130..89509eecb0603 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesallocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesallocationresult.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // NamedResourcesAllocationResultApplyConfiguration represents a declarative configuration of the NamedResourcesAllocationResult type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattribute.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattribute.go index 38df3195b1219..502859781221b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattribute.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattribute.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( resource "k8s.io/apimachinery/pkg/api/resource" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattributevalue.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattributevalue.go index d9ef2682e3b98..8b6d90d50cd8e 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesattributevalue.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattributevalue.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( resource "k8s.io/apimachinery/pkg/api/resource" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesfilter.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesfilter.go index 439eb066358bb..3a47beada4738 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesfilter.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesfilter.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // NamedResourcesFilterApplyConfiguration represents a declarative configuration of the NamedResourcesFilter type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesinstance.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesinstance.go index 4ec6fd7ab6f20..ff028814dbe8b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesinstance.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesinstance.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // NamedResourcesInstanceApplyConfiguration represents a declarative configuration of the NamedResourcesInstance type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesintslice.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesintslice.go index f3d74e7b9c19d..fa336b4ae9af8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesintslice.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesintslice.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // NamedResourcesIntSliceApplyConfiguration represents a declarative configuration of the NamedResourcesIntSlice type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesrequest.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesrequest.go index b0722df48c394..da6ac3efcfe49 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesrequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesrequest.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // NamedResourcesRequestApplyConfiguration represents a declarative configuration of the NamedResourcesRequest type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesresources.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesresources.go index 0ef0565552efe..3e467922a4d35 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesresources.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesresources.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // NamedResourcesResourcesApplyConfiguration represents a declarative configuration of the NamedResourcesResources type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesstringslice.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesstringslice.go index 27295b89642c8..8f21f81905d2b 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/namedresourcesstringslice.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesstringslice.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // NamedResourcesStringSliceApplyConfiguration represents a declarative configuration of the NamedResourcesStringSlice type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontext.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontext.go similarity index 96% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontext.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontext.go index 1eae9582dde67..ee8e73ebe2b57 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontext.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontext.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -43,7 +43,7 @@ func PodSchedulingContext(name, namespace string) *PodSchedulingContextApplyConf b.WithName(name) b.WithNamespace(namespace) b.WithKind("PodSchedulingContext") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } @@ -58,20 +58,20 @@ func PodSchedulingContext(name, namespace string) *PodSchedulingContextApplyConf // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractPodSchedulingContext(podSchedulingContext *resourcev1alpha2.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) { +func ExtractPodSchedulingContext(podSchedulingContext *resourcev1alpha3.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) { return extractPodSchedulingContext(podSchedulingContext, fieldManager, "") } // ExtractPodSchedulingContextStatus is the same as ExtractPodSchedulingContext except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractPodSchedulingContextStatus(podSchedulingContext *resourcev1alpha2.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) { +func ExtractPodSchedulingContextStatus(podSchedulingContext *resourcev1alpha3.PodSchedulingContext, fieldManager string) (*PodSchedulingContextApplyConfiguration, error) { return extractPodSchedulingContext(podSchedulingContext, fieldManager, "status") } -func extractPodSchedulingContext(podSchedulingContext *resourcev1alpha2.PodSchedulingContext, fieldManager string, subresource string) (*PodSchedulingContextApplyConfiguration, error) { +func extractPodSchedulingContext(podSchedulingContext *resourcev1alpha3.PodSchedulingContext, fieldManager string, subresource string) (*PodSchedulingContextApplyConfiguration, error) { b := &PodSchedulingContextApplyConfiguration{} - err := managedfields.ExtractInto(podSchedulingContext, internal.Parser().Type("io.k8s.api.resource.v1alpha2.PodSchedulingContext"), fieldManager, b, subresource) + err := managedfields.ExtractInto(podSchedulingContext, internal.Parser().Type("io.k8s.api.resource.v1alpha3.PodSchedulingContext"), fieldManager, b, subresource) if err != nil { return nil, err } @@ -79,7 +79,7 @@ func extractPodSchedulingContext(podSchedulingContext *resourcev1alpha2.PodSched b.WithNamespace(podSchedulingContext.Namespace) b.WithKind("PodSchedulingContext") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontextspec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontextspec.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontextspec.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontextspec.go index 7cee78ec85ee9..fd25df7a531c9 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontextspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontextspec.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // PodSchedulingContextSpecApplyConfiguration represents a declarative configuration of the PodSchedulingContextSpec type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontextstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontextstatus.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontextstatus.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontextstatus.go index 4a8f00ffc0f4a..a06e370cc3c03 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/podschedulingcontextstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/podschedulingcontextstatus.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // PodSchedulingContextStatusApplyConfiguration represents a declarative configuration of the PodSchedulingContextStatus type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaim.go similarity index 96% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaim.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaim.go index 8ad61dfbd41b4..6161595588108 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaim.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaim.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -43,7 +43,7 @@ func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration { b.WithName(name) b.WithNamespace(namespace) b.WithKind("ResourceClaim") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } @@ -58,20 +58,20 @@ func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceClaim(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { +func ExtractResourceClaim(resourceClaim *resourcev1alpha3.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { return extractResourceClaim(resourceClaim, fieldManager, "") } // ExtractResourceClaimStatus is the same as ExtractResourceClaim except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { +func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha3.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { return extractResourceClaim(resourceClaim, fieldManager, "status") } -func extractResourceClaim(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) { +func extractResourceClaim(resourceClaim *resourcev1alpha3.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) { b := &ResourceClaimApplyConfiguration{} - err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaim"), fieldManager, b, subresource) + err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClaim"), fieldManager, b, subresource) if err != nil { return nil, err } @@ -79,7 +79,7 @@ func extractResourceClaim(resourceClaim *resourcev1alpha2.ResourceClaim, fieldMa b.WithNamespace(resourceClaim.Namespace) b.WithKind("ResourceClaim") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimconsumerreference.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimconsumerreference.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimconsumerreference.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimconsumerreference.go index a383f461d7066..96196d7c952a0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimconsumerreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimconsumerreference.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( types "k8s.io/apimachinery/pkg/types" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go similarity index 97% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go index 7f5a46c021484..fe00f1dad4f59 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparameters.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -43,7 +43,7 @@ func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApp b.WithName(name) b.WithNamespace(namespace) b.WithKind("ResourceClaimParameters") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } @@ -58,20 +58,20 @@ func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApp // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { +func ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "") } // ExtractResourceClaimParametersStatus is the same as ExtractResourceClaimParameters except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { +func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "status") } -func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) { +func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) { b := &ResourceClaimParametersApplyConfiguration{} - err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimParameters"), fieldManager, b, subresource) + err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClaimParameters"), fieldManager, b, subresource) if err != nil { return nil, err } @@ -79,7 +79,7 @@ func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha2.Re b.WithNamespace(resourceClaimParameters.Namespace) b.WithKind("ResourceClaimParameters") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparametersreference.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparametersreference.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparametersreference.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparametersreference.go index 7900152ca2345..1d677011c15aa 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimparametersreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparametersreference.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceClaimParametersReferenceApplyConfiguration represents a declarative configuration of the ResourceClaimParametersReference type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimschedulingstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimschedulingstatus.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimschedulingstatus.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimschedulingstatus.go index f9e07b7467f48..caab89acdb4b7 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimschedulingstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimschedulingstatus.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceClaimSchedulingStatusApplyConfiguration represents a declarative configuration of the ResourceClaimSchedulingStatus type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimspec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimspec.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimspec.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimspec.go index 4c34e672ed7c7..38bd0c5578ecb 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimspec.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimstatus.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimstatus.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimstatus.go index 635a4c4dc20b8..fa1545e52abde 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimstatus.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceClaimStatusApplyConfiguration represents a declarative configuration of the ResourceClaimStatus type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimtemplate.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimtemplate.go similarity index 96% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimtemplate.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimtemplate.go index 0ee0ae36e0416..6f371d0c05112 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimtemplate.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimtemplate.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -42,7 +42,7 @@ func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyCo b.WithName(name) b.WithNamespace(namespace) b.WithKind("ResourceClaimTemplate") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } @@ -57,20 +57,20 @@ func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyCo // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { +func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "") } // ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { +func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status") } -func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) { +func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) { b := &ResourceClaimTemplateApplyConfiguration{} - err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimTemplate"), fieldManager, b, subresource) + err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClaimTemplate"), fieldManager, b, subresource) if err != nil { return nil, err } @@ -78,7 +78,7 @@ func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha2.Resour b.WithNamespace(resourceClaimTemplate.Namespace) b.WithKind("ResourceClaimTemplate") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimtemplatespec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimtemplatespec.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimtemplatespec.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimtemplatespec.go index 334de324e2bf3..5b03ab7553511 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclaimtemplatespec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimtemplatespec.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclass.go similarity index 97% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclass.go index cf559cfb22d45..a42ea74224bc6 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclass.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclass.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -45,7 +45,7 @@ func ResourceClass(name string) *ResourceClassApplyConfiguration { b := &ResourceClassApplyConfiguration{} b.WithName(name) b.WithKind("ResourceClass") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } @@ -60,27 +60,27 @@ func ResourceClass(name string) *ResourceClassApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceClass(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { +func ExtractResourceClass(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { return extractResourceClass(resourceClass, fieldManager, "") } // ExtractResourceClassStatus is the same as ExtractResourceClass except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceClassStatus(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { +func ExtractResourceClassStatus(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { return extractResourceClass(resourceClass, fieldManager, "status") } -func extractResourceClass(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) { +func extractResourceClass(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) { b := &ResourceClassApplyConfiguration{} - err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClass"), fieldManager, b, subresource) + err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClass"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(resourceClass.Name) b.WithKind("ResourceClass") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparameters.go similarity index 97% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparameters.go index e09b1ed4e0b64..7413fbfe7c630 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparameters.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparameters.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -44,7 +44,7 @@ func ResourceClassParameters(name, namespace string) *ResourceClassParametersApp b.WithName(name) b.WithNamespace(namespace) b.WithKind("ResourceClassParameters") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } @@ -59,20 +59,20 @@ func ResourceClassParameters(name, namespace string) *ResourceClassParametersApp // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { +func ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { return extractResourceClassParameters(resourceClassParameters, fieldManager, "") } // ExtractResourceClassParametersStatus is the same as ExtractResourceClassParameters except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { +func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { return extractResourceClassParameters(resourceClassParameters, fieldManager, "status") } -func extractResourceClassParameters(resourceClassParameters *resourcev1alpha2.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) { +func extractResourceClassParameters(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) { b := &ResourceClassParametersApplyConfiguration{} - err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClassParameters"), fieldManager, b, subresource) + err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClassParameters"), fieldManager, b, subresource) if err != nil { return nil, err } @@ -80,7 +80,7 @@ func extractResourceClassParameters(resourceClassParameters *resourcev1alpha2.Re b.WithNamespace(resourceClassParameters.Namespace) b.WithKind("ResourceClassParameters") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparametersreference.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparametersreference.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparametersreference.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparametersreference.go index 052d7365e00db..db469e5eec041 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceclassparametersreference.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparametersreference.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceClassParametersReferenceApplyConfiguration represents a declarative configuration of the ResourceClassParametersReference type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefilter.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefilter.go index 1617275f0ee5e..4c5542692cd4d 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefilter.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefilter.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceFilterApplyConfiguration represents a declarative configuration of the ResourceFilter type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefiltermodel.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefiltermodel.go index 648d319d46412..0de3f12f67897 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcefiltermodel.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefiltermodel.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceFilterModelApplyConfiguration represents a declarative configuration of the ResourceFilterModel type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcehandle.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcehandle.go index 9a8410d9ed313..6c8a697fa13f0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcehandle.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcehandle.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceHandleApplyConfiguration represents a declarative configuration of the ResourceHandle type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcemodel.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcemodel.go index b3c8540d4fe7d..2999d447df158 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcemodel.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcemodel.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceModelApplyConfiguration represents a declarative configuration of the ResourceModel type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequest.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequest.go index b93ed85402744..d0d047e752cf4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequest.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequest.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequestmodel.go similarity index 98% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequestmodel.go index b0e86483eb5c1..35d1825319954 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourcerequestmodel.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequestmodel.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // ResourceRequestModelApplyConfiguration represents a declarative configuration of the ResourceRequestModel type for use // with apply. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslice.go similarity index 96% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslice.go index 90cde67d7bd37..7486e75c82a72 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/resourceslice.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslice.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" managedfields "k8s.io/apimachinery/pkg/util/managedfields" @@ -43,7 +43,7 @@ func ResourceSlice(name string) *ResourceSliceApplyConfiguration { b := &ResourceSliceApplyConfiguration{} b.WithName(name) b.WithKind("ResourceSlice") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } @@ -58,27 +58,27 @@ func ResourceSlice(name string) *ResourceSliceApplyConfiguration { // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { +func ExtractResourceSlice(resourceSlice *resourcev1alpha3.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { return extractResourceSlice(resourceSlice, fieldManager, "") } // ExtractResourceSliceStatus is the same as ExtractResourceSlice except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceSliceStatus(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { +func ExtractResourceSliceStatus(resourceSlice *resourcev1alpha3.ResourceSlice, fieldManager string) (*ResourceSliceApplyConfiguration, error) { return extractResourceSlice(resourceSlice, fieldManager, "status") } -func extractResourceSlice(resourceSlice *resourcev1alpha2.ResourceSlice, fieldManager string, subresource string) (*ResourceSliceApplyConfiguration, error) { +func extractResourceSlice(resourceSlice *resourcev1alpha3.ResourceSlice, fieldManager string, subresource string) (*ResourceSliceApplyConfiguration, error) { b := &ResourceSliceApplyConfiguration{} - err := managedfields.ExtractInto(resourceSlice, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceSlice"), fieldManager, b, subresource) + err := managedfields.ExtractInto(resourceSlice, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceSlice"), fieldManager, b, subresource) if err != nil { return nil, err } b.WithName(resourceSlice.Name) b.WithKind("ResourceSlice") - b.WithAPIVersion("resource.k8s.io/v1alpha2") + b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/structuredresourcehandle.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/structuredresourcehandle.go index 10794f81f299a..0d58994c942e8 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/structuredresourcehandle.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/structuredresourcehandle.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/vendorparameters.go similarity index 99% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/vendorparameters.go index 851c7cdfbac20..71f86a159c25a 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha2/vendorparameters.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/vendorparameters.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by applyconfiguration-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/staging/src/k8s.io/client-go/applyconfigurations/utils.go b/staging/src/k8s.io/client-go/applyconfigurations/utils.go index 7672fb091737d..68ba339e4a753 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/utils.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/utils.go @@ -59,7 +59,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -112,7 +112,7 @@ import ( applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1" applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" @@ -1549,81 +1549,81 @@ func ForKind(kind schema.GroupVersionKind) interface{} { case rbacv1beta1.SchemeGroupVersion.WithKind("Subject"): return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{} - // Group=resource.k8s.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithKind("AllocationResult"): - return &resourcev1alpha2.AllocationResultApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("AllocationResultModel"): - return &resourcev1alpha2.AllocationResultModelApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("DriverAllocationResult"): - return &resourcev1alpha2.DriverAllocationResultApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("DriverRequests"): - return &resourcev1alpha2.DriverRequestsApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesAllocationResult"): - return &resourcev1alpha2.NamedResourcesAllocationResultApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesAttribute"): - return &resourcev1alpha2.NamedResourcesAttributeApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesAttributeValue"): - return &resourcev1alpha2.NamedResourcesAttributeValueApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesFilter"): - return &resourcev1alpha2.NamedResourcesFilterApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesInstance"): - return &resourcev1alpha2.NamedResourcesInstanceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesIntSlice"): - return &resourcev1alpha2.NamedResourcesIntSliceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesRequest"): - return &resourcev1alpha2.NamedResourcesRequestApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesResources"): - return &resourcev1alpha2.NamedResourcesResourcesApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("NamedResourcesStringSlice"): - return &resourcev1alpha2.NamedResourcesStringSliceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext"): - return &resourcev1alpha2.PodSchedulingContextApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"): - return &resourcev1alpha2.PodSchedulingContextSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContextStatus"): - return &resourcev1alpha2.PodSchedulingContextStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaim"): - return &resourcev1alpha2.ResourceClaimApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"): - return &resourcev1alpha2.ResourceClaimConsumerReferenceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParameters"): - return &resourcev1alpha2.ResourceClaimParametersApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"): - return &resourcev1alpha2.ResourceClaimParametersReferenceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"): - return &resourcev1alpha2.ResourceClaimSchedulingStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSpec"): - return &resourcev1alpha2.ResourceClaimSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimStatus"): - return &resourcev1alpha2.ResourceClaimStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplate"): - return &resourcev1alpha2.ResourceClaimTemplateApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"): - return &resourcev1alpha2.ResourceClaimTemplateSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClass"): - return &resourcev1alpha2.ResourceClassApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParameters"): - return &resourcev1alpha2.ResourceClassParametersApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParametersReference"): - return &resourcev1alpha2.ResourceClassParametersReferenceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceFilter"): - return &resourcev1alpha2.ResourceFilterApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceFilterModel"): - return &resourcev1alpha2.ResourceFilterModelApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceHandle"): - return &resourcev1alpha2.ResourceHandleApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceModel"): - return &resourcev1alpha2.ResourceModelApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequest"): - return &resourcev1alpha2.ResourceRequestApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceRequestModel"): - return &resourcev1alpha2.ResourceRequestModelApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ResourceSlice"): - return &resourcev1alpha2.ResourceSliceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("StructuredResourceHandle"): - return &resourcev1alpha2.StructuredResourceHandleApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("VendorParameters"): - return &resourcev1alpha2.VendorParametersApplyConfiguration{} + // Group=resource.k8s.io, Version=v1alpha3 + case v1alpha3.SchemeGroupVersion.WithKind("AllocationResult"): + return &resourcev1alpha3.AllocationResultApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("AllocationResultModel"): + return &resourcev1alpha3.AllocationResultModelApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DriverAllocationResult"): + return &resourcev1alpha3.DriverAllocationResultApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DriverRequests"): + return &resourcev1alpha3.DriverRequestsApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAllocationResult"): + return &resourcev1alpha3.NamedResourcesAllocationResultApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAttribute"): + return &resourcev1alpha3.NamedResourcesAttributeApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAttributeValue"): + return &resourcev1alpha3.NamedResourcesAttributeValueApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesFilter"): + return &resourcev1alpha3.NamedResourcesFilterApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesInstance"): + return &resourcev1alpha3.NamedResourcesInstanceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesIntSlice"): + return &resourcev1alpha3.NamedResourcesIntSliceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesRequest"): + return &resourcev1alpha3.NamedResourcesRequestApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesResources"): + return &resourcev1alpha3.NamedResourcesResourcesApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesStringSlice"): + return &resourcev1alpha3.NamedResourcesStringSliceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContext"): + return &resourcev1alpha3.PodSchedulingContextApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"): + return &resourcev1alpha3.PodSchedulingContextSpecApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContextStatus"): + return &resourcev1alpha3.PodSchedulingContextStatusApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"): + return &resourcev1alpha3.ResourceClaimApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"): + return &resourcev1alpha3.ResourceClaimConsumerReferenceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParameters"): + return &resourcev1alpha3.ResourceClaimParametersApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"): + return &resourcev1alpha3.ResourceClaimParametersReferenceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"): + return &resourcev1alpha3.ResourceClaimSchedulingStatusApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSpec"): + return &resourcev1alpha3.ResourceClaimSpecApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimStatus"): + return &resourcev1alpha3.ResourceClaimStatusApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplate"): + return &resourcev1alpha3.ResourceClaimTemplateApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"): + return &resourcev1alpha3.ResourceClaimTemplateSpecApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClass"): + return &resourcev1alpha3.ResourceClassApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParameters"): + return &resourcev1alpha3.ResourceClassParametersApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParametersReference"): + return &resourcev1alpha3.ResourceClassParametersReferenceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceFilter"): + return &resourcev1alpha3.ResourceFilterApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceFilterModel"): + return &resourcev1alpha3.ResourceFilterModelApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceHandle"): + return &resourcev1alpha3.ResourceHandleApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceModel"): + return &resourcev1alpha3.ResourceModelApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceRequest"): + return &resourcev1alpha3.ResourceRequestApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceRequestModel"): + return &resourcev1alpha3.ResourceRequestModelApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"): + return &resourcev1alpha3.ResourceSliceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("StructuredResourceHandle"): + return &resourcev1alpha3.StructuredResourceHandleApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("VendorParameters"): + return &resourcev1alpha3.VendorParametersApplyConfiguration{} // Group=scheduling.k8s.io, Version=v1 case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"): diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index db1eb4a833115..42c8f22aab5d5 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -60,7 +60,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -366,21 +366,21 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil - // Group=resource.k8s.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithResource("podschedulingcontexts"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulingContexts().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimParameters().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("resourceclasses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClassParameters().Informer()}, nil - case v1alpha2.SchemeGroupVersion.WithResource("resourceslices"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceSlices().Informer()}, nil + // Group=resource.k8s.io, Version=v1alpha3 + case v1alpha3.SchemeGroupVersion.WithResource("podschedulingcontexts"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().PodSchedulingContexts().Informer()}, nil + case v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaims().Informer()}, nil + case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimparameters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimParameters().Informer()}, nil + case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimTemplates().Informer()}, nil + case v1alpha3.SchemeGroupVersion.WithResource("resourceclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClasses().Informer()}, nil + case v1alpha3.SchemeGroupVersion.WithResource("resourceclassparameters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClassParameters().Informer()}, nil + case v1alpha3.SchemeGroupVersion.WithResource("resourceslices"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceSlices().Informer()}, nil // Group=scheduling.k8s.io, Version=v1 case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"): diff --git a/staging/src/k8s.io/client-go/informers/resource/interface.go b/staging/src/k8s.io/client-go/informers/resource/interface.go index 3fcce8ae9dc96..170d29d8088a6 100644 --- a/staging/src/k8s.io/client-go/informers/resource/interface.go +++ b/staging/src/k8s.io/client-go/informers/resource/interface.go @@ -20,13 +20,13 @@ package resource import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - v1alpha2 "k8s.io/client-go/informers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/informers/resource/v1alpha3" ) // Interface provides access to each of this group's versions. type Interface interface { - // V1alpha2 provides access to shared informers for resources in V1alpha2. - V1alpha2() v1alpha2.Interface + // V1alpha3 provides access to shared informers for resources in V1alpha3. + V1alpha3() v1alpha3.Interface } type group struct { @@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } -// V1alpha2 returns a new v1alpha2.Interface. -func (g *group) V1alpha2() v1alpha2.Interface { - return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions) +// V1alpha3 returns a new v1alpha3.Interface. +func (g *group) V1alpha3() v1alpha3.Interface { + return v1alpha3.New(g.factory, g.namespace, g.tweakListOptions) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/interface.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/interface.go similarity index 99% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/interface.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/interface.go index aa4a5ae7dcae1..36b9f1c7824b9 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/interface.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/interface.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/podschedulingcontext.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/podschedulingcontext.go similarity index 86% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/podschedulingcontext.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/podschedulingcontext.go index b4aabb3761ce4..62fb3614fcdca 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/podschedulingcontext.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/podschedulingcontext.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" time "time" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // PodSchedulingContexts. type PodSchedulingContextInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha2.PodSchedulingContextLister + Lister() v1alpha3.PodSchedulingContextLister } type podSchedulingContextInformer struct { @@ -62,16 +62,16 @@ func NewFilteredPodSchedulingContextInformer(client kubernetes.Interface, namesp if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().PodSchedulingContexts(namespace).List(context.TODO(), options) + return client.ResourceV1alpha3().PodSchedulingContexts(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().PodSchedulingContexts(namespace).Watch(context.TODO(), options) + return client.ResourceV1alpha3().PodSchedulingContexts(namespace).Watch(context.TODO(), options) }, }, - &resourcev1alpha2.PodSchedulingContext{}, + &resourcev1alpha3.PodSchedulingContext{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *podSchedulingContextInformer) defaultInformer(client kubernetes.Interfa } func (f *podSchedulingContextInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.PodSchedulingContext{}, f.defaultInformer) + return f.factory.InformerFor(&resourcev1alpha3.PodSchedulingContext{}, f.defaultInformer) } -func (f *podSchedulingContextInformer) Lister() v1alpha2.PodSchedulingContextLister { - return v1alpha2.NewPodSchedulingContextLister(f.Informer().GetIndexer()) +func (f *podSchedulingContextInformer) Lister() v1alpha3.PodSchedulingContextLister { + return v1alpha3.NewPodSchedulingContextLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaim.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaim.go similarity index 85% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaim.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaim.go index 3af93689191ff..fa644579b13c2 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaim.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaim.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" time "time" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // ResourceClaims. type ResourceClaimInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha2.ResourceClaimLister + Lister() v1alpha3.ResourceClaimLister } type resourceClaimInformer struct { @@ -62,16 +62,16 @@ func NewFilteredResourceClaimInformer(client kubernetes.Interface, namespace str if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaims(namespace).List(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClaims(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaims(namespace).Watch(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClaims(namespace).Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClaim{}, + &resourcev1alpha3.ResourceClaim{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *resourceClaimInformer) defaultInformer(client kubernetes.Interface, res } func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClaim{}, f.defaultInformer) + return f.factory.InformerFor(&resourcev1alpha3.ResourceClaim{}, f.defaultInformer) } -func (f *resourceClaimInformer) Lister() v1alpha2.ResourceClaimLister { - return v1alpha2.NewResourceClaimLister(f.Informer().GetIndexer()) +func (f *resourceClaimInformer) Lister() v1alpha3.ResourceClaimLister { + return v1alpha3.NewResourceClaimLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimparameters.go similarity index 86% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimparameters.go index 3064ac9f5596f..86df716241acb 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimparameters.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimparameters.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" time "time" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // ResourceClaimParameters. type ResourceClaimParametersInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha2.ResourceClaimParametersLister + Lister() v1alpha3.ResourceClaimParametersLister } type resourceClaimParametersInformer struct { @@ -62,16 +62,16 @@ func NewFilteredResourceClaimParametersInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaimParameters(namespace).List(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClaimParameters(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaimParameters(namespace).Watch(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClaimParameters(namespace).Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClaimParameters{}, + &resourcev1alpha3.ResourceClaimParameters{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *resourceClaimParametersInformer) defaultInformer(client kubernetes.Inte } func (f *resourceClaimParametersInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimParameters{}, f.defaultInformer) + return f.factory.InformerFor(&resourcev1alpha3.ResourceClaimParameters{}, f.defaultInformer) } -func (f *resourceClaimParametersInformer) Lister() v1alpha2.ResourceClaimParametersLister { - return v1alpha2.NewResourceClaimParametersLister(f.Informer().GetIndexer()) +func (f *resourceClaimParametersInformer) Lister() v1alpha3.ResourceClaimParametersLister { + return v1alpha3.NewResourceClaimParametersLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimtemplate.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimtemplate.go similarity index 86% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimtemplate.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimtemplate.go index 13f4ad835cfbc..294755661cc0c 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclaimtemplate.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimtemplate.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" time "time" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // ResourceClaimTemplates. type ResourceClaimTemplateInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha2.ResourceClaimTemplateLister + Lister() v1alpha3.ResourceClaimTemplateLister } type resourceClaimTemplateInformer struct { @@ -62,16 +62,16 @@ func NewFilteredResourceClaimTemplateInformer(client kubernetes.Interface, names if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).List(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).Watch(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClaimTemplate{}, + &resourcev1alpha3.ResourceClaimTemplate{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interf } func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimTemplate{}, f.defaultInformer) + return f.factory.InformerFor(&resourcev1alpha3.ResourceClaimTemplate{}, f.defaultInformer) } -func (f *resourceClaimTemplateInformer) Lister() v1alpha2.ResourceClaimTemplateLister { - return v1alpha2.NewResourceClaimTemplateLister(f.Informer().GetIndexer()) +func (f *resourceClaimTemplateInformer) Lister() v1alpha3.ResourceClaimTemplateLister { + return v1alpha3.NewResourceClaimTemplateLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclass.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclass.go similarity index 85% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclass.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclass.go index cb76d78fe4978..f63141a70e041 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclass.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclass.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" time "time" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // ResourceClasses. type ResourceClassInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha2.ResourceClassLister + Lister() v1alpha3.ResourceClassLister } type resourceClassInformer struct { @@ -61,16 +61,16 @@ func NewFilteredResourceClassInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClasses().List(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClasses().Watch(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClasses().Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClass{}, + &resourcev1alpha3.ResourceClass{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *resourceClassInformer) defaultInformer(client kubernetes.Interface, res } func (f *resourceClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClass{}, f.defaultInformer) + return f.factory.InformerFor(&resourcev1alpha3.ResourceClass{}, f.defaultInformer) } -func (f *resourceClassInformer) Lister() v1alpha2.ResourceClassLister { - return v1alpha2.NewResourceClassLister(f.Informer().GetIndexer()) +func (f *resourceClassInformer) Lister() v1alpha3.ResourceClassLister { + return v1alpha3.NewResourceClassLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclassparameters.go similarity index 86% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclassparameters.go index 71fbefe162027..cb2172f5c0dab 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceclassparameters.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclassparameters.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" time "time" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // ResourceClassParameters. type ResourceClassParametersInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha2.ResourceClassParametersLister + Lister() v1alpha3.ResourceClassParametersLister } type resourceClassParametersInformer struct { @@ -62,16 +62,16 @@ func NewFilteredResourceClassParametersInformer(client kubernetes.Interface, nam if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClassParameters(namespace).List(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClassParameters(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClassParameters(namespace).Watch(context.TODO(), options) + return client.ResourceV1alpha3().ResourceClassParameters(namespace).Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClassParameters{}, + &resourcev1alpha3.ResourceClassParameters{}, resyncPeriod, indexers, ) @@ -82,9 +82,9 @@ func (f *resourceClassParametersInformer) defaultInformer(client kubernetes.Inte } func (f *resourceClassParametersInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClassParameters{}, f.defaultInformer) + return f.factory.InformerFor(&resourcev1alpha3.ResourceClassParameters{}, f.defaultInformer) } -func (f *resourceClassParametersInformer) Lister() v1alpha2.ResourceClassParametersLister { - return v1alpha2.NewResourceClassParametersLister(f.Informer().GetIndexer()) +func (f *resourceClassParametersInformer) Lister() v1alpha3.ResourceClassParametersLister { + return v1alpha3.NewResourceClassParametersLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceslice.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceslice.go similarity index 85% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceslice.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceslice.go index da9d2a0243ca7..108083530c50a 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha2/resourceslice.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceslice.go @@ -16,19 +16,19 @@ limitations under the License. // Code generated by informer-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" time "time" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" - v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) @@ -36,7 +36,7 @@ import ( // ResourceSlices. type ResourceSliceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha2.ResourceSliceLister + Lister() v1alpha3.ResourceSliceLister } type resourceSliceInformer struct { @@ -61,16 +61,16 @@ func NewFilteredResourceSliceInformer(client kubernetes.Interface, resyncPeriod if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceSlices().List(context.TODO(), options) + return client.ResourceV1alpha3().ResourceSlices().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceSlices().Watch(context.TODO(), options) + return client.ResourceV1alpha3().ResourceSlices().Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceSlice{}, + &resourcev1alpha3.ResourceSlice{}, resyncPeriod, indexers, ) @@ -81,9 +81,9 @@ func (f *resourceSliceInformer) defaultInformer(client kubernetes.Interface, res } func (f *resourceSliceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceSlice{}, f.defaultInformer) + return f.factory.InformerFor(&resourcev1alpha3.ResourceSlice{}, f.defaultInformer) } -func (f *resourceSliceInformer) Lister() v1alpha2.ResourceSliceLister { - return v1alpha2.NewResourceSliceLister(f.Informer().GetIndexer()) +func (f *resourceSliceInformer) Lister() v1alpha3.ResourceSliceLister { + return v1alpha3.NewResourceSliceLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/kubernetes/clientset.go b/staging/src/k8s.io/client-go/kubernetes/clientset.go index eaa206ff65d97..ce17f8ed8eab3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/clientset.go +++ b/staging/src/k8s.io/client-go/kubernetes/clientset.go @@ -67,7 +67,7 @@ import ( rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" - resourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" @@ -125,7 +125,7 @@ type Interface interface { RbacV1() rbacv1.RbacV1Interface RbacV1beta1() rbacv1beta1.RbacV1beta1Interface RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface - ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface + ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3Interface SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface SchedulingV1() schedulingv1.SchedulingV1Interface @@ -182,7 +182,7 @@ type Clientset struct { rbacV1 *rbacv1.RbacV1Client rbacV1beta1 *rbacv1beta1.RbacV1beta1Client rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client - resourceV1alpha2 *resourcev1alpha2.ResourceV1alpha2Client + resourceV1alpha3 *resourcev1alpha3.ResourceV1alpha3Client schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client schedulingV1 *schedulingv1.SchedulingV1Client @@ -412,9 +412,9 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { return c.rbacV1alpha1 } -// ResourceV1alpha2 retrieves the ResourceV1alpha2Client -func (c *Clientset) ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface { - return c.resourceV1alpha2 +// ResourceV1alpha3 retrieves the ResourceV1alpha3Client +func (c *Clientset) ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3Interface { + return c.resourceV1alpha3 } // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client @@ -672,7 +672,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } - cs.resourceV1alpha2, err = resourcev1alpha2.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.resourceV1alpha3, err = resourcev1alpha3.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -769,7 +769,7 @@ func New(c rest.Interface) *Clientset { cs.rbacV1 = rbacv1.New(c) cs.rbacV1beta1 = rbacv1beta1.New(c) cs.rbacV1alpha1 = rbacv1alpha1.New(c) - cs.resourceV1alpha2 = resourcev1alpha2.New(c) + cs.resourceV1alpha3 = resourcev1alpha3.New(c) cs.schedulingV1alpha1 = schedulingv1alpha1.New(c) cs.schedulingV1beta1 = schedulingv1beta1.New(c) cs.schedulingV1 = schedulingv1.New(c) diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go index 7808a94a2f48f..63f384b139c52 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/clientset_generated.go @@ -113,8 +113,8 @@ import ( fakerbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1/fake" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" fakerbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1/fake" - resourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" - fakeresourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake" + resourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" + fakeresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake" schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" fakeschedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1/fake" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" @@ -438,9 +438,9 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface { return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake} } -// ResourceV1alpha2 retrieves the ResourceV1alpha2Client -func (c *Clientset) ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface { - return &fakeresourcev1alpha2.FakeResourceV1alpha2{Fake: &c.Fake} +// ResourceV1alpha3 retrieves the ResourceV1alpha3Client +func (c *Clientset) ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3Interface { + return &fakeresourcev1alpha3.FakeResourceV1alpha3{Fake: &c.Fake} } // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client diff --git a/staging/src/k8s.io/client-go/kubernetes/fake/register.go b/staging/src/k8s.io/client-go/kubernetes/fake/register.go index 339983fe0afa6..2cd83ecb57763 100644 --- a/staging/src/k8s.io/client-go/kubernetes/fake/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/fake/register.go @@ -63,7 +63,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -126,7 +126,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ rbacv1.AddToScheme, rbacv1beta1.AddToScheme, rbacv1alpha1.AddToScheme, - resourcev1alpha2.AddToScheme, + resourcev1alpha3.AddToScheme, schedulingv1alpha1.AddToScheme, schedulingv1beta1.AddToScheme, schedulingv1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go index 8ebfb7cea568c..1b15a4f247c10 100644 --- a/staging/src/k8s.io/client-go/kubernetes/scheme/register.go +++ b/staging/src/k8s.io/client-go/kubernetes/scheme/register.go @@ -63,7 +63,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" @@ -126,7 +126,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ rbacv1.AddToScheme, rbacv1beta1.AddToScheme, rbacv1alpha1.AddToScheme, - resourcev1alpha2.AddToScheme, + resourcev1alpha3.AddToScheme, schedulingv1alpha1.AddToScheme, schedulingv1beta1.AddToScheme, schedulingv1.AddToScheme, diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/doc.go similarity index 97% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/doc.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/doc.go index baaf2d9853708..fdb23fd37c260 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/doc.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha2 +package v1alpha3 diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/doc.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/doc.go similarity index 100% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/doc.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/doc.go diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_podschedulingcontext.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_podschedulingcontext.go similarity index 74% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_podschedulingcontext.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_podschedulingcontext.go index b208415522a2f..54898993e5d29 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_podschedulingcontext.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_podschedulingcontext.go @@ -23,40 +23,40 @@ import ( json "encoding/json" "fmt" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" testing "k8s.io/client-go/testing" ) // FakePodSchedulingContexts implements PodSchedulingContextInterface type FakePodSchedulingContexts struct { - Fake *FakeResourceV1alpha2 + Fake *FakeResourceV1alpha3 ns string } -var podschedulingcontextsResource = v1alpha2.SchemeGroupVersion.WithResource("podschedulingcontexts") +var podschedulingcontextsResource = v1alpha3.SchemeGroupVersion.WithResource("podschedulingcontexts") -var podschedulingcontextsKind = v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingContext") +var podschedulingcontextsKind = v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContext") // Get takes name of the podSchedulingContext, and returns the corresponding podSchedulingContext object, and an error if there is any. -func (c *FakePodSchedulingContexts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodSchedulingContext, err error) { - emptyResult := &v1alpha2.PodSchedulingContext{} +func (c *FakePodSchedulingContexts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.PodSchedulingContext, err error) { + emptyResult := &v1alpha3.PodSchedulingContext{} obj, err := c.Fake. Invokes(testing.NewGetActionWithOptions(podschedulingcontextsResource, c.ns, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.PodSchedulingContext), err + return obj.(*v1alpha3.PodSchedulingContext), err } // List takes label and field selectors, and returns the list of PodSchedulingContexts that match those selectors. -func (c *FakePodSchedulingContexts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingContextList, err error) { - emptyResult := &v1alpha2.PodSchedulingContextList{} +func (c *FakePodSchedulingContexts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.PodSchedulingContextList, err error) { + emptyResult := &v1alpha3.PodSchedulingContextList{} obj, err := c.Fake. Invokes(testing.NewListActionWithOptions(podschedulingcontextsResource, podschedulingcontextsKind, c.ns, opts), emptyResult) @@ -68,8 +68,8 @@ func (c *FakePodSchedulingContexts) List(ctx context.Context, opts v1.ListOption if label == nil { label = labels.Everything() } - list := &v1alpha2.PodSchedulingContextList{ListMeta: obj.(*v1alpha2.PodSchedulingContextList).ListMeta} - for _, item := range obj.(*v1alpha2.PodSchedulingContextList).Items { + list := &v1alpha3.PodSchedulingContextList{ListMeta: obj.(*v1alpha3.PodSchedulingContextList).ListMeta} + for _, item := range obj.(*v1alpha3.PodSchedulingContextList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -85,46 +85,46 @@ func (c *FakePodSchedulingContexts) Watch(ctx context.Context, opts v1.ListOptio } // Create takes the representation of a podSchedulingContext and creates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any. -func (c *FakePodSchedulingContexts) Create(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.CreateOptions) (result *v1alpha2.PodSchedulingContext, err error) { - emptyResult := &v1alpha2.PodSchedulingContext{} +func (c *FakePodSchedulingContexts) Create(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.CreateOptions) (result *v1alpha3.PodSchedulingContext, err error) { + emptyResult := &v1alpha3.PodSchedulingContext{} obj, err := c.Fake. Invokes(testing.NewCreateActionWithOptions(podschedulingcontextsResource, c.ns, podSchedulingContext, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.PodSchedulingContext), err + return obj.(*v1alpha3.PodSchedulingContext), err } // Update takes the representation of a podSchedulingContext and updates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any. -func (c *FakePodSchedulingContexts) Update(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha2.PodSchedulingContext, err error) { - emptyResult := &v1alpha2.PodSchedulingContext{} +func (c *FakePodSchedulingContexts) Update(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha3.PodSchedulingContext, err error) { + emptyResult := &v1alpha3.PodSchedulingContext{} obj, err := c.Fake. Invokes(testing.NewUpdateActionWithOptions(podschedulingcontextsResource, c.ns, podSchedulingContext, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.PodSchedulingContext), err + return obj.(*v1alpha3.PodSchedulingContext), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakePodSchedulingContexts) UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha2.PodSchedulingContext, err error) { - emptyResult := &v1alpha2.PodSchedulingContext{} +func (c *FakePodSchedulingContexts) UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha3.PodSchedulingContext, err error) { + emptyResult := &v1alpha3.PodSchedulingContext{} obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceActionWithOptions(podschedulingcontextsResource, "status", c.ns, podSchedulingContext, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.PodSchedulingContext), err + return obj.(*v1alpha3.PodSchedulingContext), err } // Delete takes name of the podSchedulingContext and deletes it. Returns an error if one occurs. func (c *FakePodSchedulingContexts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(podschedulingcontextsResource, c.ns, name, opts), &v1alpha2.PodSchedulingContext{}) + Invokes(testing.NewDeleteActionWithOptions(podschedulingcontextsResource, c.ns, name, opts), &v1alpha3.PodSchedulingContext{}) return err } @@ -133,24 +133,24 @@ func (c *FakePodSchedulingContexts) Delete(ctx context.Context, name string, opt func (c *FakePodSchedulingContexts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionActionWithOptions(podschedulingcontextsResource, c.ns, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha2.PodSchedulingContextList{}) + _, err := c.Fake.Invokes(action, &v1alpha3.PodSchedulingContextList{}) return err } // Patch applies the patch and returns the patched podSchedulingContext. -func (c *FakePodSchedulingContexts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodSchedulingContext, err error) { - emptyResult := &v1alpha2.PodSchedulingContext{} +func (c *FakePodSchedulingContexts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.PodSchedulingContext, err error) { + emptyResult := &v1alpha3.PodSchedulingContext{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(podschedulingcontextsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.PodSchedulingContext), err + return obj.(*v1alpha3.PodSchedulingContext), err } // Apply takes the given apply declarative configuration, applies it and returns the applied podSchedulingContext. -func (c *FakePodSchedulingContexts) Apply(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) { +func (c *FakePodSchedulingContexts) Apply(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.PodSchedulingContext, err error) { if podSchedulingContext == nil { return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil") } @@ -162,19 +162,19 @@ func (c *FakePodSchedulingContexts) Apply(ctx context.Context, podSchedulingCont if name == nil { return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply") } - emptyResult := &v1alpha2.PodSchedulingContext{} + emptyResult := &v1alpha3.PodSchedulingContext{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(podschedulingcontextsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.PodSchedulingContext), err + return obj.(*v1alpha3.PodSchedulingContext), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakePodSchedulingContexts) ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) { +func (c *FakePodSchedulingContexts) ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.PodSchedulingContext, err error) { if podSchedulingContext == nil { return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil") } @@ -186,12 +186,12 @@ func (c *FakePodSchedulingContexts) ApplyStatus(ctx context.Context, podScheduli if name == nil { return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply") } - emptyResult := &v1alpha2.PodSchedulingContext{} + emptyResult := &v1alpha3.PodSchedulingContext{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(podschedulingcontextsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.PodSchedulingContext), err + return obj.(*v1alpha3.PodSchedulingContext), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resource_client.go similarity index 59% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resource_client.go index 6f69d0fa795a0..d01b28c66a27e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resource_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resource_client.go @@ -19,46 +19,46 @@ limitations under the License. package fake import ( - v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + v1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeResourceV1alpha2 struct { +type FakeResourceV1alpha3 struct { *testing.Fake } -func (c *FakeResourceV1alpha2) PodSchedulingContexts(namespace string) v1alpha2.PodSchedulingContextInterface { +func (c *FakeResourceV1alpha3) PodSchedulingContexts(namespace string) v1alpha3.PodSchedulingContextInterface { return &FakePodSchedulingContexts{c, namespace} } -func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.ResourceClaimInterface { +func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.ResourceClaimInterface { return &FakeResourceClaims{c, namespace} } -func (c *FakeResourceV1alpha2) ResourceClaimParameters(namespace string) v1alpha2.ResourceClaimParametersInterface { +func (c *FakeResourceV1alpha3) ResourceClaimParameters(namespace string) v1alpha3.ResourceClaimParametersInterface { return &FakeResourceClaimParameters{c, namespace} } -func (c *FakeResourceV1alpha2) ResourceClaimTemplates(namespace string) v1alpha2.ResourceClaimTemplateInterface { +func (c *FakeResourceV1alpha3) ResourceClaimTemplates(namespace string) v1alpha3.ResourceClaimTemplateInterface { return &FakeResourceClaimTemplates{c, namespace} } -func (c *FakeResourceV1alpha2) ResourceClasses() v1alpha2.ResourceClassInterface { +func (c *FakeResourceV1alpha3) ResourceClasses() v1alpha3.ResourceClassInterface { return &FakeResourceClasses{c} } -func (c *FakeResourceV1alpha2) ResourceClassParameters(namespace string) v1alpha2.ResourceClassParametersInterface { +func (c *FakeResourceV1alpha3) ResourceClassParameters(namespace string) v1alpha3.ResourceClassParametersInterface { return &FakeResourceClassParameters{c, namespace} } -func (c *FakeResourceV1alpha2) ResourceSlices() v1alpha2.ResourceSliceInterface { +func (c *FakeResourceV1alpha3) ResourceSlices() v1alpha3.ResourceSliceInterface { return &FakeResourceSlices{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeResourceV1alpha2) RESTClient() rest.Interface { +func (c *FakeResourceV1alpha3) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaim.go similarity index 75% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaim.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaim.go index f0d028ba27014..db38b3d60c751 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaim.go @@ -23,40 +23,40 @@ import ( json "encoding/json" "fmt" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" testing "k8s.io/client-go/testing" ) // FakeResourceClaims implements ResourceClaimInterface type FakeResourceClaims struct { - Fake *FakeResourceV1alpha2 + Fake *FakeResourceV1alpha3 ns string } -var resourceclaimsResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaims") +var resourceclaimsResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclaims") -var resourceclaimsKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaim") +var resourceclaimsKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim") // Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any. -func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaim, err error) { - emptyResult := &v1alpha2.ResourceClaim{} +func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClaim, err error) { + emptyResult := &v1alpha3.ResourceClaim{} obj, err := c.Fake. Invokes(testing.NewGetActionWithOptions(resourceclaimsResource, c.ns, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaim), err + return obj.(*v1alpha3.ResourceClaim), err } // List takes label and field selectors, and returns the list of ResourceClaims that match those selectors. -func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimList, err error) { - emptyResult := &v1alpha2.ResourceClaimList{} +func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClaimList, err error) { + emptyResult := &v1alpha3.ResourceClaimList{} obj, err := c.Fake. Invokes(testing.NewListActionWithOptions(resourceclaimsResource, resourceclaimsKind, c.ns, opts), emptyResult) @@ -68,8 +68,8 @@ func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (res if label == nil { label = labels.Everything() } - list := &v1alpha2.ResourceClaimList{ListMeta: obj.(*v1alpha2.ResourceClaimList).ListMeta} - for _, item := range obj.(*v1alpha2.ResourceClaimList).Items { + list := &v1alpha3.ResourceClaimList{ListMeta: obj.(*v1alpha3.ResourceClaimList).ListMeta} + for _, item := range obj.(*v1alpha3.ResourceClaimList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -85,46 +85,46 @@ func (c *FakeResourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a resourceClaim and creates it. Returns the server's representation of the resourceClaim, and an error, if there is any. -func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.CreateOptions) (result *v1alpha2.ResourceClaim, err error) { - emptyResult := &v1alpha2.ResourceClaim{} +func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.CreateOptions) (result *v1alpha3.ResourceClaim, err error) { + emptyResult := &v1alpha3.ResourceClaim{} obj, err := c.Fake. Invokes(testing.NewCreateActionWithOptions(resourceclaimsResource, c.ns, resourceClaim, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaim), err + return obj.(*v1alpha3.ResourceClaim), err } // Update takes the representation of a resourceClaim and updates it. Returns the server's representation of the resourceClaim, and an error, if there is any. -func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) { - emptyResult := &v1alpha2.ResourceClaim{} +func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha3.ResourceClaim, err error) { + emptyResult := &v1alpha3.ResourceClaim{} obj, err := c.Fake. Invokes(testing.NewUpdateActionWithOptions(resourceclaimsResource, c.ns, resourceClaim, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaim), err + return obj.(*v1alpha3.ResourceClaim), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) { - emptyResult := &v1alpha2.ResourceClaim{} +func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha3.ResourceClaim, err error) { + emptyResult := &v1alpha3.ResourceClaim{} obj, err := c.Fake. Invokes(testing.NewUpdateSubresourceActionWithOptions(resourceclaimsResource, "status", c.ns, resourceClaim, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaim), err + return obj.(*v1alpha3.ResourceClaim), err } // Delete takes name of the resourceClaim and deletes it. Returns an error if one occurs. func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1alpha2.ResourceClaim{}) + Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1alpha3.ResourceClaim{}) return err } @@ -133,24 +133,24 @@ func (c *FakeResourceClaims) Delete(ctx context.Context, name string, opts v1.De func (c *FakeResourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionActionWithOptions(resourceclaimsResource, c.ns, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimList{}) + _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClaimList{}) return err } // Patch applies the patch and returns the patched resourceClaim. -func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaim, err error) { - emptyResult := &v1alpha2.ResourceClaim{} +func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaim, err error) { + emptyResult := &v1alpha3.ResourceClaim{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaim), err + return obj.(*v1alpha3.ResourceClaim), err } // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim. -func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) { +func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaim, err error) { if resourceClaim == nil { return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") } @@ -162,19 +162,19 @@ func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev if name == nil { return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") } - emptyResult := &v1alpha2.ResourceClaim{} + emptyResult := &v1alpha3.ResourceClaim{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaim), err + return obj.(*v1alpha3.ResourceClaim), err } // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) { +func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaim, err error) { if resourceClaim == nil { return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil") } @@ -186,12 +186,12 @@ func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *res if name == nil { return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply") } - emptyResult := &v1alpha2.ResourceClaim{} + emptyResult := &v1alpha3.ResourceClaim{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaim), err + return obj.(*v1alpha3.ResourceClaim), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimparameters.go similarity index 75% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimparameters.go index e141835ac0e69..1f646101e5745 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimparameters.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimparameters.go @@ -23,40 +23,40 @@ import ( json "encoding/json" "fmt" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" testing "k8s.io/client-go/testing" ) // FakeResourceClaimParameters implements ResourceClaimParametersInterface type FakeResourceClaimParameters struct { - Fake *FakeResourceV1alpha2 + Fake *FakeResourceV1alpha3 ns string } -var resourceclaimparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters") +var resourceclaimparametersResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclaimparameters") -var resourceclaimparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParameters") +var resourceclaimparametersKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParameters") // Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any. -func (c *FakeResourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimParameters, err error) { - emptyResult := &v1alpha2.ResourceClaimParameters{} +func (c *FakeResourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClaimParameters, err error) { + emptyResult := &v1alpha3.ResourceClaimParameters{} obj, err := c.Fake. Invokes(testing.NewGetActionWithOptions(resourceclaimparametersResource, c.ns, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimParameters), err + return obj.(*v1alpha3.ResourceClaimParameters), err } // List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. -func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimParametersList, err error) { - emptyResult := &v1alpha2.ResourceClaimParametersList{} +func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClaimParametersList, err error) { + emptyResult := &v1alpha3.ResourceClaimParametersList{} obj, err := c.Fake. Invokes(testing.NewListActionWithOptions(resourceclaimparametersResource, resourceclaimparametersKind, c.ns, opts), emptyResult) @@ -68,8 +68,8 @@ func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOpti if label == nil { label = labels.Everything() } - list := &v1alpha2.ResourceClaimParametersList{ListMeta: obj.(*v1alpha2.ResourceClaimParametersList).ListMeta} - for _, item := range obj.(*v1alpha2.ResourceClaimParametersList).Items { + list := &v1alpha3.ResourceClaimParametersList{ListMeta: obj.(*v1alpha3.ResourceClaimParametersList).ListMeta} + for _, item := range obj.(*v1alpha3.ResourceClaimParametersList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -85,33 +85,33 @@ func (c *FakeResourceClaimParameters) Watch(ctx context.Context, opts v1.ListOpt } // Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. -func (c *FakeResourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { - emptyResult := &v1alpha2.ResourceClaimParameters{} +func (c *FakeResourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha3.ResourceClaimParameters, err error) { + emptyResult := &v1alpha3.ResourceClaimParameters{} obj, err := c.Fake. Invokes(testing.NewCreateActionWithOptions(resourceclaimparametersResource, c.ns, resourceClaimParameters, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimParameters), err + return obj.(*v1alpha3.ResourceClaimParameters), err } // Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. -func (c *FakeResourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimParameters, err error) { - emptyResult := &v1alpha2.ResourceClaimParameters{} +func (c *FakeResourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha3.ResourceClaimParameters, err error) { + emptyResult := &v1alpha3.ResourceClaimParameters{} obj, err := c.Fake. Invokes(testing.NewUpdateActionWithOptions(resourceclaimparametersResource, c.ns, resourceClaimParameters, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimParameters), err + return obj.(*v1alpha3.ResourceClaimParameters), err } // Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs. func (c *FakeResourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(resourceclaimparametersResource, c.ns, name, opts), &v1alpha2.ResourceClaimParameters{}) + Invokes(testing.NewDeleteActionWithOptions(resourceclaimparametersResource, c.ns, name, opts), &v1alpha3.ResourceClaimParameters{}) return err } @@ -120,24 +120,24 @@ func (c *FakeResourceClaimParameters) Delete(ctx context.Context, name string, o func (c *FakeResourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionActionWithOptions(resourceclaimparametersResource, c.ns, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimParametersList{}) + _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClaimParametersList{}) return err } // Patch applies the patch and returns the patched resourceClaimParameters. -func (c *FakeResourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) { - emptyResult := &v1alpha2.ResourceClaimParameters{} +func (c *FakeResourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimParameters, err error) { + emptyResult := &v1alpha3.ResourceClaimParameters{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimparametersResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimParameters), err + return obj.(*v1alpha3.ResourceClaimParameters), err } // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters. -func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) { +func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha3.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimParameters, err error) { if resourceClaimParameters == nil { return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil") } @@ -149,12 +149,12 @@ func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimPa if name == nil { return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply") } - emptyResult := &v1alpha2.ResourceClaimParameters{} + emptyResult := &v1alpha3.ResourceClaimParameters{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimparametersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimParameters), err + return obj.(*v1alpha3.ResourceClaimParameters), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimtemplate.go similarity index 75% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimtemplate.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimtemplate.go index f3bca1991bbd9..28db7261f936e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclaimtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimtemplate.go @@ -23,40 +23,40 @@ import ( json "encoding/json" "fmt" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" testing "k8s.io/client-go/testing" ) // FakeResourceClaimTemplates implements ResourceClaimTemplateInterface type FakeResourceClaimTemplates struct { - Fake *FakeResourceV1alpha2 + Fake *FakeResourceV1alpha3 ns string } -var resourceclaimtemplatesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates") +var resourceclaimtemplatesResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates") -var resourceclaimtemplatesKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplate") +var resourceclaimtemplatesKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplate") // Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any. -func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimTemplate, err error) { - emptyResult := &v1alpha2.ResourceClaimTemplate{} +func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClaimTemplate, err error) { + emptyResult := &v1alpha3.ResourceClaimTemplate{} obj, err := c.Fake. Invokes(testing.NewGetActionWithOptions(resourceclaimtemplatesResource, c.ns, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimTemplate), err + return obj.(*v1alpha3.ResourceClaimTemplate), err } // List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors. -func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimTemplateList, err error) { - emptyResult := &v1alpha2.ResourceClaimTemplateList{} +func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClaimTemplateList, err error) { + emptyResult := &v1alpha3.ResourceClaimTemplateList{} obj, err := c.Fake. Invokes(testing.NewListActionWithOptions(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), emptyResult) @@ -68,8 +68,8 @@ func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptio if label == nil { label = labels.Everything() } - list := &v1alpha2.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha2.ResourceClaimTemplateList).ListMeta} - for _, item := range obj.(*v1alpha2.ResourceClaimTemplateList).Items { + list := &v1alpha3.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha3.ResourceClaimTemplateList).ListMeta} + for _, item := range obj.(*v1alpha3.ResourceClaimTemplateList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -85,33 +85,33 @@ func (c *FakeResourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOpti } // Create takes the representation of a resourceClaimTemplate and creates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. -func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) { - emptyResult := &v1alpha2.ResourceClaimTemplate{} +func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha3.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha3.ResourceClaimTemplate, err error) { + emptyResult := &v1alpha3.ResourceClaimTemplate{} obj, err := c.Fake. Invokes(testing.NewCreateActionWithOptions(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimTemplate), err + return obj.(*v1alpha3.ResourceClaimTemplate), err } // Update takes the representation of a resourceClaimTemplate and updates it. Returns the server's representation of the resourceClaimTemplate, and an error, if there is any. -func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) { - emptyResult := &v1alpha2.ResourceClaimTemplate{} +func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha3.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha3.ResourceClaimTemplate, err error) { + emptyResult := &v1alpha3.ResourceClaimTemplate{} obj, err := c.Fake. Invokes(testing.NewUpdateActionWithOptions(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimTemplate), err + return obj.(*v1alpha3.ResourceClaimTemplate), err } // Delete takes name of the resourceClaimTemplate and deletes it. Returns an error if one occurs. func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1alpha2.ResourceClaimTemplate{}) + Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1alpha3.ResourceClaimTemplate{}) return err } @@ -120,24 +120,24 @@ func (c *FakeResourceClaimTemplates) Delete(ctx context.Context, name string, op func (c *FakeResourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionActionWithOptions(resourceclaimtemplatesResource, c.ns, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClaimTemplateList{}) + _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClaimTemplateList{}) return err } // Patch applies the patch and returns the patched resourceClaimTemplate. -func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimTemplate, err error) { - emptyResult := &v1alpha2.ResourceClaimTemplate{} +func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimTemplate, err error) { + emptyResult := &v1alpha3.ResourceClaimTemplate{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimtemplatesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimTemplate), err + return obj.(*v1alpha3.ResourceClaimTemplate), err } // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate. -func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimTemplate, err error) { +func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimTemplate, err error) { if resourceClaimTemplate == nil { return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil") } @@ -149,12 +149,12 @@ func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTem if name == nil { return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply") } - emptyResult := &v1alpha2.ResourceClaimTemplate{} + emptyResult := &v1alpha3.ResourceClaimTemplate{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClaimTemplate), err + return obj.(*v1alpha3.ResourceClaimTemplate), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclass.go similarity index 76% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclass.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclass.go index 660f7c7f1dda5..7de19088651c3 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclass.go @@ -23,38 +23,38 @@ import ( json "encoding/json" "fmt" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" testing "k8s.io/client-go/testing" ) // FakeResourceClasses implements ResourceClassInterface type FakeResourceClasses struct { - Fake *FakeResourceV1alpha2 + Fake *FakeResourceV1alpha3 } -var resourceclassesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclasses") +var resourceclassesResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclasses") -var resourceclassesKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClass") +var resourceclassesKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClass") // Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any. -func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClass, err error) { - emptyResult := &v1alpha2.ResourceClass{} +func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClass, err error) { + emptyResult := &v1alpha3.ResourceClass{} obj, err := c.Fake. Invokes(testing.NewRootGetActionWithOptions(resourceclassesResource, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClass), err + return obj.(*v1alpha3.ResourceClass), err } // List takes label and field selectors, and returns the list of ResourceClasses that match those selectors. -func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassList, err error) { - emptyResult := &v1alpha2.ResourceClassList{} +func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClassList, err error) { + emptyResult := &v1alpha3.ResourceClassList{} obj, err := c.Fake. Invokes(testing.NewRootListActionWithOptions(resourceclassesResource, resourceclassesKind, opts), emptyResult) if obj == nil { @@ -65,8 +65,8 @@ func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (re if label == nil { label = labels.Everything() } - list := &v1alpha2.ResourceClassList{ListMeta: obj.(*v1alpha2.ResourceClassList).ListMeta} - for _, item := range obj.(*v1alpha2.ResourceClassList).Items { + list := &v1alpha3.ResourceClassList{ListMeta: obj.(*v1alpha3.ResourceClassList).ListMeta} + for _, item := range obj.(*v1alpha3.ResourceClassList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -81,31 +81,31 @@ func (c *FakeResourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (w } // Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any. -func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.CreateOptions) (result *v1alpha2.ResourceClass, err error) { - emptyResult := &v1alpha2.ResourceClass{} +func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.CreateOptions) (result *v1alpha3.ResourceClass, err error) { + emptyResult := &v1alpha3.ResourceClass{} obj, err := c.Fake. Invokes(testing.NewRootCreateActionWithOptions(resourceclassesResource, resourceClass, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClass), err + return obj.(*v1alpha3.ResourceClass), err } // Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any. -func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.UpdateOptions) (result *v1alpha2.ResourceClass, err error) { - emptyResult := &v1alpha2.ResourceClass{} +func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.UpdateOptions) (result *v1alpha3.ResourceClass, err error) { + emptyResult := &v1alpha3.ResourceClass{} obj, err := c.Fake. Invokes(testing.NewRootUpdateActionWithOptions(resourceclassesResource, resourceClass, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClass), err + return obj.(*v1alpha3.ResourceClass), err } // Delete takes name of the resourceClass and deletes it. Returns an error if one occurs. func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha2.ResourceClass{}) + Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha3.ResourceClass{}) return err } @@ -113,23 +113,23 @@ func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.D func (c *FakeResourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionActionWithOptions(resourceclassesResource, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClassList{}) + _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClassList{}) return err } // Patch applies the patch and returns the patched resourceClass. -func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClass, err error) { - emptyResult := &v1alpha2.ResourceClass{} +func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClass, err error) { + emptyResult := &v1alpha3.ResourceClass{} obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceclassesResource, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClass), err + return obj.(*v1alpha3.ResourceClass), err } // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass. -func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha2.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClass, err error) { +func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha3.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClass, err error) { if resourceClass == nil { return nil, fmt.Errorf("resourceClass provided to Apply must not be nil") } @@ -141,11 +141,11 @@ func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resource if name == nil { return nil, fmt.Errorf("resourceClass.Name must be provided to Apply") } - emptyResult := &v1alpha2.ResourceClass{} + emptyResult := &v1alpha3.ResourceClass{} obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClass), err + return obj.(*v1alpha3.ResourceClass), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclassparameters.go similarity index 75% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclassparameters.go index b58eedeca86ce..c61412de5342c 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceclassparameters.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclassparameters.go @@ -23,40 +23,40 @@ import ( json "encoding/json" "fmt" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" testing "k8s.io/client-go/testing" ) // FakeResourceClassParameters implements ResourceClassParametersInterface type FakeResourceClassParameters struct { - Fake *FakeResourceV1alpha2 + Fake *FakeResourceV1alpha3 ns string } -var resourceclassparametersResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters") +var resourceclassparametersResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclassparameters") -var resourceclassparametersKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParameters") +var resourceclassparametersKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParameters") // Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any. -func (c *FakeResourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClassParameters, err error) { - emptyResult := &v1alpha2.ResourceClassParameters{} +func (c *FakeResourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClassParameters, err error) { + emptyResult := &v1alpha3.ResourceClassParameters{} obj, err := c.Fake. Invokes(testing.NewGetActionWithOptions(resourceclassparametersResource, c.ns, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClassParameters), err + return obj.(*v1alpha3.ResourceClassParameters), err } // List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. -func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassParametersList, err error) { - emptyResult := &v1alpha2.ResourceClassParametersList{} +func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClassParametersList, err error) { + emptyResult := &v1alpha3.ResourceClassParametersList{} obj, err := c.Fake. Invokes(testing.NewListActionWithOptions(resourceclassparametersResource, resourceclassparametersKind, c.ns, opts), emptyResult) @@ -68,8 +68,8 @@ func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOpti if label == nil { label = labels.Everything() } - list := &v1alpha2.ResourceClassParametersList{ListMeta: obj.(*v1alpha2.ResourceClassParametersList).ListMeta} - for _, item := range obj.(*v1alpha2.ResourceClassParametersList).Items { + list := &v1alpha3.ResourceClassParametersList{ListMeta: obj.(*v1alpha3.ResourceClassParametersList).ListMeta} + for _, item := range obj.(*v1alpha3.ResourceClassParametersList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -85,33 +85,33 @@ func (c *FakeResourceClassParameters) Watch(ctx context.Context, opts v1.ListOpt } // Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. -func (c *FakeResourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha2.ResourceClassParameters, err error) { - emptyResult := &v1alpha2.ResourceClassParameters{} +func (c *FakeResourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha3.ResourceClassParameters, err error) { + emptyResult := &v1alpha3.ResourceClassParameters{} obj, err := c.Fake. Invokes(testing.NewCreateActionWithOptions(resourceclassparametersResource, c.ns, resourceClassParameters, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClassParameters), err + return obj.(*v1alpha3.ResourceClassParameters), err } // Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. -func (c *FakeResourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha2.ResourceClassParameters, err error) { - emptyResult := &v1alpha2.ResourceClassParameters{} +func (c *FakeResourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha3.ResourceClassParameters, err error) { + emptyResult := &v1alpha3.ResourceClassParameters{} obj, err := c.Fake. Invokes(testing.NewUpdateActionWithOptions(resourceclassparametersResource, c.ns, resourceClassParameters, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClassParameters), err + return obj.(*v1alpha3.ResourceClassParameters), err } // Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs. func (c *FakeResourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(resourceclassparametersResource, c.ns, name, opts), &v1alpha2.ResourceClassParameters{}) + Invokes(testing.NewDeleteActionWithOptions(resourceclassparametersResource, c.ns, name, opts), &v1alpha3.ResourceClassParameters{}) return err } @@ -120,24 +120,24 @@ func (c *FakeResourceClassParameters) Delete(ctx context.Context, name string, o func (c *FakeResourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewDeleteCollectionActionWithOptions(resourceclassparametersResource, c.ns, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha2.ResourceClassParametersList{}) + _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClassParametersList{}) return err } // Patch applies the patch and returns the patched resourceClassParameters. -func (c *FakeResourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) { - emptyResult := &v1alpha2.ResourceClassParameters{} +func (c *FakeResourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClassParameters, err error) { + emptyResult := &v1alpha3.ResourceClassParameters{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclassparametersResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClassParameters), err + return obj.(*v1alpha3.ResourceClassParameters), err } // Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters. -func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) { +func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha3.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClassParameters, err error) { if resourceClassParameters == nil { return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil") } @@ -149,12 +149,12 @@ func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassPa if name == nil { return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply") } - emptyResult := &v1alpha2.ResourceClassParameters{} + emptyResult := &v1alpha3.ResourceClassParameters{} obj, err := c.Fake. Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclassparametersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceClassParameters), err + return obj.(*v1alpha3.ResourceClassParameters), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceslice.go similarity index 75% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceslice.go index 7890e8af49bba..c355fc454aa06 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/fake/fake_resourceslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceslice.go @@ -23,38 +23,38 @@ import ( json "encoding/json" "fmt" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" testing "k8s.io/client-go/testing" ) // FakeResourceSlices implements ResourceSliceInterface type FakeResourceSlices struct { - Fake *FakeResourceV1alpha2 + Fake *FakeResourceV1alpha3 } -var resourceslicesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceslices") +var resourceslicesResource = v1alpha3.SchemeGroupVersion.WithResource("resourceslices") -var resourceslicesKind = v1alpha2.SchemeGroupVersion.WithKind("ResourceSlice") +var resourceslicesKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceSlice") // Get takes name of the resourceSlice, and returns the corresponding resourceSlice object, and an error if there is any. -func (c *FakeResourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceSlice, err error) { - emptyResult := &v1alpha2.ResourceSlice{} +func (c *FakeResourceSlices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceSlice, err error) { + emptyResult := &v1alpha3.ResourceSlice{} obj, err := c.Fake. Invokes(testing.NewRootGetActionWithOptions(resourceslicesResource, name, options), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceSlice), err + return obj.(*v1alpha3.ResourceSlice), err } // List takes label and field selectors, and returns the list of ResourceSlices that match those selectors. -func (c *FakeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceSliceList, err error) { - emptyResult := &v1alpha2.ResourceSliceList{} +func (c *FakeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceSliceList, err error) { + emptyResult := &v1alpha3.ResourceSliceList{} obj, err := c.Fake. Invokes(testing.NewRootListActionWithOptions(resourceslicesResource, resourceslicesKind, opts), emptyResult) if obj == nil { @@ -65,8 +65,8 @@ func (c *FakeResourceSlices) List(ctx context.Context, opts v1.ListOptions) (res if label == nil { label = labels.Everything() } - list := &v1alpha2.ResourceSliceList{ListMeta: obj.(*v1alpha2.ResourceSliceList).ListMeta} - for _, item := range obj.(*v1alpha2.ResourceSliceList).Items { + list := &v1alpha3.ResourceSliceList{ListMeta: obj.(*v1alpha3.ResourceSliceList).ListMeta} + for _, item := range obj.(*v1alpha3.ResourceSliceList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -81,31 +81,31 @@ func (c *FakeResourceSlices) Watch(ctx context.Context, opts v1.ListOptions) (wa } // Create takes the representation of a resourceSlice and creates it. Returns the server's representation of the resourceSlice, and an error, if there is any. -func (c *FakeResourceSlices) Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (result *v1alpha2.ResourceSlice, err error) { - emptyResult := &v1alpha2.ResourceSlice{} +func (c *FakeResourceSlices) Create(ctx context.Context, resourceSlice *v1alpha3.ResourceSlice, opts v1.CreateOptions) (result *v1alpha3.ResourceSlice, err error) { + emptyResult := &v1alpha3.ResourceSlice{} obj, err := c.Fake. Invokes(testing.NewRootCreateActionWithOptions(resourceslicesResource, resourceSlice, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceSlice), err + return obj.(*v1alpha3.ResourceSlice), err } // Update takes the representation of a resourceSlice and updates it. Returns the server's representation of the resourceSlice, and an error, if there is any. -func (c *FakeResourceSlices) Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (result *v1alpha2.ResourceSlice, err error) { - emptyResult := &v1alpha2.ResourceSlice{} +func (c *FakeResourceSlices) Update(ctx context.Context, resourceSlice *v1alpha3.ResourceSlice, opts v1.UpdateOptions) (result *v1alpha3.ResourceSlice, err error) { + emptyResult := &v1alpha3.ResourceSlice{} obj, err := c.Fake. Invokes(testing.NewRootUpdateActionWithOptions(resourceslicesResource, resourceSlice, opts), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceSlice), err + return obj.(*v1alpha3.ResourceSlice), err } // Delete takes name of the resourceSlice and deletes it. Returns an error if one occurs. func (c *FakeResourceSlices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(resourceslicesResource, name, opts), &v1alpha2.ResourceSlice{}) + Invokes(testing.NewRootDeleteActionWithOptions(resourceslicesResource, name, opts), &v1alpha3.ResourceSlice{}) return err } @@ -113,23 +113,23 @@ func (c *FakeResourceSlices) Delete(ctx context.Context, name string, opts v1.De func (c *FakeResourceSlices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { action := testing.NewRootDeleteCollectionActionWithOptions(resourceslicesResource, opts, listOpts) - _, err := c.Fake.Invokes(action, &v1alpha2.ResourceSliceList{}) + _, err := c.Fake.Invokes(action, &v1alpha3.ResourceSliceList{}) return err } // Patch applies the patch and returns the patched resourceSlice. -func (c *FakeResourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) { - emptyResult := &v1alpha2.ResourceSlice{} +func (c *FakeResourceSlices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceSlice, err error) { + emptyResult := &v1alpha3.ResourceSlice{} obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceslicesResource, name, pt, data, opts, subresources...), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceSlice), err + return obj.(*v1alpha3.ResourceSlice), err } // Apply takes the given apply declarative configuration, applies it and returns the applied resourceSlice. -func (c *FakeResourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) { +func (c *FakeResourceSlices) Apply(ctx context.Context, resourceSlice *resourcev1alpha3.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceSlice, err error) { if resourceSlice == nil { return nil, fmt.Errorf("resourceSlice provided to Apply must not be nil") } @@ -141,11 +141,11 @@ func (c *FakeResourceSlices) Apply(ctx context.Context, resourceSlice *resourcev if name == nil { return nil, fmt.Errorf("resourceSlice.Name must be provided to Apply") } - emptyResult := &v1alpha2.ResourceSlice{} + emptyResult := &v1alpha3.ResourceSlice{} obj, err := c.Fake. Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceslicesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) if obj == nil { return emptyResult, err } - return obj.(*v1alpha2.ResourceSlice), err + return obj.(*v1alpha3.ResourceSlice), err } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go similarity index 98% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go index d11410bb9b997..2f5289dabf6aa 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/generated_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 type PodSchedulingContextExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/podschedulingcontext.go similarity index 66% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/podschedulingcontext.go index 0ffdc1501332d..af598432127a1 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/podschedulingcontext.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,36 +38,36 @@ type PodSchedulingContextsGetter interface { // PodSchedulingContextInterface has methods to work with PodSchedulingContext resources. type PodSchedulingContextInterface interface { - Create(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.CreateOptions) (*v1alpha2.PodSchedulingContext, error) - Update(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha2.PodSchedulingContext, error) + Create(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.CreateOptions) (*v1alpha3.PodSchedulingContext, error) + Update(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha3.PodSchedulingContext, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha2.PodSchedulingContext, error) + UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha3.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha3.PodSchedulingContext, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.PodSchedulingContext, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.PodSchedulingContextList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.PodSchedulingContext, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.PodSchedulingContextList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodSchedulingContext, err error) - Apply(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.PodSchedulingContext, err error) + Apply(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.PodSchedulingContext, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) + ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha3.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.PodSchedulingContext, err error) PodSchedulingContextExpansion } // podSchedulingContexts implements PodSchedulingContextInterface type podSchedulingContexts struct { - *gentype.ClientWithListAndApply[*v1alpha2.PodSchedulingContext, *v1alpha2.PodSchedulingContextList, *resourcev1alpha2.PodSchedulingContextApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha3.PodSchedulingContext, *v1alpha3.PodSchedulingContextList, *resourcev1alpha3.PodSchedulingContextApplyConfiguration] } // newPodSchedulingContexts returns a PodSchedulingContexts -func newPodSchedulingContexts(c *ResourceV1alpha2Client, namespace string) *podSchedulingContexts { +func newPodSchedulingContexts(c *ResourceV1alpha3Client, namespace string) *podSchedulingContexts { return &podSchedulingContexts{ - gentype.NewClientWithListAndApply[*v1alpha2.PodSchedulingContext, *v1alpha2.PodSchedulingContextList, *resourcev1alpha2.PodSchedulingContextApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha3.PodSchedulingContext, *v1alpha3.PodSchedulingContextList, *resourcev1alpha3.PodSchedulingContextApplyConfiguration]( "podschedulingcontexts", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha2.PodSchedulingContext { return &v1alpha2.PodSchedulingContext{} }, - func() *v1alpha2.PodSchedulingContextList { return &v1alpha2.PodSchedulingContextList{} }), + func() *v1alpha3.PodSchedulingContext { return &v1alpha3.PodSchedulingContext{} }, + func() *v1alpha3.PodSchedulingContextList { return &v1alpha3.PodSchedulingContextList{} }), } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go similarity index 69% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go index 8e258b3e1ca7d..4cc6238b16a00 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resource_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go @@ -16,17 +16,17 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "net/http" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/client-go/kubernetes/scheme" rest "k8s.io/client-go/rest" ) -type ResourceV1alpha2Interface interface { +type ResourceV1alpha3Interface interface { RESTClient() rest.Interface PodSchedulingContextsGetter ResourceClaimsGetter @@ -37,43 +37,43 @@ type ResourceV1alpha2Interface interface { ResourceSlicesGetter } -// ResourceV1alpha2Client is used to interact with features provided by the resource.k8s.io group. -type ResourceV1alpha2Client struct { +// ResourceV1alpha3Client is used to interact with features provided by the resource.k8s.io group. +type ResourceV1alpha3Client struct { restClient rest.Interface } -func (c *ResourceV1alpha2Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface { +func (c *ResourceV1alpha3Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface { return newPodSchedulingContexts(c, namespace) } -func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimInterface { +func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimInterface { return newResourceClaims(c, namespace) } -func (c *ResourceV1alpha2Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface { +func (c *ResourceV1alpha3Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface { return newResourceClaimParameters(c, namespace) } -func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface { +func (c *ResourceV1alpha3Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface { return newResourceClaimTemplates(c, namespace) } -func (c *ResourceV1alpha2Client) ResourceClasses() ResourceClassInterface { +func (c *ResourceV1alpha3Client) ResourceClasses() ResourceClassInterface { return newResourceClasses(c) } -func (c *ResourceV1alpha2Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface { +func (c *ResourceV1alpha3Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface { return newResourceClassParameters(c, namespace) } -func (c *ResourceV1alpha2Client) ResourceSlices() ResourceSliceInterface { +func (c *ResourceV1alpha3Client) ResourceSlices() ResourceSliceInterface { return newResourceSlices(c) } -// NewForConfig creates a new ResourceV1alpha2Client for the given config. +// NewForConfig creates a new ResourceV1alpha3Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ResourceV1alpha2Client, error) { +func NewForConfig(c *rest.Config) (*ResourceV1alpha3Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -85,9 +85,9 @@ func NewForConfig(c *rest.Config) (*ResourceV1alpha2Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new ResourceV1alpha2Client for the given config and http client. +// NewForConfigAndClient creates a new ResourceV1alpha3Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha2Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha3Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -96,12 +96,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha2Cli if err != nil { return nil, err } - return &ResourceV1alpha2Client{client}, nil + return &ResourceV1alpha3Client{client}, nil } -// NewForConfigOrDie creates a new ResourceV1alpha2Client for the given config and +// NewForConfigOrDie creates a new ResourceV1alpha3Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha2Client { +func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha3Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -109,13 +109,13 @@ func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha2Client { return client } -// New creates a new ResourceV1alpha2Client for the given RESTClient. -func New(c rest.Interface) *ResourceV1alpha2Client { - return &ResourceV1alpha2Client{c} +// New creates a new ResourceV1alpha3Client for the given RESTClient. +func New(c rest.Interface) *ResourceV1alpha3Client { + return &ResourceV1alpha3Client{c} } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha2.SchemeGroupVersion + gv := v1alpha3.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() @@ -129,7 +129,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *ResourceV1alpha2Client) RESTClient() rest.Interface { +func (c *ResourceV1alpha3Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaim.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaim.go similarity index 63% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaim.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaim.go index 0f81e5008c6e8..2ac65c005e04b 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaim.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaim.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,36 +38,36 @@ type ResourceClaimsGetter interface { // ResourceClaimInterface has methods to work with ResourceClaim resources. type ResourceClaimInterface interface { - Create(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.CreateOptions) (*v1alpha2.ResourceClaim, error) - Update(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (*v1alpha2.ResourceClaim, error) + Create(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.CreateOptions) (*v1alpha3.ResourceClaim, error) + Update(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.UpdateOptions) (*v1alpha3.ResourceClaim, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (*v1alpha2.ResourceClaim, error) + UpdateStatus(ctx context.Context, resourceClaim *v1alpha3.ResourceClaim, opts v1.UpdateOptions) (*v1alpha3.ResourceClaim, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaim, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClaim, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClaimList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaim, err error) - Apply(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaim, err error) + Apply(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaim, err error) // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) + ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaim, err error) ResourceClaimExpansion } // resourceClaims implements ResourceClaimInterface type resourceClaims struct { - *gentype.ClientWithListAndApply[*v1alpha2.ResourceClaim, *v1alpha2.ResourceClaimList, *resourcev1alpha2.ResourceClaimApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration] } // newResourceClaims returns a ResourceClaims -func newResourceClaims(c *ResourceV1alpha2Client, namespace string) *resourceClaims { +func newResourceClaims(c *ResourceV1alpha3Client, namespace string) *resourceClaims { return &resourceClaims{ - gentype.NewClientWithListAndApply[*v1alpha2.ResourceClaim, *v1alpha2.ResourceClaimList, *resourcev1alpha2.ResourceClaimApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration]( "resourceclaims", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha2.ResourceClaim { return &v1alpha2.ResourceClaim{} }, - func() *v1alpha2.ResourceClaimList { return &v1alpha2.ResourceClaimList{} }), + func() *v1alpha3.ResourceClaim { return &v1alpha3.ResourceClaim{} }, + func() *v1alpha3.ResourceClaimList { return &v1alpha3.ResourceClaimList{} }), } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimparameters.go similarity index 66% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimparameters.go index e3fb474cd022b..8ae3476f612bf 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimparameters.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,32 +38,32 @@ type ResourceClaimParametersGetter interface { // ResourceClaimParametersInterface has methods to work with ResourceClaimParameters resources. type ResourceClaimParametersInterface interface { - Create(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClaimParameters, error) - Update(ctx context.Context, resourceClaimParameters *v1alpha2.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClaimParameters, error) + Create(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha3.ResourceClaimParameters, error) + Update(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha3.ResourceClaimParameters, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimParameters, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimParametersList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClaimParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClaimParametersList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimParameters, err error) - Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimParameters, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimParameters, err error) + Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha3.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimParameters, err error) ResourceClaimParametersExpansion } // resourceClaimParameters implements ResourceClaimParametersInterface type resourceClaimParameters struct { - *gentype.ClientWithListAndApply[*v1alpha2.ResourceClaimParameters, *v1alpha2.ResourceClaimParametersList, *resourcev1alpha2.ResourceClaimParametersApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha3.ResourceClaimParameters, *v1alpha3.ResourceClaimParametersList, *resourcev1alpha3.ResourceClaimParametersApplyConfiguration] } // newResourceClaimParameters returns a ResourceClaimParameters -func newResourceClaimParameters(c *ResourceV1alpha2Client, namespace string) *resourceClaimParameters { +func newResourceClaimParameters(c *ResourceV1alpha3Client, namespace string) *resourceClaimParameters { return &resourceClaimParameters{ - gentype.NewClientWithListAndApply[*v1alpha2.ResourceClaimParameters, *v1alpha2.ResourceClaimParametersList, *resourcev1alpha2.ResourceClaimParametersApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha3.ResourceClaimParameters, *v1alpha3.ResourceClaimParametersList, *resourcev1alpha3.ResourceClaimParametersApplyConfiguration]( "resourceclaimparameters", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha2.ResourceClaimParameters { return &v1alpha2.ResourceClaimParameters{} }, - func() *v1alpha2.ResourceClaimParametersList { return &v1alpha2.ResourceClaimParametersList{} }), + func() *v1alpha3.ResourceClaimParameters { return &v1alpha3.ResourceClaimParameters{} }, + func() *v1alpha3.ResourceClaimParametersList { return &v1alpha3.ResourceClaimParametersList{} }), } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimtemplate.go similarity index 67% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimtemplate.go index 3b6451a9a6aa3..87997bfee5806 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclaimtemplate.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimtemplate.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,32 +38,32 @@ type ResourceClaimTemplatesGetter interface { // ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources. type ResourceClaimTemplateInterface interface { - Create(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.CreateOptions) (*v1alpha2.ResourceClaimTemplate, error) - Update(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.UpdateOptions) (*v1alpha2.ResourceClaimTemplate, error) + Create(ctx context.Context, resourceClaimTemplate *v1alpha3.ResourceClaimTemplate, opts v1.CreateOptions) (*v1alpha3.ResourceClaimTemplate, error) + Update(ctx context.Context, resourceClaimTemplate *v1alpha3.ResourceClaimTemplate, opts v1.UpdateOptions) (*v1alpha3.ResourceClaimTemplate, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimTemplate, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClaimTemplateList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClaimTemplate, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClaimTemplateList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimTemplate, err error) - Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimTemplate, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimTemplate, err error) + Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimTemplate, err error) ResourceClaimTemplateExpansion } // resourceClaimTemplates implements ResourceClaimTemplateInterface type resourceClaimTemplates struct { - *gentype.ClientWithListAndApply[*v1alpha2.ResourceClaimTemplate, *v1alpha2.ResourceClaimTemplateList, *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha3.ResourceClaimTemplate, *v1alpha3.ResourceClaimTemplateList, *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration] } // newResourceClaimTemplates returns a ResourceClaimTemplates -func newResourceClaimTemplates(c *ResourceV1alpha2Client, namespace string) *resourceClaimTemplates { +func newResourceClaimTemplates(c *ResourceV1alpha3Client, namespace string) *resourceClaimTemplates { return &resourceClaimTemplates{ - gentype.NewClientWithListAndApply[*v1alpha2.ResourceClaimTemplate, *v1alpha2.ResourceClaimTemplateList, *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha3.ResourceClaimTemplate, *v1alpha3.ResourceClaimTemplateList, *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration]( "resourceclaimtemplates", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha2.ResourceClaimTemplate { return &v1alpha2.ResourceClaimTemplate{} }, - func() *v1alpha2.ResourceClaimTemplateList { return &v1alpha2.ResourceClaimTemplateList{} }), + func() *v1alpha3.ResourceClaimTemplate { return &v1alpha3.ResourceClaimTemplate{} }, + func() *v1alpha3.ResourceClaimTemplateList { return &v1alpha3.ResourceClaimTemplateList{} }), } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclass.go similarity index 65% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclass.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclass.go index c4600d3475652..0d88e96edf365 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclass.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclass.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,32 +38,32 @@ type ResourceClassesGetter interface { // ResourceClassInterface has methods to work with ResourceClass resources. type ResourceClassInterface interface { - Create(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.CreateOptions) (*v1alpha2.ResourceClass, error) - Update(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.UpdateOptions) (*v1alpha2.ResourceClass, error) + Create(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.CreateOptions) (*v1alpha3.ResourceClass, error) + Update(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.UpdateOptions) (*v1alpha3.ResourceClass, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClass, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClassList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClassList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClass, err error) - Apply(ctx context.Context, resourceClass *resourcev1alpha2.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClass, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClass, err error) + Apply(ctx context.Context, resourceClass *resourcev1alpha3.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClass, err error) ResourceClassExpansion } // resourceClasses implements ResourceClassInterface type resourceClasses struct { - *gentype.ClientWithListAndApply[*v1alpha2.ResourceClass, *v1alpha2.ResourceClassList, *resourcev1alpha2.ResourceClassApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha3.ResourceClass, *v1alpha3.ResourceClassList, *resourcev1alpha3.ResourceClassApplyConfiguration] } // newResourceClasses returns a ResourceClasses -func newResourceClasses(c *ResourceV1alpha2Client) *resourceClasses { +func newResourceClasses(c *ResourceV1alpha3Client) *resourceClasses { return &resourceClasses{ - gentype.NewClientWithListAndApply[*v1alpha2.ResourceClass, *v1alpha2.ResourceClassList, *resourcev1alpha2.ResourceClassApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha3.ResourceClass, *v1alpha3.ResourceClassList, *resourcev1alpha3.ResourceClassApplyConfiguration]( "resourceclasses", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha2.ResourceClass { return &v1alpha2.ResourceClass{} }, - func() *v1alpha2.ResourceClassList { return &v1alpha2.ResourceClassList{} }), + func() *v1alpha3.ResourceClass { return &v1alpha3.ResourceClass{} }, + func() *v1alpha3.ResourceClassList { return &v1alpha3.ResourceClassList{} }), } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclassparameters.go similarity index 66% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclassparameters.go index e7cdddce4d039..42db8f705928e 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclassparameters.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,32 +38,32 @@ type ResourceClassParametersGetter interface { // ResourceClassParametersInterface has methods to work with ResourceClassParameters resources. type ResourceClassParametersInterface interface { - Create(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha2.ResourceClassParameters, error) - Update(ctx context.Context, resourceClassParameters *v1alpha2.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha2.ResourceClassParameters, error) + Create(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha3.ResourceClassParameters, error) + Update(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha3.ResourceClassParameters, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClassParameters, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceClassParametersList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClassParameters, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClassParametersList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClassParameters, err error) - Apply(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClassParameters, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClassParameters, err error) + Apply(ctx context.Context, resourceClassParameters *resourcev1alpha3.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClassParameters, err error) ResourceClassParametersExpansion } // resourceClassParameters implements ResourceClassParametersInterface type resourceClassParameters struct { - *gentype.ClientWithListAndApply[*v1alpha2.ResourceClassParameters, *v1alpha2.ResourceClassParametersList, *resourcev1alpha2.ResourceClassParametersApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha3.ResourceClassParameters, *v1alpha3.ResourceClassParametersList, *resourcev1alpha3.ResourceClassParametersApplyConfiguration] } // newResourceClassParameters returns a ResourceClassParameters -func newResourceClassParameters(c *ResourceV1alpha2Client, namespace string) *resourceClassParameters { +func newResourceClassParameters(c *ResourceV1alpha3Client, namespace string) *resourceClassParameters { return &resourceClassParameters{ - gentype.NewClientWithListAndApply[*v1alpha2.ResourceClassParameters, *v1alpha2.ResourceClassParametersList, *resourcev1alpha2.ResourceClassParametersApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha3.ResourceClassParameters, *v1alpha3.ResourceClassParametersList, *resourcev1alpha3.ResourceClassParametersApplyConfiguration]( "resourceclassparameters", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha2.ResourceClassParameters { return &v1alpha2.ResourceClassParameters{} }, - func() *v1alpha2.ResourceClassParametersList { return &v1alpha2.ResourceClassParametersList{} }), + func() *v1alpha3.ResourceClassParameters { return &v1alpha3.ResourceClassParameters{} }, + func() *v1alpha3.ResourceClassParametersList { return &v1alpha3.ResourceClassParametersList{} }), } } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceslice.go similarity index 65% rename from staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go rename to staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceslice.go index fafeab70614a0..08190414081df 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/resourceslice.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceslice.go @@ -16,16 +16,16 @@ limitations under the License. // Code generated by client-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( "context" - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" gentype "k8s.io/client-go/gentype" scheme "k8s.io/client-go/kubernetes/scheme" ) @@ -38,32 +38,32 @@ type ResourceSlicesGetter interface { // ResourceSliceInterface has methods to work with ResourceSlice resources. type ResourceSliceInterface interface { - Create(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.CreateOptions) (*v1alpha2.ResourceSlice, error) - Update(ctx context.Context, resourceSlice *v1alpha2.ResourceSlice, opts v1.UpdateOptions) (*v1alpha2.ResourceSlice, error) + Create(ctx context.Context, resourceSlice *v1alpha3.ResourceSlice, opts v1.CreateOptions) (*v1alpha3.ResourceSlice, error) + Update(ctx context.Context, resourceSlice *v1alpha3.ResourceSlice, opts v1.UpdateOptions) (*v1alpha3.ResourceSlice, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceSlice, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.ResourceSliceList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceSliceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceSlice, err error) - Apply(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceSlice, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceSlice, err error) + Apply(ctx context.Context, resourceSlice *resourcev1alpha3.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceSlice, err error) ResourceSliceExpansion } // resourceSlices implements ResourceSliceInterface type resourceSlices struct { - *gentype.ClientWithListAndApply[*v1alpha2.ResourceSlice, *v1alpha2.ResourceSliceList, *resourcev1alpha2.ResourceSliceApplyConfiguration] + *gentype.ClientWithListAndApply[*v1alpha3.ResourceSlice, *v1alpha3.ResourceSliceList, *resourcev1alpha3.ResourceSliceApplyConfiguration] } // newResourceSlices returns a ResourceSlices -func newResourceSlices(c *ResourceV1alpha2Client) *resourceSlices { +func newResourceSlices(c *ResourceV1alpha3Client) *resourceSlices { return &resourceSlices{ - gentype.NewClientWithListAndApply[*v1alpha2.ResourceSlice, *v1alpha2.ResourceSliceList, *resourcev1alpha2.ResourceSliceApplyConfiguration]( + gentype.NewClientWithListAndApply[*v1alpha3.ResourceSlice, *v1alpha3.ResourceSliceList, *resourcev1alpha3.ResourceSliceApplyConfiguration]( "resourceslices", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1alpha2.ResourceSlice { return &v1alpha2.ResourceSlice{} }, - func() *v1alpha2.ResourceSliceList { return &v1alpha2.ResourceSliceList{} }), + func() *v1alpha3.ResourceSlice { return &v1alpha3.ResourceSlice{} }, + func() *v1alpha3.ResourceSliceList { return &v1alpha3.ResourceSliceList{} }), } } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/expansion_generated.go similarity index 99% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/expansion_generated.go index 68861832d9c8d..bc580e3d233b9 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/expansion_generated.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/expansion_generated.go @@ -16,7 +16,7 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 // PodSchedulingContextListerExpansion allows custom methods to be added to // PodSchedulingContextLister. diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/podschedulingcontext.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/podschedulingcontext.go similarity index 81% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/podschedulingcontext.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/podschedulingcontext.go index 9aca7bfbf9306..ed9b049432331 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/podschedulingcontext.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/podschedulingcontext.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type PodSchedulingContextLister interface { // List lists all PodSchedulingContexts in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.PodSchedulingContext, err error) + List(selector labels.Selector) (ret []*v1alpha3.PodSchedulingContext, err error) // PodSchedulingContexts returns an object that can list and get PodSchedulingContexts. PodSchedulingContexts(namespace string) PodSchedulingContextNamespaceLister PodSchedulingContextListerExpansion @@ -38,17 +38,17 @@ type PodSchedulingContextLister interface { // podSchedulingContextLister implements the PodSchedulingContextLister interface. type podSchedulingContextLister struct { - listers.ResourceIndexer[*v1alpha2.PodSchedulingContext] + listers.ResourceIndexer[*v1alpha3.PodSchedulingContext] } // NewPodSchedulingContextLister returns a new PodSchedulingContextLister. func NewPodSchedulingContextLister(indexer cache.Indexer) PodSchedulingContextLister { - return &podSchedulingContextLister{listers.New[*v1alpha2.PodSchedulingContext](indexer, v1alpha2.Resource("podschedulingcontext"))} + return &podSchedulingContextLister{listers.New[*v1alpha3.PodSchedulingContext](indexer, v1alpha3.Resource("podschedulingcontext"))} } // PodSchedulingContexts returns an object that can list and get PodSchedulingContexts. func (s *podSchedulingContextLister) PodSchedulingContexts(namespace string) PodSchedulingContextNamespaceLister { - return podSchedulingContextNamespaceLister{listers.NewNamespaced[*v1alpha2.PodSchedulingContext](s.ResourceIndexer, namespace)} + return podSchedulingContextNamespaceLister{listers.NewNamespaced[*v1alpha3.PodSchedulingContext](s.ResourceIndexer, namespace)} } // PodSchedulingContextNamespaceLister helps list and get PodSchedulingContexts. @@ -56,15 +56,15 @@ func (s *podSchedulingContextLister) PodSchedulingContexts(namespace string) Pod type PodSchedulingContextNamespaceLister interface { // List lists all PodSchedulingContexts in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.PodSchedulingContext, err error) + List(selector labels.Selector) (ret []*v1alpha3.PodSchedulingContext, err error) // Get retrieves the PodSchedulingContext from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha2.PodSchedulingContext, error) + Get(name string) (*v1alpha3.PodSchedulingContext, error) PodSchedulingContextNamespaceListerExpansion } // podSchedulingContextNamespaceLister implements the PodSchedulingContextNamespaceLister // interface. type podSchedulingContextNamespaceLister struct { - listers.ResourceIndexer[*v1alpha2.PodSchedulingContext] + listers.ResourceIndexer[*v1alpha3.PodSchedulingContext] } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaim.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaim.go similarity index 81% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaim.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaim.go index 8d789314dbc48..ac6a3e1564035 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaim.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaim.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type ResourceClaimLister interface { // List lists all ResourceClaims in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClaim, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClaim, err error) // ResourceClaims returns an object that can list and get ResourceClaims. ResourceClaims(namespace string) ResourceClaimNamespaceLister ResourceClaimListerExpansion @@ -38,17 +38,17 @@ type ResourceClaimLister interface { // resourceClaimLister implements the ResourceClaimLister interface. type resourceClaimLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClaim] + listers.ResourceIndexer[*v1alpha3.ResourceClaim] } // NewResourceClaimLister returns a new ResourceClaimLister. func NewResourceClaimLister(indexer cache.Indexer) ResourceClaimLister { - return &resourceClaimLister{listers.New[*v1alpha2.ResourceClaim](indexer, v1alpha2.Resource("resourceclaim"))} + return &resourceClaimLister{listers.New[*v1alpha3.ResourceClaim](indexer, v1alpha3.Resource("resourceclaim"))} } // ResourceClaims returns an object that can list and get ResourceClaims. func (s *resourceClaimLister) ResourceClaims(namespace string) ResourceClaimNamespaceLister { - return resourceClaimNamespaceLister{listers.NewNamespaced[*v1alpha2.ResourceClaim](s.ResourceIndexer, namespace)} + return resourceClaimNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClaim](s.ResourceIndexer, namespace)} } // ResourceClaimNamespaceLister helps list and get ResourceClaims. @@ -56,15 +56,15 @@ func (s *resourceClaimLister) ResourceClaims(namespace string) ResourceClaimName type ResourceClaimNamespaceLister interface { // List lists all ResourceClaims in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClaim, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClaim, err error) // Get retrieves the ResourceClaim from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha2.ResourceClaim, error) + Get(name string) (*v1alpha3.ResourceClaim, error) ResourceClaimNamespaceListerExpansion } // resourceClaimNamespaceLister implements the ResourceClaimNamespaceLister // interface. type resourceClaimNamespaceLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClaim] + listers.ResourceIndexer[*v1alpha3.ResourceClaim] } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimparameters.go similarity index 82% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimparameters.go index ad751a6cee77f..aa5636b33d61a 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimparameters.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimparameters.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type ResourceClaimParametersLister interface { // List lists all ResourceClaimParameters in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimParameters, err error) // ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister ResourceClaimParametersListerExpansion @@ -38,17 +38,17 @@ type ResourceClaimParametersLister interface { // resourceClaimParametersLister implements the ResourceClaimParametersLister interface. type resourceClaimParametersLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClaimParameters] + listers.ResourceIndexer[*v1alpha3.ResourceClaimParameters] } // NewResourceClaimParametersLister returns a new ResourceClaimParametersLister. func NewResourceClaimParametersLister(indexer cache.Indexer) ResourceClaimParametersLister { - return &resourceClaimParametersLister{listers.New[*v1alpha2.ResourceClaimParameters](indexer, v1alpha2.Resource("resourceclaimparameters"))} + return &resourceClaimParametersLister{listers.New[*v1alpha3.ResourceClaimParameters](indexer, v1alpha3.Resource("resourceclaimparameters"))} } // ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister { - return resourceClaimParametersNamespaceLister{listers.NewNamespaced[*v1alpha2.ResourceClaimParameters](s.ResourceIndexer, namespace)} + return resourceClaimParametersNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClaimParameters](s.ResourceIndexer, namespace)} } // ResourceClaimParametersNamespaceLister helps list and get ResourceClaimParameters. @@ -56,15 +56,15 @@ func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string type ResourceClaimParametersNamespaceLister interface { // List lists all ResourceClaimParameters in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimParameters, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimParameters, err error) // Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha2.ResourceClaimParameters, error) + Get(name string) (*v1alpha3.ResourceClaimParameters, error) ResourceClaimParametersNamespaceListerExpansion } // resourceClaimParametersNamespaceLister implements the ResourceClaimParametersNamespaceLister // interface. type resourceClaimParametersNamespaceLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClaimParameters] + listers.ResourceIndexer[*v1alpha3.ResourceClaimParameters] } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimtemplate.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimtemplate.go similarity index 82% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimtemplate.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimtemplate.go index 7ad1c769fac85..6c15f82bba8dc 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclaimtemplate.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimtemplate.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type ResourceClaimTemplateLister interface { // List lists all ResourceClaimTemplates in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimTemplate, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimTemplate, err error) // ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates. ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister ResourceClaimTemplateListerExpansion @@ -38,17 +38,17 @@ type ResourceClaimTemplateLister interface { // resourceClaimTemplateLister implements the ResourceClaimTemplateLister interface. type resourceClaimTemplateLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClaimTemplate] + listers.ResourceIndexer[*v1alpha3.ResourceClaimTemplate] } // NewResourceClaimTemplateLister returns a new ResourceClaimTemplateLister. func NewResourceClaimTemplateLister(indexer cache.Indexer) ResourceClaimTemplateLister { - return &resourceClaimTemplateLister{listers.New[*v1alpha2.ResourceClaimTemplate](indexer, v1alpha2.Resource("resourceclaimtemplate"))} + return &resourceClaimTemplateLister{listers.New[*v1alpha3.ResourceClaimTemplate](indexer, v1alpha3.Resource("resourceclaimtemplate"))} } // ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates. func (s *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) ResourceClaimTemplateNamespaceLister { - return resourceClaimTemplateNamespaceLister{listers.NewNamespaced[*v1alpha2.ResourceClaimTemplate](s.ResourceIndexer, namespace)} + return resourceClaimTemplateNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClaimTemplate](s.ResourceIndexer, namespace)} } // ResourceClaimTemplateNamespaceLister helps list and get ResourceClaimTemplates. @@ -56,15 +56,15 @@ func (s *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) R type ResourceClaimTemplateNamespaceLister interface { // List lists all ResourceClaimTemplates in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClaimTemplate, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimTemplate, err error) // Get retrieves the ResourceClaimTemplate from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha2.ResourceClaimTemplate, error) + Get(name string) (*v1alpha3.ResourceClaimTemplate, error) ResourceClaimTemplateNamespaceListerExpansion } // resourceClaimTemplateNamespaceLister implements the ResourceClaimTemplateNamespaceLister // interface. type resourceClaimTemplateNamespaceLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClaimTemplate] + listers.ResourceIndexer[*v1alpha3.ResourceClaimTemplate] } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclass.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclass.go similarity index 80% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclass.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclass.go index ecbe18a767b67..0c911003b0cdc 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclass.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclass.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" @@ -30,19 +30,19 @@ import ( type ResourceClassLister interface { // List lists all ResourceClasses in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClass, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClass, err error) // Get retrieves the ResourceClass from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha2.ResourceClass, error) + Get(name string) (*v1alpha3.ResourceClass, error) ResourceClassListerExpansion } // resourceClassLister implements the ResourceClassLister interface. type resourceClassLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClass] + listers.ResourceIndexer[*v1alpha3.ResourceClass] } // NewResourceClassLister returns a new ResourceClassLister. func NewResourceClassLister(indexer cache.Indexer) ResourceClassLister { - return &resourceClassLister{listers.New[*v1alpha2.ResourceClass](indexer, v1alpha2.Resource("resourceclass"))} + return &resourceClassLister{listers.New[*v1alpha3.ResourceClass](indexer, v1alpha3.Resource("resourceclass"))} } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclassparameters.go similarity index 82% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclassparameters.go index f731bfe13388b..beb0645a9ed48 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceclassparameters.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclassparameters.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" @@ -30,7 +30,7 @@ import ( type ResourceClassParametersLister interface { // List lists all ResourceClassParameters in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClassParameters, err error) // ResourceClassParameters returns an object that can list and get ResourceClassParameters. ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister ResourceClassParametersListerExpansion @@ -38,17 +38,17 @@ type ResourceClassParametersLister interface { // resourceClassParametersLister implements the ResourceClassParametersLister interface. type resourceClassParametersLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClassParameters] + listers.ResourceIndexer[*v1alpha3.ResourceClassParameters] } // NewResourceClassParametersLister returns a new ResourceClassParametersLister. func NewResourceClassParametersLister(indexer cache.Indexer) ResourceClassParametersLister { - return &resourceClassParametersLister{listers.New[*v1alpha2.ResourceClassParameters](indexer, v1alpha2.Resource("resourceclassparameters"))} + return &resourceClassParametersLister{listers.New[*v1alpha3.ResourceClassParameters](indexer, v1alpha3.Resource("resourceclassparameters"))} } // ResourceClassParameters returns an object that can list and get ResourceClassParameters. func (s *resourceClassParametersLister) ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister { - return resourceClassParametersNamespaceLister{listers.NewNamespaced[*v1alpha2.ResourceClassParameters](s.ResourceIndexer, namespace)} + return resourceClassParametersNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClassParameters](s.ResourceIndexer, namespace)} } // ResourceClassParametersNamespaceLister helps list and get ResourceClassParameters. @@ -56,15 +56,15 @@ func (s *resourceClassParametersLister) ResourceClassParameters(namespace string type ResourceClassParametersNamespaceLister interface { // List lists all ResourceClassParameters in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceClassParameters, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceClassParameters, err error) // Get retrieves the ResourceClassParameters from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha2.ResourceClassParameters, error) + Get(name string) (*v1alpha3.ResourceClassParameters, error) ResourceClassParametersNamespaceListerExpansion } // resourceClassParametersNamespaceLister implements the ResourceClassParametersNamespaceLister // interface. type resourceClassParametersNamespaceLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceClassParameters] + listers.ResourceIndexer[*v1alpha3.ResourceClassParameters] } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceslice.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceslice.go similarity index 80% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceslice.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceslice.go index c5937df8277eb..ae87b8b66dfdc 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha2/resourceslice.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceslice.go @@ -16,10 +16,10 @@ limitations under the License. // Code generated by lister-gen. DO NOT EDIT. -package v1alpha2 +package v1alpha3 import ( - v1alpha2 "k8s.io/api/resource/v1alpha2" + v1alpha3 "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" @@ -30,19 +30,19 @@ import ( type ResourceSliceLister interface { // List lists all ResourceSlices in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha2.ResourceSlice, err error) + List(selector labels.Selector) (ret []*v1alpha3.ResourceSlice, err error) // Get retrieves the ResourceSlice from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha2.ResourceSlice, error) + Get(name string) (*v1alpha3.ResourceSlice, error) ResourceSliceListerExpansion } // resourceSliceLister implements the ResourceSliceLister interface. type resourceSliceLister struct { - listers.ResourceIndexer[*v1alpha2.ResourceSlice] + listers.ResourceIndexer[*v1alpha3.ResourceSlice] } // NewResourceSliceLister returns a new ResourceSliceLister. func NewResourceSliceLister(indexer cache.Indexer) ResourceSliceLister { - return &resourceSliceLister{listers.New[*v1alpha2.ResourceSlice](indexer, v1alpha2.Resource("resourceslice"))} + return &resourceSliceLister{listers.New[*v1alpha3.ResourceSlice](indexer, v1alpha3.Resource("resourceslice"))} } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go index 05ea7875c1c3e..f26fc083731ef 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go @@ -28,7 +28,7 @@ import ( "github.com/google/go-cmp/cmp" v1 "k8s.io/api/core/v1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -37,7 +37,7 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" corev1types "k8s.io/client-go/kubernetes/typed/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/record" "k8s.io/client-go/util/workqueue" @@ -67,14 +67,14 @@ type Driver interface { // possible. class.Parameters may be nil. // // The caller wraps the error to include the parameter reference. - GetClassParameters(ctx context.Context, class *resourcev1alpha2.ResourceClass) (interface{}, error) + GetClassParameters(ctx context.Context, class *resourceapi.ResourceClass) (interface{}, error) // GetClaimParameters is called to retrieve the parameter object // referenced by a claim. The content should be validated now if // possible. claim.Spec.Parameters may be nil. // // The caller wraps the error to include the parameter reference. - GetClaimParameters(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, class *resourcev1alpha2.ResourceClass, classParameters interface{}) (interface{}, error) + GetClaimParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, classParameters interface{}) (interface{}, error) // Allocate is called when all same-driver ResourceClaims for Pod are ready // to be allocated. The selectedNode is empty for ResourceClaims with immediate @@ -111,7 +111,7 @@ type Driver interface { // Deallocate may be called when a previous allocation got // interrupted. Deallocate must then stop any on-going allocation // activity and free resources before returning without an error. - Deallocate(ctx context.Context, claim *resourcev1alpha2.ResourceClaim) error + Deallocate(ctx context.Context, claim *resourceapi.ResourceClaim) error // UnsuitableNodes checks all pending claims with delayed allocation // for a pod. All claims are ready for allocation by the driver @@ -137,8 +137,8 @@ type Driver interface { // pod.Spec.ResourceClaim entry. type ClaimAllocation struct { PodClaimName string - Claim *resourcev1alpha2.ResourceClaim - Class *resourcev1alpha2.ResourceClass + Claim *resourceapi.ResourceClaim + Class *resourceapi.ResourceClass ClaimParameters interface{} ClassParameters interface{} @@ -148,7 +148,7 @@ type ClaimAllocation struct { // Driver must populate this field with resources that were // allocated for the claim in case of successful allocation. - Allocation *resourcev1alpha2.AllocationResult + Allocation *resourceapi.AllocationResult // In case of error allocating particular claim, driver must // populate this field. Error error @@ -165,10 +165,10 @@ type controller struct { claimNameLookup *resourceclaim.Lookup queue workqueue.TypedRateLimitingInterface[string] eventRecorder record.EventRecorder - rcLister resourcev1alpha2listers.ResourceClassLister + rcLister resourcelisters.ResourceClassLister rcSynced cache.InformerSynced claimCache cache.MutationCache - schedulingCtxLister resourcev1alpha2listers.PodSchedulingContextLister + schedulingCtxLister resourcelisters.PodSchedulingContextLister claimSynced cache.InformerSynced schedulingCtxSynced cache.InformerSynced } @@ -184,9 +184,9 @@ func New( kubeClient kubernetes.Interface, informerFactory informers.SharedInformerFactory) Controller { logger := klog.LoggerWithName(klog.FromContext(ctx), "resource controller") - rcInformer := informerFactory.Resource().V1alpha2().ResourceClasses() - claimInformer := informerFactory.Resource().V1alpha2().ResourceClaims() - schedulingCtxInformer := informerFactory.Resource().V1alpha2().PodSchedulingContexts() + rcInformer := informerFactory.Resource().V1alpha3().ResourceClasses() + claimInformer := informerFactory.Resource().V1alpha3().ResourceClaims() + schedulingCtxInformer := informerFactory.Resource().V1alpha3().PodSchedulingContexts() claimNameLookup := resourceclaim.NewNameLookup(kubeClient) eventBroadcaster := record.NewBroadcaster(record.WithContext(ctx)) @@ -321,9 +321,9 @@ func getKey(obj interface{}) (string, error) { } prefix := "" switch obj.(type) { - case *resourcev1alpha2.ResourceClaim: + case *resourceapi.ResourceClaim: prefix = claimKeyPrefix - case *resourcev1alpha2.PodSchedulingContext: + case *resourceapi.PodSchedulingContext: prefix = schedulingCtxKeyPrefix default: return "", fmt.Errorf("unexpected object: %T", obj) @@ -427,7 +427,7 @@ func (ctrl *controller) syncKey(ctx context.Context, key string) (obj runtime.Ob return } -func (ctrl *controller) getCachedClaim(ctx context.Context, key string) (*resourcev1alpha2.ResourceClaim, error) { +func (ctrl *controller) getCachedClaim(ctx context.Context, key string) (*resourceapi.ResourceClaim, error) { claimObj, exists, err := ctrl.claimCache.GetByKey(key) if !exists || k8serrors.IsNotFound(err) { klog.FromContext(ctx).V(5).Info("ResourceClaim not found, no need to process it") @@ -436,16 +436,16 @@ func (ctrl *controller) getCachedClaim(ctx context.Context, key string) (*resour if err != nil { return nil, err } - claim, ok := claimObj.(*resourcev1alpha2.ResourceClaim) + claim, ok := claimObj.(*resourceapi.ResourceClaim) if !ok { - return nil, fmt.Errorf("internal error: got %T instead of *resourcev1alpha2.ResourceClaim from claim cache", claimObj) + return nil, fmt.Errorf("internal error: got %T instead of *resourceapi.ResourceClaim from claim cache", claimObj) } return claim, nil } // syncClaim determines which next action may be needed for a ResourceClaim // and does it. -func (ctrl *controller) syncClaim(ctx context.Context, claim *resourcev1alpha2.ResourceClaim) error { +func (ctrl *controller) syncClaim(ctx context.Context, claim *resourceapi.ResourceClaim) error { var err error logger := klog.FromContext(ctx) @@ -476,7 +476,7 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourcev1alpha2.R claim.Status.Allocation = nil claim.Status.DriverName = "" claim.Status.DeallocationRequested = false - claim, err = ctrl.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) + claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) if err != nil { return fmt.Errorf("remove allocation: %v", err) } @@ -491,7 +491,7 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourcev1alpha2.R if claim.Status.DeallocationRequested { // Still need to remove it. claim.Status.DeallocationRequested = false - claim, err = ctrl.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) + claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) if err != nil { return fmt.Errorf("remove deallocation: %v", err) } @@ -499,7 +499,7 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourcev1alpha2.R } claim.Finalizers = ctrl.removeFinalizer(claim.Finalizers) - claim, err = ctrl.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) + claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) if err != nil { return fmt.Errorf("remove finalizer: %v", err) } @@ -519,7 +519,7 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourcev1alpha2.R return nil } -func (ctrl *controller) getParameters(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, class *resourcev1alpha2.ResourceClass, notifyClaim bool) (claimParameters, classParameters interface{}, err error) { +func (ctrl *controller) getParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, notifyClaim bool) (claimParameters, classParameters interface{}, err error) { classParameters, err = ctrl.driver.GetClassParameters(ctx, class) if err != nil { ctrl.eventRecorder.Event(class, v1.EventTypeWarning, "Failed", err.Error()) @@ -539,7 +539,7 @@ func (ctrl *controller) getParameters(ctx context.Context, claim *resourcev1alph // allocateClaims filters list of claims, keeps those needing allocation and asks driver to do the allocations. // Driver is supposed to write the AllocationResult and Error field into argument claims slice. -func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAllocation, selectedNode string, selectedUser *resourcev1alpha2.ResourceClaimConsumerReference) { +func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAllocation, selectedNode string, selectedUser *resourceapi.ResourceClaimConsumerReference) { logger := klog.FromContext(ctx) needAllocation := make([]*ClaimAllocation, 0, len(claims)) @@ -569,7 +569,7 @@ func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAlloc logger.V(5).Info("Adding finalizer", "claim", claim.Name) claim.Finalizers = append(claim.Finalizers, ctrl.finalizer) var err error - claim, err = ctrl.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) + claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) if err != nil { logger.Error(err, "add finalizer", "claim", claim.Name) claimAllocation.Error = fmt.Errorf("add finalizer: %v", err) @@ -607,7 +607,7 @@ func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAlloc claim.Status.ReservedFor = append(claim.Status.ReservedFor, *selectedUser) } logger.V(6).Info("Updating claim after allocation", "claim", claim) - claim, err := ctrl.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) + claim, err := ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) if err != nil { claimAllocation.Error = fmt.Errorf("add allocation: %v", err) continue @@ -666,7 +666,7 @@ func (ctrl *controller) checkPodClaim(ctx context.Context, pod *v1.Pod, podClaim // syncPodSchedulingContext determines which next action may be needed for a PodSchedulingContext object // and does it. -func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulingCtx *resourcev1alpha2.PodSchedulingContext) error { +func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulingCtx *resourceapi.PodSchedulingContext) error { logger := klog.FromContext(ctx) // Ignore deleted objects. @@ -756,7 +756,7 @@ func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulin logger.V(2).Info("skipping allocation for unsuitable selected node", "node", selectedNode) } else { logger.V(2).Info("allocation for selected node", "node", selectedNode) - selectedUser := &resourcev1alpha2.ResourceClaimConsumerReference{ + selectedUser := &resourceapi.ResourceClaimConsumerReference{ Resource: "pods", Name: pod.Name, UID: pod.UID, @@ -793,7 +793,7 @@ func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulin if i < 0 { // Add new entry. schedulingCtx.Status.ResourceClaims = append(schedulingCtx.Status.ResourceClaims, - resourcev1alpha2.ResourceClaimSchedulingStatus{ + resourceapi.ResourceClaimSchedulingStatus{ Name: delayed.PodClaimName, UnsuitableNodes: truncateNodes(delayed.UnsuitableNodes, selectedNode), }) @@ -806,7 +806,7 @@ func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulin } if modified { logger.V(6).Info("Updating pod scheduling with modified unsuitable nodes", "podSchedulingCtx", schedulingCtx) - if _, err := ctrl.kubeClient.ResourceV1alpha2().PodSchedulingContexts(schedulingCtx.Namespace).UpdateStatus(ctx, schedulingCtx, metav1.UpdateOptions{}); err != nil { + if _, err := ctrl.kubeClient.ResourceV1alpha3().PodSchedulingContexts(schedulingCtx.Namespace).UpdateStatus(ctx, schedulingCtx, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("update unsuitable node status: %v", err) } } @@ -821,7 +821,7 @@ func truncateNodes(nodes []string, selectedNode string) []string { // this list might be too long by one element. When truncating it, make // sure that the selected node is listed. lenUnsuitable := len(nodes) - if lenUnsuitable > resourcev1alpha2.PodSchedulingNodeListMaxSize { + if lenUnsuitable > resourceapi.PodSchedulingNodeListMaxSize { if nodes[0] == selectedNode { // Truncate at the end and keep selected node in the first element. nodes = nodes[0 : lenUnsuitable-1] @@ -848,7 +848,7 @@ func (claims claimAllocations) MarshalLog() interface{} { var _ logr.Marshaler = claimAllocations{} // findClaim returns the index of the specified pod claim, -1 if not found. -func findClaim(claims []resourcev1alpha2.ResourceClaimSchedulingStatus, podClaimName string) int { +func findClaim(claims []resourceapi.ResourceClaimSchedulingStatus, podClaimName string) int { for i := range claims { if claims[i].Name == podClaimName { return i @@ -881,7 +881,7 @@ func stringsDiffer(a, b []string) bool { } // hasFinalizer checks if the claim has the finalizer of the driver. -func (ctrl *controller) hasFinalizer(claim *resourcev1alpha2.ResourceClaim) bool { +func (ctrl *controller) hasFinalizer(claim *resourceapi.ResourceClaim) bool { for _, finalizer := range claim.Finalizers { if finalizer == ctrl.finalizer { return true diff --git a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go index a7bb6cc911d7b..94f6a22384da8 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" corev1 "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" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/informers" @@ -47,7 +47,7 @@ func TestController(t *testing.T) { otherClassName := "other-class" ourFinalizer := driverName + "/deletion-protection" otherFinalizer := otherDriverName + "/deletion-protection" - classes := []*resourcev1alpha2.ResourceClass{ + classes := []*resourceapi.ResourceClass{ createClass(className, driverName), createClass(otherClassName, otherDriverName), } @@ -63,63 +63,63 @@ func TestController(t *testing.T) { otherNodeName := "worker-2" unsuitableNodes := []string{otherNodeName} potentialNodes := []string{nodeName, otherNodeName} - maxNodes := make([]string, resourcev1alpha2.PodSchedulingNodeListMaxSize) + maxNodes := make([]string, resourceapi.PodSchedulingNodeListMaxSize) for i := range maxNodes { maxNodes[i] = fmt.Sprintf("node-%d", i) } - withDeletionTimestamp := func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + withDeletionTimestamp := func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { var deleted metav1.Time claim = claim.DeepCopy() claim.DeletionTimestamp = &deleted return claim } - withReservedFor := func(claim *resourcev1alpha2.ResourceClaim, pod *corev1.Pod) *resourcev1alpha2.ResourceClaim { + withReservedFor := func(claim *resourceapi.ResourceClaim, pod *corev1.Pod) *resourceapi.ResourceClaim { claim = claim.DeepCopy() - claim.Status.ReservedFor = append(claim.Status.ReservedFor, resourcev1alpha2.ResourceClaimConsumerReference{ + claim.Status.ReservedFor = append(claim.Status.ReservedFor, resourceapi.ResourceClaimConsumerReference{ Resource: "pods", Name: pod.Name, UID: pod.UID, }) return claim } - withFinalizer := func(claim *resourcev1alpha2.ResourceClaim, finalizer string) *resourcev1alpha2.ResourceClaim { + withFinalizer := func(claim *resourceapi.ResourceClaim, finalizer string) *resourceapi.ResourceClaim { claim = claim.DeepCopy() claim.Finalizers = append(claim.Finalizers, finalizer) return claim } - allocation := resourcev1alpha2.AllocationResult{} - withAllocate := func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + allocation := resourceapi.AllocationResult{} + withAllocate := func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { // Any allocated claim must have our finalizer. claim = withFinalizer(claim, ourFinalizer) claim.Status.Allocation = &allocation claim.Status.DriverName = driverName return claim } - withDeallocate := func(claim *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim { + withDeallocate := func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { claim.Status.DeallocationRequested = true return claim } - withSelectedNode := func(podSchedulingCtx *resourcev1alpha2.PodSchedulingContext) *resourcev1alpha2.PodSchedulingContext { + withSelectedNode := func(podSchedulingCtx *resourceapi.PodSchedulingContext) *resourceapi.PodSchedulingContext { podSchedulingCtx = podSchedulingCtx.DeepCopy() podSchedulingCtx.Spec.SelectedNode = nodeName return podSchedulingCtx } - withSpecificUnsuitableNodes := func(podSchedulingCtx *resourcev1alpha2.PodSchedulingContext, unsuitableNodes []string) *resourcev1alpha2.PodSchedulingContext { + withSpecificUnsuitableNodes := func(podSchedulingCtx *resourceapi.PodSchedulingContext, unsuitableNodes []string) *resourceapi.PodSchedulingContext { podSchedulingCtx = podSchedulingCtx.DeepCopy() podSchedulingCtx.Status.ResourceClaims = append(podSchedulingCtx.Status.ResourceClaims, - resourcev1alpha2.ResourceClaimSchedulingStatus{Name: podClaimName, UnsuitableNodes: unsuitableNodes}, + resourceapi.ResourceClaimSchedulingStatus{Name: podClaimName, UnsuitableNodes: unsuitableNodes}, ) return podSchedulingCtx } - withUnsuitableNodes := func(podSchedulingCtx *resourcev1alpha2.PodSchedulingContext) *resourcev1alpha2.PodSchedulingContext { + withUnsuitableNodes := func(podSchedulingCtx *resourceapi.PodSchedulingContext) *resourceapi.PodSchedulingContext { return withSpecificUnsuitableNodes(podSchedulingCtx, unsuitableNodes) } - withSpecificPotentialNodes := func(podSchedulingCtx *resourcev1alpha2.PodSchedulingContext, potentialNodes []string) *resourcev1alpha2.PodSchedulingContext { + withSpecificPotentialNodes := func(podSchedulingCtx *resourceapi.PodSchedulingContext, potentialNodes []string) *resourceapi.PodSchedulingContext { podSchedulingCtx = podSchedulingCtx.DeepCopy() podSchedulingCtx.Spec.PotentialNodes = potentialNodes return podSchedulingCtx } - withPotentialNodes := func(podSchedulingCtx *resourcev1alpha2.PodSchedulingContext) *resourcev1alpha2.PodSchedulingContext { + withPotentialNodes := func(podSchedulingCtx *resourceapi.PodSchedulingContext) *resourceapi.PodSchedulingContext { return withSpecificPotentialNodes(podSchedulingCtx, potentialNodes) } @@ -128,10 +128,10 @@ func TestController(t *testing.T) { for name, test := range map[string]struct { key string driver mockDriver - classes []*resourcev1alpha2.ResourceClass + classes []*resourceapi.ResourceClass pod *corev1.Pod - schedulingCtx, expectedSchedulingCtx *resourcev1alpha2.PodSchedulingContext - claim, expectedClaim *resourcev1alpha2.ResourceClaim + schedulingCtx, expectedSchedulingCtx *resourceapi.PodSchedulingContext + claim, expectedClaim *resourceapi.ResourceClaim expectedError string }{ "invalid-key": { @@ -345,10 +345,10 @@ func TestController(t *testing.T) { initialObjects = append(initialObjects, test.claim) } kubeClient, informerFactory := fakeK8s(initialObjects) - rcInformer := informerFactory.Resource().V1alpha2().ResourceClasses() - claimInformer := informerFactory.Resource().V1alpha2().ResourceClaims() + rcInformer := informerFactory.Resource().V1alpha3().ResourceClasses() + claimInformer := informerFactory.Resource().V1alpha3().ResourceClaims() podInformer := informerFactory.Core().V1().Pods() - podSchedulingInformer := informerFactory.Resource().V1alpha2().PodSchedulingContexts() + podSchedulingInformer := informerFactory.Resource().V1alpha3().PodSchedulingContexts() // Order is important: on function exit, we first must // cancel, then wait (last-in-first-out). defer informerFactory.Shutdown() @@ -356,13 +356,13 @@ func TestController(t *testing.T) { for _, obj := range initialObjects { switch obj.(type) { - case *resourcev1alpha2.ResourceClass: + case *resourceapi.ResourceClass: require.NoError(t, rcInformer.Informer().GetStore().Add(obj), "add resource class") - case *resourcev1alpha2.ResourceClaim: + case *resourceapi.ResourceClaim: require.NoError(t, claimInformer.Informer().GetStore().Add(obj), "add resource claim") case *corev1.Pod: require.NoError(t, podInformer.Informer().GetStore().Add(obj), "add pod") - case *resourcev1alpha2.PodSchedulingContext: + case *resourceapi.PodSchedulingContext: require.NoError(t, podSchedulingInformer.Informer().GetStore().Add(obj), "add pod scheduling") default: t.Fatalf("unknown initialObject type: %+v", obj) @@ -375,9 +375,9 @@ func TestController(t *testing.T) { ctrl := New(ctx, driverName, driver, kubeClient, informerFactory) informerFactory.Start(ctx.Done()) if !cache.WaitForCacheSync(ctx.Done(), - informerFactory.Resource().V1alpha2().ResourceClasses().Informer().HasSynced, - informerFactory.Resource().V1alpha2().ResourceClaims().Informer().HasSynced, - informerFactory.Resource().V1alpha2().PodSchedulingContexts().Informer().HasSynced, + informerFactory.Resource().V1alpha3().ResourceClasses().Informer().HasSynced, + informerFactory.Resource().V1alpha3().ResourceClaims().Informer().HasSynced, + informerFactory.Resource().V1alpha3().PodSchedulingContexts().Informer().HasSynced, ) { t.Fatal("could not sync caches") } @@ -391,17 +391,17 @@ func TestController(t *testing.T) { if err != nil && err.Error() != test.expectedError { t.Fatalf("expected error %q, got %q", test.expectedError, err.Error()) } - claims, err := kubeClient.ResourceV1alpha2().ResourceClaims("").List(ctx, metav1.ListOptions{}) + claims, err := kubeClient.ResourceV1alpha3().ResourceClaims("").List(ctx, metav1.ListOptions{}) require.NoError(t, err, "list claims") - var expectedClaims []resourcev1alpha2.ResourceClaim + var expectedClaims []resourceapi.ResourceClaim if test.expectedClaim != nil { expectedClaims = append(expectedClaims, *test.expectedClaim) } assert.Equal(t, expectedClaims, claims.Items) - podSchedulings, err := kubeClient.ResourceV1alpha2().PodSchedulingContexts("").List(ctx, metav1.ListOptions{}) + podSchedulings, err := kubeClient.ResourceV1alpha3().PodSchedulingContexts("").List(ctx, metav1.ListOptions{}) require.NoError(t, err, "list pod schedulings") - var expectedPodSchedulings []resourcev1alpha2.PodSchedulingContext + var expectedPodSchedulings []resourceapi.PodSchedulingContext if test.expectedSchedulingCtx != nil { expectedPodSchedulings = append(expectedPodSchedulings, *test.expectedSchedulingCtx) } @@ -429,7 +429,7 @@ type mockDriver struct { type allocate struct { selectedNode string - allocResult *resourcev1alpha2.AllocationResult + allocResult *resourceapi.AllocationResult allocErr error } @@ -459,7 +459,7 @@ func (m mockDriver) expectUnsuitableNodes(expected map[string][]string, err erro return m } -func (m mockDriver) GetClassParameters(ctx context.Context, class *resourcev1alpha2.ResourceClass) (interface{}, error) { +func (m mockDriver) GetClassParameters(ctx context.Context, class *resourceapi.ResourceClass) (interface{}, error) { m.t.Logf("GetClassParameters(%s)", class) result, ok := m.classParameters[class.Name] if !ok { @@ -471,7 +471,7 @@ func (m mockDriver) GetClassParameters(ctx context.Context, class *resourcev1alp return result, nil } -func (m mockDriver) GetClaimParameters(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, class *resourcev1alpha2.ResourceClass, classParameters interface{}) (interface{}, error) { +func (m mockDriver) GetClaimParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, classParameters interface{}) (interface{}, error) { m.t.Logf("GetClaimParameters(%s)", claim) result, ok := m.claimParameters[claim.Name] if !ok { @@ -498,7 +498,7 @@ func (m mockDriver) Allocate(ctx context.Context, claims []*ClaimAllocation, sel return } -func (m mockDriver) Deallocate(ctx context.Context, claim *resourcev1alpha2.ResourceClaim) error { +func (m mockDriver) Deallocate(ctx context.Context, claim *resourceapi.ResourceClaim) error { m.t.Logf("Deallocate(%s)", claim) err, ok := m.deallocate[claim.Name] if !ok { @@ -532,8 +532,8 @@ func (m mockDriver) UnsuitableNodes(ctx context.Context, pod *corev1.Pod, claims return nil } -func createClass(className, driverName string) *resourcev1alpha2.ResourceClass { - return &resourcev1alpha2.ResourceClass{ +func createClass(className, driverName string) *resourceapi.ResourceClass { + return &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, @@ -541,13 +541,13 @@ func createClass(className, driverName string) *resourcev1alpha2.ResourceClass { } } -func createClaim(claimName, claimNamespace, className string) *resourcev1alpha2.ResourceClaim { - return &resourcev1alpha2.ResourceClaim{ +func createClaim(claimName, claimNamespace, className string) *resourceapi.ResourceClaim { + return &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: claimName, Namespace: claimNamespace, }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: className, }, } @@ -572,9 +572,9 @@ func createPod(podName, podNamespace string, claims map[string]string) *corev1.P return pod } -func createPodSchedulingContexts(pod *corev1.Pod) *resourcev1alpha2.PodSchedulingContext { +func createPodSchedulingContexts(pod *corev1.Pod) *resourceapi.PodSchedulingContext { controller := true - return &resourcev1alpha2.PodSchedulingContext{ + return &resourceapi.PodSchedulingContext{ ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: pod.Namespace, diff --git a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go index c5e440ab4b8fb..a7b04fac2bccd 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go @@ -26,7 +26,7 @@ import ( "google.golang.org/grpc" "k8s.io/klog/v2" - resourceapi "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/resourceslice" diff --git a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go index fb74480d996d9..a9a0e3d739fff 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go @@ -31,7 +31,7 @@ import ( "sync/atomic" 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" "k8s.io/client-go/kubernetes" "k8s.io/utils/ptr" @@ -157,7 +157,7 @@ func (l *Lookup) Name(pod *v1.Pod, podClaim *v1.PodResourceClaim) (name *string, // was created for the Pod. It returns an error that is informative // enough to be returned by the caller without adding further details // about the Pod or ResourceClaim. -func IsForPod(pod *v1.Pod, claim *resourcev1alpha2.ResourceClaim) error { +func IsForPod(pod *v1.Pod, claim *resourceapi.ResourceClaim) error { // Checking the namespaces is just a precaution. The caller should // never pass in a ResourceClaim that isn't from the same namespace as the // Pod. @@ -169,7 +169,7 @@ func IsForPod(pod *v1.Pod, claim *resourcev1alpha2.ResourceClaim) error { // IsReservedForPod checks whether a claim lists the pod as one of the objects // that the claim was reserved for. -func IsReservedForPod(pod *v1.Pod, claim *resourcev1alpha2.ResourceClaim) bool { +func IsReservedForPod(pod *v1.Pod, claim *resourceapi.ResourceClaim) bool { for _, reserved := range claim.Status.ReservedFor { if reserved.UID == pod.UID { return true @@ -179,14 +179,14 @@ func IsReservedForPod(pod *v1.Pod, claim *resourcev1alpha2.ResourceClaim) bool { } // CanBeReserved checks whether the claim could be reserved for another object. -func CanBeReserved(claim *resourcev1alpha2.ResourceClaim) bool { +func CanBeReserved(claim *resourceapi.ResourceClaim) bool { // Currently no restrictions on sharing... return true } // IsAllocatedWithStructuredParameters checks whether the claim is allocated // and the allocation was done with structured parameters. -func IsAllocatedWithStructuredParameters(claim *resourcev1alpha2.ResourceClaim) bool { +func IsAllocatedWithStructuredParameters(claim *resourceapi.ResourceClaim) bool { if claim.Status.Allocation == nil { return false } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim_test.go b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim_test.go index 0518ece1e255a..d5953ba8ad1bb 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim_test.go @@ -21,7 +21,7 @@ import ( "testing" 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" "k8s.io/apimachinery/pkg/types" ) @@ -48,14 +48,14 @@ func TestResourceClaimIsForPod(t *testing.T) { UID: newUID(), }, } - claimNoOwner := &resourcev1alpha2.ResourceClaim{ + claimNoOwner := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "claimNoOwner", UID: newUID(), }, } - claimWithOwner := &resourcev1alpha2.ResourceClaim{ + claimWithOwner := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Namespace: "kube-system", Name: "claimNoOwner", @@ -68,7 +68,7 @@ func TestResourceClaimIsForPod(t *testing.T) { }, }, } - userClaimWithOwner := &resourcev1alpha2.ResourceClaim{ + userClaimWithOwner := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Namespace: "user-namespace", Name: "userClaimWithOwner", @@ -84,7 +84,7 @@ func TestResourceClaimIsForPod(t *testing.T) { testcases := map[string]struct { pod *v1.Pod - claim *resourcev1alpha2.ResourceClaim + claim *resourceapi.ResourceClaim expectedError string }{ "owned": { diff --git a/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go b/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go index 7cb1d0e79e813..b70212523b373 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go @@ -25,14 +25,14 @@ import ( "github.com/google/go-cmp/cmp" - resourceapi "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" apiequality "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/sets" - resourceinformers "k8s.io/client-go/informers/resource/v1alpha2" + resourceinformers "k8s.io/client-go/informers/resource/v1alpha3" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" @@ -337,7 +337,7 @@ func (c *Controller) sync(ctx context.Context) error { slice = slice.DeepCopy() slice.ResourceModel = *resource logger.V(5).Info("Reusing existing resource slice", "slice", klog.KObj(slice)) - if _, err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Update(ctx, slice, metav1.UpdateOptions{}); err != nil { + if _, err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Update(ctx, slice, metav1.UpdateOptions{}); err != nil { return fmt.Errorf("update resource slice: %w", err) } continue @@ -364,7 +364,7 @@ func (c *Controller) sync(ctx context.Context) error { slice.NodeName = c.owner.Name } logger.V(5).Info("Creating new resource slice", "slice", klog.KObj(slice)) - if _, err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}); err != nil { + if _, err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}); err != nil { return fmt.Errorf("create resource slice: %w", err) } } @@ -373,7 +373,7 @@ func (c *Controller) sync(ctx context.Context) error { for i := 0; i < numObsoleteSlices; i++ { slice := obsoleteSlices[i] logger.V(5).Info("Deleting obsolete resource slice", "slice", klog.KObj(slice)) - if err := c.kubeClient.ResourceV1alpha2().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}); err != nil { + if err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}); err != nil { return fmt.Errorf("delete resource slice: %w", err) } } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go index d4beb0ce69890..504983d8c8438 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go @@ -26,7 +26,7 @@ import ( "github.com/google/cel-go/common/types" "github.com/google/cel-go/common/types/traits" - resourceapi "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/util/version" celconfig "k8s.io/apiserver/pkg/apis/cel" apiservercel "k8s.io/apiserver/pkg/cel" diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go index bea913c81fc52..240fdacd4fcf3 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - resourceapi "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/apiserver/pkg/cel/environment" "k8s.io/klog/v2/ktesting" diff --git a/test/e2e/dra/deploy.go b/test/e2e/dra/deploy.go index 38c4801e975bd..62da5d00d3fa4 100644 --- a/test/e2e/dra/deploy.go +++ b/test/e2e/dra/deploy.go @@ -37,7 +37,7 @@ import ( appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" @@ -48,7 +48,7 @@ import ( "k8s.io/apimachinery/pkg/selection" "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/client-go/discovery/cached/memory" - resourceapiinformer "k8s.io/client-go/informers/resource/v1alpha2" + resourceapiinformer "k8s.io/client-go/informers/resource/v1alpha3" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "k8s.io/client-go/restmapper" @@ -113,20 +113,20 @@ func NewNodes(f *framework.Framework, minNodes, maxNodes int) *Nodes { _, err = claimInformer.AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: func(obj any) { defer ginkgo.GinkgoRecover() - claim := obj.(*resourcev1alpha2.ResourceClaim) + claim := obj.(*resourceapi.ResourceClaim) framework.Logf("New claim:\n%s", format.Object(claim, 1)) validateClaim(claim) }, UpdateFunc: func(oldObj, newObj any) { defer ginkgo.GinkgoRecover() - oldClaim := oldObj.(*resourcev1alpha2.ResourceClaim) - newClaim := newObj.(*resourcev1alpha2.ResourceClaim) + oldClaim := oldObj.(*resourceapi.ResourceClaim) + newClaim := newObj.(*resourceapi.ResourceClaim) framework.Logf("Updated claim:\n%s\nDiff:\n%s", format.Object(newClaim, 1), cmp.Diff(oldClaim, newClaim)) validateClaim(newClaim) }, DeleteFunc: func(obj any) { defer ginkgo.GinkgoRecover() - claim := obj.(*resourcev1alpha2.ResourceClaim) + claim := obj.(*resourceapi.ResourceClaim) framework.Logf("Deleted claim:\n%s", format.Object(claim, 1)) }, }) @@ -140,7 +140,7 @@ func NewNodes(f *framework.Framework, minNodes, maxNodes int) *Nodes { return nodes } -func validateClaim(claim *resourcev1alpha2.ResourceClaim) { +func validateClaim(claim *resourceapi.ResourceClaim) { // The apiserver doesn't enforce that a claim always has a finalizer // while being allocated. This is a convention that whoever allocates a // claim has to follow to prevent using a claim that is at risk of @@ -258,7 +258,7 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { d.classParameterAPIKind = "ConfigMap" case parameterModeStructured: d.parameterAPIGroup = "resource.k8s.io" - d.parameterAPIVersion = "v1alpha2" + d.parameterAPIVersion = "v1alpha3" d.claimParameterAPIKind = "ResourceClaimParameters" d.classParameterAPIKind = "ResourceClassParameters" default: @@ -498,8 +498,8 @@ func (d *Driver) TearDown() { } func (d *Driver) IsGone(ctx context.Context) { - gomega.Eventually(ctx, func(ctx context.Context) ([]resourcev1alpha2.ResourceSlice, error) { - slices, err := d.f.ClientSet.ResourceV1alpha2().ResourceSlices().List(ctx, metav1.ListOptions{FieldSelector: "driverName=" + d.Name}) + gomega.Eventually(ctx, func(ctx context.Context) ([]resourceapi.ResourceSlice, error) { + slices, err := d.f.ClientSet.ResourceV1alpha3().ResourceSlices().List(ctx, metav1.ListOptions{FieldSelector: "driverName=" + d.Name}) if err != nil { return nil, err } diff --git a/test/e2e/dra/dra.go b/test/e2e/dra/dra.go index 829aa377f9cdd..935c1856df159 100644 --- a/test/e2e/dra/dra.go +++ b/test/e2e/dra/dra.go @@ -30,7 +30,7 @@ import ( "github.com/onsi/gomega/gstruct" 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" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -264,8 +264,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.By("waiting for pod to finish") framework.ExpectNoError(e2epod.WaitForPodNoLongerRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace), "wait for pod to finish") ginkgo.By("waiting for claim to be unreserved") - gomega.Eventually(ctx, func(ctx context.Context) (*resourcev1alpha2.ResourceClaim, error) { - return f.ClientSet.ResourceV1alpha2().ResourceClaims(pod.Namespace).Get(ctx, claim.Name, metav1.GetOptions{}) + gomega.Eventually(ctx, func(ctx context.Context) (*resourceapi.ResourceClaim, error) { + return f.ClientSet.ResourceV1alpha3().ResourceClaims(pod.Namespace).Get(ctx, claim.Name, metav1.GetOptions{}) }).WithTimeout(f.Timeouts.PodDelete).Should(gomega.HaveField("Status.ReservedFor", gomega.BeEmpty()), "reservation should have been removed") }) @@ -279,8 +279,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.By("waiting for pod to finish") framework.ExpectNoError(e2epod.WaitForPodNoLongerRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace), "wait for pod to finish") ginkgo.By("waiting for claim to be deleted") - gomega.Eventually(ctx, func(ctx context.Context) ([]resourcev1alpha2.ResourceClaim, error) { - claims, err := f.ClientSet.ResourceV1alpha2().ResourceClaims(pod.Namespace).List(ctx, metav1.ListOptions{}) + gomega.Eventually(ctx, func(ctx context.Context) ([]resourceapi.ResourceClaim, error) { + claims, err := f.ClientSet.ResourceV1alpha3().ResourceClaims(pod.Namespace).List(ctx, metav1.ListOptions{}) if err != nil { return nil, err } @@ -312,9 +312,9 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, objects = append(objects, claim, pod) b.create(ctx, objects...) - gomega.Eventually(ctx, func(ctx context.Context) (*resourcev1alpha2.ResourceClaim, error) { - return b.f.ClientSet.ResourceV1alpha2().ResourceClaims(b.f.Namespace.Name).Get(ctx, claim.Name, metav1.GetOptions{}) - }).WithTimeout(f.Timeouts.PodDelete).ShouldNot(gomega.HaveField("Status.Allocation", (*resourcev1alpha2.AllocationResult)(nil))) + gomega.Eventually(ctx, func(ctx context.Context) (*resourceapi.ResourceClaim, error) { + return b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Get(ctx, claim.Name, metav1.GetOptions{}) + }).WithTimeout(f.Timeouts.PodDelete).ShouldNot(gomega.HaveField("Status.Allocation", (*resourceapi.AllocationResult)(nil))) b.testPod(ctx, f.ClientSet, pod, expectedEnv...) @@ -322,9 +322,9 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, framework.ExpectNoError(b.f.ClientSet.CoreV1().Pods(b.f.Namespace.Name).Delete(ctx, pod.Name, metav1.DeleteOptions{})) ginkgo.By("waiting for claim to get deallocated") - gomega.Eventually(ctx, func(ctx context.Context) (*resourcev1alpha2.ResourceClaim, error) { - return b.f.ClientSet.ResourceV1alpha2().ResourceClaims(b.f.Namespace.Name).Get(ctx, claim.Name, metav1.GetOptions{}) - }).WithTimeout(f.Timeouts.PodDelete).Should(gomega.HaveField("Status.Allocation", (*resourcev1alpha2.AllocationResult)(nil))) + gomega.Eventually(ctx, func(ctx context.Context) (*resourceapi.ResourceClaim, error) { + return b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Get(ctx, claim.Name, metav1.GetOptions{}) + }).WithTimeout(f.Timeouts.PodDelete).Should(gomega.HaveField("Status.Allocation", (*resourceapi.AllocationResult)(nil))) }) } @@ -418,7 +418,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // at a time. After removing the "not sharable" // feature, we have to create more pods than supported // at the same time to get the same effect. - numPods := resourcev1alpha2.ResourceClaimReservedForMaxSize + 10 + numPods := resourceapi.ResourceClaimReservedForMaxSize + 10 pods := make([]*v1.Pod, numPods) for i := 0; i < numPods; i++ { pod := b.podExternal() @@ -450,7 +450,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.It("retries pod scheduling after creating resource class", func(ctx context.Context) { objects, expectedEnv := b.flexibleParameters() pod, template := b.podInline() - class, err := f.ClientSet.ResourceV1alpha2().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) + class, err := f.ClientSet.ResourceV1alpha3().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) framework.ExpectNoError(err) template.Spec.Spec.ResourceClassName += "-b" objects = append(objects, template, pod) @@ -471,7 +471,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, pod, template := b.podInline() // First modify the class so that it matches no nodes. - class, err := f.ClientSet.ResourceV1alpha2().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) + class, err := f.ClientSet.ResourceV1alpha3().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) framework.ExpectNoError(err) class.SuitableNodes = &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{ @@ -486,7 +486,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }, }, } - class, err = f.ClientSet.ResourceV1alpha2().ResourceClasses().Update(ctx, class, metav1.UpdateOptions{}) + class, err = f.ClientSet.ResourceV1alpha3().ResourceClasses().Update(ctx, class, metav1.UpdateOptions{}) framework.ExpectNoError(err) // Now create the pod. @@ -497,7 +497,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // Unblock the pod. class.SuitableNodes = nil - _, err = f.ClientSet.ResourceV1alpha2().ResourceClasses().Update(ctx, class, metav1.UpdateOptions{}) + _, err = f.ClientSet.ResourceV1alpha3().ResourceClasses().Update(ctx, class, metav1.UpdateOptions{}) framework.ExpectNoError(err) b.testPod(ctx, f.ClientSet, pod, expectedEnv...) @@ -607,7 +607,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.DeferCleanup(e2enode.RemoveTaintOffNode, f.ClientSet, nodeName, taint) ginkgo.By("waiting for claim to get deallocated") - gomega.Eventually(ctx, framework.GetObject(b.f.ClientSet.ResourceV1alpha2().ResourceClaims(b.f.Namespace.Name).Get, claim.Name, metav1.GetOptions{})).WithTimeout(f.Timeouts.PodDelete).Should(gomega.HaveField("Status.Allocation", gomega.BeNil())) + gomega.Eventually(ctx, framework.GetObject(b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Get, claim.Name, metav1.GetOptions{})).WithTimeout(f.Timeouts.PodDelete).Should(gomega.HaveField("Status.Allocation", gomega.BeNil())) }) } @@ -702,7 +702,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.By("waiting for one claim from driver1 to be allocated") var nodeSelector *v1.NodeSelector gomega.Eventually(ctx, func(ctx context.Context) (int, error) { - claims, err := f.ClientSet.ResourceV1alpha2().ResourceClaims(f.Namespace.Name).List(ctx, metav1.ListOptions{}) + claims, err := f.ClientSet.ResourceV1alpha3().ResourceClaims(f.Namespace.Name).List(ctx, metav1.ListOptions{}) if err != nil { return 0, err } @@ -839,7 +839,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // Now check for exactly the right set of objects for all nodes. ginkgo.By("check if ResourceSlice object(s) exist on the API server") - resourceClient := f.ClientSet.ResourceV1alpha2().ResourceSlices() + resourceClient := f.ClientSet.ResourceV1alpha3().ResourceSlices() var expectedObjects []any for _, nodeName := range nodes.NodeNames { node, err := f.ClientSet.CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{}) @@ -861,14 +861,14 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }), "NodeName": gomega.Equal(nodeName), "DriverName": gomega.Equal(driver.Name), - "ResourceModel": gomega.Equal(resourcev1alpha2.ResourceModel{NamedResources: &resourcev1alpha2.NamedResourcesResources{ - Instances: []resourcev1alpha2.NamedResourcesInstance{{Name: "instance-00"}}, + "ResourceModel": gomega.Equal(resourceapi.ResourceModel{NamedResources: &resourceapi.NamedResourcesResources{ + Instances: []resourceapi.NamedResourcesInstance{{Name: "instance-00"}}, }}), }), ) } matchSlices := gomega.ContainElements(expectedObjects...) - getSlices := func(ctx context.Context) ([]resourcev1alpha2.ResourceSlice, error) { + getSlices := func(ctx context.Context) ([]resourceapi.ResourceSlice, error) { slices, err := resourceClient.List(ctx, metav1.ListOptions{FieldSelector: fmt.Sprintf("driverName=%s", driverName)}) if err != nil { return nil, err @@ -956,7 +956,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, claim2 := b2.externalClaim() claim2b := b2.externalClaim() pod := b1.podExternal() - for i, claim := range []*resourcev1alpha2.ResourceClaim{claim1b, claim2, claim2b} { + for i, claim := range []*resourceapi.ResourceClaim{claim1b, claim2, claim2b} { claim := claim pod.Spec.ResourceClaims = append(pod.Spec.ResourceClaims, v1.PodResourceClaim{ @@ -1000,8 +1000,8 @@ func (b *builder) className() string { // class returns the resource class that the builder's other objects // reference. -func (b *builder) class() *resourcev1alpha2.ResourceClass { - class := &resourcev1alpha2.ResourceClass{ +func (b *builder) class() *resourceapi.ResourceClass { + class := &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: b.className(), }, @@ -1010,7 +1010,7 @@ func (b *builder) class() *resourcev1alpha2.ResourceClass { StructuredParameters: ptr.To(b.driver.parameterMode != parameterModeConfigMap), } if b.classParametersName != "" { - class.ParametersRef = &resourcev1alpha2.ResourceClassParametersReference{ + class.ParametersRef = &resourceapi.ResourceClassParametersReference{ APIGroup: b.driver.parameterAPIGroup, Kind: b.driver.classParameterAPIKind, Name: b.classParametersName, @@ -1040,19 +1040,19 @@ func (b *builder) nodeSelector() *v1.NodeSelector { // externalClaim returns external resource claim // that test pods can reference -func (b *builder) externalClaim() *resourcev1alpha2.ResourceClaim { +func (b *builder) externalClaim() *resourceapi.ResourceClaim { b.claimCounter++ name := "external-claim" + b.driver.NameSuffix // This is what podExternal expects. if b.claimCounter > 1 { name += fmt.Sprintf("-%d", b.claimCounter) } - return &resourcev1alpha2.ResourceClaim{ + return &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: b.className(), - ParametersRef: &resourcev1alpha2.ResourceClaimParametersReference{ + ParametersRef: &resourceapi.ResourceClaimParametersReference{ APIGroup: b.driver.parameterAPIGroup, Kind: b.driver.claimParameterAPIKind, Name: b.parametersName(), @@ -1122,22 +1122,22 @@ func (b *builder) parameters(kv ...string) *v1.ConfigMap { } } -func (b *builder) classParameters(generatedFrom string, kv ...string) *resourcev1alpha2.ResourceClassParameters { +func (b *builder) classParameters(generatedFrom string, kv ...string) *resourceapi.ResourceClassParameters { raw := b.rawParameterData(kv...) b.parametersCounter++ - parameters := &resourcev1alpha2.ResourceClassParameters{ + parameters := &resourceapi.ResourceClassParameters{ ObjectMeta: metav1.ObjectMeta{ Namespace: b.f.Namespace.Name, Name: b.parametersName(), }, - VendorParameters: []resourcev1alpha2.VendorParameters{ + VendorParameters: []resourceapi.VendorParameters{ {DriverName: b.driver.Name, Parameters: runtime.RawExtension{Raw: raw}}, }, } if generatedFrom != "" { - parameters.GeneratedFrom = &resourcev1alpha2.ResourceClassParametersReference{ + parameters.GeneratedFrom = &resourceapi.ResourceClassParametersReference{ Kind: "ConfigMap", Namespace: b.f.Namespace.Name, Name: generatedFrom, @@ -1147,9 +1147,9 @@ func (b *builder) classParameters(generatedFrom string, kv ...string) *resourcev return parameters } -func (b *builder) claimParameters(generatedFrom string, claimKV, requestKV []string) *resourcev1alpha2.ResourceClaimParameters { +func (b *builder) claimParameters(generatedFrom string, claimKV, requestKV []string) *resourceapi.ResourceClaimParameters { b.parametersCounter++ - parameters := &resourcev1alpha2.ResourceClaimParameters{ + parameters := &resourceapi.ResourceClaimParameters{ ObjectMeta: metav1.ObjectMeta{ Namespace: b.f.Namespace.Name, Name: b.parametersName(), @@ -1158,15 +1158,15 @@ func (b *builder) claimParameters(generatedFrom string, claimKV, requestKV []str // Without any request, nothing gets allocated and vendor // parameters are also not passed down because they get // attached to the allocation result. - DriverRequests: []resourcev1alpha2.DriverRequests{ + DriverRequests: []resourceapi.DriverRequests{ { DriverName: b.driver.Name, VendorParameters: runtime.RawExtension{Raw: b.rawParameterData(claimKV...)}, - Requests: []resourcev1alpha2.ResourceRequest{ + Requests: []resourceapi.ResourceRequest{ { VendorParameters: runtime.RawExtension{Raw: b.rawParameterData(requestKV...)}, - ResourceRequestModel: resourcev1alpha2.ResourceRequestModel{ - NamedResources: &resourcev1alpha2.NamedResourcesRequest{ + ResourceRequestModel: resourceapi.ResourceRequestModel{ + NamedResources: &resourceapi.NamedResourcesRequest{ Selector: "true", }, }, @@ -1177,7 +1177,7 @@ func (b *builder) claimParameters(generatedFrom string, claimKV, requestKV []str } if generatedFrom != "" { - parameters.GeneratedFrom = &resourcev1alpha2.ResourceClaimParametersReference{ + parameters.GeneratedFrom = &resourceapi.ResourceClaimParametersReference{ Kind: "ConfigMap", Name: generatedFrom, } @@ -1232,7 +1232,7 @@ func (b *builder) pod() *v1.Pod { } // makePodInline adds an inline resource claim with default class name and parameters. -func (b *builder) podInline() (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) { +func (b *builder) podInline() (*v1.Pod, *resourceapi.ResourceClaimTemplate) { pod := b.pod() pod.Spec.Containers[0].Name = "with-resource" podClaimName := "my-inline-claim" @@ -1243,15 +1243,15 @@ func (b *builder) podInline() (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) ResourceClaimTemplateName: ptr.To(pod.Name), }, } - template := &resourcev1alpha2.ResourceClaimTemplate{ + template := &resourceapi.ResourceClaimTemplate{ ObjectMeta: metav1.ObjectMeta{ Name: pod.Name, Namespace: pod.Namespace, }, - Spec: resourcev1alpha2.ResourceClaimTemplateSpec{ - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimTemplateSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: b.className(), - ParametersRef: &resourcev1alpha2.ResourceClaimParametersReference{ + ParametersRef: &resourceapi.ResourceClaimParametersReference{ APIGroup: b.driver.parameterAPIGroup, Kind: b.driver.claimParameterAPIKind, Name: b.parametersName(), @@ -1263,7 +1263,7 @@ func (b *builder) podInline() (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) } // podInlineMultiple returns a pod with inline resource claim referenced by 3 containers -func (b *builder) podInlineMultiple() (*v1.Pod, *resourcev1alpha2.ResourceClaimTemplate) { +func (b *builder) podInlineMultiple() (*v1.Pod, *resourceapi.ResourceClaimTemplate) { pod, template := b.podInline() pod.Spec.Containers = append(pod.Spec.Containers, *pod.Spec.Containers[0].DeepCopy(), *pod.Spec.Containers[0].DeepCopy()) pod.Spec.Containers[1].Name = pod.Spec.Containers[1].Name + "-1" @@ -1304,28 +1304,28 @@ func (b *builder) create(ctx context.Context, objs ...klog.KMetadata) []klog.KMe var err error var createdObj klog.KMetadata switch obj := obj.(type) { - case *resourcev1alpha2.ResourceClass: - createdObj, err = b.f.ClientSet.ResourceV1alpha2().ResourceClasses().Create(ctx, obj, metav1.CreateOptions{}) + case *resourceapi.ResourceClass: + createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClasses().Create(ctx, obj, metav1.CreateOptions{}) ginkgo.DeferCleanup(func(ctx context.Context) { - err := b.f.ClientSet.ResourceV1alpha2().ResourceClasses().Delete(ctx, createdObj.GetName(), metav1.DeleteOptions{}) + err := b.f.ClientSet.ResourceV1alpha3().ResourceClasses().Delete(ctx, createdObj.GetName(), metav1.DeleteOptions{}) framework.ExpectNoError(err, "delete resource class") }) case *v1.Pod: createdObj, err = b.f.ClientSet.CoreV1().Pods(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) case *v1.ConfigMap: createdObj, err = b.f.ClientSet.CoreV1().ConfigMaps(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) - case *resourcev1alpha2.ResourceClaim: - createdObj, err = b.f.ClientSet.ResourceV1alpha2().ResourceClaims(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) - case *resourcev1alpha2.ResourceClaimTemplate: - createdObj, err = b.f.ClientSet.ResourceV1alpha2().ResourceClaimTemplates(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) - case *resourcev1alpha2.ResourceClassParameters: - createdObj, err = b.f.ClientSet.ResourceV1alpha2().ResourceClassParameters(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) - case *resourcev1alpha2.ResourceClaimParameters: - createdObj, err = b.f.ClientSet.ResourceV1alpha2().ResourceClaimParameters(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) - case *resourcev1alpha2.ResourceSlice: - createdObj, err = b.f.ClientSet.ResourceV1alpha2().ResourceSlices().Create(ctx, obj, metav1.CreateOptions{}) + case *resourceapi.ResourceClaim: + createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) + case *resourceapi.ResourceClaimTemplate: + createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClaimTemplates(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) + case *resourceapi.ResourceClassParameters: + createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClassParameters(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) + case *resourceapi.ResourceClaimParameters: + createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClaimParameters(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) + case *resourceapi.ResourceSlice: + createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceSlices().Create(ctx, obj, metav1.CreateOptions{}) ginkgo.DeferCleanup(func(ctx context.Context) { - err := b.f.ClientSet.ResourceV1alpha2().ResourceSlices().Delete(ctx, createdObj.GetName(), metav1.DeleteOptions{}) + err := b.f.ClientSet.ResourceV1alpha3().ResourceSlices().Delete(ctx, createdObj.GetName(), metav1.DeleteOptions{}) framework.ExpectNoError(err, "delete node resource slice") }) default: @@ -1397,14 +1397,14 @@ func (b *builder) tearDown(ctx context.Context) { return b.listTestPods(ctx) }).WithTimeout(time.Minute).Should(gomega.BeEmpty(), "remaining pods despite deletion") - claims, err := b.f.ClientSet.ResourceV1alpha2().ResourceClaims(b.f.Namespace.Name).List(ctx, metav1.ListOptions{}) + claims, err := b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).List(ctx, metav1.ListOptions{}) framework.ExpectNoError(err, "get resource claims") for _, claim := range claims.Items { if claim.DeletionTimestamp != nil { continue } ginkgo.By(fmt.Sprintf("deleting %T %s", &claim, klog.KObj(&claim))) - err := b.f.ClientSet.ResourceV1alpha2().ResourceClaims(b.f.Namespace.Name).Delete(ctx, claim.Name, metav1.DeleteOptions{}) + err := b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Delete(ctx, claim.Name, metav1.DeleteOptions{}) if !apierrors.IsNotFound(err) { framework.ExpectNoError(err, "delete claim") } @@ -1416,8 +1416,8 @@ func (b *builder) tearDown(ctx context.Context) { } ginkgo.By("waiting for claims to be deallocated and deleted") - gomega.Eventually(func() ([]resourcev1alpha2.ResourceClaim, error) { - claims, err := b.f.ClientSet.ResourceV1alpha2().ResourceClaims(b.f.Namespace.Name).List(ctx, metav1.ListOptions{}) + gomega.Eventually(func() ([]resourceapi.ResourceClaim, error) { + claims, err := b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).List(ctx, metav1.ListOptions{}) if err != nil { return nil, err } diff --git a/test/e2e/dra/kind.yaml b/test/e2e/dra/kind.yaml index 59884ed31b56c..952f874812be1 100644 --- a/test/e2e/dra/kind.yaml +++ b/test/e2e/dra/kind.yaml @@ -19,7 +19,7 @@ nodes: v: "5" apiServer: extraArgs: - runtime-config: "resource.k8s.io/v1alpha2=true" + runtime-config: "resource.k8s.io/v1alpha3=true" - | kind: InitConfiguration nodeRegistration: diff --git a/test/e2e/dra/test-driver/README.md b/test/e2e/dra/test-driver/README.md index be79dbbf9a09d..baa275897c12c 100644 --- a/test/e2e/dra/test-driver/README.md +++ b/test/e2e/dra/test-driver/README.md @@ -55,7 +55,7 @@ kubelet<->dynamic resource allocation plugin interaction. To try out the feature, build Kubernetes, then in one console run: ```console -RUNTIME_CONFIG="resource.k8s.io/v1alpha2" FEATURE_GATES=DynamicResourceAllocation=true ALLOW_PRIVILEGED=1 ./hack/local-up-cluster.sh -O +RUNTIME_CONFIG="resource.k8s.io/v1alpha3" FEATURE_GATES=DynamicResourceAllocation=true ALLOW_PRIVILEGED=1 ./hack/local-up-cluster.sh -O ``` In another: diff --git a/test/e2e/dra/test-driver/app/controller.go b/test/e2e/dra/test-driver/app/controller.go index 4c113593af405..5a578ba3664f0 100644 --- a/test/e2e/dra/test-driver/app/controller.go +++ b/test/e2e/dra/test-driver/app/controller.go @@ -28,7 +28,7 @@ import ( "sync" 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" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" @@ -68,9 +68,9 @@ func (r Resources) AllNodes(nodeLister listersv1.NodeLister) []string { return r.Nodes } -func (r Resources) NewAllocation(node string, data []byte) *resourcev1alpha2.AllocationResult { - allocation := &resourcev1alpha2.AllocationResult{} - allocation.ResourceHandles = []resourcev1alpha2.ResourceHandle{ +func (r Resources) NewAllocation(node string, data []byte) *resourceapi.AllocationResult { + allocation := &resourceapi.AllocationResult{} + allocation.ResourceHandles = []resourceapi.ResourceHandle{ { DriverName: r.DriverName, Data: string(data), @@ -193,7 +193,7 @@ func (c *ExampleController) GetNumDeallocations() int64 { return c.numDeallocations } -func (c *ExampleController) GetClassParameters(ctx context.Context, class *resourcev1alpha2.ResourceClass) (interface{}, error) { +func (c *ExampleController) GetClassParameters(ctx context.Context, class *resourceapi.ResourceClass) (interface{}, error) { if class.ParametersRef != nil { if class.ParametersRef.APIGroup != "" || class.ParametersRef.Kind != "ConfigMap" { @@ -204,7 +204,7 @@ func (c *ExampleController) GetClassParameters(ctx context.Context, class *resou return nil, nil } -func (c *ExampleController) GetClaimParameters(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, class *resourcev1alpha2.ResourceClass, classParameters interface{}) (interface{}, error) { +func (c *ExampleController) GetClaimParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, classParameters interface{}) (interface{}, error) { if claim.Spec.ParametersRef != nil { if claim.Spec.ParametersRef.APIGroup != "" || claim.Spec.ParametersRef.Kind != "ConfigMap" { @@ -246,7 +246,7 @@ func (c *ExampleController) allocateOneByOne(ctx context.Context, claimAllocatio } // allocate simply copies parameters as JSON map into a ResourceHandle. -func (c *ExampleController) allocateOne(ctx context.Context, claim *resourcev1alpha2.ResourceClaim, claimParameters interface{}, class *resourcev1alpha2.ResourceClass, classParameters interface{}, selectedNode string) (result *resourcev1alpha2.AllocationResult, err error) { +func (c *ExampleController) allocateOne(ctx context.Context, claim *resourceapi.ResourceClaim, claimParameters interface{}, class *resourceapi.ResourceClass, classParameters interface{}, selectedNode string) (result *resourceapi.AllocationResult, err error) { logger := klog.LoggerWithValues(klog.LoggerWithName(klog.FromContext(ctx), "Allocate"), "claim", klog.KObj(claim), "uid", claim.UID) defer func() { logger.V(3).Info("done", "result", result, "err", err) @@ -316,7 +316,7 @@ func (c *ExampleController) allocateOne(ctx context.Context, claim *resourcev1al return allocation, nil } -func (c *ExampleController) Deallocate(ctx context.Context, claim *resourcev1alpha2.ResourceClaim) error { +func (c *ExampleController) Deallocate(ctx context.Context, claim *resourceapi.ResourceClaim) error { logger := klog.LoggerWithValues(klog.LoggerWithName(klog.FromContext(ctx), "Deallocate"), "claim", klog.KObj(claim), "uid", claim.UID) c.mutex.Lock() defer c.mutex.Unlock() diff --git a/test/e2e/dra/test-driver/app/kubeletplugin.go b/test/e2e/dra/test-driver/app/kubeletplugin.go index ce320c51352dd..5b7c1f0742256 100644 --- a/test/e2e/dra/test-driver/app/kubeletplugin.go +++ b/test/e2e/dra/test-driver/app/kubeletplugin.go @@ -28,7 +28,7 @@ import ( "google.golang.org/grpc" - resourceapi "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -256,7 +256,7 @@ func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimReq *drap // that it understands. var resourceHandle string var structuredResourceHandle *resourceapi.StructuredResourceHandle - claim, err := ex.kubeClient.ResourceV1alpha2().ResourceClaims(claimReq.Namespace).Get(ctx, claimReq.Name, metav1.GetOptions{}) + claim, err := ex.kubeClient.ResourceV1alpha3().ResourceClaims(claimReq.Namespace).Get(ctx, claimReq.Name, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("retrieve claim %s/%s: %w", claimReq.Namespace, claimReq.Name, err) } diff --git a/test/e2e/dra/test-driver/deploy/example/broken-resourceclass.yaml b/test/e2e/dra/test-driver/deploy/example/broken-resourceclass.yaml index c6cf1c2ec9e96..0cfb6d6ee7663 100644 --- a/test/e2e/dra/test-driver/deploy/example/broken-resourceclass.yaml +++ b/test/e2e/dra/test-driver/deploy/example/broken-resourceclass.yaml @@ -2,7 +2,7 @@ # When using it instead of a functional one, scheduling a pod leads to: # Warning FailedScheduling 16s default-scheduler 0/1 nodes are available: 1 excluded via potential node filter in resource class. -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClass metadata: name: example diff --git a/test/e2e/dra/test-driver/deploy/example/pod-external.yaml b/test/e2e/dra/test-driver/deploy/example/pod-external.yaml index 4901a4810dd14..304dd903d4ee9 100644 --- a/test/e2e/dra/test-driver/deploy/example/pod-external.yaml +++ b/test/e2e/dra/test-driver/deploy/example/pod-external.yaml @@ -8,7 +8,7 @@ metadata: data: a: b --- -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaim metadata: name: external-claim diff --git a/test/e2e/dra/test-driver/deploy/example/pod-inline-multiple.yaml b/test/e2e/dra/test-driver/deploy/example/pod-inline-multiple.yaml index 10e4503ee77a7..a859834cb6bee 100644 --- a/test/e2e/dra/test-driver/deploy/example/pod-inline-multiple.yaml +++ b/test/e2e/dra/test-driver/deploy/example/pod-inline-multiple.yaml @@ -6,7 +6,7 @@ metadata: data: a: b --- -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaimTemplate metadata: name: pause-template diff --git a/test/e2e/dra/test-driver/deploy/example/pod-inline.yaml b/test/e2e/dra/test-driver/deploy/example/pod-inline.yaml index 8248cd6333a72..10619b12e3e52 100644 --- a/test/e2e/dra/test-driver/deploy/example/pod-inline.yaml +++ b/test/e2e/dra/test-driver/deploy/example/pod-inline.yaml @@ -8,7 +8,7 @@ metadata: data: a: b --- -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaimTemplate metadata: name: test-inline-claim-template diff --git a/test/e2e/dra/test-driver/deploy/example/pod-shared.yaml b/test/e2e/dra/test-driver/deploy/example/pod-shared.yaml index 54b120c28cddb..164ed41fa6073 100644 --- a/test/e2e/dra/test-driver/deploy/example/pod-shared.yaml +++ b/test/e2e/dra/test-driver/deploy/example/pod-shared.yaml @@ -8,7 +8,7 @@ metadata: data: a: b --- -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaim metadata: name: shared-claim diff --git a/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml b/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml index 705891324c910..c6e92bb4d2efa 100644 --- a/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml +++ b/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml @@ -6,7 +6,7 @@ metadata: data: a: b --- -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaim metadata: name: example diff --git a/test/e2e/dra/test-driver/deploy/example/resourceclass.yaml b/test/e2e/dra/test-driver/deploy/example/resourceclass.yaml index 948b39fb18f6e..89b856295e316 100644 --- a/test/e2e/dra/test-driver/deploy/example/resourceclass.yaml +++ b/test/e2e/dra/test-driver/deploy/example/resourceclass.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClass metadata: name: example diff --git a/test/e2e_node/dra_test.go b/test/e2e_node/dra_test.go index e459f986c6e23..0d2dacef3c845 100644 --- a/test/e2e_node/dra_test.go +++ b/test/e2e_node/dra_test.go @@ -38,7 +38,7 @@ import ( "github.com/onsi/gomega/types" 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" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" @@ -469,8 +469,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) f.Context("ResourceSlice", f.WithSerial(), func() { - listResources := func(ctx context.Context) ([]resourcev1alpha2.ResourceSlice, error) { - slices, err := f.ClientSet.ResourceV1alpha2().ResourceSlices().List(ctx, metav1.ListOptions{}) + listResources := func(ctx context.Context) ([]resourceapi.ResourceSlice, error) { + slices, err := f.ClientSet.ResourceV1alpha3().ResourceSlices().List(ctx, metav1.ListOptions{}) if err != nil { return nil, err } @@ -562,7 +562,7 @@ func newKubeletPlugin(ctx context.Context, clientSet kubernetes.Interface, nodeN ginkgo.DeferCleanup(func(ctx context.Context) { // kubelet should do this eventually, but better make sure. // A separate test checks this explicitly. - framework.ExpectNoError(clientSet.ResourceV1alpha2().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: "driverName=" + driverName})) + framework.ExpectNoError(clientSet.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: "driverName=" + driverName})) }) ginkgo.DeferCleanup(plugin.Stop) @@ -575,31 +575,31 @@ func newKubeletPlugin(ctx context.Context, clientSet kubernetes.Interface, nodeN // and placed on the node without involving the scheduler and the DRA controller func createTestObjects(ctx context.Context, clientSet kubernetes.Interface, nodename, namespace, className, claimName, podName string, deferPodDeletion bool, pluginNames []string) *v1.Pod { // ResourceClass - class := &resourcev1alpha2.ResourceClass{ + class := &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, DriverName: "controller", } - _, err := clientSet.ResourceV1alpha2().ResourceClasses().Create(ctx, class, metav1.CreateOptions{}) + _, err := clientSet.ResourceV1alpha3().ResourceClasses().Create(ctx, class, metav1.CreateOptions{}) framework.ExpectNoError(err) - ginkgo.DeferCleanup(clientSet.ResourceV1alpha2().ResourceClasses().Delete, className, metav1.DeleteOptions{}) + ginkgo.DeferCleanup(clientSet.ResourceV1alpha3().ResourceClasses().Delete, className, metav1.DeleteOptions{}) // ResourceClaim podClaimName := "resource-claim" - claim := &resourcev1alpha2.ResourceClaim{ + claim := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: claimName, }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: className, }, } - createdClaim, err := clientSet.ResourceV1alpha2().ResourceClaims(namespace).Create(ctx, claim, metav1.CreateOptions{}) + createdClaim, err := clientSet.ResourceV1alpha3().ResourceClaims(namespace).Create(ctx, claim, metav1.CreateOptions{}) framework.ExpectNoError(err) - ginkgo.DeferCleanup(clientSet.ResourceV1alpha2().ResourceClaims(namespace).Delete, claimName, metav1.DeleteOptions{}) + ginkgo.DeferCleanup(clientSet.ResourceV1alpha3().ResourceClaims(namespace).Delete, claimName, metav1.DeleteOptions{}) // Pod containerName := "testcontainer" @@ -638,46 +638,46 @@ func createTestObjects(ctx context.Context, clientSet kubernetes.Interface, node // Update claim status: set ReservedFor and AllocationResult // NOTE: This is usually done by the DRA controller - resourceHandlers := make([]resourcev1alpha2.ResourceHandle, len(pluginNames)) + resourceHandlers := make([]resourceapi.ResourceHandle, len(pluginNames)) for i, pluginName := range pluginNames { - resourceHandlers[i] = resourcev1alpha2.ResourceHandle{ + resourceHandlers[i] = resourceapi.ResourceHandle{ DriverName: pluginName, Data: "{\"EnvVars\":{\"DRA_PARAM1\":\"PARAM1_VALUE\"},\"NodeName\":\"\"}", } } - createdClaim.Status = resourcev1alpha2.ResourceClaimStatus{ + createdClaim.Status = resourceapi.ResourceClaimStatus{ DriverName: "controller", - ReservedFor: []resourcev1alpha2.ResourceClaimConsumerReference{ + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {Resource: "pods", Name: podName, UID: createdPod.UID}, }, - Allocation: &resourcev1alpha2.AllocationResult{ + Allocation: &resourceapi.AllocationResult{ ResourceHandles: resourceHandlers, }, } - _, err = clientSet.ResourceV1alpha2().ResourceClaims(namespace).UpdateStatus(ctx, createdClaim, metav1.UpdateOptions{}) + _, err = clientSet.ResourceV1alpha3().ResourceClaims(namespace).UpdateStatus(ctx, createdClaim, metav1.UpdateOptions{}) framework.ExpectNoError(err) return pod } func createTestResourceSlice(ctx context.Context, clientSet kubernetes.Interface, nodeName, driverName string) { - slice := &resourcev1alpha2.ResourceSlice{ + slice := &resourceapi.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{ Name: nodeName, }, NodeName: nodeName, DriverName: driverName, - ResourceModel: resourcev1alpha2.ResourceModel{ - NamedResources: &resourcev1alpha2.NamedResourcesResources{}, + ResourceModel: resourceapi.ResourceModel{ + NamedResources: &resourceapi.NamedResourcesResources{}, }, } ginkgo.By(fmt.Sprintf("Creating ResourceSlice %s", nodeName)) - slice, err := clientSet.ResourceV1alpha2().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}) + slice, err := clientSet.ResourceV1alpha3().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}) framework.ExpectNoError(err, "create ResourceSlice") ginkgo.DeferCleanup(func(ctx context.Context) { ginkgo.By(fmt.Sprintf("Deleting ResourceSlice %s", nodeName)) - err := clientSet.ResourceV1alpha2().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}) + err := clientSet.ResourceV1alpha3().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}) if !apierrors.IsNotFound(err) { framework.ExpectNoError(err, "delete ResourceSlice") } diff --git a/test/integration/apiserver/apply/reset_fields_test.go b/test/integration/apiserver/apply/reset_fields_test.go index 33ca07a7383a1..84b978d671e27 100644 --- a/test/integration/apiserver/apply/reset_fields_test.go +++ b/test/integration/apiserver/apply/reset_fields_test.go @@ -59,8 +59,8 @@ var resetFieldsStatusData = map[schema.GroupVersionResource]string{ gvr("storage.k8s.io", "v1", "volumeattachments"): `{"status": {"attached": false}}`, gvr("policy", "v1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 25}}`, gvr("policy", "v1beta1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 25}}`, - gvr("resource.k8s.io", "v1alpha2", "podschedulingcontexts"): `{"status": {"resourceClaims": [{"name": "my-claim", "unsuitableNodes": ["node2"]}]}}`, // Not really a conflict with status_test.go: Apply just stores both nodes. Conflict testing therefore gets disabled for podschedulingcontexts. - gvr("resource.k8s.io", "v1alpha2", "resourceclaims"): `{"status": {"driverName": "other.example.com"}}`, + gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): `{"status": {"resourceClaims": [{"name": "my-claim", "unsuitableNodes": ["node2"]}]}}`, // Not really a conflict with status_test.go: Apply just stores both nodes. Conflict testing therefore gets disabled for podschedulingcontexts. + gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"status": {"driverName": "other.example.com"}}`, gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{"status": {"commonEncodingVersion":"v1","storageVersions":[{"apiServerID":"1","decodableVersions":["v1","v2"],"encodingVersion":"v1"}],"conditions":[{"type":"AllEncodingVersionsEqual","status":"False","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"allEncodingVersionsEqual","message":"all encoding versions are set to v1"}]}}`, // standard for []metav1.Condition gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicies"): `{"status": {"conditions":[{"type":"Accepted","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, @@ -152,10 +152,10 @@ var resetFieldsSpecData = map[schema.GroupVersionResource]string{ gvr("awesome.bears.com", "v3", "pandas"): `{"spec": {"replicas": 302}}`, gvr("apiregistration.k8s.io", "v1beta1", "apiservices"): `{"metadata": {"labels": {"a":"c"}}, "spec": {"group": "foo2.com"}}`, gvr("apiregistration.k8s.io", "v1", "apiservices"): `{"metadata": {"labels": {"a":"c"}}, "spec": {"group": "foo2.com"}}`, - gvr("resource.k8s.io", "v1alpha2", "podschedulingcontexts"): `{"spec": {"selectedNode": "node2name"}}`, - gvr("resource.k8s.io", "v1alpha2", "resourceclasses"): `{"driverName": "other.example.com"}`, - gvr("resource.k8s.io", "v1alpha2", "resourceclaims"): `{"spec": {"resourceClassName": "class2name"}}`, // ResourceClassName is immutable, but that doesn't matter for the test. - gvr("resource.k8s.io", "v1alpha2", "resourceclaimtemplates"): `{"spec": {"spec": {"resourceClassName": "class2name"}}}`, + gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): `{"spec": {"selectedNode": "node2name"}}`, + gvr("resource.k8s.io", "v1alpha3", "resourceclasses"): `{"driverName": "other.example.com"}`, + gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"spec": {"resourceClassName": "class2name"}}`, // ResourceClassName is immutable, but that doesn't matter for the test. + gvr("resource.k8s.io", "v1alpha3", "resourceclaimtemplates"): `{"spec": {"spec": {"resourceClassName": "class2name"}}}`, gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{}`, gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicies"): `{"metadata": {"labels": {"a":"c"}}, "spec": {"paramKind": {"apiVersion": "apps/v1", "kind": "Deployment"}}}`, gvr("admissionregistration.k8s.io", "v1beta1", "validatingadmissionpolicies"): `{"metadata": {"labels": {"a":"c"}}, "spec": {"paramKind": {"apiVersion": "apps/v1", "kind": "Deployment"}}}`, diff --git a/test/integration/apiserver/apply/status_test.go b/test/integration/apiserver/apply/status_test.go index efae4a5cfa97a..8accd1ebf6eb1 100644 --- a/test/integration/apiserver/apply/status_test.go +++ b/test/integration/apiserver/apply/status_test.go @@ -52,8 +52,8 @@ var statusData = map[schema.GroupVersionResource]string{ gvr("storage.k8s.io", "v1", "volumeattachments"): `{"status": {"attached": true}}`, gvr("policy", "v1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 5}}`, gvr("policy", "v1beta1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 5}}`, - gvr("resource.k8s.io", "v1alpha2", "podschedulingcontexts"): `{"status": {"resourceClaims": [{"name": "my-claim", "unsuitableNodes": ["node1"]}]}}`, - gvr("resource.k8s.io", "v1alpha2", "resourceclaims"): `{"status": {"driverName": "example.com"}}`, + gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): `{"status": {"resourceClaims": [{"name": "my-claim", "unsuitableNodes": ["node1"]}]}}`, + gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"status": {"driverName": "example.com"}}`, gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{"status": {"commonEncodingVersion":"v1","storageVersions":[{"apiServerID":"1","decodableVersions":["v1","v2"],"encodingVersion":"v1"}],"conditions":[{"type":"AllEncodingVersionsEqual","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"allEncodingVersionsEqual","message":"all encoding versions are set to v1"}]}}`, // standard for []metav1.Condition gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicies"): `{"status": {"conditions":[{"type":"Accepted","status":"False","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, diff --git a/test/integration/auth/node_test.go b/test/integration/auth/node_test.go index 8c16b02813ea8..e2bab8d440d50 100644 --- a/test/integration/auth/node_test.go +++ b/test/integration/auth/node_test.go @@ -27,7 +27,7 @@ import ( coordination "k8s.io/api/coordination/v1" corev1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1" - "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" storagev1 "k8s.io/api/storage/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/resource" @@ -108,17 +108,17 @@ func TestNodeAuthorizer(t *testing.T) { if _, err := superuserClient.CoreV1().ConfigMaps("ns").Create(context.TODO(), &corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "myconfigmap"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - if _, err := superuserClient.ResourceV1alpha2().ResourceClaims("ns").Create(context.TODO(), &v1alpha2.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mynamedresourceclaim"}, Spec: v1alpha2.ResourceClaimSpec{ResourceClassName: "example.com"}}, metav1.CreateOptions{}); err != nil { + if _, err := superuserClient.ResourceV1alpha3().ResourceClaims("ns").Create(context.TODO(), &resourceapi.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mynamedresourceclaim"}, Spec: resourceapi.ResourceClaimSpec{ResourceClassName: "example.com"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - if _, err := superuserClient.ResourceV1alpha2().ResourceClaims("ns").Create(context.TODO(), &v1alpha2.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mytemplatizedresourceclaim"}, Spec: v1alpha2.ResourceClaimSpec{ResourceClassName: "example.com"}}, metav1.CreateOptions{}); err != nil { + if _, err := superuserClient.ResourceV1alpha3().ResourceClaims("ns").Create(context.TODO(), &resourceapi.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mytemplatizedresourceclaim"}, Spec: resourceapi.ResourceClaimSpec{ResourceClassName: "example.com"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - model := v1alpha2.ResourceModel{NamedResources: &v1alpha2.NamedResourcesResources{}} - if _, err := superuserClient.ResourceV1alpha2().ResourceSlices().Create(context.TODO(), &v1alpha2.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice1"}, NodeName: "node1", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { + model := resourceapi.ResourceModel{NamedResources: &resourceapi.NamedResourcesResources{}} + if _, err := superuserClient.ResourceV1alpha3().ResourceSlices().Create(context.TODO(), &resourceapi.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice1"}, NodeName: "node1", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - if _, err := superuserClient.ResourceV1alpha2().ResourceSlices().Create(context.TODO(), &v1alpha2.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice2"}, NodeName: "node2", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { + if _, err := superuserClient.ResourceV1alpha3().ResourceSlices().Create(context.TODO(), &resourceapi.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice2"}, NodeName: "node2", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -193,13 +193,13 @@ func TestNodeAuthorizer(t *testing.T) { } getResourceClaim := func(client clientset.Interface) func() error { return func() error { - _, err := client.ResourceV1alpha2().ResourceClaims("ns").Get(context.TODO(), "mynamedresourceclaim", metav1.GetOptions{}) + _, err := client.ResourceV1alpha3().ResourceClaims("ns").Get(context.TODO(), "mynamedresourceclaim", metav1.GetOptions{}) return err } } getResourceClaimTemplate := func(client clientset.Interface) func() error { return func() error { - _, err := client.ResourceV1alpha2().ResourceClaims("ns").Get(context.TODO(), "mytemplatizedresourceclaim", metav1.GetOptions{}) + _, err := client.ResourceV1alpha3().ResourceClaims("ns").Get(context.TODO(), "mytemplatizedresourceclaim", metav1.GetOptions{}) return err } } @@ -209,7 +209,7 @@ func TestNodeAuthorizer(t *testing.T) { if nodeName != nil { listOptions.FieldSelector = "nodeName=" + *nodeName } - return client.ResourceV1alpha2().ResourceSlices().DeleteCollection(context.TODO(), metav1.DeleteOptions{}, listOptions) + return client.ResourceV1alpha3().ResourceSlices().DeleteCollection(context.TODO(), metav1.DeleteOptions{}, listOptions) } } addResourceClaimTemplateReference := func(client clientset.Interface) func() error { @@ -663,7 +663,7 @@ func TestNodeAuthorizer(t *testing.T) { expectAllowed(t, deleteResourceSliceCollection(csiNode1Client, ptr.To("node1"))) // One slice must have been deleted, the other not. - slices, err := superuserClient.ResourceV1alpha2().ResourceSlices().List(context.TODO(), metav1.ListOptions{}) + slices, err := superuserClient.ResourceV1alpha3().ResourceSlices().List(context.TODO(), metav1.ListOptions{}) if err != nil { t.Fatal(err) } @@ -676,7 +676,7 @@ func TestNodeAuthorizer(t *testing.T) { // Superuser can delete. expectAllowed(t, deleteResourceSliceCollection(superuserClient, nil)) - slices, err = superuserClient.ResourceV1alpha2().ResourceSlices().List(context.TODO(), metav1.ListOptions{}) + slices, err = superuserClient.ResourceV1alpha3().ResourceSlices().List(context.TODO(), metav1.ListOptions{}) if err != nil { t.Fatal(err) } diff --git a/test/integration/etcd/data.go b/test/integration/etcd/data.go index a3934fc3fecdc..360a022ec2716 100644 --- a/test/integration/etcd/data.go +++ b/test/integration/etcd/data.go @@ -403,32 +403,32 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes }, // -- - // k8s.io/kubernetes/pkg/apis/resource/v1alpha2 - gvr("resource.k8s.io", "v1alpha2", "resourceclasses"): { + // k8s.io/kubernetes/pkg/apis/resource/v1alpha3 + gvr("resource.k8s.io", "v1alpha3", "resourceclasses"): { Stub: `{"metadata": {"name": "class1name"}, "driverName": "example.com"}`, ExpectedEtcdPath: "/registry/resourceclasses/class1name", }, - gvr("resource.k8s.io", "v1alpha2", "resourceclaims"): { + gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): { Stub: `{"metadata": {"name": "claim1name"}, "spec": {"resourceClassName": "class1name", "allocationMode": "WaitForFirstConsumer"}}`, ExpectedEtcdPath: "/registry/resourceclaims/" + namespace + "/claim1name", }, - gvr("resource.k8s.io", "v1alpha2", "resourceclaimtemplates"): { + gvr("resource.k8s.io", "v1alpha3", "resourceclaimtemplates"): { Stub: `{"metadata": {"name": "claimtemplate1name"}, "spec": {"spec": {"resourceClassName": "class1name", "allocationMode": "WaitForFirstConsumer"}}}`, ExpectedEtcdPath: "/registry/resourceclaimtemplates/" + namespace + "/claimtemplate1name", }, - gvr("resource.k8s.io", "v1alpha2", "podschedulingcontexts"): { + gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): { Stub: `{"metadata": {"name": "pod1name"}, "spec": {"selectedNode": "node1name", "potentialNodes": ["node1name", "node2name"]}}`, ExpectedEtcdPath: "/registry/podschedulingcontexts/" + namespace + "/pod1name", }, - gvr("resource.k8s.io", "v1alpha2", "resourceclassparameters"): { + gvr("resource.k8s.io", "v1alpha3", "resourceclassparameters"): { Stub: `{"metadata": {"name": "class1parameters"}}`, ExpectedEtcdPath: "/registry/resourceclassparameters/" + namespace + "/class1parameters", }, - gvr("resource.k8s.io", "v1alpha2", "resourceclaimparameters"): { + gvr("resource.k8s.io", "v1alpha3", "resourceclaimparameters"): { Stub: `{"metadata": {"name": "claim1parameters"}}`, ExpectedEtcdPath: "/registry/resourceclaimparameters/" + namespace + "/claim1parameters", }, - gvr("resource.k8s.io", "v1alpha2", "resourceslices"): { + gvr("resource.k8s.io", "v1alpha3", "resourceslices"): { Stub: `{"metadata": {"name": "node1slice"}, "nodeName": "worker1", "driverName": "dra.example.com", "namedResources": {}}`, ExpectedEtcdPath: "/registry/resourceslices/node1slice", }, diff --git a/test/integration/scheduler/scheduler_test.go b/test/integration/scheduler/scheduler_test.go index 6a33addf9db4c..f47e64ad63f94 100644 --- a/test/integration/scheduler/scheduler_test.go +++ b/test/integration/scheduler/scheduler_test.go @@ -29,7 +29,7 @@ import ( "github.com/google/go-cmp/cmp" 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" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -679,30 +679,30 @@ func TestPodSchedulingContextSSA(t *testing.T) { } defer func() { - if err := testCtx.ClientSet.ResourceV1alpha2().ResourceClasses().DeleteCollection(testCtx.Ctx, metav1.DeleteOptions{}, metav1.ListOptions{}); err != nil { + if err := testCtx.ClientSet.ResourceV1alpha3().ResourceClasses().DeleteCollection(testCtx.Ctx, metav1.DeleteOptions{}, metav1.ListOptions{}); err != nil { t.Errorf("Unexpected error deleting ResourceClasses: %v", err) } }() - class := &resourcev1alpha2.ResourceClass{ + class := &resourceapi.ResourceClass{ ObjectMeta: metav1.ObjectMeta{ Name: "my-class", }, DriverName: "does-not-matter", } - if _, err := testCtx.ClientSet.ResourceV1alpha2().ResourceClasses().Create(testCtx.Ctx, class, metav1.CreateOptions{}); err != nil { + if _, err := testCtx.ClientSet.ResourceV1alpha3().ResourceClasses().Create(testCtx.Ctx, class, metav1.CreateOptions{}); err != nil { t.Fatalf("Failed to create class: %v", err) } - claim := &resourcev1alpha2.ResourceClaim{ + claim := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "my-claim", Namespace: testCtx.NS.Name, }, - Spec: resourcev1alpha2.ResourceClaimSpec{ + Spec: resourceapi.ResourceClaimSpec{ ResourceClassName: class.Name, }, } - if _, err := testCtx.ClientSet.ResourceV1alpha2().ResourceClaims(claim.Namespace).Create(testCtx.Ctx, claim, metav1.CreateOptions{}); err != nil { + if _, err := testCtx.ClientSet.ResourceV1alpha3().ResourceClaims(claim.Namespace).Create(testCtx.Ctx, claim, metav1.CreateOptions{}); err != nil { t.Fatalf("Failed to create claim: %v", err) } @@ -719,11 +719,11 @@ func TestPodSchedulingContextSSA(t *testing.T) { } // Check that the PodSchedulingContext exists and has a selected node. - var schedulingCtx *resourcev1alpha2.PodSchedulingContext + var schedulingCtx *resourceapi.PodSchedulingContext if err := wait.PollUntilContextTimeout(testCtx.Ctx, 10*time.Microsecond, 30*time.Second, true, func(context.Context) (bool, error) { var err error - schedulingCtx, err = testCtx.ClientSet.ResourceV1alpha2().PodSchedulingContexts(pod.Namespace).Get(testCtx.Ctx, pod.Name, metav1.GetOptions{}) + schedulingCtx, err = testCtx.ClientSet.ResourceV1alpha3().PodSchedulingContexts(pod.Namespace).Get(testCtx.Ctx, pod.Name, metav1.GetOptions{}) if apierrors.IsNotFound(err) { return false, nil } @@ -756,12 +756,12 @@ func TestPodSchedulingContextSSA(t *testing.T) { // Now force the scheduler to update the PodSchedulingContext by setting UnsuitableNodes so that // the selected node is not suitable. - schedulingCtx.Status.ResourceClaims = []resourcev1alpha2.ResourceClaimSchedulingStatus{{ + schedulingCtx.Status.ResourceClaims = []resourceapi.ResourceClaimSchedulingStatus{{ Name: podClaimName, UnsuitableNodes: []string{schedulingCtx.Spec.SelectedNode}, }} - if _, err := testCtx.ClientSet.ResourceV1alpha2().PodSchedulingContexts(pod.Namespace).UpdateStatus(testCtx.Ctx, schedulingCtx, metav1.UpdateOptions{}); err != nil { + if _, err := testCtx.ClientSet.ResourceV1alpha3().PodSchedulingContexts(pod.Namespace).UpdateStatus(testCtx.Ctx, schedulingCtx, metav1.UpdateOptions{}); err != nil { t.Fatalf("Unexpected PodSchedulingContext status update error: %v", err) } diff --git a/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml b/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml index cc591c6542f03..12b1af5f944ec 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaim metadata: name: test-claim-{{.Index}} diff --git a/test/integration/scheduler_perf/config/dra/resourceclaim.yaml b/test/integration/scheduler_perf/config/dra/resourceclaim.yaml index e2420f077e82e..0f11096d29994 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaim.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaim.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaim metadata: name: test-claim-{{.Index}} diff --git a/test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml b/test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml index b10a111040120..0a99d52c62a58 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaimParameters metadata: name: test-claim-parameters diff --git a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml index 413125058acee..c98f320592fca 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaimTemplate metadata: name: test-claim-template diff --git a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml index 29048726caf46..79e66f49ee09a 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaimTemplate metadata: name: test-claim-template diff --git a/test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml b/test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml index ac1bb2e530d48..8fd4a83267dc0 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClass metadata: name: test-class diff --git a/test/integration/scheduler_perf/config/dra/resourceclass.yaml b/test/integration/scheduler_perf/config/dra/resourceclass.yaml index 8ba0fcb3a2a92..87801ed658497 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclass.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclass.yaml @@ -1,4 +1,4 @@ -apiVersion: resource.k8s.io/v1alpha2 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClass metadata: name: test-class diff --git a/test/integration/scheduler_perf/dra.go b/test/integration/scheduler_perf/dra.go index 85d2d60a9f6dd..7f2ab2dcd2d81 100644 --- a/test/integration/scheduler_perf/dra.go +++ b/test/integration/scheduler_perf/dra.go @@ -22,7 +22,7 @@ import ( "path/filepath" "sync" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/util/workqueue" "k8s.io/klog/v2" @@ -84,7 +84,7 @@ func (op *createResourceClaimsOp) requiredNamespaces() []string { func (op *createResourceClaimsOp) run(tCtx ktesting.TContext) { tCtx.Logf("creating %d claims in namespace %q", op.Count, op.Namespace) - var claimTemplate *resourcev1alpha2.ResourceClaim + var claimTemplate *resourceapi.ResourceClaim if err := getSpecFromFile(&op.TemplatePath, &claimTemplate); err != nil { tCtx.Fatalf("parsing ResourceClaim %q: %v", op.TemplatePath, err) } @@ -92,7 +92,7 @@ func (op *createResourceClaimsOp) run(tCtx ktesting.TContext) { var mutex sync.Mutex create := func(i int) { err := func() error { - if _, err := tCtx.Client().ResourceV1alpha2().ResourceClaims(op.Namespace).Create(tCtx, claimTemplate.DeepCopy(), metav1.CreateOptions{}); err != nil { + if _, err := tCtx.Client().ResourceV1alpha3().ResourceClaims(op.Namespace).Create(tCtx, claimTemplate.DeepCopy(), metav1.CreateOptions{}); err != nil { return fmt.Errorf("create claim: %v", err) } return nil @@ -196,11 +196,11 @@ func (op *createResourceDriverOp) run(tCtx ktesting.TContext) { if op.StructuredParameters { for _, nodeName := range resources.Nodes { slice := resourceSlice(op.DriverName, nodeName, op.MaxClaimsPerNode) - _, err := tCtx.Client().ResourceV1alpha2().ResourceSlices().Create(tCtx, slice, metav1.CreateOptions{}) + _, err := tCtx.Client().ResourceV1alpha3().ResourceSlices().Create(tCtx, slice, metav1.CreateOptions{}) tCtx.ExpectNoError(err, "create node resource slice") } tCtx.CleanupCtx(func(tCtx ktesting.TContext) { - err := tCtx.Client().ResourceV1alpha2().ResourceSlices().DeleteCollection(tCtx, + err := tCtx.Client().ResourceV1alpha3().ResourceSlices().DeleteCollection(tCtx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: "driverName=" + op.DriverName}, ) @@ -228,8 +228,8 @@ func (op *createResourceDriverOp) run(tCtx ktesting.TContext) { }) } -func resourceSlice(driverName, nodeName string, capacity int) *resourcev1alpha2.ResourceSlice { - slice := &resourcev1alpha2.ResourceSlice{ +func resourceSlice(driverName, nodeName string, capacity int) *resourceapi.ResourceSlice { + slice := &resourceapi.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{ Name: nodeName, }, @@ -237,14 +237,14 @@ func resourceSlice(driverName, nodeName string, capacity int) *resourcev1alpha2. NodeName: nodeName, DriverName: driverName, - ResourceModel: resourcev1alpha2.ResourceModel{ - NamedResources: &resourcev1alpha2.NamedResourcesResources{}, + ResourceModel: resourceapi.ResourceModel{ + NamedResources: &resourceapi.NamedResourcesResources{}, }, } for i := 0; i < capacity; i++ { slice.ResourceModel.NamedResources.Instances = append(slice.ResourceModel.NamedResources.Instances, - resourcev1alpha2.NamedResourcesInstance{ + resourceapi.NamedResourcesInstance{ Name: fmt.Sprintf("instance-%d", i), }, ) diff --git a/test/integration/scheduler_perf/util.go b/test/integration/scheduler_perf/util.go index 56f24c4fb0044..40e252fd6a94d 100644 --- a/test/integration/scheduler_perf/util.go +++ b/test/integration/scheduler_perf/util.go @@ -87,7 +87,7 @@ func mustSetupCluster(tCtx ktesting.TContext, config *config.KubeSchedulerConfig // except for DRA API group when needed. runtimeConfig := []string{"api/alpha=false"} if enabledFeatures[features.DynamicResourceAllocation] { - runtimeConfig = append(runtimeConfig, "resource.k8s.io/v1alpha2=true") + runtimeConfig = append(runtimeConfig, "resource.k8s.io/v1alpha3=true") } customFlags := []string{ // Disable ServiceAccount admission plugin as we don't have serviceaccount controller running. diff --git a/test/integration/util/util.go b/test/integration/util/util.go index c975c1187b9ed..9a028e0f36ddc 100644 --- a/test/integration/util/util.go +++ b/test/integration/util/util.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/api/core/v1" policy "k8s.io/api/policy/v1" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + resourceapi "k8s.io/api/resource/v1alpha3" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -130,9 +130,9 @@ func StartScheduler(ctx context.Context, clientSet clientset.Interface, kubeConf func CreateResourceClaimController(ctx context.Context, tb ktesting.TB, clientSet clientset.Interface, informerFactory informers.SharedInformerFactory) func() { podInformer := informerFactory.Core().V1().Pods() - schedulingInformer := informerFactory.Resource().V1alpha2().PodSchedulingContexts() - claimInformer := informerFactory.Resource().V1alpha2().ResourceClaims() - claimTemplateInformer := informerFactory.Resource().V1alpha2().ResourceClaimTemplates() + schedulingInformer := informerFactory.Resource().V1alpha3().PodSchedulingContexts() + claimInformer := informerFactory.Resource().V1alpha3().ResourceClaims() + claimTemplateInformer := informerFactory.Resource().V1alpha3().ResourceClaimTemplates() claimController, err := resourceclaim.NewController(klog.FromContext(ctx), clientSet, podInformer, schedulingInformer, claimInformer, claimTemplateInformer) if err != nil { tb.Fatalf("Error creating claim controller: %v", err) @@ -512,7 +512,7 @@ func InitTestAPIServer(t *testing.T, nsPrefix string, admission admission.Interf options.Admission.GenericAdmission.DisablePlugins = []string{"ServiceAccount", "TaintNodesByCondition", "Priority", "StorageObjectInUseProtection"} if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { options.APIEnablement.RuntimeConfig = cliflag.ConfigurationMap{ - resourcev1alpha2.SchemeGroupVersion.String(): "true", + resourceapi.SchemeGroupVersion.String(): "true", } } }, From d5531089ef59ba29519d3fbd5a3c240d5b344bf9 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Jul 2024 13:50:09 +0200 Subject: [PATCH 11/20] api test: update TestDefaulting Logging and sub-tests were added to help debug this problem: the test passes for ResourceClaim (same defaulting!) and fails for the list, but only if run together with the other test cases?! $ go test ./pkg/api/testing --- FAIL: TestDefaulting (1.76s) --- FAIL: TestDefaulting/resource.k8s.io/v1alpha3,_Kind=ResourceClaimList (0.01s) defaulting_test.go:238: expected resource.k8s.io/v1alpha3, Kind=ResourceClaimList to trigger defaulting due to fuzzing FAIL FAIL k8s.io/kubernetes/pkg/api/testing 17.294s FAIL $ go test -run=TestDefaulting/resource.k8s.io/v1alpha3,_Kind=ResourceClaimList ./pkg/api/testing ok k8s.io/kubernetes/pkg/api/testing 0.062s What fixed that problem was increasing the likelihood of generating the right test object by iterating more often before giving up. --- pkg/api/testing/defaulting_test.go | 110 ++++++++++++++++------------- 1 file changed, 62 insertions(+), 48 deletions(-) diff --git a/pkg/api/testing/defaulting_test.go b/pkg/api/testing/defaulting_test.go index a442b14dfbfc0..2a08f788e298e 100644 --- a/pkg/api/testing/defaulting_test.go +++ b/pkg/api/testing/defaulting_test.go @@ -192,24 +192,6 @@ func TestDefaulting(t *testing.T) { {Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Kind: "PriorityLevelConfigurationList"}: {}, } - f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1)) - f.Funcs( - func(s *runtime.RawExtension, c fuzz.Continue) {}, - func(s *metav1.LabelSelector, c fuzz.Continue) { - c.FuzzNoCustom(s) - s.MatchExpressions = nil // need to fuzz this specially - }, - func(s *metav1.ListOptions, c fuzz.Continue) { - c.FuzzNoCustom(s) - s.LabelSelector = "" // need to fuzz requirement strings specially - s.FieldSelector = "" // need to fuzz requirement strings specially - }, - func(s *extensionsv1beta1.ScaleStatus, c fuzz.Continue) { - c.FuzzNoCustom(s) - s.TargetSelector = "" // need to fuzz requirement strings specially - }, - ) - scheme := legacyscheme.Scheme var testTypes orderedGroupVersionKinds for gvk := range scheme.AllKnownTypes() { @@ -221,45 +203,77 @@ func TestDefaulting(t *testing.T) { sort.Sort(testTypes) for _, gvk := range testTypes { - _, expectedChanged := typesWithDefaulting[gvk] - iter := 0 - changedOnce := false - for { - if iter > *roundtrip.FuzzIters { - if !expectedChanged || changedOnce { - break - } - if iter > 300 { - t.Errorf("expected %s to trigger defaulting due to fuzzing", gvk) - break + gvk := gvk + t.Run(gvk.String(), func(t *testing.T) { + // Each sub-tests gets its own fuzzer instance to make running it independent + // from what other tests ran before. + f := fuzz.New().NilChance(.5).NumElements(1, 1).RandSource(rand.NewSource(1)) + f.Funcs( + func(s *runtime.RawExtension, c fuzz.Continue) {}, + func(s *metav1.LabelSelector, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.MatchExpressions = nil // need to fuzz this specially + }, + func(s *metav1.ListOptions, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.LabelSelector = "" // need to fuzz requirement strings specially + s.FieldSelector = "" // need to fuzz requirement strings specially + }, + func(s *extensionsv1beta1.ScaleStatus, c fuzz.Continue) { + c.FuzzNoCustom(s) + s.TargetSelector = "" // need to fuzz requirement strings specially + }, + ) + + _, expectedChanged := typesWithDefaulting[gvk] + iter := 0 + changedOnce := false + for { + if iter > *roundtrip.FuzzIters { + if !expectedChanged || changedOnce { + break + } + // This uses to be 300, but for ResourceClaimList that was not high enough + // because depending on the starting conditions, the fuzzer never created the + // one combination where defaulting kicked in (empty string in non-empty slice + // in another non-empty slice). + if iter > 3000 { + t.Errorf("expected %s to trigger defaulting due to fuzzing", gvk) + break + } + // if we expected defaulting, continue looping until the fuzzer gives us one + // at worst, we will timeout } - // if we expected defaulting, continue looping until the fuzzer gives us one - // at worst, we will timeout - } - iter++ + iter++ - src, err := scheme.New(gvk) - if err != nil { - t.Fatal(err) - } - f.Fuzz(src) + src, err := scheme.New(gvk) + if err != nil { + t.Fatal(err) + } + f.Fuzz(src) - src.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) + src.GetObjectKind().SetGroupVersionKind(schema.GroupVersionKind{}) - original := src.DeepCopyObject() + original := src.DeepCopyObject() - // get internal - withDefaults := src.DeepCopyObject() - scheme.Default(withDefaults.(runtime.Object)) + // get internal + withDefaults := src.DeepCopyObject() + scheme.Default(withDefaults) - if !reflect.DeepEqual(original, withDefaults) { - changedOnce = true - if !expectedChanged { - t.Errorf("{Group: \"%s\", Version: \"%s\", Kind: \"%s\"} did not expect defaults to be set - update expected or check defaulter registering: %s", gvk.Group, gvk.Version, gvk.Kind, cmp.Diff(original, withDefaults)) + if !reflect.DeepEqual(original, withDefaults) { + diff := cmp.Diff(original, withDefaults) + if !changedOnce { + t.Logf("got diff (-fuzzed, +with defaults):\n%s", diff) + changedOnce = true + } + if !expectedChanged { + t.Errorf("{Group: \"%s\", Version: \"%s\", Kind: \"%s\"} did not expect defaults to be set - update expected or check defaulter registering: %s", gvk.Group, gvk.Version, gvk.Kind, diff) + } } } - } + }) } + } func BenchmarkPodDefaulting(b *testing.B) { From f93c2454c3e227cebc85cae69d50fa88f80c01a0 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Tue, 18 Jun 2024 17:47:29 +0200 Subject: [PATCH 12/20] DRA: new API for 1.31 This is a complete revamp of the original API. Some of the key difference: - refocused on structured parameters and allocating devices - support for constraints across devices - support for allocating "all" or a fixed amount of similar devices in a single request - no class for ResourceClaims, instead individual device requests are associated with a mandatory DeviceClass The implementation is complete enough to bring up the apiserver. Adapting other components follows. --- api/api-rules/violation_exceptions.list | 11 +- api/discovery/aggregated_v2.json | 80 +- api/discovery/aggregated_v2beta1.json | 80 +- .../apis__resource.k8s.io__v1alpha3.json | 68 +- api/openapi-spec/swagger.json | 3442 ++----- api/openapi-spec/v3/api__v1_openapi.json | 4 + .../v3/apis__apps__v1_openapi.json | 4 + .../v3/apis__batch__v1_openapi.json | 4 + ...is__resource.k8s.io__v1alpha3_openapi.json | 8035 +++++------------ hack/update-codegen.sh | 2 +- pkg/api/testing/defaulting_test.go | 4 + pkg/apis/core/types.go | 7 + pkg/apis/core/v1/zz_generated.conversion.go | 2 + pkg/apis/core/validation/validation.go | 13 +- pkg/apis/core/validation/validation_test.go | 43 + pkg/apis/resource/fuzzer/fuzzer.go | 22 +- pkg/apis/resource/namedresources.go | 112 - pkg/apis/resource/register.go | 8 +- .../namedresources/validation/validation.go | 178 - .../validation/validation_test.go | 188 - pkg/apis/resource/types.go | 1097 ++- pkg/apis/resource/v1alpha3/conversion.go | 3 +- pkg/apis/resource/v1alpha3/defaults.go | 11 + .../v1alpha3/zz_generated.conversion.go | 1380 +-- .../v1alpha3/zz_generated.defaults.go | 35 + pkg/apis/resource/validation/validation.go | 810 +- .../validation/validation_deviceclass_test.go | 247 + .../validation_resourceclaim_test.go | 469 +- ...validation_resourceclaimparameters_test.go | 306 - .../validation_resourceclaimtemplate_test.go | 133 +- .../validation_resourceclass_test.go | 301 - ...validation_resourceclassparameters_test.go | 313 - .../validation_resourceslice_test.go | 57 +- pkg/apis/resource/zz_generated.deepcopy.go | 807 +- pkg/generated/openapi/zz_generated.openapi.go | 1442 ++- pkg/kubelet/cm/dra/state/state_checkpoint.go | 4 - .../cm/dra/state/zz_generated.deepcopy.go | 8 - pkg/printers/internalversion/printers.go | 100 +- .../storage/storage.go | 22 +- .../storage/storage_test.go | 35 +- pkg/registry/resource/deviceclass/strategy.go | 85 + .../strategy_test.go | 31 +- .../resourceclaim/storage/storage_test.go | 11 +- .../resource/resourceclaim/strategy.go | 8 +- .../resource/resourceclaim/strategy_test.go | 3 - .../storage/storage.go | 57 - .../storage/storage_test.go | 145 - .../resourceclaimparameters/strategy.go | 103 - .../resourceclaimparameters/strategy_test.go | 81 - .../storage/storage_test.go | 7 +- .../resourceclaimtemplate/strategy.go | 6 +- .../resourceclaimtemplate/strategy_test.go | 5 - .../resource/resourceclass/strategy.go | 75 - .../storage/storage.go | 57 - .../storage/storage_test.go | 145 - .../resourceclassparameters/strategy.go | 103 - .../resourceclassparameters/strategy_test.go | 81 - .../resourceslice/storage/storage_test.go | 13 +- .../resource/resourceslice/strategy.go | 24 +- .../resource/resourceslice/strategy_test.go | 35 +- .../resource/rest/storage_resource.go | 26 +- .../dynamicresources/dynamicresources_test.go | 19 - .../dynamicresources/structuredparameters.go | 47 +- .../admission/noderestriction/admission.go | 4 +- .../noderestriction/admission_test.go | 51 +- .../auth/authorizer/node/graph_populator.go | 2 +- .../authorizer/node/node_authorizer_test.go | 12 +- .../authorizer/rbac/bootstrappolicy/policy.go | 4 +- .../src/k8s.io/api/core/v1/generated.pb.go | 2002 ++-- .../src/k8s.io/api/core/v1/generated.proto | 7 + staging/src/k8s.io/api/core/v1/types.go | 7 + .../core/v1/types_swagger_doc_generated.go | 5 +- .../api/resource/v1alpha3/generated.pb.go | 7369 ++++++--------- .../api/resource/v1alpha3/generated.proto | 998 +- .../api/resource/v1alpha3/namedresources.go | 127 - .../k8s.io/api/resource/v1alpha3/register.go | 8 +- .../src/k8s.io/api/resource/v1alpha3/types.go | 1137 ++- .../v1alpha3/types_swagger_doc_generated.go | 408 +- .../v1alpha3/zz_generated.deepcopy.go | 797 +- .../api/testdata/HEAD/apps.v1.DaemonSet.json | 9 +- .../api/testdata/HEAD/apps.v1.DaemonSet.pb | Bin 10834 -> 10876 bytes .../api/testdata/HEAD/apps.v1.DaemonSet.yaml | 3 + .../api/testdata/HEAD/apps.v1.Deployment.json | 9 +- .../api/testdata/HEAD/apps.v1.Deployment.pb | Bin 10847 -> 10889 bytes .../api/testdata/HEAD/apps.v1.Deployment.yaml | 3 + .../api/testdata/HEAD/apps.v1.ReplicaSet.json | 9 +- .../api/testdata/HEAD/apps.v1.ReplicaSet.pb | Bin 10764 -> 10806 bytes .../api/testdata/HEAD/apps.v1.ReplicaSet.yaml | 3 + .../testdata/HEAD/apps.v1.StatefulSet.json | 9 +- .../api/testdata/HEAD/apps.v1.StatefulSet.pb | Bin 11935 -> 11977 bytes .../testdata/HEAD/apps.v1.StatefulSet.yaml | 3 + .../HEAD/apps.v1beta1.Deployment.json | 9 +- .../testdata/HEAD/apps.v1beta1.Deployment.pb | Bin 10856 -> 10898 bytes .../HEAD/apps.v1beta1.Deployment.yaml | 3 + .../HEAD/apps.v1beta1.StatefulSet.json | 9 +- .../testdata/HEAD/apps.v1beta1.StatefulSet.pb | Bin 11940 -> 11982 bytes .../HEAD/apps.v1beta1.StatefulSet.yaml | 3 + .../testdata/HEAD/apps.v1beta2.DaemonSet.json | 9 +- .../testdata/HEAD/apps.v1beta2.DaemonSet.pb | Bin 10839 -> 10881 bytes .../testdata/HEAD/apps.v1beta2.DaemonSet.yaml | 3 + .../HEAD/apps.v1beta2.Deployment.json | 9 +- .../testdata/HEAD/apps.v1beta2.Deployment.pb | Bin 10852 -> 10894 bytes .../HEAD/apps.v1beta2.Deployment.yaml | 3 + .../HEAD/apps.v1beta2.ReplicaSet.json | 9 +- .../testdata/HEAD/apps.v1beta2.ReplicaSet.pb | Bin 10769 -> 10811 bytes .../HEAD/apps.v1beta2.ReplicaSet.yaml | 3 + .../HEAD/apps.v1beta2.StatefulSet.json | 9 +- .../testdata/HEAD/apps.v1beta2.StatefulSet.pb | Bin 11940 -> 11982 bytes .../HEAD/apps.v1beta2.StatefulSet.yaml | 3 + .../api/testdata/HEAD/batch.v1.CronJob.json | 9 +- .../api/testdata/HEAD/batch.v1.CronJob.pb | Bin 11427 -> 11469 bytes .../api/testdata/HEAD/batch.v1.CronJob.yaml | 3 + .../api/testdata/HEAD/batch.v1.Job.json | 9 +- .../k8s.io/api/testdata/HEAD/batch.v1.Job.pb | Bin 11053 -> 11095 bytes .../api/testdata/HEAD/batch.v1.Job.yaml | 3 + .../testdata/HEAD/batch.v1beta1.CronJob.json | 9 +- .../testdata/HEAD/batch.v1beta1.CronJob.pb | Bin 11432 -> 11474 bytes .../testdata/HEAD/batch.v1beta1.CronJob.yaml | 3 + .../k8s.io/api/testdata/HEAD/core.v1.Pod.json | 18 +- .../k8s.io/api/testdata/HEAD/core.v1.Pod.pb | Bin 11816 -> 11900 bytes .../k8s.io/api/testdata/HEAD/core.v1.Pod.yaml | 6 + .../HEAD/core.v1.PodStatusResult.json | 9 +- .../testdata/HEAD/core.v1.PodStatusResult.pb | Bin 1971 -> 2013 bytes .../HEAD/core.v1.PodStatusResult.yaml | 3 + .../testdata/HEAD/core.v1.PodTemplate.json | 9 +- .../api/testdata/HEAD/core.v1.PodTemplate.pb | Bin 10600 -> 10642 bytes .../testdata/HEAD/core.v1.PodTemplate.yaml | 3 + .../HEAD/core.v1.ReplicationController.json | 9 +- .../HEAD/core.v1.ReplicationController.pb | Bin 10722 -> 10764 bytes .../HEAD/core.v1.ReplicationController.yaml | 3 + .../HEAD/extensions.v1beta1.DaemonSet.json | 9 +- .../HEAD/extensions.v1beta1.DaemonSet.pb | Bin 10847 -> 10889 bytes .../HEAD/extensions.v1beta1.DaemonSet.yaml | 3 + .../HEAD/extensions.v1beta1.Deployment.json | 9 +- .../HEAD/extensions.v1beta1.Deployment.pb | Bin 10862 -> 10904 bytes .../HEAD/extensions.v1beta1.Deployment.yaml | 3 + .../HEAD/extensions.v1beta1.ReplicaSet.json | 9 +- .../HEAD/extensions.v1beta1.ReplicaSet.pb | Bin 10775 -> 10817 bytes .../HEAD/extensions.v1beta1.ReplicaSet.yaml | 3 + ...resource.k8s.io.v1alpha3.DeviceClass.json} | 63 +- ...> resource.k8s.io.v1alpha3.DeviceClass.pb} | Bin 633 -> 636 bytes ...resource.k8s.io.v1alpha3.DeviceClass.yaml} | 51 +- ...esource.k8s.io.v1alpha3.ResourceClaim.json | 114 +- .../resource.k8s.io.v1alpha3.ResourceClaim.pb | Bin 1008 -> 1051 bytes ...esource.k8s.io.v1alpha3.ResourceClaim.yaml | 84 +- ...k8s.io.v1alpha3.ResourceClaimParameters.pb | Bin 703 -> 0 bytes ...k8s.io.v1alpha3.ResourceClaimTemplate.json | 53 +- ...e.k8s.io.v1alpha3.ResourceClaimTemplate.pb | Bin 840 -> 1049 bytes ...k8s.io.v1alpha3.ResourceClaimTemplate.yaml | 32 +- ...esource.k8s.io.v1alpha3.ResourceClass.json | 78 - .../resource.k8s.io.v1alpha3.ResourceClass.pb | Bin 567 -> 0 bytes ...esource.k8s.io.v1alpha3.ResourceClass.yaml | 53 - ...s.io.v1alpha3.ResourceClassParameters.json | 75 - ...s.io.v1alpha3.ResourceClassParameters.yaml | 52 - ...esource.k8s.io.v1alpha3.ResourceSlice.json | 69 +- .../resource.k8s.io.v1alpha3.ResourceSlice.pb | Bin 529 -> 628 bytes ...esource.k8s.io.v1alpha3.ResourceSlice.yaml | 47 +- .../apps.v1.DaemonSet.after_roundtrip.pb | Bin 10531 -> 10537 bytes .../apps.v1.Deployment.after_roundtrip.pb | Bin 10544 -> 10550 bytes .../apps.v1.ReplicaSet.after_roundtrip.pb | Bin 10461 -> 10467 bytes .../apps.v1.StatefulSet.after_roundtrip.pb | Bin 11632 -> 11638 bytes ...apps.v1beta1.Deployment.after_roundtrip.pb | Bin 10553 -> 10559 bytes ...pps.v1beta1.StatefulSet.after_roundtrip.pb | Bin 11637 -> 11643 bytes .../apps.v1beta2.DaemonSet.after_roundtrip.pb | Bin 10536 -> 10542 bytes ...apps.v1beta2.Deployment.after_roundtrip.pb | Bin 10549 -> 10555 bytes ...apps.v1beta2.ReplicaSet.after_roundtrip.pb | Bin 10466 -> 10472 bytes ...pps.v1beta2.StatefulSet.after_roundtrip.pb | Bin 11637 -> 11643 bytes .../batch.v1.CronJob.after_roundtrip.pb | Bin 11078 -> 11084 bytes .../v1.29.0/batch.v1.Job.after_roundtrip.pb | Bin 10704 -> 10710 bytes .../batch.v1beta1.CronJob.after_roundtrip.pb | Bin 11083 -> 11089 bytes .../v1.29.0/core.v1.Pod.after_roundtrip.pb | Bin 11318 -> 11330 bytes ...core.v1.PodStatusResult.after_roundtrip.pb | Bin 0 -> 1782 bytes .../core.v1.PodTemplate.after_roundtrip.pb | Bin 10297 -> 10303 bytes ...1.ReplicationController.after_roundtrip.pb | Bin 10419 -> 10425 bytes ...sions.v1beta1.DaemonSet.after_roundtrip.pb | Bin 10544 -> 10550 bytes ...ions.v1beta1.Deployment.after_roundtrip.pb | Bin 10559 -> 10565 bytes ...ions.v1beta1.ReplicaSet.after_roundtrip.pb | Bin 10472 -> 10478 bytes .../apps.v1.DaemonSet.after_roundtrip.pb | Bin 10747 -> 10753 bytes .../apps.v1.Deployment.after_roundtrip.pb | Bin 10760 -> 10766 bytes .../apps.v1.ReplicaSet.after_roundtrip.pb | Bin 10677 -> 10683 bytes .../apps.v1.StatefulSet.after_roundtrip.pb | Bin 11848 -> 11854 bytes ...apps.v1beta1.Deployment.after_roundtrip.pb | Bin 10769 -> 10775 bytes ...pps.v1beta1.StatefulSet.after_roundtrip.pb | Bin 11853 -> 11859 bytes .../apps.v1beta2.DaemonSet.after_roundtrip.pb | Bin 10752 -> 10758 bytes ...apps.v1beta2.Deployment.after_roundtrip.pb | Bin 10765 -> 10771 bytes ...apps.v1beta2.ReplicaSet.after_roundtrip.pb | Bin 10682 -> 10688 bytes ...pps.v1beta2.StatefulSet.after_roundtrip.pb | Bin 11853 -> 11859 bytes .../batch.v1.CronJob.after_roundtrip.pb | Bin 11340 -> 11346 bytes .../v1.30.0/batch.v1.Job.after_roundtrip.pb | Bin 10966 -> 10972 bytes .../batch.v1beta1.CronJob.after_roundtrip.pb | Bin 11345 -> 11351 bytes .../v1.30.0/core.v1.Pod.after_roundtrip.pb | Bin 11699 -> 11711 bytes ...core.v1.PodStatusResult.after_roundtrip.pb | Bin 0 -> 1947 bytes .../core.v1.PodTemplate.after_roundtrip.pb | Bin 10513 -> 10519 bytes ...1.ReplicationController.after_roundtrip.pb | Bin 10635 -> 10641 bytes ...sions.v1beta1.DaemonSet.after_roundtrip.pb | Bin 10760 -> 10766 bytes ...ions.v1beta1.Deployment.after_roundtrip.pb | Bin 10775 -> 10781 bytes ...ions.v1beta1.ReplicaSet.after_roundtrip.pb | Bin 10688 -> 10694 bytes .../core/v1/resourceclaim.go | 11 +- .../applyconfigurations/internal/internal.go | 423 +- .../resource/v1alpha3/allocationresult.go | 36 +- .../v1alpha3/allocationresultmodel.go | 39 - .../resource/v1alpha3/basicdevice.go | 65 + ...esourcesfilter.go => celdeviceselector.go} | 20 +- ...resourcesallocationresult.go => device.go} | 23 +- .../v1alpha3/deviceallocationconfiguration.go | 63 + .../v1alpha3/deviceallocationresult.go | 58 + .../resource/v1alpha3/deviceattribute.go | 66 + .../resource/v1alpha3/deviceclaim.go | 72 + .../v1alpha3/deviceclaimconfiguration.go | 50 + ...ourceclaimparameters.go => deviceclass.go} | 102 +- .../v1alpha3/deviceclassconfiguration.go | 39 + .../resource/v1alpha3/deviceclassspec.go | 71 + .../resource/v1alpha3/deviceconfiguration.go | 39 + .../resource/v1alpha3/deviceconstraint.go | 54 + .../resource/v1alpha3/devicerequest.go | 93 + .../v1alpha3/devicerequestallocationresult.go | 66 + .../resource/v1alpha3/deviceselector.go | 39 + .../v1alpha3/driverallocationresult.go | 52 - .../resource/v1alpha3/driverrequests.go | 66 - .../v1alpha3/namedresourcesattribute.go | 100 - .../v1alpha3/namedresourcesattributevalue.go | 97 - .../v1alpha3/namedresourcesinstance.go | 53 - .../v1alpha3/namedresourcesintslice.go | 41 - .../v1alpha3/namedresourcesrequest.go | 39 - .../v1alpha3/namedresourcesresources.go | 44 - .../v1alpha3/namedresourcesstringslice.go | 41 - ...meters.go => opaquedeviceconfiguration.go} | 22 +- .../resourceclaimparametersreference.go | 57 - .../resource/v1alpha3/resourceclaimspec.go | 20 +- .../resource/v1alpha3/resourceclaimstatus.go | 9 - .../resource/v1alpha3/resourceclass.go | 281 - .../v1alpha3/resourceclassparameters.go | 283 - .../resourceclassparametersreference.go | 66 - .../resource/v1alpha3/resourcefilter.go | 48 - .../resource/v1alpha3/resourcefiltermodel.go | 39 - .../resource/v1alpha3/resourcehandle.go | 57 - .../resource/v1alpha3/resourcemodel.go | 39 - .../resource/v1alpha3/resourcepool.go | 57 + .../resource/v1alpha3/resourcerequest.go | 52 - .../resource/v1alpha3/resourcerequestmodel.go | 39 - .../resource/v1alpha3/resourceslice.go | 28 +- .../resource/v1alpha3/resourceslicespec.go | 93 + .../v1alpha3/structuredresourcehandle.go | 75 - .../client-go/applyconfigurations/utils.go | 88 +- .../src/k8s.io/client-go/informers/generic.go | 8 +- .../{resourceclass.go => deviceclass.go} | 38 +- .../informers/resource/v1alpha3/interface.go | 28 +- .../v1alpha3/resourceclaimparameters.go | 90 - .../v1alpha3/resourceclassparameters.go | 90 - .../typed/resource/v1alpha3/deviceclass.go | 69 + .../v1alpha3/fake/fake_deviceclass.go | 151 + .../v1alpha3/fake/fake_resource_client.go | 16 +- .../fake/fake_resourceclaimparameters.go | 160 - .../v1alpha3/fake/fake_resourceclass.go | 151 - .../fake/fake_resourceclassparameters.go | 160 - .../resource/v1alpha3/generated_expansion.go | 8 +- .../resource/v1alpha3/resource_client.go | 20 +- .../v1alpha3/resourceclaimparameters.go | 69 - .../typed/resource/v1alpha3/resourceclass.go | 69 - .../v1alpha3/resourceclassparameters.go | 69 - .../{resourceclass.go => deviceclass.go} | 26 +- .../resource/v1alpha3/expansion_generated.go | 24 +- .../v1alpha3/resourceclaimparameters.go | 70 - .../v1alpha3/resourceclassparameters.go | 70 - .../cel/compile.go | 286 + .../cel/compile_test.go | 212 + .../namedresources => }/cel/semver.go | 0 .../namedresources => }/cel/semver_test.go | 2 +- .../namedresources => }/cel/semverlib.go | 0 .../resourceclaim/resourceclaim.go | 10 +- .../structured/namedresources/cel/compile.go | 234 - .../namedresources/cel/compile_test.go | 155 - .../apiserver/apply/reset_fields_test.go | 6 +- .../apiserver/apply/status_test.go | 2 +- test/integration/auth/node_test.go | 11 +- test/integration/etcd/data.go | 20 +- 276 files changed, 15348 insertions(+), 25306 deletions(-) delete mode 100644 pkg/apis/resource/namedresources.go delete mode 100644 pkg/apis/resource/structured/namedresources/validation/validation.go delete mode 100644 pkg/apis/resource/structured/namedresources/validation/validation_test.go create mode 100644 pkg/apis/resource/validation/validation_deviceclass_test.go delete mode 100644 pkg/apis/resource/validation/validation_resourceclaimparameters_test.go delete mode 100644 pkg/apis/resource/validation/validation_resourceclass_test.go delete mode 100644 pkg/apis/resource/validation/validation_resourceclassparameters_test.go rename pkg/registry/resource/{resourceclass => deviceclass}/storage/storage.go (75%) rename pkg/registry/resource/{resourceclass => deviceclass}/storage/storage_test.go (83%) create mode 100644 pkg/registry/resource/deviceclass/strategy.go rename pkg/registry/resource/{resourceclass => deviceclass}/strategy_test.go (67%) delete mode 100644 pkg/registry/resource/resourceclaimparameters/storage/storage.go delete mode 100644 pkg/registry/resource/resourceclaimparameters/storage/storage_test.go delete mode 100644 pkg/registry/resource/resourceclaimparameters/strategy.go delete mode 100644 pkg/registry/resource/resourceclaimparameters/strategy_test.go delete mode 100644 pkg/registry/resource/resourceclass/strategy.go delete mode 100644 pkg/registry/resource/resourceclassparameters/storage/storage.go delete mode 100644 pkg/registry/resource/resourceclassparameters/storage/storage_test.go delete mode 100644 pkg/registry/resource/resourceclassparameters/strategy.go delete mode 100644 pkg/registry/resource/resourceclassparameters/strategy_test.go delete mode 100644 staging/src/k8s.io/api/resource/v1alpha3/namedresources.go rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha3.ResourceClaimParameters.json => resource.k8s.io.v1alpha3.DeviceClass.json} (65%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha3.ResourceClassParameters.pb => resource.k8s.io.v1alpha3.DeviceClass.pb} (63%) rename staging/src/k8s.io/api/testdata/HEAD/{resource.k8s.io.v1alpha3.ResourceClaimParameters.yaml => resource.k8s.io.v1alpha3.DeviceClass.yaml} (60%) delete mode 100644 staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimParameters.pb delete mode 100644 staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.json delete mode 100644 staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.pb delete mode 100644 staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.yaml delete mode 100644 staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.json delete mode 100644 staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.yaml create mode 100644 staging/src/k8s.io/api/testdata/v1.29.0/core.v1.PodStatusResult.after_roundtrip.pb create mode 100644 staging/src/k8s.io/api/testdata/v1.30.0/core.v1.PodStatusResult.after_roundtrip.pb delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresultmodel.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/basicdevice.go rename staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/{namedresourcesfilter.go => celdeviceselector.go} (50%) rename staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/{namedresourcesallocationresult.go => device.go} (51%) create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationconfiguration.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationresult.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceattribute.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaim.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaimconfiguration.go rename staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/{resourceclaimparameters.go => deviceclass.go} (59%) create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassconfiguration.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassspec.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconfiguration.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconstraint.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequest.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequestallocationresult.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceselector.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverallocationresult.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverrequests.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattribute.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattributevalue.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesinstance.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesintslice.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesrequest.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesresources.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesstringslice.go rename staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/{vendorparameters.go => opaquedeviceconfiguration.go} (55%) delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparametersreference.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclass.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparameters.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparametersreference.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefilter.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefiltermodel.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcehandle.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcemodel.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcepool.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequest.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequestmodel.go create mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslicespec.go delete mode 100644 staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/structuredresourcehandle.go rename staging/src/k8s.io/client-go/informers/resource/v1alpha3/{resourceclass.go => deviceclass.go} (55%) delete mode 100644 staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimparameters.go delete mode 100644 staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclassparameters.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/deviceclass.go create mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_deviceclass.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimparameters.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclass.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclassparameters.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimparameters.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclass.go delete mode 100644 staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclassparameters.go rename staging/src/k8s.io/client-go/listers/resource/v1alpha3/{resourceclass.go => deviceclass.go} (55%) delete mode 100644 staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimparameters.go delete mode 100644 staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclassparameters.go create mode 100644 staging/src/k8s.io/dynamic-resource-allocation/cel/compile.go create mode 100644 staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go rename staging/src/k8s.io/dynamic-resource-allocation/{structured/namedresources => }/cel/semver.go (100%) rename staging/src/k8s.io/dynamic-resource-allocation/{structured/namedresources => }/cel/semver_test.go (98%) rename staging/src/k8s.io/dynamic-resource-allocation/{structured/namedresources => }/cel/semverlib.go (100%) delete mode 100644 staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go delete mode 100644 staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go diff --git a/api/api-rules/violation_exceptions.list b/api/api-rules/violation_exceptions.list index 4940563397f13..fc4997fad703d 100644 --- a/api/api-rules/violation_exceptions.list +++ b/api/api-rules/violation_exceptions.list @@ -52,13 +52,10 @@ 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/networking/v1alpha1,ServiceCIDRSpec,CIDRs API rule violation: names_match,k8s.io/api/networking/v1beta1,ServiceCIDRSpec,CIDRs -API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,BoolValue -API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,IntSliceValue -API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,IntValue -API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,QuantityValue -API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,StringSliceValue -API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,StringValue -API rule violation: names_match,k8s.io/api/resource/v1alpha3,NamedResourcesAttributeValue,VersionValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,DeviceAttribute,BoolValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,DeviceAttribute,IntValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,DeviceAttribute,StringValue +API rule violation: names_match,k8s.io/api/resource/v1alpha3,DeviceAttribute,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,Schema API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XEmbeddedResource diff --git a/api/discovery/aggregated_v2.json b/api/discovery/aggregated_v2.json index a142fb394c17a..33ada3450e481 100644 --- a/api/discovery/aggregated_v2.json +++ b/api/discovery/aggregated_v2.json @@ -1891,6 +1891,26 @@ { "freshness": "Current", "resources": [ + { + "resource": "deviceclasses", + "responseKind": { + "group": "", + "kind": "DeviceClass", + "version": "" + }, + "scope": "Cluster", + "singularResource": "deviceclass", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, { "resource": "podschedulingcontexts", "responseKind": { @@ -1926,26 +1946,6 @@ "watch" ] }, - { - "resource": "resourceclaimparameters", - "responseKind": { - "group": "", - "kind": "ResourceClaimParameters", - "version": "" - }, - "scope": "Namespaced", - "singularResource": "resourceclaimparameters", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, { "resource": "resourceclaims", "responseKind": { @@ -2001,46 +2001,6 @@ "watch" ] }, - { - "resource": "resourceclasses", - "responseKind": { - "group": "", - "kind": "ResourceClass", - "version": "" - }, - "scope": "Cluster", - "singularResource": "resourceclass", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, - { - "resource": "resourceclassparameters", - "responseKind": { - "group": "", - "kind": "ResourceClassParameters", - "version": "" - }, - "scope": "Namespaced", - "singularResource": "resourceclassparameters", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, { "resource": "resourceslices", "responseKind": { diff --git a/api/discovery/aggregated_v2beta1.json b/api/discovery/aggregated_v2beta1.json index 2f703476bccc6..f9fed0bd40b6a 100644 --- a/api/discovery/aggregated_v2beta1.json +++ b/api/discovery/aggregated_v2beta1.json @@ -1891,6 +1891,26 @@ { "freshness": "Current", "resources": [ + { + "resource": "deviceclasses", + "responseKind": { + "group": "", + "kind": "DeviceClass", + "version": "" + }, + "scope": "Cluster", + "singularResource": "deviceclass", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, { "resource": "podschedulingcontexts", "responseKind": { @@ -1926,26 +1946,6 @@ "watch" ] }, - { - "resource": "resourceclaimparameters", - "responseKind": { - "group": "", - "kind": "ResourceClaimParameters", - "version": "" - }, - "scope": "Namespaced", - "singularResource": "resourceclaimparameters", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, { "resource": "resourceclaims", "responseKind": { @@ -2001,46 +2001,6 @@ "watch" ] }, - { - "resource": "resourceclasses", - "responseKind": { - "group": "", - "kind": "ResourceClass", - "version": "" - }, - "scope": "Cluster", - "singularResource": "resourceclass", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, - { - "resource": "resourceclassparameters", - "responseKind": { - "group": "", - "kind": "ResourceClassParameters", - "version": "" - }, - "scope": "Namespaced", - "singularResource": "resourceclassparameters", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, { "resource": "resourceslices", "responseKind": { diff --git a/api/discovery/apis__resource.k8s.io__v1alpha3.json b/api/discovery/apis__resource.k8s.io__v1alpha3.json index cbb3d46e8d97c..535ae34c33f2e 100644 --- a/api/discovery/apis__resource.k8s.io__v1alpha3.json +++ b/api/discovery/apis__resource.k8s.io__v1alpha3.json @@ -3,6 +3,23 @@ "groupVersion": "resource.k8s.io/v1alpha3", "kind": "APIResourceList", "resources": [ + { + "kind": "DeviceClass", + "name": "deviceclasses", + "namespaced": false, + "singularName": "deviceclass", + "storageVersionHash": "12soGlw2WzE=", + "verbs": [ + "create", + "delete", + "deletecollection", + "get", + "list", + "patch", + "update", + "watch" + ] + }, { "kind": "PodSchedulingContext", "name": "podschedulingcontexts", @@ -31,23 +48,6 @@ "update" ] }, - { - "kind": "ResourceClaimParameters", - "name": "resourceclaimparameters", - "namespaced": true, - "singularName": "resourceclaimparameters", - "storageVersionHash": "42WVd9cucrU=", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, { "kind": "ResourceClaim", "name": "resourceclaims", @@ -93,40 +93,6 @@ "watch" ] }, - { - "kind": "ResourceClass", - "name": "resourceclasses", - "namespaced": false, - "singularName": "resourceclass", - "storageVersionHash": "gv35DluSP3c=", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, - { - "kind": "ResourceClassParameters", - "name": "resourceclassparameters", - "namespaced": true, - "singularName": "resourceclassparameters", - "storageVersionHash": "369PrU9Yi/E=", - "verbs": [ - "create", - "delete", - "deletecollection", - "get", - "list", - "patch", - "update", - "watch" - ] - }, { "kind": "ResourceSlice", "name": "resourceslices", diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index d88d8ac157196..d474a369fdec2 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -10369,6 +10369,10 @@ "name": { "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", "type": "string" + }, + "request": { + "description": "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.", + "type": "string" } }, "required": [ @@ -14952,213 +14956,409 @@ "io.k8s.api.resource.v1alpha3.AllocationResult": { "description": "AllocationResult contains attributes of an allocated resource.", "properties": { - "availableOnNodes": { + "controller": { + "description": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + "type": "string" + }, + "devices": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationResult", + "description": "Devices is the result of allocating devices." + }, + "nodeSelector": { "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", - "description": "This field will get set by the resource driver after it has allocated the resource to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere." + "description": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.BasicDevice": { + "description": "BasicDevice defines one device instance using fields that are supported by all clients which support DRA.", + "properties": { + "attributes": { + "additionalProperties": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAttribute" + }, + "description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "type": "object" }, - "resourceHandles": { - "description": "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceHandle" + "capacity": { + "additionalProperties": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "type": "object" } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DriverAllocationResult": { - "description": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + "io.k8s.api.resource.v1alpha3.CELDeviceSelector": { + "description": "CELDeviceSelector contains a CEL expression for selecting a device.", "properties": { - "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult", - "description": "NamedResources describes the allocation result when using the named resources model." - }, - "vendorRequestParameters": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated." + "expression": { + "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)", + "type": "string" } }, + "required": [ + "expression" + ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.DriverRequests": { - "description": "DriverRequests describes all resources that are needed from one particular driver.", + "io.k8s.api.resource.v1alpha3.Device": { + "description": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", "properties": { - "driverName": { - "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "basic": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.BasicDevice", + "description": "Basic defines one device instance using fields that are supported by all clients which support DRA." + }, + "name": { + "description": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.", "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration": { + "description": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", + "properties": { + "opaque": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." }, "requests": { - "description": "Requests describes all resources that are needed from the driver.", + "description": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceRequest" + "type": "string" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "vendorParameters": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim." + "source": { + "description": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", + "type": "string" } }, + "required": [ + "source" + ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult": { - "description": "NamedResourcesAllocationResult is used in AllocationResultModel.", + "io.k8s.api.resource.v1alpha3.DeviceAllocationResult": { + "description": "DeviceAllocationResult is the result of allocating devices.", "properties": { - "name": { - "description": "Name is the name of the selected resource instance.", - "type": "string" + "config": { + "description": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "results": { + "description": "Results lists all allocated devices.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, - "required": [ - "name" - ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesAttribute": { - "description": "NamedResourcesAttribute is a combination of an attribute name and its value.", + "io.k8s.api.resource.v1alpha3.DeviceAttribute": { + "description": "DeviceAttribute must have exactly one field set.", "properties": { "bool": { "description": "BoolValue is a true/false value.", "type": "boolean" }, "int": { - "description": "IntValue is a 64-bit integer.", + "description": "IntValue is a number.", "format": "int64", "type": "integer" }, - "intSlice": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice", - "description": "IntSliceValue is an array of 64-bit integers." + "string": { + "description": "StringValue is a string. Must not be longer than 64 characters.", + "type": "string" }, - "name": { - "description": "Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.", + "version": { + "description": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.", "type": "string" + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceClaim": { + "description": "DeviceClaim defines how to request devices with a ResourceClaim.", + "properties": { + "config": { + "description": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "quantity": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity", - "description": "QuantityValue is a quantity." + "constraints": { + "description": "These constraints must be satisfied by the set of devices that get allocated for the claim.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceConstraint" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "string": { - "description": "StringValue is a string.", - "type": "string" + "requests": { + "description": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceRequest" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration": { + "description": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", + "properties": { + "opaque": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." }, - "stringSlice": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice", - "description": "StringSliceValue is an array of strings." + "requests": { + "description": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceClass": { + "description": "DeviceClass is a vendor or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, - "version": { - "description": "VersionValue is a semantic version according to semver.org spec 2.0.0.", + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", + "description": "Standard object metadata" + }, + "spec": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassSpec", + "description": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number." } }, "required": [ - "name" + "spec" ], + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "DeviceClass", + "version": "v1alpha3" + } + ] + }, + "io.k8s.api.resource.v1alpha3.DeviceClassConfiguration": { + "description": "DeviceClassConfiguration is used in DeviceClass.", + "properties": { + "opaque": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration", + "description": "Opaque provides driver-specific configuration parameters." + } + }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesFilter": { - "description": "NamedResourcesFilter is used in ResourceFilterModel.", + "io.k8s.api.resource.v1alpha3.DeviceClassList": { + "description": "DeviceClassList is a collection of classes.", "properties": { - "selector": { - "description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type in NamedResourcesAttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()", + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" + }, + "items": { + "description": "Items is the list of resource classes.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" + }, + "type": "array" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", + "description": "Standard list metadata" } }, "required": [ - "selector" + "items" ], - "type": "object" + "type": "object", + "x-kubernetes-group-version-kind": [ + { + "group": "resource.k8s.io", + "kind": "DeviceClassList", + "version": "v1alpha3" + } + ] }, - "io.k8s.api.resource.v1alpha3.NamedResourcesInstance": { - "description": "NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.", + "io.k8s.api.resource.v1alpha3.DeviceClassSpec": { "properties": { - "attributes": { - "description": "Attributes defines the attributes of this resource instance. The name of each attribute must be unique.", + "config": { + "description": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesAttribute" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassConfiguration" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "name": { - "description": "Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.", + "selectors": { + "description": "Each selector must be satisfied by a device which is claimed via this class.", + "items": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceSelector" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "suitableNodes": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", + "description": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceConstraint": { + "description": "DeviceConstraint must have exactly one field set besides Requests.", + "properties": { + "matchAttribute": { + "description": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.", "type": "string" + }, + "requests": { + "description": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.", + "items": { + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, - "required": [ - "name" - ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice": { - "description": "NamedResourcesIntSlice contains a slice of 64-bit integers.", + "io.k8s.api.resource.v1alpha3.DeviceRequest": { + "description": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", "properties": { - "ints": { - "description": "Ints is the slice of 64-bit integers.", + "adminAccess": { + "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.", + "type": "boolean" + }, + "count": { + "description": "Count is used only when the count mode is \"Exact\". Must be greater than zero. If CountMode is Exact and this field is not specified, the default is one.", + "format": "int64", + "type": "integer" + }, + "countMode": { + "description": "CountMode and its related fields define how many devices are needed to satisfy this request. Supported values are:\n\n- Exact: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf countMode is not specified, the default countMode is Exact. If countMode is Exact and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + "type": "string" + }, + "deviceClassName": { + "description": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.", + "type": "string" + }, + "name": { + "description": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.", + "type": "string" + }, + "selectors": { + "description": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", "items": { - "format": "int64", - "type": "integer" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceSelector" }, "type": "array", "x-kubernetes-list-type": "atomic" } }, "required": [ - "ints" + "name", + "deviceClassName" ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesRequest": { - "description": "NamedResourcesRequest is used in ResourceRequestModel.", + "io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult": { + "description": "DeviceRequestAllocationResult contains the allocation result for one request.", "properties": { - "selector": { - "description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()", + "device": { + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", + "type": "string" + }, + "driver": { + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "pool": { + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "type": "string" + }, + "request": { + "description": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", "type": "string" } }, "required": [ - "selector" + "request", + "driver", + "pool", + "device" ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesResources": { - "description": "NamedResourcesResources is used in ResourceModel.", + "io.k8s.api.resource.v1alpha3.DeviceSelector": { + "description": "DeviceSelector must have exactly one field set.", "properties": { - "instances": { - "description": "The list of all individual resources instances currently available.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesInstance" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "cel": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.CELDeviceSelector", + "description": "CEL contains a CEL expression for selecting a device." } }, "required": [ - "instances" + "cel" ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice": { - "description": "NamedResourcesStringSlice contains a slice of strings.", + "io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration": { + "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", "properties": { - "strings": { - "description": "Strings is the slice of strings.", - "items": { - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "driver": { + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", + "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions." } }, "required": [ - "strings" + "driver", + "parameters" ], "type": "object" }, "io.k8s.api.resource.v1alpha3.PodSchedulingContext": { - "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DRAControlPlaneController feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -15264,7 +15464,7 @@ "type": "object" }, "io.k8s.api.resource.v1alpha3.ResourceClaim": { - "description": "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "description": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -15280,11 +15480,11 @@ }, "spec": { "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimSpec", - "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 what is being requested and how to configure it. The spec is immutable." }, "status": { "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimStatus", - "description": "Status describes whether the resource is available and with which attributes." + "description": "Status describes whether the claim is ready to use and what has been allocated." } }, "required": [ @@ -15361,100 +15561,6 @@ } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimParameters": { - "description": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "driverRequests": { - "description": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DriverRequests" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "generatedFrom": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference", - "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." - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object metadata" - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.ResourceClaimParametersList": { - "description": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of node resource capacity objects.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata" - } - }, - "required": [ - "items" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceClaimParametersList", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference": { - "description": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", - "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - "type": "string" - }, - "kind": { - "description": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata, for example \"ConfigMap\".", - "type": "string" - }, - "name": { - "description": "Name is the name of resource being referenced.", - "type": "string" - } - }, - "required": [ - "kind", - "name" - ], - "type": "object" - }, "io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus": { "description": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", "properties": { @@ -15471,42 +15577,38 @@ "x-kubernetes-list-type": "atomic" } }, + "required": [ + "name" + ], "type": "object" }, "io.k8s.api.resource.v1alpha3.ResourceClaimSpec": { - "description": "ResourceClaimSpec defines how a resource is to be allocated.", + "description": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", "properties": { - "parametersRef": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference", - "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." - }, - "resourceClassName": { - "description": "ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.", + "controller": { + "description": "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", "type": "string" + }, + "devices": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClaim", + "description": "Devices defines how to request devices." } }, - "required": [ - "resourceClassName" - ], "type": "object" }, "io.k8s.api.resource.v1alpha3.ResourceClaimStatus": { - "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.", + "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", "properties": { "allocation": { "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.AllocationResult", - "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 once the claim has been allocated successfully." }, "deallocationRequested": { - "description": "DeallocationRequested indicates that a ResourceClaim is to be deallocated.\n\nThe driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nWhile DeallocationRequested is set, no new consumers may be added to ReservedFor.", + "description": "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", "type": "boolean" }, - "driverName": { - "description": "DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.", - "type": "string" - }, "reservedFor": { - "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", "items": { "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference" }, @@ -15522,7 +15624,7 @@ "type": "object" }, "io.k8s.api.resource.v1alpha3.ResourceClaimTemplate": { - "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.", + "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -15605,251 +15707,38 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceClass": { - "description": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "io.k8s.api.resource.v1alpha3.ResourcePool": { + "description": "ResourcePool describes the pool that ResourceSlices belong to.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "driverName": { - "description": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object metadata" - }, - "parametersRef": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference", - "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." - }, - "structuredParameters": { - "description": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", - "type": "boolean" - }, - "suitableNodes": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", - "description": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates." - } - }, - "required": [ - "driverName" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.ResourceClassList": { - "description": "ResourceClassList is a collection of classes.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of resource classes.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata" - } - }, - "required": [ - "items" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceClassList", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.ResourceClassParameters": { - "description": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "filters": { - "description": "Filters describes additional contraints that must be met when using the class.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceFilter" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "generatedFrom": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference", - "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." - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "description": "Standard object metadata" - }, - "vendorParameters": { - "description": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.VendorParameters" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.ResourceClassParametersList": { - "description": "ResourceClassParametersList is a collection of ResourceClassParameters.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of node resource capacity objects.", - "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "description": "Standard list metadata" - } - }, - "required": [ - "items" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceClassParametersList", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.ResourceClassParametersReference": { - "description": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", - "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - "type": "string" - }, - "kind": { - "description": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata.", - "type": "string" + "generation": { + "description": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.", + "format": "int64", + "type": "integer" }, "name": { - "description": "Name is the name of resource being referenced.", + "description": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes.", "type": "string" }, - "namespace": { - "description": "Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources.", - "type": "string" - } - }, - "required": [ - "kind", - "name" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.ResourceFilter": { - "description": "ResourceFilter is a filter for resources from one particular driver.", - "properties": { - "driverName": { - "description": "DriverName is the name used by the DRA driver kubelet plugin.", - "type": "string" - }, - "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesFilter", - "description": "NamedResources describes a resource filter using the named resources model." - } - }, - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.ResourceHandle": { - "description": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", - "properties": { - "data": { - "description": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", - "type": "string" - }, - "driverName": { - "description": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", - "type": "string" - }, - "structuredData": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.StructuredResourceHandle", - "description": "If StructuredData is set, then it needs to be used instead of Data." + "resourceSliceCount": { + "description": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be higher than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.", + "format": "int64", + "type": "integer" } }, "required": [ - "driverName" + "name", + "generation", + "resourceSliceCount" ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceRequest": { - "description": "ResourceRequest is a request for resources from one particular driver.", - "properties": { - "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesRequest", - "description": "NamedResources describes a request for resources with the named resources model." - }, - "vendorParameters": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim." - } - }, - "type": "object" - }, "io.k8s.api.resource.v1alpha3.ResourceSlice": { - "description": "ResourceSlice provides information about available resources on individual nodes.", + "description": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a given driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "driverName": { - "description": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.", - "type": "string" - }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" @@ -15858,17 +15747,13 @@ "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", "description": "Standard object metadata" }, - "namedResources": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.NamedResourcesResources", - "description": "NamedResources describes available resources using the named resources model." - }, - "nodeName": { - "description": "NodeName identifies the node which provides the resources if they are local to a node.\n\nA field selector can be used to list only ResourceSlice objects with a certain node name.", - "type": "string" + "spec": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSliceSpec", + "description": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number." } }, "required": [ - "driverName" + "spec" ], "type": "object", "x-kubernetes-group-version-kind": [ @@ -15887,7 +15772,7 @@ "type": "string" }, "items": { - "description": "Items is the list of node resource capacity objects.", + "description": "Items is the list of resource ResourceSlices.", "items": { "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceSlice" }, @@ -15897,7 +15782,7 @@ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "metadata": { + "listMeta": { "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", "description": "Standard list metadata" } @@ -15914,47 +15799,42 @@ } ] }, - "io.k8s.api.resource.v1alpha3.StructuredResourceHandle": { - "description": "StructuredResourceHandle is the in-tree representation of the allocation result.", + "io.k8s.api.resource.v1alpha3.ResourceSliceSpec": { + "description": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", "properties": { - "nodeName": { - "description": "NodeName is the name of the node providing the necessary resources if the resources are local to a node.", - "type": "string" + "allNodes": { + "description": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "type": "boolean" }, - "results": { - "description": "Results lists all allocated driver resources.", + "devices": { + "description": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", "items": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DriverAllocationResult" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.Device" }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "vendorClaimParameters": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated." + "driver": { + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "type": "string" }, - "vendorClassParameters": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated." - } - }, - "required": [ - "results" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.VendorParameters": { - "description": "VendorParameters are opaque parameters for one particular driver.", - "properties": { - "driverName": { - "description": "DriverName is the name used by the DRA driver kubelet plugin.", + "nodeName": { + "description": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.", "type": "string" }, - "parameters": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension", - "description": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim." + "nodeSelector": { + "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector", + "description": "NodeSelector defines which nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set." + }, + "pool": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourcePool", + "description": "Pool describes the pool that this ResourceSlice belongs to. This field is immutable." } }, + "required": [ + "driver", + "pool" + ], "type": "object" }, "io.k8s.api.scheduling.v1.PriorityClass": { @@ -70445,13 +70325,13 @@ ] } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of PodSchedulingContext", - "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", + "description": "delete collection of DeviceClass", + "operationId": "deleteResourceV1alpha3CollectionDeviceClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -70522,7 +70402,7 @@ "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, @@ -70530,8 +70410,8 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", + "description": "list or watch objects of kind DeviceClass", + "operationId": "listResourceV1alpha3DeviceClass", "parameters": [ { "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" @@ -70575,7 +70455,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClassList" } }, "401": { @@ -70591,14 +70471,11 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -70607,15 +70484,15 @@ "consumes": [ "*/*" ], - "description": "create a PodSchedulingContext", - "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", + "description": "create a DeviceClass", + "operationId": "createResourceV1alpha3DeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, { @@ -70645,19 +70522,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -70673,18 +70550,18 @@ "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete a PodSchedulingContext", - "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", + "description": "delete a DeviceClass", + "operationId": "deleteResourceV1alpha3DeviceClass", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -70715,13 +70592,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "202": { "description": "Accepted", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -70737,7 +70614,7 @@ "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, @@ -70745,8 +70622,8 @@ "consumes": [ "*/*" ], - "description": "read the specified PodSchedulingContext", - "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", + "description": "read the specified DeviceClass", + "operationId": "readResourceV1alpha3DeviceClass", "produces": [ "application/json", "application/yaml", @@ -70756,7 +70633,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -70772,22 +70649,19 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the PodSchedulingContext", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" } @@ -70799,8 +70673,8 @@ "application/strategic-merge-patch+json", "application/apply-patch+yaml" ], - "description": "partially update the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", + "description": "partially update the specified DeviceClass", + "operationId": "patchResourceV1alpha3DeviceClass", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -70835,13 +70709,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -70857,7 +70731,7 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, @@ -70865,15 +70739,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", + "description": "replace the specified DeviceClass", + "operationId": "replaceResourceV1alpha3DeviceClass", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, { @@ -70903,13 +70777,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "401": { @@ -70925,18 +70799,63 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { - "get": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { + "delete": { "consumes": [ "*/*" ], - "description": "read status of the specified PodSchedulingContext", - "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", + "description": "delete collection of PodSchedulingContext", + "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", + "parameters": [ + { + "$ref": "#/parameters/body-2Y1dVQaQ" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "type": "string", + "uniqueItems": true + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/orphanDependents-uRB25kX5" + }, + { + "$ref": "#/parameters/propagationPolicy-6jk3prlO" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + } + ], "produces": [ "application/json", "application/yaml", @@ -70946,7 +70865,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "401": { @@ -70959,79 +70878,63 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", "version": "v1alpha3" } }, - "parameters": [ - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "patch": { + "get": { "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" + "*/*" ], - "description": "partially update status of the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", + "description": "list or watch objects of kind PodSchedulingContext", + "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { - "$ref": "#/parameters/body-78PwaGsr" + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" }, { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/continue-QfD61s0i" }, { - "$ref": "#/parameters/fieldManager-7c6nTn1T" + "$ref": "#/parameters/fieldSelector-xIcQKXFG" }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true + "$ref": "#/parameters/labelSelector-5Zw57w4C" }, { - "$ref": "#/parameters/force-tOGGb0Yi" + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "401": { @@ -71044,19 +70947,27 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", "version": "v1alpha3" } }, - "put": { + "parameters": [ + { + "$ref": "#/parameters/namespace-vgWSWtn3" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + } + ], + "post": { "consumes": [ "*/*" ], - "description": "replace status of the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", + "description": "create a PodSchedulingContext", + "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "in": "body", @@ -71102,6 +71013,12 @@ "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + } + }, "401": { "description": "Unauthorized" } @@ -71112,7 +71029,7 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", @@ -71120,20 +71037,17 @@ } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ResourceClaimParameters", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimParameters", + "description": "delete a PodSchedulingContext", + "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -71141,35 +71055,14 @@ "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, { "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, { "$ref": "#/parameters/orphanDependents-uRB25kX5" }, { "$ref": "#/parameters/propagationPolicy-6jk3prlO" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" } ], "produces": [ @@ -71181,7 +71074,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + } + }, + "202": { + "description": "Accepted", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71194,10 +71093,10 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "deletecollection", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -71205,52 +71104,18 @@ "consumes": [ "*/*" ], - "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha3NamespacedResourceClaimParameters", - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ], + "description": "read the specified PodSchedulingContext", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71263,14 +71128,22 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, "parameters": [ + { + "description": "name of the PodSchedulingContext", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true + }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, @@ -71278,20 +71151,18 @@ "$ref": "#/parameters/pretty-tJGM1-ng" } ], - "post": { + "patch": { "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json", + "application/apply-patch+yaml" ], - "description": "create ResourceClaimParameters", - "operationId": "createResourceV1alpha3NamespacedResourceClaimParameters", + "description": "partially update the specified PodSchedulingContext", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" - } + "$ref": "#/parameters/body-78PwaGsr" }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -71301,7 +71172,7 @@ "uniqueItems": true }, { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" + "$ref": "#/parameters/fieldManager-7c6nTn1T" }, { "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", @@ -71309,6 +71180,9 @@ "name": "fieldValidation", "type": "string", "uniqueItems": true + }, + { + "$ref": "#/parameters/force-tOGGb0Yi" } ], "produces": [ @@ -71320,19 +71194,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71345,24 +71213,27 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters/{name}": { - "delete": { + }, + "put": { "consumes": [ "*/*" ], - "description": "delete ResourceClaimParameters", - "operationId": "deleteResourceV1alpha3NamespacedResourceClaimParameters", + "description": "replace the specified PodSchedulingContext", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { - "$ref": "#/parameters/body-2Y1dVQaQ" + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + } }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -71372,13 +71243,14 @@ "uniqueItems": true }, { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" + "$ref": "#/parameters/fieldManager-Qy4HdaTW" }, { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "type": "string", + "uniqueItems": true } ], "produces": [ @@ -71390,13 +71262,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, - "202": { - "description": "Accepted", + "201": { + "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71409,19 +71281,21 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } - }, + } + }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { "get": { "consumes": [ "*/*" ], - "description": "read the specified ResourceClaimParameters", - "operationId": "readResourceV1alpha3NamespacedResourceClaimParameters", + "description": "read status of the specified PodSchedulingContext", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", "produces": [ "application/json", "application/yaml", @@ -71431,7 +71305,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71447,13 +71321,13 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the ResourceClaimParameters", + "description": "name of the PodSchedulingContext", "in": "path", "name": "name", "required": true, @@ -71474,8 +71348,8 @@ "application/strategic-merge-patch+json", "application/apply-patch+yaml" ], - "description": "partially update the specified ResourceClaimParameters", - "operationId": "patchResourceV1alpha3NamespacedResourceClaimParameters", + "description": "partially update status of the specified PodSchedulingContext", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "$ref": "#/parameters/body-78PwaGsr" @@ -71510,13 +71384,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71532,7 +71406,7 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -71540,15 +71414,15 @@ "consumes": [ "*/*" ], - "description": "replace the specified ResourceClaimParameters", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaimParameters", + "description": "replace status of the specified PodSchedulingContext", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, { @@ -71578,13 +71452,13 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "201": { "description": "Created", "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "401": { @@ -71600,7 +71474,7 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } } @@ -72765,1347 +72639,235 @@ } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind PodSchedulingContext", + "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "PodSchedulingContext", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/resourceclaims": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaim", + "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { + "get": { + "consumes": [ + "*/*" + ], + "description": "list or watch objects of kind ResourceClaimTemplate", + "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", + "produces": [ + "application/json", + "application/yaml", + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + } + }, + "401": { + "description": "Unauthorized" + } + }, + "schemes": [ + "https" + ], + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "list", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" + }, + { + "$ref": "#/parameters/continue-QfD61s0i" + }, + { + "$ref": "#/parameters/fieldSelector-xIcQKXFG" + }, + { + "$ref": "#/parameters/labelSelector-5Zw57w4C" + }, + { + "$ref": "#/parameters/limit-1NfNmdNH" + }, + { + "$ref": "#/parameters/pretty-tJGM1-ng" + }, + { + "$ref": "#/parameters/resourceVersion-5WAnf1kx" + }, + { + "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" + }, + { + "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" + }, + { + "$ref": "#/parameters/timeoutSeconds-yvYezaOC" + }, + { + "$ref": "#/parameters/watch-XNNPZGbK" + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/resourceslices": { "delete": { "consumes": [ "*/*" ], - "description": "delete collection of ResourceClassParameters", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClassParameters", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { - "consumes": [ - "*/*" - ], - "description": "create ResourceClassParameters", - "operationId": "createResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete ResourceClassParameters", - "operationId": "deleteResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified ResourceClassParameters", - "operationId": "readResourceV1alpha3NamespacedResourceClassParameters", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "name of the ResourceClassParameters", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified ResourceClassParameters", - "operationId": "patchResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified ResourceClassParameters", - "operationId": "replaceResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclaimparameters": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha3ResourceClaimParametersForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclaims": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaim", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclasses": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete collection of ResourceClass", - "operationId": "deleteResourceV1alpha3CollectionResourceClass", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind ResourceClass", - "operationId": "listResourceV1alpha3ResourceClass", - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "post": { - "consumes": [ - "*/*" - ], - "description": "create a ResourceClass", - "operationId": "createResourceV1alpha3ResourceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/resourceclasses/{name}": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete a ResourceClass", - "operationId": "deleteResourceV1alpha3ResourceClass", - "parameters": [ - { - "$ref": "#/parameters/body-2Y1dVQaQ" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/gracePeriodSeconds--K5HaBOS" - }, - { - "$ref": "#/parameters/orphanDependents-uRB25kX5" - }, - { - "$ref": "#/parameters/propagationPolicy-6jk3prlO" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "202": { - "description": "Accepted", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "get": { - "consumes": [ - "*/*" - ], - "description": "read the specified ResourceClass", - "operationId": "readResourceV1alpha3ResourceClass", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "name of the ResourceClass", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - } - ], - "patch": { - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json", - "application/apply-patch+yaml" - ], - "description": "partially update the specified ResourceClass", - "operationId": "patchResourceV1alpha3ResourceClass", - "parameters": [ - { - "$ref": "#/parameters/body-78PwaGsr" - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-7c6nTn1T" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/force-tOGGb0Yi" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "put": { - "consumes": [ - "*/*" - ], - "description": "replace the specified ResourceClass", - "operationId": "replaceResourceV1alpha3ResourceClass", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/fieldManager-Qy4HdaTW" - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "type": "string", - "uniqueItems": true - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "201": { - "description": "Created", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/resourceclassparameters": { - "get": { - "consumes": [ - "*/*" - ], - "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha3ResourceClassParametersForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceslices": { - "delete": { - "consumes": [ - "*/*" - ], - "description": "delete collection of ResourceSlice", - "operationId": "deleteResourceV1alpha3CollectionResourceSlice", + "description": "delete collection of ResourceSlice", + "operationId": "deleteResourceV1alpha3CollectionResourceSlice", "parameters": [ { "$ref": "#/parameters/body-2Y1dVQaQ" @@ -74578,175 +73340,13 @@ } } }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimParametersList", + "description": "watch individual changes to a list of DeviceClass. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3DeviceClassList", "produces": [ "application/json", "application/yaml", @@ -74774,7 +73374,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "DeviceClass", "version": "v1alpha3" } }, @@ -74794,9 +73394,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -74817,13 +73414,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimParameters", + "description": "watch changes to an object of kind DeviceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3DeviceClass", "produces": [ "application/json", "application/yaml", @@ -74851,7 +73448,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "DeviceClass", "version": "v1alpha3" } }, @@ -74872,16 +73469,13 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ResourceClaimParameters", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, "type": "string", "uniqueItems": true }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -74902,13 +73496,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", + "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", "produces": [ "application/json", "application/yaml", @@ -74936,84 +73530,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaim", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -75033,14 +73550,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the ResourceClaim", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "$ref": "#/parameters/namespace-vgWSWtn3" }, @@ -75064,90 +73573,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" - }, - { - "$ref": "#/parameters/namespace-vgWSWtn3" - }, - { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", + "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", "produces": [ "application/json", "application/yaml", @@ -75175,7 +73607,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -75196,7 +73628,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ResourceClaimTemplate", + "description": "name of the PodSchedulingContext", "in": "path", "name": "name", "required": true, @@ -75226,13 +73658,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClassParametersList", + "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", "produces": [ "application/json", "application/yaml", @@ -75260,7 +73692,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "ResourceClaim", "version": "v1alpha3" } }, @@ -75303,13 +73735,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClassParameters", + "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaim", "produces": [ "application/json", "application/yaml", @@ -75337,7 +73769,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "ResourceClaim", "version": "v1alpha3" } }, @@ -75358,7 +73790,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "description": "name of the ResourceClassParameters", + "description": "name of the ResourceClaim", "in": "path", "name": "name", "required": true, @@ -75388,13 +73820,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", + "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", "produces": [ "application/json", "application/yaml", @@ -75422,7 +73854,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, @@ -75443,78 +73875,7 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimparameters": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimParametersListForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" - }, - { - "$ref": "#/parameters/limit-1NfNmdNH" + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" @@ -75536,13 +73897,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", + "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", "produces": [ "application/json", "application/yaml", @@ -75567,10 +73928,10 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, @@ -75591,78 +73952,15 @@ "$ref": "#/parameters/limit-1NfNmdNH" }, { - "$ref": "#/parameters/pretty-tJGM1-ng" - }, - { - "$ref": "#/parameters/resourceVersion-5WAnf1kx" - }, - { - "$ref": "#/parameters/resourceVersionMatch-t8XhRHeC" - }, - { - "$ref": "#/parameters/sendInitialEvents-rLXlEK_k" - }, - { - "$ref": "#/parameters/timeoutSeconds-yvYezaOC" - }, - { - "$ref": "#/parameters/watch-XNNPZGbK" - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { - "get": { - "consumes": [ - "*/*" - ], - "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "schemes": [ - "https" - ], - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "$ref": "#/parameters/allowWatchBookmarks-HC2hJt-J" - }, - { - "$ref": "#/parameters/continue-QfD61s0i" - }, - { - "$ref": "#/parameters/fieldSelector-xIcQKXFG" - }, - { - "$ref": "#/parameters/labelSelector-5Zw57w4C" + "description": "name of the ResourceClaimTemplate", + "in": "path", + "name": "name", + "required": true, + "type": "string", + "uniqueItems": true }, { - "$ref": "#/parameters/limit-1NfNmdNH" + "$ref": "#/parameters/namespace-vgWSWtn3" }, { "$ref": "#/parameters/pretty-tJGM1-ng" @@ -75684,13 +73982,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses": { + "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ResourceClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClassList", + "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75718,7 +74016,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClass", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -75758,13 +74056,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { "get": { "consumes": [ "*/*" ], - "description": "watch changes to an object of kind ResourceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3ResourceClass", + "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75789,10 +74087,10 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClass", + "kind": "ResourceClaim", "version": "v1alpha3" } }, @@ -75812,14 +74110,6 @@ { "$ref": "#/parameters/limit-1NfNmdNH" }, - { - "description": "name of the ResourceClass", - "in": "path", - "name": "name", - "required": true, - "type": "string", - "uniqueItems": true - }, { "$ref": "#/parameters/pretty-tJGM1-ng" }, @@ -75840,13 +74130,13 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { "get": { "consumes": [ "*/*" ], - "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClassParametersListForAllNamespaces", + "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", "produces": [ "application/json", "application/yaml", @@ -75874,7 +74164,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index c0fa289668ab2..e24eb73b4127e 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -6516,6 +6516,10 @@ "default": "", "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", "type": "string" + }, + "request": { + "description": "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.", + "type": "string" } }, "required": [ diff --git a/api/openapi-spec/v3/apis__apps__v1_openapi.json b/api/openapi-spec/v3/apis__apps__v1_openapi.json index c36f1511d637e..26c11dbaac87d 100644 --- a/api/openapi-spec/v3/apis__apps__v1_openapi.json +++ b/api/openapi-spec/v3/apis__apps__v1_openapi.json @@ -4286,6 +4286,10 @@ "default": "", "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", "type": "string" + }, + "request": { + "description": "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.", + "type": "string" } }, "required": [ diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index 0afe53ed612bf..e8e27469e53e9 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -3490,6 +3490,10 @@ "default": "", "description": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", "type": "string" + }, + "request": { + "description": "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.", + "type": "string" } }, "required": [ diff --git a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json index 6ee5610bdce55..24d52b8ffa52c 100644 --- a/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json +++ b/api/openapi-spec/v3/apis__resource.k8s.io__v1alpha3_openapi.json @@ -89,144 +89,83 @@ "io.k8s.api.resource.v1alpha3.AllocationResult": { "description": "AllocationResult contains attributes of an allocated resource.", "properties": { - "availableOnNodes": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.core.v1.NodeSelector" - } - ], - "description": "This field will get set by the resource driver after it has allocated the resource to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere." + "controller": { + "description": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + "type": "string" }, - "resourceHandles": { - "description": "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceHandle" - } - ], - "default": {} - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.DriverAllocationResult": { - "description": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", - "properties": { - "namedResources": { + "devices": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceAllocationResult" } ], - "description": "NamedResources describes the allocation result when using the named resources model." + "default": {}, + "description": "Devices is the result of allocating devices." }, - "vendorRequestParameters": { + "nodeSelector": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + "$ref": "#/components/schemas/io.k8s.api.core.v1.NodeSelector" } ], - "description": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated." + "description": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere." } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.DriverRequests": { - "description": "DriverRequests describes all resources that are needed from one particular driver.", + "io.k8s.api.resource.v1alpha3.BasicDevice": { + "description": "BasicDevice defines one device instance using fields that are supported by all clients which support DRA.", "properties": { - "driverName": { - "description": "DriverName is the name used by the DRA driver kubelet plugin.", - "type": "string" - }, - "requests": { - "description": "Requests describes all resources that are needed from the driver.", - "items": { + "attributes": { + "additionalProperties": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceRequest" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceAttribute" } ], "default": {} }, - "type": "array", - "x-kubernetes-list-type": "atomic" + "description": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "type": "object" }, - "vendorParameters": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" - } - ], - "description": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim." + "capacity": { + "additionalProperties": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity" + }, + "description": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "type": "object" } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult": { - "description": "NamedResourcesAllocationResult is used in AllocationResultModel.", + "io.k8s.api.resource.v1alpha3.CELDeviceSelector": { + "description": "CELDeviceSelector contains a CEL expression for selecting a device.", "properties": { - "name": { + "expression": { "default": "", - "description": "Name is the name of the selected resource instance.", + "description": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)", "type": "string" } }, "required": [ - "name" + "expression" ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesAttribute": { - "description": "NamedResourcesAttribute is a combination of an attribute name and its value.", + "io.k8s.api.resource.v1alpha3.Device": { + "description": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", "properties": { - "bool": { - "description": "BoolValue is a true/false value.", - "type": "boolean" - }, - "int": { - "description": "IntValue is a 64-bit integer.", - "format": "int64", - "type": "integer" - }, - "intSlice": { + "basic": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.BasicDevice" } ], - "description": "IntSliceValue is an array of 64-bit integers." + "description": "Basic defines one device instance using fields that are supported by all clients which support DRA." }, "name": { "default": "", - "description": "Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.", - "type": "string" - }, - "quantity": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - ], - "description": "QuantityValue is a quantity." - }, - "string": { - "description": "StringValue is a string.", - "type": "string" - }, - "stringSlice": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice" - } - ], - "description": "StringSliceValue is an array of strings." - }, - "version": { - "description": "VersionValue is a semantic version according to semver.org spec 2.0.0.", + "description": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.", "type": "string" } }, @@ -235,29 +174,46 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesFilter": { - "description": "NamedResourcesFilter is used in ResourceFilterModel.", + "io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration": { + "description": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", "properties": { - "selector": { + "opaque": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration" + } + ], + "description": "Opaque provides driver-specific configuration parameters." + }, + "requests": { + "description": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.", + "items": { + "default": "", + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "source": { "default": "", - "description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type in NamedResourcesAttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()", + "description": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", "type": "string" } }, "required": [ - "selector" + "source" ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesInstance": { - "description": "NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.", + "io.k8s.api.resource.v1alpha3.DeviceAllocationResult": { + "description": "DeviceAllocationResult is the result of allocating devices.", "properties": { - "attributes": { - "description": "Attributes defines the attributes of this resource instance. The name of each attribute must be unique.", + "config": { + "description": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesAttribute" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration" } ], "default": {} @@ -265,59 +221,80 @@ "type": "array", "x-kubernetes-list-type": "atomic" }, - "name": { - "default": "", - "description": "Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice": { - "description": "NamedResourcesIntSlice contains a slice of 64-bit integers.", - "properties": { - "ints": { - "description": "Ints is the slice of 64-bit integers.", + "results": { + "description": "Results lists all allocated devices.", "items": { - "default": 0, - "format": "int64", - "type": "integer" + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult" + } + ], + "default": {} }, "type": "array", "x-kubernetes-list-type": "atomic" } }, - "required": [ - "ints" - ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesRequest": { - "description": "NamedResourcesRequest is used in ResourceRequestModel.", + "io.k8s.api.resource.v1alpha3.DeviceAttribute": { + "description": "DeviceAttribute must have exactly one field set.", "properties": { - "selector": { - "default": "", - "description": "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()", + "bool": { + "description": "BoolValue is a true/false value.", + "type": "boolean" + }, + "int": { + "description": "IntValue is a number.", + "format": "int64", + "type": "integer" + }, + "string": { + "description": "StringValue is a string. Must not be longer than 64 characters.", + "type": "string" + }, + "version": { + "description": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.", "type": "string" } }, - "required": [ - "selector" - ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesResources": { - "description": "NamedResourcesResources is used in ResourceModel.", + "io.k8s.api.resource.v1alpha3.DeviceClaim": { + "description": "DeviceClaim defines how to request devices with a ResourceClaim.", "properties": { - "instances": { - "description": "The list of all individual resources instances currently available.", + "config": { + "description": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "constraints": { + "description": "These constraints must be satisfied by the set of devices that get allocated for the claim.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceConstraint" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "requests": { + "description": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesInstance" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceRequest" } ], "default": {} @@ -326,16 +303,21 @@ "x-kubernetes-list-type": "atomic" } }, - "required": [ - "instances" - ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice": { - "description": "NamedResourcesStringSlice contains a slice of strings.", + "io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration": { + "description": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", "properties": { - "strings": { - "description": "Strings is the slice of strings.", + "opaque": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration" + } + ], + "description": "Opaque provides driver-specific configuration parameters." + }, + "requests": { + "description": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.", "items": { "default": "", "type": "string" @@ -344,13 +326,10 @@ "x-kubernetes-list-type": "atomic" } }, - "required": [ - "strings" - ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContext": { - "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "io.k8s.api.resource.v1alpha3.DeviceClass": { + "description": "DeviceClass is a vendor or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -372,20 +351,11 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec" - } - ], - "default": {}, - "description": "Spec describes where resources for the Pod are needed." - }, - "status": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClassSpec" } ], "default": {}, - "description": "Status describes where resources for the Pod can be allocated." + "description": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number." } }, "required": [ @@ -395,24 +365,38 @@ "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContextList": { - "description": "PodSchedulingContextList is a collection of Pod scheduling objects.", + "io.k8s.api.resource.v1alpha3.DeviceClassConfiguration": { + "description": "DeviceClassConfiguration is used in DeviceClass.", + "properties": { + "opaque": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration" + } + ], + "description": "Opaque provides driver-specific configuration parameters." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceClassList": { + "description": "DeviceClassList is a collection of classes.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is the list of PodSchedulingContext objects.", + "description": "Items is the list of resource classes.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } ], "default": {} @@ -440,68 +424,204 @@ "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "PodSchedulingContextList", + "kind": "DeviceClassList", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec": { - "description": "PodSchedulingContextSpec describes where resources for the Pod are needed.", + "io.k8s.api.resource.v1alpha3.DeviceClassSpec": { "properties": { - "potentialNodes": { - "description": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.", + "config": { + "description": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", "items": { - "default": "", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClassConfiguration" + } + ], + "default": {} }, "type": "array", "x-kubernetes-list-type": "atomic" }, - "selectedNode": { - "description": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.", + "selectors": { + "description": "Each selector must be satisfied by a device which is claimed via this class.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceSelector" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "suitableNodes": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.core.v1.NodeSelector" + } + ], + "description": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate." + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceConstraint": { + "description": "DeviceConstraint must have exactly one field set besides Requests.", + "properties": { + "matchAttribute": { + "description": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.", "type": "string" + }, + "requests": { + "description": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.", + "items": { + "default": "", + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "type": "object" }, - "io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus": { - "description": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", + "io.k8s.api.resource.v1alpha3.DeviceRequest": { + "description": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", "properties": { - "resourceClaims": { - "description": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", + "adminAccess": { + "default": false, + "description": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.", + "type": "boolean" + }, + "count": { + "description": "Count is used only when the count mode is \"Exact\". Must be greater than zero. If CountMode is Exact and this field is not specified, the default is one.", + "format": "int64", + "type": "integer" + }, + "countMode": { + "description": "CountMode and its related fields define how many devices are needed to satisfy this request. Supported values are:\n\n- Exact: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf countMode is not specified, the default countMode is Exact. If countMode is Exact and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + "type": "string" + }, + "deviceClassName": { + "default": "", + "description": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.", + "type": "string" + }, + "name": { + "default": "", + "description": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.", + "type": "string" + }, + "selectors": { + "description": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceSelector" } ], "default": {} }, "type": "array", - "x-kubernetes-list-map-keys": [ - "name" - ], - "x-kubernetes-list-type": "map" + "x-kubernetes-list-type": "atomic" } }, + "required": [ + "name", + "deviceClassName" + ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceClaim": { - "description": "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult": { + "description": "DeviceRequestAllocationResult contains the allocation result for one request.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "device": { + "default": "", + "description": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "driver": { + "default": "", + "description": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", "type": "string" }, - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } + "pool": { + "default": "", + "description": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "type": "string" + }, + "request": { + "default": "", + "description": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", + "type": "string" + } + }, + "required": [ + "request", + "driver", + "pool", + "device" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.DeviceSelector": { + "description": "DeviceSelector must have exactly one field set.", + "properties": { + "cel": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.CELDeviceSelector" + } + ], + "description": "CEL contains a CEL expression for selecting a device." + } + }, + "required": [ + "cel" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration": { + "description": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", + "properties": { + "driver": { + "default": "", + "description": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "type": "string" + }, + "parameters": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" + } + ], + "description": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions." + } + }, + "required": [ + "driver", + "parameters" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.PodSchedulingContext": { + "description": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DRAControlPlaneController feature gate.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + } ], "default": {}, "description": "Standard object metadata" @@ -509,20 +629,20 @@ "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimSpec" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec" } ], "default": {}, - "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 where resources for the Pod are needed." }, "status": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimStatus" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus" } ], "default": {}, - "description": "Status describes whether the resource is available and with which attributes." + "description": "Status describes where resources for the Pod can be allocated." } }, "required": [ @@ -532,54 +652,24 @@ "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "PodSchedulingContext", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference": { - "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", - "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - "type": "string" - }, - "name": { - "default": "", - "description": "Name is the name of resource being referenced.", - "type": "string" - }, - "resource": { - "default": "", - "description": "Resource is the type of resource being referenced, for example \"pods\".", - "type": "string" - }, - "uid": { - "default": "", - "description": "UID identifies exactly one incarnation of the resource.", - "type": "string" - } - }, - "required": [ - "resource", - "name", - "uid" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.ResourceClaimList": { - "description": "ResourceClaimList is a collection of claims.", + "io.k8s.api.resource.v1alpha3.PodSchedulingContextList": { + "description": "PodSchedulingContextList is a collection of Pod scheduling objects.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is the list of resource claims.", + "description": "Items is the list of PodSchedulingContext objects.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } ], "default": {} @@ -607,38 +697,58 @@ "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "ResourceClaimList", + "kind": "PodSchedulingContextList", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimParameters": { - "description": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + "io.k8s.api.resource.v1alpha3.PodSchedulingContextSpec": { + "description": "PodSchedulingContextSpec describes where resources for the Pod are needed.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" + "potentialNodes": { + "description": "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.", + "items": { + "default": "", + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "driverRequests": { - "description": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", + "selectedNode": { + "description": "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.", + "type": "string" + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.PodSchedulingContextStatus": { + "description": "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", + "properties": { + "resourceClaims": { + "description": "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DriverRequests" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus" } ], "default": {} }, "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "generatedFrom": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference" - } + "x-kubernetes-list-map-keys": [ + "name" ], - "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." + "x-kubernetes-list-type": "map" + } + }, + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.ResourceClaim": { + "description": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", @@ -652,30 +762,81 @@ ], "default": {}, "description": "Standard object metadata" + }, + "spec": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimSpec" + } + ], + "default": {}, + "description": "Spec describes what is being requested and how to configure it. The spec is immutable." + }, + "status": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimStatus" + } + ], + "default": {}, + "description": "Status describes whether the claim is ready to use and what has been allocated." } }, + "required": [ + "spec" + ], "type": "object", "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "ResourceClaim", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimParametersList": { - "description": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + "io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference": { + "description": "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", + "type": "string" + }, + "name": { + "default": "", + "description": "Name is the name of resource being referenced.", + "type": "string" + }, + "resource": { + "default": "", + "description": "Resource is the type of resource being referenced, for example \"pods\".", + "type": "string" + }, + "uid": { + "default": "", + "description": "UID identifies exactly one incarnation of the resource.", + "type": "string" + } + }, + "required": [ + "resource", + "name", + "uid" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.ResourceClaimList": { + "description": "ResourceClaimList is a collection of claims.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is the list of node resource capacity objects.", + "description": "Items is the list of resource claims.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } ], "default": {} @@ -703,39 +864,16 @@ "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "ResourceClaimParametersList", + "kind": "ResourceClaimList", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference": { - "description": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", - "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - "type": "string" - }, - "kind": { - "default": "", - "description": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata, for example \"ConfigMap\".", - "type": "string" - }, - "name": { - "default": "", - "description": "Name is the name of resource being referenced.", - "type": "string" - } - }, - "required": [ - "kind", - "name" - ], - "type": "object" - }, "io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus": { "description": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", "properties": { "name": { + "default": "", "description": "Name matches the pod.spec.resourceClaims[*].Name field.", "type": "string" }, @@ -749,32 +887,32 @@ "x-kubernetes-list-type": "atomic" } }, + "required": [ + "name" + ], "type": "object" }, "io.k8s.api.resource.v1alpha3.ResourceClaimSpec": { - "description": "ResourceClaimSpec defines how a resource is to be allocated.", + "description": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", "properties": { - "parametersRef": { + "controller": { + "description": "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + "type": "string" + }, + "devices": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClaim" } ], - "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." - }, - "resourceClassName": { - "default": "", - "description": "ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.", - "type": "string" + "default": {}, + "description": "Devices defines how to request devices." } }, - "required": [ - "resourceClassName" - ], "type": "object" }, "io.k8s.api.resource.v1alpha3.ResourceClaimStatus": { - "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.", + "description": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", "properties": { "allocation": { "allOf": [ @@ -782,18 +920,14 @@ "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.AllocationResult" } ], - "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 once the claim has been allocated successfully." }, "deallocationRequested": { - "description": "DeallocationRequested indicates that a ResourceClaim is to be deallocated.\n\nThe driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nWhile DeallocationRequested is set, no new consumers may be added to ReservedFor.", + "description": "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", "type": "boolean" }, - "driverName": { - "description": "DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.", - "type": "string" - }, "reservedFor": { - "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + "description": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", "items": { "allOf": [ { @@ -814,7 +948,7 @@ "type": "object" }, "io.k8s.api.resource.v1alpha3.ResourceClaimTemplate": { - "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.", + "description": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", @@ -927,77 +1061,89 @@ ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceClass": { - "description": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "io.k8s.api.resource.v1alpha3.ResourcePool": { + "description": "ResourcePool describes the pool that ResourceSlices belong to.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" + "generation": { + "default": 0, + "description": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.", + "format": "int64", + "type": "integer" }, - "driverName": { + "name": { "default": "", - "description": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "description": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes.", "type": "string" }, - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - ], - "default": {}, - "description": "Standard object metadata" - }, - "parametersRef": { - "allOf": [ + "resourceSliceCount": { + "default": 0, + "description": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be higher than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.", + "format": "int64", + "type": "integer" + } + }, + "required": [ + "name", + "generation", + "resourceSliceCount" + ], + "type": "object" + }, + "io.k8s.api.resource.v1alpha3.ResourceSlice": { + "description": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a given driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" } ], - "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." - }, - "structuredParameters": { - "description": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", - "type": "boolean" + "default": {}, + "description": "Standard object metadata" }, - "suitableNodes": { + "spec": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.core.v1.NodeSelector" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceSpec" } ], - "description": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates." + "default": {}, + "description": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number." } }, "required": [ - "driverName" + "spec" ], "type": "object", "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "ResourceClass", + "kind": "ResourceSlice", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClassList": { - "description": "ResourceClassList is a collection of classes.", + "io.k8s.api.resource.v1alpha3.ResourceSliceList": { + "description": "ResourceSliceList is a collection of ResourceSlices.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, "items": { - "description": "Items is the list of resource classes.", + "description": "Items is the list of resource ResourceSlices.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } ], "default": {} @@ -1008,7 +1154,7 @@ "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "metadata": { + "listMeta": { "allOf": [ { "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" @@ -1025,24 +1171,24 @@ "x-kubernetes-group-version-kind": [ { "group": "resource.k8s.io", - "kind": "ResourceClassList", + "kind": "ResourceSliceList", "version": "v1alpha3" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClassParameters": { - "description": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + "io.k8s.api.resource.v1alpha3.ResourceSliceSpec": { + "description": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" + "allNodes": { + "description": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "type": "boolean" }, - "filters": { - "description": "Filters describes additional contraints that must be met when using the class.", + "devices": { + "description": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", "items": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceFilter" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.Device" } ], "default": {} @@ -1050,478 +1196,173 @@ "type": "array", "x-kubernetes-list-type": "atomic" }, - "generatedFrom": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersReference" - } - ], - "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." + "driver": { + "default": "", + "description": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "type": "string" }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "nodeName": { + "description": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.", "type": "string" }, - "metadata": { + "nodeSelector": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + "$ref": "#/components/schemas/io.k8s.api.core.v1.NodeSelector" } ], - "default": {}, - "description": "Standard object metadata" - }, - "vendorParameters": { - "description": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.VendorParameters" - } - ], - "default": {} - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.ResourceClassParametersList": { - "description": "ResourceClassParametersList is a collection of ResourceClassParameters.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" + "description": "NodeSelector defines which nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set." }, - "items": { - "description": "Items is the list of node resource capacity objects.", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - ], - "default": {} - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { + "pool": { "allOf": [ { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourcePool" } ], "default": {}, - "description": "Standard list metadata" + "description": "Pool describes the pool that this ResourceSlice belongs to. This field is immutable." } }, "required": [ - "items" + "driver", + "pool" ], - "type": "object", - "x-kubernetes-group-version-kind": [ + "type": "object" + }, + "io.k8s.apimachinery.pkg.api.resource.Quantity": { + "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + "oneOf": [ { - "group": "resource.k8s.io", - "kind": "ResourceClassParametersList", - "version": "v1alpha3" + "type": "string" + }, + { + "type": "number" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceClassParametersReference": { - "description": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { + "description": "APIResource specifies the name of a resource and whether it is namespaced.", "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", + "categories": { + "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", + "items": { + "default": "", + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" + }, + "group": { + "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", "type": "string" }, "kind": { "default": "", - "description": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata.", + "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", "type": "string" }, "name": { "default": "", - "description": "Name is the name of resource being referenced.", + "description": "name is the plural name of the resource.", "type": "string" }, - "namespace": { - "description": "Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources.", - "type": "string" - } - }, - "required": [ - "kind", - "name" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.ResourceFilter": { - "description": "ResourceFilter is a filter for resources from one particular driver.", - "properties": { - "driverName": { - "description": "DriverName is the name used by the DRA driver kubelet plugin.", - "type": "string" + "namespaced": { + "default": false, + "description": "namespaced indicates if a resource is namespaced or not.", + "type": "boolean" }, - "namedResources": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesFilter" - } - ], - "description": "NamedResources describes a resource filter using the named resources model." - } - }, - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.ResourceHandle": { - "description": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", - "properties": { - "data": { - "description": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", - "type": "string" + "shortNames": { + "description": "shortNames is a list of suggested short names of the resource.", + "items": { + "default": "", + "type": "string" + }, + "type": "array", + "x-kubernetes-list-type": "atomic" }, - "driverName": { + "singularName": { "default": "", - "description": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", + "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", "type": "string" }, - "structuredData": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.StructuredResourceHandle" - } - ], - "description": "If StructuredData is set, then it needs to be used instead of Data." + "storageVersionHash": { + "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", + "type": "string" + }, + "verbs": { + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", + "items": { + "default": "", + "type": "string" + }, + "type": "array" + }, + "version": { + "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", + "type": "string" } }, "required": [ - "driverName" + "name", + "singularName", + "namespaced", + "kind", + "verbs" ], "type": "object" }, - "io.k8s.api.resource.v1alpha3.ResourceRequest": { - "description": "ResourceRequest is a request for resources from one particular driver.", - "properties": { - "namedResources": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesRequest" - } - ], - "description": "NamedResources describes a request for resources with the named resources model." - }, - "vendorParameters": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" - } - ], - "description": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim." - } - }, - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.ResourceSlice": { - "description": "ResourceSlice provides information about available resources on individual nodes.", + "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { + "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "driverName": { + "groupVersion": { "default": "", - "description": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.", + "description": "groupVersion is the group and version this APIResourceList is for.", "type": "string" }, "kind": { "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "type": "string" }, - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - ], - "default": {}, - "description": "Standard object metadata" - }, - "namedResources": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.NamedResourcesResources" - } - ], - "description": "NamedResources describes available resources using the named resources model." - }, - "nodeName": { - "description": "NodeName identifies the node which provides the resources if they are local to a node.\n\nA field selector can be used to list only ResourceSlice objects with a certain node name.", - "type": "string" + "resources": { + "description": "resources contains the name of the resources and if they are namespaced.", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" + } + ], + "default": {} + }, + "type": "array", + "x-kubernetes-list-type": "atomic" } }, "required": [ - "driverName" + "groupVersion", + "resources" ], "type": "object", "x-kubernetes-group-version-kind": [ { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" + "group": "", + "kind": "APIResourceList", + "version": "v1" } ] }, - "io.k8s.api.resource.v1alpha3.ResourceSliceList": { - "description": "ResourceSliceList is a collection of ResourceSlices.", + "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "apiVersion": { "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "type": "string" }, - "items": { - "description": "Items is the list of node resource capacity objects.", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - ], - "default": {} - }, - "type": "array" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - ], - "default": {}, - "description": "Standard list metadata" - } - }, - "required": [ - "items" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "resource.k8s.io", - "kind": "ResourceSliceList", - "version": "v1alpha3" - } - ] - }, - "io.k8s.api.resource.v1alpha3.StructuredResourceHandle": { - "description": "StructuredResourceHandle is the in-tree representation of the allocation result.", - "properties": { - "nodeName": { - "description": "NodeName is the name of the node providing the necessary resources if the resources are local to a node.", - "type": "string" - }, - "results": { - "description": "Results lists all allocated driver resources.", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DriverAllocationResult" - } - ], - "default": {} - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "vendorClaimParameters": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" - } - ], - "description": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated." - }, - "vendorClassParameters": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" - } - ], - "description": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated." - } - }, - "required": [ - "results" - ], - "type": "object" - }, - "io.k8s.api.resource.v1alpha3.VendorParameters": { - "description": "VendorParameters are opaque parameters for one particular driver.", - "properties": { - "driverName": { - "description": "DriverName is the name used by the DRA driver kubelet plugin.", - "type": "string" - }, - "parameters": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension" - } - ], - "description": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim." - } - }, - "type": "object" - }, - "io.k8s.apimachinery.pkg.api.resource.Quantity": { - "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { - "description": "APIResource specifies the name of a resource and whether it is namespaced.", - "properties": { - "categories": { - "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - "items": { - "default": "", - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "group": { - "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", - "type": "string" - }, - "kind": { - "default": "", - "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - "type": "string" - }, - "name": { - "default": "", - "description": "name is the plural name of the resource.", - "type": "string" - }, - "namespaced": { - "default": false, - "description": "namespaced indicates if a resource is namespaced or not.", - "type": "boolean" - }, - "shortNames": { - "description": "shortNames is a list of suggested short names of the resource.", - "items": { - "default": "", - "type": "string" - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - }, - "singularName": { - "default": "", - "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", - "type": "string" - }, - "storageVersionHash": { - "description": "The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates.", - "type": "string" - }, - "verbs": { - "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - "items": { - "default": "", - "type": "string" - }, - "type": "array" - }, - "version": { - "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - "type": "string" - } - }, - "required": [ - "name", - "singularName", - "namespaced", - "kind", - "verbs" - ], - "type": "object" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { - "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "groupVersion": { - "default": "", - "description": "groupVersion is the group and version this APIResourceList is for.", - "type": "string" - }, - "kind": { - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - "type": "string" - }, - "resources": { - "description": "resources contains the name of the resources and if they are namespaced.", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" - } - ], - "default": {} - }, - "type": "array", - "x-kubernetes-list-type": "atomic" - } - }, - "required": [ - "groupVersion", - "resources" - ], - "type": "object", - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "APIResourceList", - "version": "v1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { - "description": "DeleteOptions may be provided when deleting an API object.", - "properties": { - "apiVersion": { - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - "type": "string" - }, - "dryRun": { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "items": { "default": "", "type": "string" @@ -2592,10 +2433,10 @@ ] } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses": { "delete": { - "description": "delete collection of PodSchedulingContext", - "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", + "description": "delete collection of DeviceClass", + "operationId": "deleteResourceV1alpha3CollectionDeviceClass", "parameters": [ { "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", @@ -2746,13 +2587,13 @@ "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, "get": { - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", + "description": "list or watch objects of kind DeviceClass", + "operationId": "listResourceV1alpha3DeviceClass", "parameters": [ { "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", @@ -2850,27 +2691,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClassList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClassList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClassList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClassList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClassList" } } }, @@ -2886,21 +2727,11 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -2912,8 +2743,8 @@ } ], "post": { - "description": "create a PodSchedulingContext", - "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", + "description": "create a DeviceClass", + "operationId": "createResourceV1alpha3DeviceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -2947,7 +2778,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -2958,17 +2789,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -2978,17 +2809,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -2998,17 +2829,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3024,15 +2855,15 @@ "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { + "/apis/resource.k8s.io/v1alpha3/deviceclasses/{name}": { "delete": { - "description": "delete a PodSchedulingContext", - "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", + "description": "delete a DeviceClass", + "operationId": "deleteResourceV1alpha3DeviceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3085,17 +2916,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3105,17 +2936,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3131,29 +2962,29 @@ "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, "get": { - "description": "read the specified PodSchedulingContext", - "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", + "description": "read the specified DeviceClass", + "operationId": "readResourceV1alpha3DeviceClass", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3169,13 +3000,13 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the PodSchedulingContext", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, @@ -3184,16 +3015,6 @@ "uniqueItems": true } }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -3205,8 +3026,8 @@ } ], "patch": { - "description": "partially update the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", + "description": "partially update the specified DeviceClass", + "operationId": "patchResourceV1alpha3DeviceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3275,17 +3096,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3295,17 +3116,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3321,13 +3142,13 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } }, "put": { - "description": "replace the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", + "description": "replace the specified DeviceClass", + "operationId": "replaceResourceV1alpha3DeviceClass", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -3361,7 +3182,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3372,17 +3193,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3392,17 +3213,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.DeviceClass" } } }, @@ -3418,85 +3239,25 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "DeviceClass", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { - "get": { - "description": "read status of the specified PodSchedulingContext", - "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "patch": { - "description": "partially update status of the specified PodSchedulingContext", - "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts": { + "delete": { + "description": "delete collection of PodSchedulingContext", + "operationId": "deleteResourceV1alpha3CollectionNamespacedPodSchedulingContext", "parameters": [ + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -3507,99 +3268,126 @@ } }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "in": "query", - "name": "fieldManager", + "name": "fieldSelector", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "fieldValidation", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", "in": "query", - "name": "force", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", "schema": { "type": "boolean", "uniqueItems": true } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } } ], "requestBody": { "content": { - "application/apply-patch+yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/strategic-merge-patch+json": { + "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" } } - }, - "required": true + } }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } } }, "description": "OK" }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - } - }, - "description": "Created" - }, "401": { "description": "Unauthorized" } @@ -3607,275 +3395,19 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "PodSchedulingContext", "version": "v1alpha3" } }, - "put": { - "description": "replace status of the specified PodSchedulingContext", - "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", + "get": { + "description": "list or watch objects of kind PodSchedulingContext", + "operationId": "listResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" - } - } - }, - "description": "Created" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters": { - "delete": { - "description": "delete collection of ResourceClaimParameters", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimParameters", - "parameters": [ - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", - "version": "v1alpha3" - } - }, - "get": { - "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha3NamespacedResourceClaimParameters", - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", "in": "query", "name": "allowWatchBookmarks", "schema": { @@ -3970,27 +3502,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } } }, @@ -4006,7 +3538,7 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -4032,9 +3564,9 @@ } ], "post": { - "description": "create ResourceClaimParameters", - "operationId": "createResourceV1alpha3NamespacedResourceClaimParameters", - "parameters": [ + "description": "create a PodSchedulingContext", + "operationId": "createResourceV1alpha3NamespacedPodSchedulingContext", + "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -4067,7 +3599,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4078,17 +3610,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4098,17 +3630,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4118,17 +3650,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4144,15 +3676,15 @@ "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}": { "delete": { - "description": "delete ResourceClaimParameters", - "operationId": "deleteResourceV1alpha3NamespacedResourceClaimParameters", + "description": "delete a PodSchedulingContext", + "operationId": "deleteResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4205,17 +3737,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4225,17 +3757,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4251,29 +3783,29 @@ "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, "get": { - "description": "read the specified ResourceClaimParameters", - "operationId": "readResourceV1alpha3NamespacedResourceClaimParameters", + "description": "read the specified PodSchedulingContext", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContext", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4289,13 +3821,13 @@ "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, "parameters": [ { - "description": "name of the ResourceClaimParameters", + "description": "name of the PodSchedulingContext", "in": "path", "name": "name", "required": true, @@ -4325,8 +3857,8 @@ } ], "patch": { - "description": "partially update the specified ResourceClaimParameters", - "operationId": "patchResourceV1alpha3NamespacedResourceClaimParameters", + "description": "partially update the specified PodSchedulingContext", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4395,17 +3927,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4415,17 +3947,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4441,13 +3973,13 @@ "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, "put": { - "description": "replace the specified ResourceClaimParameters", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaimParameters", + "description": "replace the specified PodSchedulingContext", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContext", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4481,7 +4013,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4492,17 +4024,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4512,17 +4044,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4538,150 +4070,31 @@ "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { - "delete": { - "description": "delete collection of ResourceClaim", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaim", - "parameters": [ - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - } - } - }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/podschedulingcontexts/{name}/status": { + "get": { + "description": "read status of the specified PodSchedulingContext", + "operationId": "readResourceV1alpha3NamespacedPodSchedulingContextStatus", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4694,138 +4107,150 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "deletecollection", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, - "get": { - "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha3NamespacedResourceClaim", + "parameters": [ + { + "description": "name of the PodSchedulingContext", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "patch": { + "description": "partially update status of the specified PodSchedulingContext", + "operationId": "patchResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", - "name": "continue", + "name": "dryRun", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", "in": "query", - "name": "fieldSelector", + "name": "fieldManager", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "labelSelector", + "name": "fieldValidation", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", "in": "query", - "name": "limit", + "name": "force", "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", + "type": "boolean", "uniqueItems": true } } ], + "requestBody": { + "content": { + "application/apply-patch+yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/strategic-merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, - "application/json;stream=watch": { + "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, - "application/vnd.kubernetes.protobuf": { + "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, - "application/vnd.kubernetes.protobuf;stream=watch": { + "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, - "description": "OK" + "description": "Created" }, "401": { "description": "Unauthorized" @@ -4834,37 +4259,16 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, - "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "post": { - "description": "create a ResourceClaim", - "operationId": "createResourceV1alpha3NamespacedResourceClaim", + "put": { + "description": "replace status of the specified PodSchedulingContext", + "operationId": "replaceResourceV1alpha3NamespacedPodSchedulingContextStatus", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -4898,7 +4302,7 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4909,17 +4313,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, @@ -4929,42 +4333,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContext" } } }, "description": "Created" }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" - } - } - }, - "description": "Accepted" - }, "401": { "description": "Unauthorized" } @@ -4972,19 +4356,28 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "PodSchedulingContext", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims": { "delete": { - "description": "delete a ResourceClaim", - "operationId": "deleteResourceV1alpha3NamespacedResourceClaim", + "description": "delete collection of ResourceClaim", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaim", "parameters": [ + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -4994,6 +4387,15 @@ "uniqueItems": true } }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", @@ -5003,6 +4405,24 @@ "uniqueItems": true } }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, { "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", @@ -5020,6 +4440,42 @@ "type": "string", "uniqueItems": true } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } } ], "requestBody": { @@ -5036,42 +4492,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } } }, "description": "OK" }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" - } - } - }, - "description": "Accepted" - }, "401": { "description": "Unauthorized" } @@ -5079,7 +4515,7 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", @@ -5087,24 +4523,126 @@ } }, "get": { - "description": "read the specified ResourceClaim", - "operationId": "readResourceV1alpha3NamespacedResourceClaim", + "description": "list or watch objects of kind ResourceClaim", + "operationId": "listResourceV1alpha3NamespacedResourceClaim", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + } + }, + "application/json;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + } + }, + "application/vnd.kubernetes.protobuf;stream=watch": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } } }, @@ -5117,7 +4655,7 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", @@ -5125,16 +4663,6 @@ } }, "parameters": [ - { - "description": "name of the ResourceClaim", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "object name and auth scope, such as for teams and projects", "in": "path", @@ -5155,9 +4683,9 @@ } } ], - "patch": { - "description": "partially update the specified ResourceClaim", - "operationId": "patchResourceV1alpha3NamespacedResourceClaim", + "post": { + "description": "create a ResourceClaim", + "operationId": "createResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5169,7 +4697,7 @@ } }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", "name": "fieldManager", "schema": { @@ -5185,37 +4713,13 @@ "type": "string", "uniqueItems": true } - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "schema": { - "type": "boolean", - "uniqueItems": true - } } ], "requestBody": { "content": { - "application/apply-patch+yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/strategic-merge-patch+json": { + "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, @@ -5262,6 +4766,26 @@ }, "description": "Created" }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + } + }, + "description": "Accepted" + }, "401": { "description": "Unauthorized" } @@ -5269,16 +4793,18 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", "version": "v1alpha3" } - }, - "put": { - "description": "replace the specified ResourceClaim", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaim", + } + }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}": { + "delete": { + "description": "delete a ResourceClaim", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5290,18 +4816,27 @@ } }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "fieldManager", + "name": "gracePeriodSeconds", "schema": { - "type": "string", + "type": "integer", "uniqueItems": true } }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", - "name": "fieldValidation", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", "schema": { "type": "string", "uniqueItems": true @@ -5312,11 +4847,10 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" } } - }, - "required": true + } }, "responses": { "200": { @@ -5339,7 +4873,7 @@ }, "description": "OK" }, - "201": { + "202": { "content": { "application/json": { "schema": { @@ -5357,7 +4891,7 @@ } } }, - "description": "Created" + "description": "Accepted" }, "401": { "description": "Unauthorized" @@ -5366,18 +4900,16 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaim", "version": "v1alpha3" } - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { + }, "get": { - "description": "read status of the specified ResourceClaim", - "operationId": "readResourceV1alpha3NamespacedResourceClaimStatus", + "description": "read the specified ResourceClaim", + "operationId": "readResourceV1alpha3NamespacedResourceClaim", "responses": { "200": { "content": { @@ -5445,8 +4977,8 @@ } ], "patch": { - "description": "partially update status of the specified ResourceClaim", - "operationId": "patchResourceV1alpha3NamespacedResourceClaimStatus", + "description": "partially update the specified ResourceClaim", + "operationId": "patchResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5566,8 +5098,8 @@ } }, "put": { - "description": "replace status of the specified ResourceClaim", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaimStatus", + "description": "replace the specified ResourceClaim", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaim", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -5663,20 +5195,80 @@ } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { - "delete": { - "description": "delete collection of ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimTemplate", - "parameters": [ - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaims/{name}/status": { + "get": { + "description": "read status of the specified ResourceClaim", + "operationId": "readResourceV1alpha3NamespacedResourceClaimStatus", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + } + }, + "description": "OK" }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaim", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "description": "name of the ResourceClaim", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "patch": { + "description": "partially update status of the specified ResourceClaim", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimStatus", + "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -5687,126 +5279,99 @@ } }, { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", "in": "query", - "name": "resourceVersion", + "name": "fieldManager", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "resourceVersionMatch", + "name": "fieldValidation", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", "in": "query", - "name": "sendInitialEvents", + "name": "force", "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } } ], "requestBody": { "content": { - "*/*": { + "application/apply-patch+yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/strategic-merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } } - } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, "description": "OK" }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + } + }, + "description": "Created" + }, "401": { "description": "Unauthorized" } @@ -5814,138 +5379,95 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "deletecollection", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", + "kind": "ResourceClaim", "version": "v1alpha3" } }, - "get": { - "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha3NamespacedResourceClaimTemplate", + "put": { + "description": "replace status of the specified ResourceClaim", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimStatus", "parameters": [ { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", - "name": "continue", + "name": "dryRun", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", - "name": "fieldSelector", + "name": "fieldManager", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "labelSelector", + "name": "fieldValidation", "schema": { "type": "string", "uniqueItems": true } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } } }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, - "application/json;stream=watch": { + "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, - "application/vnd.kubernetes.protobuf": { + "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, - "application/vnd.kubernetes.protobuf;stream=watch": { + "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaim" } } }, - "description": "OK" + "description": "Created" }, "401": { "description": "Unauthorized" @@ -5954,38 +5476,28 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", + "kind": "ResourceClaim", "version": "v1alpha3" } - }, - "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "post": { - "description": "create a ResourceClaimTemplate", - "operationId": "createResourceV1alpha3NamespacedResourceClaimTemplate", + } + }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates": { + "delete": { + "description": "delete collection of ResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClaimTemplate", "parameters": [ + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -5996,95 +5508,126 @@ } }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "in": "query", - "name": "fieldManager", + "name": "fieldSelector", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "fieldValidation", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", "schema": { "type": "string", "uniqueItems": true } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } } ], "requestBody": { "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" } } - }, - "required": true + } }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } } }, "description": "OK" }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - } - }, - "description": "Created" - }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - } - }, - "description": "Accepted" - }, "401": { "description": "Unauthorized" } @@ -6092,139 +5635,134 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", "version": "v1alpha3" } - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { - "delete": { - "description": "delete a ResourceClaimTemplate", - "operationId": "deleteResourceV1alpha3NamespacedResourceClaimTemplate", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + }, + "get": { + "description": "list or watch objects of kind ResourceClaimTemplate", + "operationId": "listResourceV1alpha3NamespacedResourceClaimTemplate", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", "in": "query", - "name": "dryRun", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", "in": "query", - "name": "gracePeriodSeconds", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", "schema": { "type": "integer", "uniqueItems": true } }, { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", "in": "query", - "name": "orphanDependents", + "name": "resourceVersion", "schema": { - "type": "boolean", + "type": "string", "uniqueItems": true } }, { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", "in": "query", - "name": "propagationPolicy", + "name": "resourceVersionMatch", "schema": { "type": "string", "uniqueItems": true } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true } } - }, + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - } - }, - "description": "OK" - }, - "202": { - "content": { - "application/json": { + "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" - } - } - }, - "description": "Accepted" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", - "version": "v1alpha3" - } - }, - "get": { - "description": "read the specified ResourceClaimTemplate", - "operationId": "readResourceV1alpha3NamespacedResourceClaimTemplate", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, - "application/vnd.kubernetes.protobuf": { + "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } } }, @@ -6237,7 +5775,7 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "get", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", @@ -6245,16 +5783,6 @@ } }, "parameters": [ - { - "description": "name of the ResourceClaimTemplate", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "object name and auth scope, such as for teams and projects", "in": "path", @@ -6275,9 +5803,9 @@ } } ], - "patch": { - "description": "partially update the specified ResourceClaimTemplate", - "operationId": "patchResourceV1alpha3NamespacedResourceClaimTemplate", + "post": { + "description": "create a ResourceClaimTemplate", + "operationId": "createResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6289,7 +5817,7 @@ } }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", "name": "fieldManager", "schema": { @@ -6305,37 +5833,13 @@ "type": "string", "uniqueItems": true } - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "schema": { - "type": "boolean", - "uniqueItems": true - } } ], "requestBody": { "content": { - "application/apply-patch+yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/strategic-merge-patch+json": { + "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6382,6 +5886,26 @@ }, "description": "Created" }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + } + }, + "description": "Accepted" + }, "401": { "description": "Unauthorized" } @@ -6389,16 +5913,18 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", "version": "v1alpha3" } - }, - "put": { - "description": "replace the specified ResourceClaimTemplate", - "operationId": "replaceResourceV1alpha3NamespacedResourceClaimTemplate", + } + }, + "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "delete": { + "description": "delete a ResourceClaimTemplate", + "operationId": "deleteResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", @@ -6410,18 +5936,27 @@ } }, { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "fieldManager", + "name": "gracePeriodSeconds", "schema": { - "type": "string", + "type": "integer", "uniqueItems": true } }, { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", - "name": "fieldValidation", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", "schema": { "type": "string", "uniqueItems": true @@ -6432,11 +5967,10 @@ "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" } } - }, - "required": true + } }, "responses": { "200": { @@ -6459,7 +5993,7 @@ }, "description": "OK" }, - "201": { + "202": { "content": { "application/json": { "schema": { @@ -6477,7 +6011,7 @@ } } }, - "description": "Created" + "description": "Accepted" }, "401": { "description": "Unauthorized" @@ -6486,28 +6020,86 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "put", + "x-kubernetes-action": "delete", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", "version": "v1alpha3" } - } - }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters": { - "delete": { - "description": "delete collection of ResourceClassParameters", - "operationId": "deleteResourceV1alpha3CollectionNamespacedResourceClassParameters", - "parameters": [ - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } + }, + "get": { + "description": "read the specified ResourceClaimTemplate", + "operationId": "readResourceV1alpha3NamespacedResourceClaimTemplate", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + } + }, + "description": "OK" }, + "401": { + "description": "Unauthorized" + } + }, + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "get", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceClaimTemplate", + "version": "v1alpha3" + } + }, + "parameters": [ + { + "description": "name of the ResourceClaimTemplate", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", + "in": "query", + "name": "pretty", + "schema": { + "type": "string", + "uniqueItems": true + } + } + ], + "patch": { + "description": "partially update the specified ResourceClaimTemplate", + "operationId": "patchResourceV1alpha3NamespacedResourceClaimTemplate", + "parameters": [ { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -6518,126 +6110,99 @@ } }, { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", "in": "query", - "name": "resourceVersion", + "name": "fieldManager", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "resourceVersionMatch", + "name": "fieldValidation", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", "in": "query", - "name": "sendInitialEvents", + "name": "force", "schema": { "type": "boolean", "uniqueItems": true } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } } ], "requestBody": { "content": { - "*/*": { + "application/apply-patch+yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/strategic-merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" } } - } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, "description": "OK" }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } + } + }, + "description": "Created" + }, "401": { "description": "Unauthorized" } @@ -6645,212 +6210,51 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "deletecollection", + "x-kubernetes-action": "patch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, - "get": { - "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha3NamespacedResourceClassParameters", + "put": { + "description": "replace the specified ResourceClaimTemplate", + "operationId": "replaceResourceV1alpha3NamespacedResourceClaimTemplate", "parameters": [ { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", - "name": "continue", + "name": "dryRun", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", - "name": "fieldSelector", + "name": "fieldManager", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "labelSelector", + "name": "fieldValidation", "schema": { "type": "string", "uniqueItems": true } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "post": { - "description": "create ResourceClassParameters", - "operationId": "createResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" + } } }, "required": true @@ -6860,17 +6264,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, @@ -6880,42 +6284,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplate" } } }, "description": "Created" }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - } - }, - "description": "Accepted" - }, "401": { "description": "Unauthorized" } @@ -6923,105 +6307,48 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "post", + "x-kubernetes-action": "put", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } } }, - "/apis/resource.k8s.io/v1alpha3/namespaces/{namespace}/resourceclassparameters/{name}": { - "delete": { - "description": "delete ResourceClassParameters", - "operationId": "deleteResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - } - } - }, + "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { + "get": { + "description": "list or watch objects of kind PodSchedulingContext", + "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, - "application/vnd.kubernetes.protobuf": { + "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - } - }, - "description": "OK" - }, - "202": { - "content": { - "application/json": { + "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, - "application/vnd.kubernetes.protobuf": { + "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" } } }, - "description": "Accepted" + "description": "OK" }, "401": { "description": "Unauthorized" @@ -7030,72 +6357,59 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "delete", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, - "get": { - "description": "read the specified ResourceClassParameters", - "operationId": "readResourceV1alpha3NamespacedResourceClassParameters", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true } }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "parameters": [ { - "description": "name of the ResourceClassParameters", - "in": "path", - "name": "name", - "required": true, + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", "schema": { "type": "string", "uniqueItems": true } }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -7104,114 +6418,88 @@ "type": "string", "uniqueItems": true } - } - ], - "patch": { - "description": "partially update the specified ResourceClassParameters", - "operationId": "patchResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "schema": { - "type": "boolean", - "uniqueItems": true - } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true } - ], - "requestBody": { - "content": { - "application/apply-patch+yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/strategic-merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - }, - "required": true }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ] + }, + "/apis/resource.k8s.io/v1alpha3/resourceclaims": { + "get": { + "description": "list or watch objects of kind ResourceClaim", + "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, - "application/vnd.kubernetes.protobuf": { + "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { + "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, - "application/vnd.kubernetes.protobuf": { + "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" } } }, - "description": "Created" + "description": "OK" }, "401": { "description": "Unauthorized" @@ -7220,168 +6508,21 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "patch", + "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "ResourceClaim", "version": "v1alpha3" } }, - "put": { - "description": "replace the specified ResourceClassParameters", - "operationId": "replaceResourceV1alpha3NamespacedResourceClassParameters", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParameters" - } - } - }, - "description": "Created" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/podschedulingcontexts": { - "get": { - "description": "list or watch objects of kind PodSchedulingContext", - "operationId": "listResourceV1alpha3PodSchedulingContextForAllNamespaces", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.PodSchedulingContextList" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true } }, { @@ -7476,36 +6617,36 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { "get": { - "description": "list or watch objects of kind ResourceClaimParameters", - "operationId": "listResourceV1alpha3ResourceClaimParametersForAllNamespaces", + "description": "list or watch objects of kind ResourceClaimTemplate", + "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimParametersList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" } } }, @@ -7521,7 +6662,7 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, @@ -7627,36 +6768,145 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/resourceclaims": { - "get": { - "description": "list or watch objects of kind ResourceClaim", - "operationId": "listResourceV1alpha3ResourceClaimForAllNamespaces", + "/apis/resource.k8s.io/v1alpha3/resourceslices": { + "delete": { + "description": "delete collection of ResourceSlice", + "operationId": "deleteResourceV1alpha3CollectionResourceSlice", + "parameters": [ + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", + "in": "query", + "name": "gracePeriodSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "in": "query", + "name": "orphanDependents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", + "in": "query", + "name": "propagationPolicy", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + } + } + } + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimList" + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" } } }, @@ -7669,145 +6919,134 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "list", + "x-kubernetes-action": "deletecollection", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "ResourceSlice", "version": "v1alpha3" } }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclaimtemplates": { "get": { - "description": "list or watch objects of kind ResourceClaimTemplate", - "operationId": "listResourceV1alpha3ResourceClaimTemplateForAllNamespaces", + "description": "list or watch objects of kind ResourceSlice", + "operationId": "listResourceV1alpha3ResourceSlice", + "parameters": [ + { + "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", + "in": "query", + "name": "allowWatchBookmarks", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", + "in": "query", + "name": "continue", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "in": "query", + "name": "fieldSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "in": "query", + "name": "labelSelector", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersion", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "in": "query", + "name": "resourceVersionMatch", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", + "in": "query", + "name": "sendInitialEvents", + "schema": { + "type": "boolean", + "uniqueItems": true + } + }, + { + "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", + "in": "query", + "name": "timeoutSeconds", + "schema": { + "type": "integer", + "uniqueItems": true + } + }, + { + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "in": "query", + "name": "watch", + "schema": { + "type": "boolean", + "uniqueItems": true + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/json;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/vnd.kubernetes.protobuf;stream=watch": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" } } }, @@ -7823,56 +7062,11 @@ "x-kubernetes-action": "list", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", + "kind": "ResourceSlice", "version": "v1alpha3" } }, "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -7881,68 +7075,12 @@ "type": "string", "uniqueItems": true } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceclasses": { - "delete": { - "description": "delete collection of ResourceClass", - "operationId": "deleteResourceV1alpha3CollectionResourceClass", + ], + "post": { + "description": "create a ResourceSlice", + "operationId": "createResourceV1alpha3ResourceSlice", "parameters": [ - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", @@ -7953,126 +7091,95 @@ } }, { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", "in": "query", - "name": "resourceVersion", + "name": "fieldManager", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", "in": "query", - "name": "resourceVersionMatch", + "name": "fieldValidation", "schema": { "type": "string", "uniqueItems": true } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } } ], "requestBody": { "content": { "*/*": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } - } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, "description": "OK" }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "description": "Created" + }, + "202": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "description": "Accepted" + }, "401": { "description": "Unauthorized" } @@ -8080,318 +7187,50 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "deletecollection", + "x-kubernetes-action": "post", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClass", + "kind": "ResourceSlice", "version": "v1alpha3" } - }, - "get": { - "description": "list or watch objects of kind ResourceClass", - "operationId": "listResourceV1alpha3ResourceClass", + } + }, + "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { + "delete": { + "description": "delete a ResourceSlice", + "operationId": "deleteResourceV1alpha3ResourceSlice", "parameters": [ { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", "in": "query", - "name": "labelSelector", + "name": "dryRun", "schema": { "type": "string", "uniqueItems": true } }, { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "in": "query", - "name": "limit", + "name": "gracePeriodSeconds", "schema": { "type": "integer", "uniqueItems": true } }, { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "in": "query", - "name": "resourceVersion", + "name": "orphanDependents", "schema": { - "type": "string", + "type": "boolean", "uniqueItems": true } }, { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassList" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "post": { - "description": "create a ResourceClass", - "operationId": "createResourceV1alpha3ResourceClass", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "Created" - }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "Accepted" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/resourceclasses/{name}": { - "delete": { - "description": "delete a ResourceClass", - "operationId": "deleteResourceV1alpha3ResourceClass", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", + "name": "propagationPolicy", "schema": { "type": "string", "uniqueItems": true @@ -8412,17 +7251,17 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -8432,2131 +7271,55 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "Accepted" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "get": { - "description": "read the specified ResourceClass", - "operationId": "readResourceV1alpha3ResourceClass", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "name of the ResourceClass", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "patch": { - "description": "partially update the specified ResourceClass", - "operationId": "patchResourceV1alpha3ResourceClass", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "application/apply-patch+yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/strategic-merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "Created" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - }, - "put": { - "description": "replace the specified ResourceClass", - "operationId": "replaceResourceV1alpha3ResourceClass", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClass" - } - } - }, - "description": "Created" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClass", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/resourceclassparameters": { - "get": { - "description": "list or watch objects of kind ResourceClassParameters", - "operationId": "listResourceV1alpha3ResourceClassParametersForAllNamespaces", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceClassParametersList" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClassParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/resourceslices": { - "delete": { - "description": "delete collection of ResourceSlice", - "operationId": "deleteResourceV1alpha3CollectionResourceSlice", - "parameters": [ - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" - } - }, - "get": { - "description": "list or watch objects of kind ResourceSlice", - "operationId": "listResourceV1alpha3ResourceSlice", - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSliceList" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "post": { - "description": "create a ResourceSlice", - "operationId": "createResourceV1alpha3ResourceSlice", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "Created" - }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "Accepted" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/resourceslices/{name}": { - "delete": { - "description": "delete a ResourceSlice", - "operationId": "deleteResourceV1alpha3ResourceSlice", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "in": "query", - "name": "gracePeriodSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", - "in": "query", - "name": "orphanDependents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.", - "in": "query", - "name": "propagationPolicy", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "OK" - }, - "202": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "Accepted" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" - } - }, - "get": { - "description": "read the specified ResourceSlice", - "operationId": "readResourceV1alpha3ResourceSlice", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "name of the ResourceSlice", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "patch": { - "description": "partially update the specified ResourceSlice", - "operationId": "patchResourceV1alpha3ResourceSlice", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - "in": "query", - "name": "force", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "application/apply-patch+yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/json-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - }, - "application/strategic-merge-patch+json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "Created" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" - } - }, - "put": { - "description": "replace the specified ResourceSlice", - "operationId": "replaceResourceV1alpha3ResourceSlice", - "parameters": [ - { - "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", - "in": "query", - "name": "dryRun", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - "in": "query", - "name": "fieldManager", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - "in": "query", - "name": "fieldValidation", - "schema": { - "type": "string", - "uniqueItems": true - } - } - ], - "requestBody": { - "content": { - "*/*": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "OK" - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" - } - } - }, - "description": "Created" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceSlice", - "version": "v1alpha3" - } - } - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { - "get": { - "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { - "get": { - "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "PodSchedulingContext", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "name of the PodSchedulingContext", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters": { - "get": { - "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimParametersList", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimparameters/{name}": { - "get": { - "description": "watch changes to an object of kind ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimParameters", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "name of the ResourceClaimParameters", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } - } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { - "get": { - "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/yaml": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - } - }, - "description": "OK" - }, - "401": { - "description": "Unauthorized" - } - }, - "tags": [ - "resource_v1alpha3" - ], - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "resource.k8s.io", - "kind": "ResourceClaim", - "version": "v1alpha3" - } - }, - "parameters": [ - { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", - "in": "query", - "name": "pretty", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "description": "Accepted" + }, + "401": { + "description": "Unauthorized" } }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "delete", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } - ] - }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { + }, "get": { - "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaim", + "description": "read the specified ResourceSlice", + "operationId": "readResourceV1alpha3ResourceSlice", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/json;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/vnd.kubernetes.protobuf": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "application/vnd.kubernetes.protobuf;stream=watch": { - "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } }, "application/yaml": { "schema": { - "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" } } }, @@ -10569,61 +7332,16 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "get", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "ResourceSlice", "version": "v1alpha3" } }, "parameters": [ { - "description": "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - "in": "query", - "name": "allowWatchBookmarks", - "schema": { - "type": "boolean", - "uniqueItems": true - } - }, - { - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "in": "query", - "name": "continue", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "in": "query", - "name": "fieldSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "in": "query", - "name": "labelSelector", - "schema": { - "type": "string", - "uniqueItems": true - } - }, - { - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "uniqueItems": true - } - }, - { - "description": "name of the ResourceClaim", + "description": "name of the ResourceSlice", "in": "path", "name": "name", "required": true, @@ -10632,16 +7350,6 @@ "uniqueItems": true } }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -10650,58 +7358,231 @@ "type": "string", "uniqueItems": true } - }, - { - "description": "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersion", - "schema": { - "type": "string", - "uniqueItems": true + } + ], + "patch": { + "description": "partially update the specified ResourceSlice", + "operationId": "patchResourceV1alpha3ResourceSlice", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", + "in": "query", + "name": "force", + "schema": { + "type": "boolean", + "uniqueItems": true + } } + ], + "requestBody": { + "content": { + "application/apply-patch+yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + }, + "application/strategic-merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" + } + } + }, + "required": true }, - { - "description": "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - "in": "query", - "name": "resourceVersionMatch", - "schema": { - "type": "string", - "uniqueItems": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" } }, - { - "description": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - "in": "query", - "name": "sendInitialEvents", - "schema": { - "type": "boolean", - "uniqueItems": true + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "patch", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" + } + }, + "put": { + "description": "replace the specified ResourceSlice", + "operationId": "replaceResourceV1alpha3ResourceSlice", + "parameters": [ + { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "in": "query", + "name": "dryRun", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", + "in": "query", + "name": "fieldManager", + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", + "in": "query", + "name": "fieldValidation", + "schema": { + "type": "string", + "uniqueItems": true + } } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "required": true }, - { - "description": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - "in": "query", - "name": "timeoutSeconds", - "schema": { - "type": "integer", - "uniqueItems": true + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "description": "OK" + }, + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/vnd.kubernetes.protobuf": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + }, + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/io.k8s.api.resource.v1alpha3.ResourceSlice" + } + } + }, + "description": "Created" + }, + "401": { + "description": "Unauthorized" } }, - { - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "in": "query", - "name": "watch", - "schema": { - "type": "boolean", - "uniqueItems": true - } + "tags": [ + "resource_v1alpha3" + ], + "x-kubernetes-action": "put", + "x-kubernetes-group-version-kind": { + "group": "resource.k8s.io", + "kind": "ResourceSlice", + "version": "v1alpha3" } - ] + } }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses": { "get": { - "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", + "description": "watch individual changes to a list of DeviceClass. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3DeviceClassList", "responses": { "200": { "content": { @@ -10743,7 +7624,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", + "kind": "DeviceClass", "version": "v1alpha3" } }, @@ -10793,16 +7674,6 @@ "uniqueItems": true } }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -10859,10 +7730,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/deviceclasses/{name}": { "get": { - "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", + "description": "watch changes to an object of kind DeviceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3DeviceClass", "responses": { "200": { "content": { @@ -10904,7 +7775,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimTemplate", + "kind": "DeviceClass", "version": "v1alpha3" } }, @@ -10955,7 +7826,7 @@ } }, { - "description": "name of the ResourceClaimTemplate", + "description": "name of the DeviceClass", "in": "path", "name": "name", "required": true, @@ -10964,16 +7835,6 @@ "uniqueItems": true } }, - { - "description": "object name and auth scope, such as for teams and projects", - "in": "path", - "name": "namespace", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -11030,10 +7891,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts": { "get": { - "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3NamespacedResourceClassParametersList", + "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContextList", "responses": { "200": { "content": { @@ -11075,7 +7936,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -11191,10 +8052,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclassparameters/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/podschedulingcontexts/{name}": { "get": { - "description": "watch changes to an object of kind ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3NamespacedResourceClassParameters", + "description": "watch changes to an object of kind PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedPodSchedulingContext", "responses": { "200": { "content": { @@ -11236,7 +8097,7 @@ "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -11287,7 +8148,7 @@ } }, { - "description": "name of the ResourceClassParameters", + "description": "name of the PodSchedulingContext", "in": "path", "name": "name", "required": true, @@ -11362,10 +8223,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims": { "get": { - "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", + "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimList", "responses": { "200": { "content": { @@ -11407,7 +8268,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "PodSchedulingContext", + "kind": "ResourceClaim", "version": "v1alpha3" } }, @@ -11457,6 +8318,16 @@ "uniqueItems": true } }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -11513,10 +8384,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaims/{name}": { "get": { - "description": "watch individual changes to a list of ResourceClaimParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimParametersListForAllNamespaces", + "description": "watch changes to an object of kind ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaim", "responses": { "200": { "content": { @@ -11555,10 +8426,10 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaimParameters", + "kind": "ResourceClaim", "version": "v1alpha3" } }, @@ -11608,6 +8479,26 @@ "uniqueItems": true } }, + { + "description": "name of the ResourceClaim", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -11664,10 +8555,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates": { "get": { - "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", + "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplateList", "responses": { "200": { "content": { @@ -11709,7 +8600,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClaim", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, @@ -11759,6 +8650,16 @@ "uniqueItems": true } }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -11815,10 +8716,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { + "/apis/resource.k8s.io/v1alpha3/watch/namespaces/{namespace}/resourceclaimtemplates/{name}": { "get": { - "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", + "description": "watch changes to an object of kind ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", + "operationId": "watchResourceV1alpha3NamespacedResourceClaimTemplate", "responses": { "200": { "content": { @@ -11857,7 +8758,7 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "watchlist", + "x-kubernetes-action": "watch", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", "kind": "ResourceClaimTemplate", @@ -11910,6 +8811,26 @@ "uniqueItems": true } }, + { + "description": "name of the ResourceClaimTemplate", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, + { + "description": "object name and auth scope, such as for teams and projects", + "in": "path", + "name": "namespace", + "required": true, + "schema": { + "type": "string", + "uniqueItems": true + } + }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -11966,10 +8887,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses": { + "/apis/resource.k8s.io/v1alpha3/watch/podschedulingcontexts": { "get": { - "description": "watch individual changes to a list of ResourceClass. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClassList", + "description": "watch individual changes to a list of PodSchedulingContext. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3PodSchedulingContextListForAllNamespaces", "responses": { "200": { "content": { @@ -12011,7 +8932,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClass", + "kind": "PodSchedulingContext", "version": "v1alpha3" } }, @@ -12117,10 +9038,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclasses/{name}": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaims": { "get": { - "description": "watch changes to an object of kind ResourceClass. deprecated: use the 'watch' parameter with a list operation instead, filtered to a single item with the 'fieldSelector' parameter.", - "operationId": "watchResourceV1alpha3ResourceClass", + "description": "watch individual changes to a list of ResourceClaim. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3ResourceClaimListForAllNamespaces", "responses": { "200": { "content": { @@ -12159,10 +9080,10 @@ "tags": [ "resource_v1alpha3" ], - "x-kubernetes-action": "watch", + "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClass", + "kind": "ResourceClaim", "version": "v1alpha3" } }, @@ -12212,16 +9133,6 @@ "uniqueItems": true } }, - { - "description": "name of the ResourceClass", - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string", - "uniqueItems": true - } - }, { "description": "If 'true', then the output is pretty printed. Defaults to 'false' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget).", "in": "query", @@ -12278,10 +9189,10 @@ } ] }, - "/apis/resource.k8s.io/v1alpha3/watch/resourceclassparameters": { + "/apis/resource.k8s.io/v1alpha3/watch/resourceclaimtemplates": { "get": { - "description": "watch individual changes to a list of ResourceClassParameters. deprecated: use the 'watch' parameter with a list operation instead.", - "operationId": "watchResourceV1alpha3ResourceClassParametersListForAllNamespaces", + "description": "watch individual changes to a list of ResourceClaimTemplate. deprecated: use the 'watch' parameter with a list operation instead.", + "operationId": "watchResourceV1alpha3ResourceClaimTemplateListForAllNamespaces", "responses": { "200": { "content": { @@ -12323,7 +9234,7 @@ "x-kubernetes-action": "watchlist", "x-kubernetes-group-version-kind": { "group": "resource.k8s.io", - "kind": "ResourceClassParameters", + "kind": "ResourceClaimTemplate", "version": "v1alpha3" } }, diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 8824651086828..7b65a50807ee4 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -37,7 +37,7 @@ API_KNOWN_VIOLATIONS_DIR="${API_KNOWN_VIOLATIONS_DIR:-"${KUBE_ROOT}/api/api-rule OUT_DIR="_output" BOILERPLATE_FILENAME="hack/boilerplate/boilerplate.generatego.txt" APPLYCONFIG_PKG="k8s.io/client-go/applyconfigurations" -PLURAL_EXCEPTIONS="Endpoints:Endpoints,ResourceClaimParameters:ResourceClaimParameters,ResourceClassParameters:ResourceClassParameters" +PLURAL_EXCEPTIONS="Endpoints:Endpoints" # Any time we call sort, we want it in the same locale. export LC_ALL="C" diff --git a/pkg/api/testing/defaulting_test.go b/pkg/api/testing/defaulting_test.go index 2a08f788e298e..75a5e0b1cfd02 100644 --- a/pkg/api/testing/defaulting_test.go +++ b/pkg/api/testing/defaulting_test.go @@ -135,6 +135,10 @@ func TestDefaulting(t *testing.T) { {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: "RoleBindingList"}: {}, + {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaim"}: {}, + {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaimList"}: {}, + {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaimTemplate"}: {}, + {Group: "resource.k8s.io", Version: "v1alpha3", Kind: "ResourceClaimTemplateList"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicy"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyList"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyBinding"}: {}, diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index 05ddfe643f7a7..1889997c32aae 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -2439,6 +2439,13 @@ type ResourceClaim struct { // the Pod where this field is used. It makes that resource available // inside a container. Name string + + // Request is the name chosen for a request in the referenced claim. + // If empty, everything from the claim is made available, otherwise + // only the result of this request. + // + // +optional + Request string } // Container represents a single container that is expected to be run on the host. diff --git a/pkg/apis/core/v1/zz_generated.conversion.go b/pkg/apis/core/v1/zz_generated.conversion.go index c8aa5b0b9a2a8..bf87334939816 100644 --- a/pkg/apis/core/v1/zz_generated.conversion.go +++ b/pkg/apis/core/v1/zz_generated.conversion.go @@ -7373,6 +7373,7 @@ func Convert_core_ReplicationControllerStatus_To_v1_ReplicationControllerStatus( func autoConvert_v1_ResourceClaim_To_core_ResourceClaim(in *v1.ResourceClaim, out *core.ResourceClaim, s conversion.Scope) error { out.Name = in.Name + out.Request = in.Request return nil } @@ -7383,6 +7384,7 @@ func Convert_v1_ResourceClaim_To_core_ResourceClaim(in *v1.ResourceClaim, out *c func autoConvert_core_ResourceClaim_To_v1_ResourceClaim(in *core.ResourceClaim, out *v1.ResourceClaim, s conversion.Scope) error { out.Name = in.Name + out.Request = in.Request return nil } diff --git a/pkg/apis/core/validation/validation.go b/pkg/apis/core/validation/validation.go index e0841d0c21bb2..5f7cb09a9da8c 100644 --- a/pkg/apis/core/validation/validation.go +++ b/pkg/apis/core/validation/validation.go @@ -6735,9 +6735,20 @@ func validateResourceClaimNames(claims []core.ResourceClaim, podClaimNames sets. allErrs = append(allErrs, field.Required(fldPath.Index(i), "")) } else { if names.Has(name) { + // All requests of that claim already referenced. allErrs = append(allErrs, field.Duplicate(fldPath.Index(i), name)) } else { - names.Insert(name) + key := name + if claim.Request != "" { + allErrs = append(allErrs, ValidateDNS1123Label(claim.Request, fldPath.Index(i).Child("request"))...) + key += "/" + claim.Request + } + if names.Has(key) { + // The specific request was already referenced. + allErrs = append(allErrs, field.Duplicate(fldPath.Index(i), key)) + } else { + names.Insert(key) + } } if !podClaimNames.Has(name) { // field.NotFound doesn't accept an diff --git a/pkg/apis/core/validation/validation_test.go b/pkg/apis/core/validation/validation_test.go index 65d5a2236e395..5b8041acb192d 100644 --- a/pkg/apis/core/validation/validation_test.go +++ b/pkg/apis/core/validation/validation_test.go @@ -23720,6 +23720,8 @@ func TestValidateDynamicResourceAllocation(t *testing.T) { shortPodName := &metav1.ObjectMeta{ Name: "some-pod", } + requestName := "req-0" + anotherRequestName := "req-1" goodClaimTemplate := podtest.MakePod("", podtest.SetContainers(podtest.MakeContainer("ctr", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim-template"}}}))), podtest.SetRestartPolicy(core.RestartPolicyAlways), @@ -23752,6 +23754,26 @@ func TestValidateDynamicResourceAllocation(t *testing.T) { ResourceClaimName: &externalClaimName, }), ), + "multiple claim with requests": podtest.MakePod("", + podtest.SetContainers(podtest.MakeContainer("ctr", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim", Request: requestName}, {Name: "another-claim", Request: requestName}}}))), + podtest.SetResourceClaims( + core.PodResourceClaim{ + Name: "my-claim", + ResourceClaimName: &externalClaimName, + }, + core.PodResourceClaim{ + Name: "another-claim", + ResourceClaimName: &externalClaimName, + }), + ), + "single claim with requests": podtest.MakePod("", + podtest.SetContainers(podtest.MakeContainer("ctr", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim", Request: requestName}, {Name: "my-claim", Request: anotherRequestName}}}))), + podtest.SetResourceClaims( + core.PodResourceClaim{ + Name: "my-claim", + ResourceClaimName: &externalClaimName, + }), + ), "init container": podtest.MakePod("", podtest.SetInitContainers(podtest.MakeContainer("ctr-init", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim"}}}))), podtest.SetResourceClaims(core.PodResourceClaim{ @@ -23832,6 +23854,27 @@ func TestValidateDynamicResourceAllocation(t *testing.T) { ResourceClaimName: &externalClaimName, }), ), + "pod claim name duplicates without and with request": podtest.MakePod("", + podtest.SetContainers(podtest.MakeContainer("ctr", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim"}, {Name: "my-claim", Request: "req-0"}}}))), + podtest.SetResourceClaims(core.PodResourceClaim{ + Name: "my-claim", + ResourceClaimName: &externalClaimName, + }), + ), + "pod claim name duplicates with requests": podtest.MakePod("", + podtest.SetContainers(podtest.MakeContainer("ctr", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim", Request: "req-0"}, {Name: "my-claim", Request: "req-0"}}}))), + podtest.SetResourceClaims(core.PodResourceClaim{ + Name: "my-claim", + ResourceClaimName: &externalClaimName, + }), + ), + "bad request name": podtest.MakePod("", + podtest.SetContainers(podtest.MakeContainer("ctr", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim", Request: "*$@%^"}}}))), + podtest.SetResourceClaims(core.PodResourceClaim{ + Name: "my-claim", + ResourceClaimName: &externalClaimName, + }), + ), "no claims defined": podtest.MakePod("", podtest.SetContainers(podtest.MakeContainer("ctr", podtest.SetContainerResources(core.ResourceRequirements{Claims: []core.ResourceClaim{{Name: "my-claim"}}}))), podtest.SetRestartPolicy(core.RestartPolicyAlways), diff --git a/pkg/apis/resource/fuzzer/fuzzer.go b/pkg/apis/resource/fuzzer/fuzzer.go index 5f9b5273900c0..36ad429fcd30a 100644 --- a/pkg/apis/resource/fuzzer/fuzzer.go +++ b/pkg/apis/resource/fuzzer/fuzzer.go @@ -17,10 +17,30 @@ limitations under the License. package fuzzer import ( + fuzz "github.com/google/gofuzz" + "k8s.io/apimachinery/pkg/runtime" runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/kubernetes/pkg/apis/resource" ) // Funcs contains the fuzzer functions for the resource group. var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} { - return nil + return []interface{}{ + func(r *resource.DeviceRequest, c fuzz.Continue) { + c.FuzzNoCustom(r) // fuzz self without calling this function again + + // Match defaulter. + if r.CountMode == "" { + r.CountMode = []resource.DeviceCountMode{resource.DeviceCountModeAll, resource.DeviceCountModeExact}[c.Int31n(2)] + } + if r.CountMode == resource.DeviceCountModeExact && r.Count == 0 { + r.Count = 1 + } + }, + func(r *resource.OpaqueDeviceConfiguration, c fuzz.Continue) { + c.FuzzNoCustom(r) + // Match the fuzzer default content for runtime.Object. + r.Parameters = runtime.RawExtension{Raw: []byte(`{"apiVersion":"unknown.group/unknown","kind":"Something","someKey":"someValue"}`)} + }, + } } diff --git a/pkg/apis/resource/namedresources.go b/pkg/apis/resource/namedresources.go deleted file mode 100644 index 4e96d9b0a419e..0000000000000 --- a/pkg/apis/resource/namedresources.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resource - -import "k8s.io/apimachinery/pkg/api/resource" - -// NamedResourcesResources is used in ResourceModel. -type NamedResourcesResources struct { - // The list of all individual resources instances currently available. - Instances []NamedResourcesInstance -} - -// NamedResourcesInstance represents one individual hardware instance that can be selected based -// on its attributes. -type NamedResourcesInstance struct { - // Name is unique identifier among all resource instances managed by - // the driver on the node. It must be a DNS subdomain. - Name string - - // Attributes defines the attributes of this resource instance. - // The name of each attribute must be unique. - Attributes []NamedResourcesAttribute -} - -// NamedResourcesAttribute is a combination of an attribute name and its value. -type NamedResourcesAttribute struct { - // Name is unique identifier among all resource instances managed by - // the driver on the node. It must be a DNS subdomain. - Name string - - NamedResourcesAttributeValue -} - -// NamedResourcesAttributeValue must have one and only one field set. -type NamedResourcesAttributeValue struct { - // QuantityValue is a quantity. - QuantityValue *resource.Quantity - // BoolValue is a true/false value. - BoolValue *bool - // IntValue is a 64-bit integer. - IntValue *int64 - // IntSliceValue is an array of 64-bit integers. - IntSliceValue *NamedResourcesIntSlice - // StringValue is a string. - StringValue *string - // StringSliceValue is an array of strings. - StringSliceValue *NamedResourcesStringSlice - // VersionValue is a semantic version according to semver.org spec 2.0.0. - VersionValue *string -} - -// NamedResourcesIntSlice contains a slice of 64-bit integers. -type NamedResourcesIntSlice struct { - // Ints is the slice of 64-bit integers. - Ints []int64 -} - -// NamedResourcesStringSlice contains a slice of strings. -type NamedResourcesStringSlice struct { - // Strings is the slice of strings. - Strings []string -} - -// NamedResourcesRequest is used in ResourceRequestModel. -type NamedResourcesRequest struct { - // Selector is a CEL expression which must evaluate to true if a - // resource instance is suitable. The language is as defined in - // https://kubernetes.io/docs/reference/using-api/cel/ - // - // In addition, for each type NamedResourcesin AttributeValue there is a map that - // resolves to the corresponding value of the instance under evaluation. - // For example: - // - // attributes.quantity["a"].isGreaterThan(quantity("0")) && - // attributes.stringslice["b"].isSorted() - Selector string -} - -// NamedResourcesFilter is used in ResourceFilterModel. -type NamedResourcesFilter struct { - // Selector is a CEL expression which must evaluate to true if a - // resource instance is suitable. The language is as defined in - // https://kubernetes.io/docs/reference/using-api/cel/ - // - // In addition, for each type in NamedResourcesAttributeValue there is a map that - // resolves to the corresponding value of the instance under evaluation. - // For example: - // - // attributes.quantity["a"].isGreaterThan(quantity("0")) && - // attributes.stringslice["b"].isSorted() - Selector string -} - -// NamedResourcesAllocationResult is used in AllocationResultModel. -type NamedResourcesAllocationResult struct { - // Name is the name of the selected resource instance. - Name string -} diff --git a/pkg/apis/resource/register.go b/pkg/apis/resource/register.go index 1d7b718abeff1..37136ac1f9eec 100644 --- a/pkg/apis/resource/register.go +++ b/pkg/apis/resource/register.go @@ -52,8 +52,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { return err } scheme.AddKnownTypes(SchemeGroupVersion, - &ResourceClass{}, - &ResourceClassList{}, + &DeviceClass{}, + &DeviceClassList{}, &ResourceClaim{}, &ResourceClaimList{}, &ResourceClaimTemplate{}, @@ -62,10 +62,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodSchedulingContextList{}, &ResourceSlice{}, &ResourceSliceList{}, - &ResourceClaimParameters{}, - &ResourceClaimParametersList{}, - &ResourceClassParameters{}, - &ResourceClassParametersList{}, ) return nil diff --git a/pkg/apis/resource/structured/namedresources/validation/validation.go b/pkg/apis/resource/structured/namedresources/validation/validation.go deleted file mode 100644 index 755507c8e86c1..0000000000000 --- a/pkg/apis/resource/structured/namedresources/validation/validation.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "fmt" - "regexp" - - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/cel" - "k8s.io/apiserver/pkg/cel/environment" - namedresourcescel "k8s.io/dynamic-resource-allocation/structured/namedresources/cel" - corevalidation "k8s.io/kubernetes/pkg/apis/core/validation" - "k8s.io/kubernetes/pkg/apis/resource" -) - -var ( - validateInstanceName = corevalidation.ValidateDNS1123Subdomain - validateAttributeName = corevalidation.ValidateDNS1123Subdomain -) - -type Options struct { - // StoredExpressions must be true if and only if validating CEL - // expressions that were already stored persistently. This makes - // validation more permissive by enabling CEL definitions that are not - // valid yet for new expressions. - StoredExpressions bool -} - -func ValidateResources(resources *resource.NamedResourcesResources, fldPath *field.Path) field.ErrorList { - allErrs := validateInstances(resources.Instances, fldPath.Child("instances")) - return allErrs -} - -func validateInstances(instances []resource.NamedResourcesInstance, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - instanceNames := sets.New[string]() - for i, instance := range instances { - idxPath := fldPath.Index(i) - instanceName := instance.Name - allErrs = append(allErrs, validateInstanceName(instanceName, idxPath.Child("name"))...) - if instanceNames.Has(instanceName) { - allErrs = append(allErrs, field.Duplicate(idxPath.Child("name"), instanceName)) - } else { - instanceNames.Insert(instanceName) - } - allErrs = append(allErrs, validateAttributes(instance.Attributes, idxPath.Child("attributes"))...) - } - return allErrs -} - -var ( - numericIdentifier = `(0|[1-9]\d*)` - - preReleaseIdentifier = `(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)` - - buildIdentifier = `[0-9a-zA-Z-]+` - - semverRe = regexp.MustCompile(`^` + - - // dot-separated version segments (e.g. 1.2.3) - numericIdentifier + `\.` + numericIdentifier + `\.` + numericIdentifier + - - // optional dot-separated prerelease segments (e.g. -alpha.PRERELEASE.1) - `(-` + preReleaseIdentifier + `(\.` + preReleaseIdentifier + `)*)?` + - - // optional dot-separated build identifier segments (e.g. +build.id.20240305) - `(\+` + buildIdentifier + `(\.` + buildIdentifier + `)*)?` + - - `$`) -) - -func validateAttributes(attributes []resource.NamedResourcesAttribute, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - attributeNames := sets.New[string]() - for i, attribute := range attributes { - idxPath := fldPath.Index(i) - attributeName := attribute.Name - allErrs = append(allErrs, validateAttributeName(attributeName, idxPath.Child("name"))...) - if attributeNames.Has(attributeName) { - allErrs = append(allErrs, field.Duplicate(idxPath.Child("name"), attributeName)) - } else { - attributeNames.Insert(attributeName) - } - - entries := sets.New[string]() - if attribute.QuantityValue != nil { - entries.Insert("quantity") - } - if attribute.BoolValue != nil { - entries.Insert("bool") - } - if attribute.IntValue != nil { - entries.Insert("int") - } - if attribute.IntSliceValue != nil { - entries.Insert("intSlice") - } - if attribute.StringValue != nil { - entries.Insert("string") - } - if attribute.StringSliceValue != nil { - entries.Insert("stringSlice") - } - if attribute.VersionValue != nil { - entries.Insert("version") - if !semverRe.MatchString(*attribute.VersionValue) { - allErrs = append(allErrs, field.Invalid(idxPath.Child("version"), *attribute.VersionValue, "must be a string compatible with semver.org spec 2.0.0")) - } - } - - switch len(entries) { - case 0: - allErrs = append(allErrs, field.Required(idxPath, "exactly one value must be set")) - case 1: - // Okay. - default: - allErrs = append(allErrs, field.Invalid(idxPath, sets.List(entries), "exactly one field must be set, not several")) - } - } - return allErrs -} - -func ValidateRequest(opts Options, request *resource.NamedResourcesRequest, fldPath *field.Path) field.ErrorList { - return validateSelector(opts, request.Selector, fldPath.Child("selector")) -} - -func ValidateFilter(opts Options, filter *resource.NamedResourcesFilter, fldPath *field.Path) field.ErrorList { - return validateSelector(opts, filter.Selector, fldPath.Child("selector")) -} - -func validateSelector(opts Options, selector string, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - if selector == "" { - allErrs = append(allErrs, field.Required(fldPath, "")) - } else { - envType := environment.NewExpressions - if opts.StoredExpressions { - envType = environment.StoredExpressions - } - result := namedresourcescel.Compiler.CompileCELExpression(selector, envType) - if result.Error != nil { - allErrs = append(allErrs, convertCELErrorToValidationError(fldPath, selector, result.Error)) - } - } - return allErrs -} - -func convertCELErrorToValidationError(fldPath *field.Path, expression string, err *cel.Error) *field.Error { - switch err.Type { - case cel.ErrorTypeRequired: - return field.Required(fldPath, err.Detail) - case cel.ErrorTypeInvalid: - return field.Invalid(fldPath, expression, err.Detail) - case cel.ErrorTypeInternal: - return field.InternalError(fldPath, err) - } - return field.InternalError(fldPath, fmt.Errorf("unsupported error type: %w", err)) -} - -func ValidateAllocationResult(result *resource.NamedResourcesAllocationResult, fldPath *field.Path) field.ErrorList { - return validateInstanceName(result.Name, fldPath.Child("name")) -} diff --git a/pkg/apis/resource/structured/namedresources/validation/validation_test.go b/pkg/apis/resource/structured/namedresources/validation/validation_test.go deleted file mode 100644 index 7fedfcae55673..0000000000000 --- a/pkg/apis/resource/structured/namedresources/validation/validation_test.go +++ /dev/null @@ -1,188 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/apimachinery/pkg/util/validation/field" - resourceapi "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/utils/ptr" -) - -func testResources(instances []resourceapi.NamedResourcesInstance) *resourceapi.NamedResourcesResources { - resources := &resourceapi.NamedResourcesResources{ - Instances: instances, - } - return resources -} - -func TestValidateResources(t *testing.T) { - goodName := "foo" - badName := "!@#$%^" - quantity := resource.MustParse("1") - - scenarios := map[string]struct { - resources *resourceapi.NamedResourcesResources - wantFailures field.ErrorList - }{ - "empty": { - resources: testResources(nil), - }, - "good": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName}}), - }, - "bad-name": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("instances").Index(0).Child("name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: badName}}), - }, - "duplicate-name": { - wantFailures: field.ErrorList{field.Duplicate(field.NewPath("instances").Index(1).Child("name"), goodName)}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName}, {Name: goodName}}), - }, - "quantity": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{QuantityValue: &quantity}}}}}), - }, - "bool": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{BoolValue: ptr.To(true)}}}}}), - }, - "int": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{IntValue: ptr.To(int64(1))}}}}}), - }, - "int-slice": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{IntSliceValue: &resourceapi.NamedResourcesIntSlice{Ints: []int64{1, 2, 3}}}}}}}), - }, - "string": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{StringValue: ptr.To("hello")}}}}}), - }, - "string-slice": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{StringSliceValue: &resourceapi.NamedResourcesStringSlice{Strings: []string{"hello"}}}}}}}), - }, - "version-okay": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0.0")}}}}}), - }, - "version-beta": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0.0-beta")}}}}}), - }, - "version-beta-1": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0.0-beta.1")}}}}}), - }, - "version-build": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0.0+build")}}}}}), - }, - "version-build-1": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0.0+build.1")}}}}}), - }, - "version-beta-1-build-1": { - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0.0-beta.1+build.1")}}}}}), - }, - "version-bad": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("instances").Index(0).Child("attributes").Index(0).Child("version"), "1.0", "must be a string compatible with semver.org spec 2.0.0")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0")}}}}}), - }, - "version-bad-leading-zeros": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("instances").Index(0).Child("attributes").Index(0).Child("version"), "01.0.0", "must be a string compatible with semver.org spec 2.0.0")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("01.0.0")}}}}}), - }, - "version-bad-leading-zeros-middle": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("instances").Index(0).Child("attributes").Index(0).Child("version"), "1.00.0", "must be a string compatible with semver.org spec 2.0.0")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.00.0")}}}}}), - }, - "version-bad-leading-zeros-end": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("instances").Index(0).Child("attributes").Index(0).Child("version"), "1.0.00", "must be a string compatible with semver.org spec 2.0.0")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To("1.0.00")}}}}}), - }, - "version-bad-spaces": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("instances").Index(0).Child("attributes").Index(0).Child("version"), " 1.0.0 ", "must be a string compatible with semver.org spec 2.0.0")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{VersionValue: ptr.To(" 1.0.0 ")}}}}}), - }, - "empty-attribute": { - wantFailures: field.ErrorList{field.Required(field.NewPath("instances").Index(0).Child("attributes").Index(0), "exactly one value must be set")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName}}}}), - }, - "duplicate-value": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("instances").Index(0).Child("attributes").Index(0), []string{"bool", "int"}, "exactly one field must be set, not several")}, - resources: testResources([]resourceapi.NamedResourcesInstance{{Name: goodName, Attributes: []resourceapi.NamedResourcesAttribute{{Name: goodName, NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{BoolValue: ptr.To(true), IntValue: ptr.To(int64(1))}}}}}), - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - errs := ValidateResources(scenario.resources, nil) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} - -func TestValidateSelector(t *testing.T) { - scenarios := map[string]struct { - selector string - wantFailures field.ErrorList - }{ - "okay": { - selector: "true", - }, - "empty": { - selector: "", - wantFailures: field.ErrorList{field.Required(nil, "")}, - }, - "undefined": { - selector: "nosuchvar", - wantFailures: field.ErrorList{field.Invalid(nil, "nosuchvar", "compilation failed: ERROR: :1:1: undeclared reference to 'nosuchvar' (in container '')\n | nosuchvar\n | ^")}, - }, - "wrong-type": { - selector: "1", - wantFailures: field.ErrorList{field.Invalid(nil, "1", "must evaluate to bool")}, - }, - "quantity": { - selector: `attributes.quantity["name"].isGreaterThan(quantity("0"))`, - }, - "bool": { - selector: `attributes.bool["name"]`, - }, - "int": { - selector: `attributes.int["name"] > 0`, - }, - "intslice": { - selector: `attributes.intslice["name"].isSorted()`, - }, - "string": { - selector: `attributes.string["name"] == "fish"`, - }, - "stringslice": { - selector: `attributes.stringslice["name"].isSorted()`, - }, - "version": { - selector: `attributes.version["name"].isGreaterThan(semver("1.0.0"))`, - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - // At the moment, there's no difference between stored and new expressions. - // This uses the stricter validation. - opts := Options{ - StoredExpressions: false, - } - errs := validateSelector(opts, scenario.selector, nil) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} diff --git a/pkg/apis/resource/types.go b/pkg/apis/resource/types.go index b5091b1b36650..9e3d5a8511c19 100644 --- a/pkg/apis/resource/types.go +++ b/pkg/apis/resource/types.go @@ -17,17 +17,284 @@ limitations under the License. package resource import ( + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/validation" "k8s.io/kubernetes/pkg/apis/core" ) +const ( + // Finalizer is the finalizer that gets set for claims + // which were allocated through a builtin controller. + // Reserved for use by Kubernetes, DRA driver controllers must + // use their own finalizer. + Finalizer = "resource.kubernetes.io/delete-protection" +) + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// ResourceClaim describes which resources are needed by a resource consumer. -// Its status tracks whether the resource has been allocated and what the -// resulting attributes are. +// ResourceSlice represents one or more resources in a pool of similar resources, +// managed by a given driver. A pool may span more than one ResourceSlice, and exactly how many +// ResourceSlices comprise a pool is determined by the driver. +// +// At the moment, the only supported resources are devices with attributes and capacities. +// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. +// The ResourceSlice in which a device gets published may change over time. The unique identifier +// for a device is the tuple , , . +// +// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number +// and updates all ResourceSlices with that new number and new resource definitions. A consumer +// must only use ResourceSlices with the highest generation number and ignore all others. +// +// When allocating all resources in a pool matching certain criteria or when +// looking for the best solution among several different alternatives, a +// consumer should check the number of ResourceSlices in a pool (included in +// each ResourceSlice) to determine whether its view of a pool is complete and +// if not, should wait until the driver has completed updating the pool. +// +// For resources that are not local to a node, the node name is not set. Instead, +// the driver may use a node selector to specify where the devices are available. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +type ResourceSlice struct { + metav1.TypeMeta + // Standard object metadata + // +optional + metav1.ObjectMeta + + // Contains the information published by the driver. + // + // Changing the spec automatically increments the metadata.generation number. + Spec ResourceSliceSpec +} + +const ( + // ResourceSliceSelectorNodeName can be used in a [metav1.ListOptions] + // field selector to filter based on [ResourceSliceSpec.NodeName]. + ResourceSliceSelectorNodeName = "spec.nodeName" + // ResourceSliceSelectorDriver can be used in a [metav1.ListOptions] + // field selector to filter based on [ResourceSliceSpec.Driver]. + ResourceSliceSelectorDriver = "spec.driver" +) + +// ResourceSliceSpec contains the information published by the driver in one ResourceSlice. +type ResourceSliceSpec struct { + // Driver identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. This field is immutable. + // + // +required + Driver string + + // Pool describes the pool that this ResourceSlice belongs to. + // This field is immutable. + // + // +required + Pool ResourcePool + + // NodeName identifies the node which provides the resources in this pool. + // A field selector can be used to list only ResourceSlice + // objects belonging to a certain node. + // + // This field can be used to limit access from nodes to ResourceSlices with + // the same node name. It also indicates to autoscalers that adding + // new nodes of the same type as some old node might also make new + // resources available. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // This field is immutable. + // + // +optional + // +oneOf=NodeSelection + NodeName string + + // NodeSelector defines which nodes have access to the resources in the pool. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + NodeSelector *core.NodeSelector + + // AllNodes indicates that all nodes have access to the resources in the pool. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + AllNodes bool + + // Devices lists some or all of the devices in this pool. + // + // Must not have more than 128 entries. + // + // +optional + // +listType=atomic + Devices []Device +} + +// ResourcePool describes the pool that ResourceSlices belong to. +type ResourcePool struct { + // Name is used to identify the pool. For node-local devices, this + // is often the node name, but this is not required. + // + // It must not be longer than 253 characters and must consist of one or more DNS sub-domains + // separated by slashes. + // + // +required + Name string + + // Generation tracks the change in a pool over time. Whenever a driver + // changes something about one or more of the resources in a pool, it + // must change the generation in all ResourceSlices which are part of + // that pool. Consumers of ResourceSlices should only consider + // resources from the pool with the highest generation number. The + // generation may be reset by drivers, which should be fine for + // consumers, assuming that all ResourceSlices in a pool are updated to + // match or deleted. + // + // Combined with ResourceSliceCount, this mechanism enables consumers to + // detect pools which are comprised of multiple ResourceSlices and are + // in an incomplete state. + // + // +required + Generation int64 + + // ResourceSliceCount is the total number of ResourceSlices in the pool at this + // generation number. Must be higher than zero. + // + // Consumers can use this to check whether they have seen all ResourceSlices + // belonging to the same pool. + // + // +required + ResourceSliceCount int64 +} + +const ResourceSliceMaxSharedCapacity = 128 +const ResourceSliceMaxDevices = 128 +const PoolNameMaxLength = validation.DNS1123SubdomainMaxLength // Same as for a single node name. + +// Device represents one individual hardware instance that can be selected based +// on its attributes. Besides the name, exactly one field must be set. +type Device struct { + // Name is unique identifier among all devices managed by + // the driver in the pool. It must be a DNS label. + // + // +required + Name string + + // Basic defines one device instance using fields that are supported + // by all clients which support DRA. + // + // +optional + // +oneOf=deviceType + Basic *BasicDevice +} + +// BasicDevice defines one device instance using fields that are supported +// by all clients which support DRA. +type BasicDevice struct { + // Attributes defines the set of attributes for this device. + // The name of each attribute must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + Attributes map[QualifiedName]DeviceAttribute + + // Capacity defines the set of capacities for this device. + // The name of each capacity must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + Capacity map[QualifiedName]resource.Quantity +} + +// Limit for the sum of the number of entries in both ResourceSlices. +const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32 + +// QualifiedName is the name of a device attribute or capacity. +// +// Attributes and capacities are defined either by the owner of the specific +// driver (usually the vendor) or by some 3rd party (e.g. the Kubernetes +// project). Because they are sometimes compared across devices, a given name +// is expected to mean the same thing and have the same type on all devices. +// +// Names must be either a C identifier (e.g. "theName") or a DNS subdomain +// followed by a slash ("/") followed by a C identifier +// (e.g. "dra.example.com/theName"). Names which do not include the +// domain prefix are assumed to be part of the driver's domain. Attributes +// or capacities defined by 3rd parties must include the domain prefix. +// +// The maximum length for the DNS subdomain is 63 characters (same as +// for driver names) and the maximum length of the C identifier +// is 32. +type QualifiedName string + +// FullyQualifiedName is a QualifiedName where the domain is set. +type FullyQualifiedName string + +// DeviceMaxIDLength is the maximum length of the identifier in a device attribute or capacity name (`/`). +const DeviceMaxIDLength = 32 + +// DeviceAttribute must have exactly one field set. +type DeviceAttribute struct { + // The Go field names below have a Value suffix to avoid a conflict between the + // field "String" and the corresponding method. That method is required. + // The Kubernetes API is defined without that suffix to keep it more natural. + + // IntValue is a number. + // + // +optional + IntValue *int64 + + // BoolValue is a true/false value. + // + // +optional + BoolValue *bool + + // StringValue is a string. Must not be longer than 64 characters. + // + // +optional + StringValue *string + + // VersionValue is a semantic version according to semver.org spec 2.0.0. + // Must not be longer than 64 characters. + // + // +optional + VersionValue *string +} + +// DeviceAttributeMaxValueLength is the maximum length of a string or version attribute value. +const DeviceAttributeMaxValueLength = 64 + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ResourceSliceList is a collection of ResourceSlices. +type ResourceSliceList struct { + metav1.TypeMeta + // Standard list metadata + // +optional + metav1.ListMeta + + // Items is the list of resource ResourceSlices. + Items []ResourceSlice +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ResourceClaim describes a request for access to resources in the cluster, +// for use by workloads. For example, if a workload needs an accelerator device +// with specific properties, this is how that request is expressed. The status +// stanza tracks whether this claim has been satisfied and what specific +// resources have been allocated. // // This is an alpha type and requires enabling the DynamicResourceAllocation // feature gate. @@ -37,64 +304,339 @@ type ResourceClaim struct { // +optional metav1.ObjectMeta - // Spec describes the desired attributes of a resource that then needs - // to be allocated. It can only be set once when creating the - // ResourceClaim. + // Spec describes what is being requested and how to configure it. + // The spec is immutable. Spec ResourceClaimSpec - // Status describes whether the resource is available and with which - // attributes. + // Status describes whether the claim is ready to use and what has been allocated. // +optional Status ResourceClaimStatus } -// ResourceClaimSpec defines how a resource is to be allocated. +// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. type ResourceClaimSpec struct { - // ResourceClassName references the driver and additional parameters - // via the name of a ResourceClass that was created as part of the - // driver deployment. - ResourceClassName string + // Devices defines how to request devices. + // + // +optional + Devices DeviceClaim - // ParametersRef references a separate object with arbitrary parameters - // that will be used by the driver when allocating a resource for the - // claim. + // Controller is the name of the DRA driver that is meant + // to handle allocation of this claim. If empty, allocation is handled + // by the scheduler while scheduling a pod. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. // - // The object must be in the same namespace as the ResourceClaim. // +optional - ParametersRef *ResourceClaimParametersReference + Controller string } -// ResourceClaimStatus tracks whether the resource has been allocated and what -// the resulting attributes are. -type ResourceClaimStatus struct { - // DriverName is a copy of the driver name from the ResourceClass at - // the time when allocation started. +// DeviceClaim defines how to request devices with a ResourceClaim. +type DeviceClaim struct { + // Requests represent individual requests for distinct devices which + // must all be satisfied. If empty, nothing needs to be allocated. + // // +optional - DriverName string + // +listType=atomic + Requests []DeviceRequest - // 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. + // These constraints must be satisfied by the set of devices that get + // allocated for the claim. + // + // +optional + // +listType=atomic + Constraints []DeviceConstraint + + // This field holds configuration for multiple potential drivers which + // could satisfy requests in this claim. It is ignored while allocating + // the claim. + // + // +optional + // +listType=atomic + Config []DeviceClaimConfiguration +} + +const ( + DeviceRequestsMaxSize = AllocationResultsMaxSize + DeviceConstraintsMaxSize = 32 + DeviceConfigMaxSize = 32 +) + +// DeviceRequest is a request for devices required for a claim. +// This is typically a request for a single resource like a device, but can +// also ask for several identical devices. +// +// A DeviceClassName is currently required. Clients must check that it is +// indeed set. It's absence indicates that something changed in a way that +// is not supported by the client yet, in which case it must refuse to +// handle the request. +type DeviceRequest struct { + // Name can be used to reference this request in a pod.spec.containers[].resources.claims + // entry and in a constraint of the claim. + // + // Must be a DNS label. + // + // +required + Name string + + // DeviceClassName references a specific DeviceClass, which can define + // additional configuration and selectors to be inherited by this + // request. + // + // A class is required. Which classes are available depends on the cluster. + // + // Administrators may use this to restrict which devices may get + // requested by only installing classes with selectors for permitted + // devices. If users are free to request anything without restrictions, + // then administrators can create an empty DeviceClass for users + // to reference. + // + // +required + DeviceClassName string + + // Selectors define criteria which must be satisfied by a specific + // device in order for that device to be considered for this + // request. All selectors must be satisfied for a device to be + // considered. + // + // +optional + // +listType=atomic + Selectors []DeviceSelector + + // CountMode and its related fields define how many devices are needed + // to satisfy this request. Supported values are: + // + // - Exact: This request is for a specific number of devices. + // This is the default. The exact number is provided in the + // count field. + // + // - All: This request is for all of the matching devices in a pool. + // Allocation will fail if some devices are already allocated, + // unless adminAccess is requested. + // + // If countMode is not specified, the default countMode is Exact. If + // countMode is Exact and count is not specified, the default count is + // one. Any other requests must specify this field. + // + // More modes may get added in the future. Clients must refuse to handle + // requests with unknown modes. + // + // +optional + CountMode DeviceCountMode + + // Count is used only when the count mode is "Exact". Must be greater than zero. + // If CountMode is Exact and this field is not specified, the default is one. + // + // +optional + Count int64 + + // AdminAccess indicates that this is a claim for administrative access + // to the device(s). Claims with AdminAccess are expected to be used for + // monitoring or other management services for a device. They ignore + // all ordinary claims to the device with respect to access modes and + // any resource allocations. + // + // +optional + // +default=false + AdminAccess bool +} + +const ( + DeviceSelectorsMaxSize = 32 +) + +type DeviceCountMode string + +// Valid [DeviceRequest.CountMode] values. +const ( + DeviceCountModeExact = DeviceCountMode("Exact") + DeviceCountModeAll = DeviceCountMode("All") +) + +// DeviceSelector must have exactly one field set. +type DeviceSelector struct { + // CEL contains a CEL expression for selecting a device. + // + // +required + CEL *CELDeviceSelector +} + +// CELDeviceSelector contains a CEL expression for selecting a device. +type CELDeviceSelector struct { + // Expression is a CEL expression which evaluates a single device. It + // must evaluate to true when the device under consideration satisfies + // the desired criteria, and false when it does not. Any other result + // is an error and causes allocation of devices to abort. + // + // The expression's input is an object named "device", which carries + // the following properties: + // - driver (string): the name of the driver which defines this device. + // - attributes (map[string]object): the device's attributes, grouped by prefix + // (e.g. device.attributes["dra.example.com"] evaluates to an object with all + // of the attributes which were prefixed by "dra.example.com". + // - capacity (map[string]object): the device's capacities, grouped by prefix. + // + // Example: Consider a device with driver="dra.example.com", which exposes + // two attributes named "model" and "ext.example.com/family" and which + // exposes one capacity named "modules". This input to this expression + // would have the following fields: + // + // device.driver + // device.attributes["dra.example.com"].model + // device.attributes["ext.example.com"].family + // device.capacity["dra.example.com"].modules + // + // The device.driver field can be used to check for a specific driver, + // either as a high-level precondition (i.e. you only want to consider + // devices from this driver) or as part of a multi-clause expression + // that is meant to consider devices from different drivers. + // + // The value type of each attribute is defined by the device + // definition, and users who write these expressions must consult the + // documentation for their specific drivers. The value type of each + // capacity is Quantity. + // + // If an unknown prefix is used as a lookup in either device.attributes + // or device.capacity, an empty map will be returned. Any reference to + // an unknown field will cause an evaluation error and allocation to + // abort. + // + // A robust expression should check for the existence of attributes + // before referencing them. + // + // For ease of use, the cel.bind() function is enabled, and can be used + // to simplify expressions that access multiple attributes with the + // same domain. For example: + // + // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) + // + // +required + Expression string +} + +// DeviceConstraint must have exactly one field set besides Requests. +type DeviceConstraint struct { + // Requests is a list of the one or more requests in this claim which + // must co-satisfy this constraint. If a request is fulfilled by + // multiple devices, then all of the devices must satisfy the + // constraint. If this is not specified, this constraint applies to all + // requests in this claim. + // + // +optional + // +listType=atomic + Requests []string + + // MatchAttribute requires that all devices in question have this + // attribute and that its type and value are the same across those + // devices. + // + // For example, if you specified "dra.example.com/numa" (a hypothetical example!), + // then only devices in the same NUMA node will be chosen. A device which + // does not have that attribute will not be chosen. All devices should + // use a value of the same type for this attribute because that is part of + // its specification, but if one device doesn't, then it also will not be + // chosen. + // + // Must include the domain qualifier. + // + // +optional + MatchAttribute *FullyQualifiedName +} + +// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. +type DeviceClaimConfiguration struct { + // Requests lists the names of requests where the configuration applies. + // If empty, it applies to all requests. + // + // +optional + // +listType=atomic + Requests []string + + DeviceConfiguration // inline +} + +// DeviceConfiguration must have exactly one field set. It gets embedded +// inline in some other structs which have other fields, so field names must +// not conflict with those. +type DeviceConfiguration struct { + // Opaque provides driver-specific configuration parameters. + // + // +optional + Opaque *OpaqueDeviceConfiguration +} + +// OpaqueDeviceConfiguration contains configuration parameters for a driver +// in a format defined by the driver vendor. +type OpaqueDeviceConfiguration struct { + // Driver is used to determine which kubelet plugin needs + // to be passed these configuration parameters. + // + // An admission policy provided by the driver developer could use this + // to decide whether it needs to validate them. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string + + // Parameters can contain arbitrary data. It is the responsibility of + // the driver developer to handle validation and versioning. Typically this + // includes self-identification and a version ("kind" + "apiVersion" for + // Kubernetes types), with conversion between different versions. + // + // +required + Parameters runtime.RawExtension +} + +// ResourceClaimStatus tracks whether the resource has been allocated and what +// the result of that was. +type ResourceClaimStatus struct { + // Allocation is set once the claim has been allocated successfully. + // // +optional Allocation *AllocationResult // ReservedFor indicates which entities are currently allowed to use // the claim. A Pod which references a ResourceClaim which is not - // reserved for that Pod will not be started. + // reserved for that Pod will not be started. A claim that is in + // use or might be in use because it has been reserved must not get + // deallocated. + // + // In a cluster with multiple scheduler instances, two pods might get + // scheduled concurrently by different schedulers. When they reference + // the same ResourceClaim which already has reached its maximum number + // of consumers, only one pod can be scheduled. + // + // Both schedulers try to add their pod to the claim.status.reservedFor + // field, but only the update that reaches the API server first gets + // stored. The other one fails with an error and the scheduler + // which issued it knows that it must put the pod back into the queue, + // waiting for the ResourceClaim to become usable again. // // There can be at most 32 such reservations. This may get increased in // the future, but not reduced. + // // +optional + // +listType=map + // +listMapKey=uid + // +patchStrategy=merge + // +patchMergeKey=uid ReservedFor []ResourceClaimConsumerReference - // DeallocationRequested indicates that a ResourceClaim is to be - // deallocated. + // Indicates that a claim is to be deallocated. While this is set, + // no new consumers may be added to ReservedFor. // - // The driver then must deallocate this claim and reset the field + // This is only used if the claim needs to be deallocated by a DRA driver. + // That driver then must deallocate this claim and reset the field // together with clearing the Allocation field. // - // While DeallocationRequested is set, no new consumers may be added to - // ReservedFor. + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. + // // +optional DeallocationRequested bool } @@ -103,101 +645,142 @@ type ResourceClaimStatus struct { // claim.status.reservedFor. const ResourceClaimReservedForMaxSize = 32 +// ResourceClaimConsumerReference contains enough information to let you +// locate the consumer of a ResourceClaim. The user must be a resource in the same +// namespace as the ResourceClaim. +type ResourceClaimConsumerReference struct { + // APIGroup is the group for the resource being referenced. It is + // empty for the core API. This matches the group in the APIVersion + // that is used when creating the resources. + // +optional + APIGroup string + // Resource is the type of resource being referenced, for example "pods". + // +required + Resource string + // Name is the name of resource being referenced. + // +required + Name string + // UID identifies exactly one incarnation of the resource. + // +required + UID types.UID +} + // AllocationResult contains attributes of an allocated resource. type AllocationResult struct { - // ResourceHandles contain the state associated with an allocation that - // should be maintained throughout the lifetime of a claim. Each - // ResourceHandle contains data that should be passed to a specific kubelet - // plugin once it lands on a node. This data is returned by the driver - // after a successful allocation and is opaque to Kubernetes. Driver - // documentation may explain to users how to interpret this data if needed. - // - // Setting this field is optional. It has a maximum size of 32 entries. - // If null (or empty), it is assumed this allocation will be processed by a - // single kubelet plugin with no ResourceHandle data attached. The name of - // the kubelet plugin invoked will match the DriverName set in the - // ResourceClaimStatus this AllocationResult is embedded in. + // Devices is the result of allocating devices. // - // +listType=atomic // +optional - ResourceHandles []ResourceHandle + Devices DeviceAllocationResult - // This field will get set by the resource driver after it has allocated - // the resource to inform the scheduler where it can schedule Pods using - // the ResourceClaim. + // NodeSelector defines where the allocated resources are available. If + // unset, they are available everywhere. // - // Setting this field is optional. If null, the resource is available - // everywhere. // +optional - AvailableOnNodes *core.NodeSelector -} + NodeSelector *core.NodeSelector -// AllocationResultResourceHandlesMaxSize represents the maximum number of -// entries in allocation.resourceHandles. -const AllocationResultResourceHandlesMaxSize = 32 - -// ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. -type ResourceHandle struct { - // DriverName specifies the name of the resource driver whose kubelet - // plugin should be invoked to process this ResourceHandle's data once it - // lands on a node. This may differ from the DriverName set in - // ResourceClaimStatus this ResourceHandle is embedded in. - DriverName string + // Controller is the name of the DRA driver which handled the + // allocation. That driver is also responsible for deallocating the + // claim. It is empty when the claim can be deallocated without + // involving a driver. + // + // A driver may allocate devices provided by other drivers, so this + // driver name here can be different from the driver names listed for + // the results. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. + // + // +optional + Controller string +} - // Data contains the opaque data associated with this ResourceHandle. It is - // set by the controller component of the resource driver whose name - // matches the DriverName set in the ResourceClaimStatus this - // ResourceHandle is embedded in. It is set at allocation time and is - // intended for processing by the kubelet plugin whose name matches - // the DriverName set in this ResourceHandle. +// DeviceAllocationResult is the result of allocating devices. +type DeviceAllocationResult struct { + // Results lists all allocated devices. // - // The maximum size of this field is 16KiB. This may get increased in the - // future, but not reduced. // +optional - Data string + // +listType=atomic + Results []DeviceRequestAllocationResult - // If StructuredData is set, then it needs to be used instead of Data. - StructuredData *StructuredResourceHandle + // This field is a combination of all the claim and class configuration parameters. + // Drivers can distinguish between those based on a flag. + // + // This includes configuration parameters for drivers which have no allocated + // devices in the result because it is up to the drivers which configuration + // parameters they support. They can silently ignore unknown configuration + // parameters. + // + // +optional + // +listType=atomic + Config []DeviceAllocationConfiguration } -// ResourceHandleDataMaxSize represents the maximum size of resourceHandle.data. -const ResourceHandleDataMaxSize = 16 * 1024 +// AllocationResultsMaxSize represents the maximum number of +// entries in allocation.devices.results. +const AllocationResultsMaxSize = 32 -// StructuredResourceHandle is the in-tree representation of the allocation result. -type StructuredResourceHandle struct { - // VendorClassParameters are the per-claim configuration parameters - // from the resource class at the time that the claim was allocated. - VendorClassParameters runtime.Object +// DeviceRequestAllocationResult contains the allocation result for one request. +type DeviceRequestAllocationResult struct { + // Request is the name of the request in the claim which caused this + // device to be allocated. Multiple devices may have been allocated + // per request. + // + // +required + Request string - // VendorClaimParameters are the per-claim configuration parameters - // from the resource claim parameters at the time that the claim was - // allocated. - VendorClaimParameters runtime.Object + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string - // NodeName is the name of the node providing the necessary resources - // if the resources are local to a node. - NodeName string + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + Pool string - // Results lists all allocated driver resources. - Results []DriverAllocationResult + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + Device string } -// DriverAllocationResult contains vendor parameters and the allocation result for -// one request. -type DriverAllocationResult struct { - // VendorRequestParameters are the per-request configuration parameters - // from the time that the claim was allocated. - VendorRequestParameters runtime.Object +// DeviceAllocationConfiguration gets embedded in an AllocationResult. +type DeviceAllocationConfiguration struct { + // Source records whether the configuration comes from a class and thus + // is not something that a normal user would have been able to set + // or from a claim. + // + // +required + Source AllocationConfigSource - AllocationResultModel -} + // Requests lists the names of requests where the configuration applies. + // If empty, its applies to all requests. + // + // +optional + // +listType=atomic + Requests []string -// AllocationResultModel must have one and only one field set. -type AllocationResultModel struct { - // NamedResources describes the allocation result when using the named resources model. - NamedResources *NamedResourcesAllocationResult + DeviceConfiguration // inline } +type AllocationConfigSource string + +// Valid [DeviceAllocationConfiguration.Source] values. +const ( + AllocationConfigSourceClass = "FromClass" + AllocationConfigSourceClaim = "FromClaim" +) + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ResourceClaimList is a collection of claims. @@ -217,7 +800,7 @@ type ResourceClaimList struct { // a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation // mode. // -// This is an alpha type and requires enabling the DynamicResourceAllocation +// This is an alpha type and requires enabling the DRAControlPlaneController // feature gate. type PodSchedulingContext struct { metav1.TypeMeta @@ -229,6 +812,8 @@ type PodSchedulingContext struct { Spec PodSchedulingContextSpec // Status describes where resources for the Pod can be allocated. + // + // +optional Status PodSchedulingContextStatus } @@ -237,6 +822,8 @@ type PodSchedulingContextSpec struct { // SelectedNode is the node for which allocation of ResourceClaims that // are referenced by the Pod and that use "WaitForFirstConsumer" // allocation is to be attempted. + // + // +optional SelectedNode string // PotentialNodes lists nodes where the Pod might be able to run. @@ -245,7 +832,9 @@ type PodSchedulingContextSpec struct { // many clusters. Larger clusters may need more attempts to find a node // that suits all pending resources. This may get increased in the // future, but not reduced. + // // +optional + // +listType=atomic PotentialNodes []string } @@ -254,6 +843,9 @@ type PodSchedulingContextStatus struct { // ResourceClaims describes resource availability for each // pod.spec.resourceClaim entry where the corresponding ResourceClaim // uses "WaitForFirstConsumer" allocation mode. + // + // +listType=map + // +listMapKey=name // +optional ResourceClaims []ResourceClaimSchedulingStatus @@ -266,6 +858,8 @@ type PodSchedulingContextStatus struct { // ResourceClaim with "WaitForFirstConsumer" allocation mode. type ResourceClaimSchedulingStatus struct { // Name matches the pod.spec.resourceClaims[*].Name field. + // + // +required Name string // UnsuitableNodes lists nodes that the ResourceClaim cannot be @@ -274,7 +868,9 @@ type ResourceClaimSchedulingStatus struct { // The size of this field is limited to 128, the same as for // PodSchedulingSpec.PotentialNodes. This may get increased in the // future, but not reduced. + // // +optional + // +listType=atomic UnsuitableNodes []string } @@ -298,114 +894,89 @@ type PodSchedulingContextList struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// ResourceClass is used by administrators to influence how resources -// are allocated. +// DeviceClass is a vendor or admin-provided resource that contains +// device configuration and selectors. It can be referenced in +// the device requests of a claim to apply these presets. +// Cluster scoped. // // This is an alpha type and requires enabling the DynamicResourceAllocation // feature gate. -type ResourceClass struct { +type DeviceClass struct { metav1.TypeMeta // Standard object metadata // +optional metav1.ObjectMeta - // DriverName defines the name of the dynamic resource driver that is - // used for allocation of a ResourceClaim that uses this class. + // Spec defines what can be allocated and how to configure it. + // + // This is mutable. Consumers have to be prepared for classes changing + // at any time, either because they get updated or replaced. Claim + // allocations are done once based on whatever was set in classes at + // the time of allocation. + // + // Changing the spec automatically increments the metadata.generation number. + Spec DeviceClassSpec +} + +// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated +// and how to configure it. +type DeviceClassSpec struct { + // Each selector must be satisfied by a device which is claimed via this class. // - // Resource drivers have a unique name in forward domain order - // (acme.example.com). - DriverName string + // +optional + // +listType=atomic + Selectors []DeviceSelector - // 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. + // Config defines configuration parameters that apply to each device that is claimed via this class. + // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor + // configuration applies to exactly one driver. + // + // They are passed to the driver, but are not considered while allocating the claim. + // // +optional - ParametersRef *ResourceClassParametersReference + // +listType=atomic + Config []DeviceClassConfiguration // Only nodes matching the selector will be considered by the scheduler // when trying to find a Node that fits a Pod when that Pod uses - // a ResourceClaim that has not been allocated yet. + // a claim that has not been allocated yet *and* that claim + // gets allocated through a control plane controller. It is ignored + // when the claim does not use a control plane controller + // for allocation. + // + // Setting this field is optional. If unset, all Nodes are candidates. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. // - // Setting this field is optional. If null, all nodes are candidates. // +optional SuitableNodes *core.NodeSelector +} - // If and only if allocation of claims using this class is handled - // via structured parameters, then StructuredParameters must be set to true. - StructuredParameters *bool +// DeviceClassConfiguration is used in DeviceClass. +type DeviceClassConfiguration struct { + DeviceConfiguration // inline } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// ResourceClassList is a collection of classes. -type ResourceClassList struct { +// DeviceClassList is a collection of classes. +type DeviceClassList struct { metav1.TypeMeta // Standard list metadata // +optional metav1.ListMeta // Items is the list of resource classes. - Items []ResourceClass -} - -// ResourceClassParametersReference contains enough information to let you -// locate the parameters for a ResourceClass. -type ResourceClassParametersReference struct { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - APIGroup string - // Kind is the type of resource being referenced. This is the same - // value as in the parameter object's metadata. - Kind string - // Name is the name of resource being referenced. - Name string - // Namespace that contains the referenced resource. Must be empty - // for cluster-scoped resources and non-empty for namespaced - // resources. - // +optional - Namespace string -} - -// ResourceClaimParametersReference contains enough information to let you -// locate the parameters for a ResourceClaim. The object must be in the same -// namespace as the ResourceClaim. -type ResourceClaimParametersReference struct { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - APIGroup string - // Kind is the type of resource being referenced. This is the same - // value as in the parameter object's metadata, for example "ConfigMap". - Kind string - // Name is the name of resource being referenced. - Name string -} - -// ResourceClaimConsumerReference contains enough information to let you -// locate the consumer of a ResourceClaim. The user must be a resource in the same -// namespace as the ResourceClaim. -type ResourceClaimConsumerReference struct { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - APIGroup string - // Resource is the type of resource being referenced, for example "pods". - Resource string - // Name is the name of resource being referenced. - Name string - // UID identifies exactly one incarnation of the resource. - UID types.UID + Items []DeviceClass } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ResourceClaimTemplate is used to produce ResourceClaim objects. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. type ResourceClaimTemplate struct { metav1.TypeMeta // Standard object metadata @@ -446,169 +1017,3 @@ type ResourceClaimTemplateList struct { // Items is the list of resource claim templates. Items []ResourceClaimTemplate } - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceSlice provides information about available -// resources on individual nodes. -type ResourceSlice struct { - metav1.TypeMeta - // Standard object metadata - metav1.ObjectMeta - - // NodeName identifies the node which provides the resources - // if they are local to a node. - // - // A field selector can be used to list only ResourceSlice - // objects with a certain node name. - NodeName string - - // DriverName identifies the DRA driver providing the capacity information. - // A field selector can be used to list only ResourceSlice - // objects with a certain driver name. - DriverName string - - ResourceModel -} - -// ResourceModel must have one and only one field set. -type ResourceModel struct { - // NamedResources describes available resources using the named resources model. - NamedResources *NamedResourcesResources -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceSliceList is a collection of ResourceSlices. -type ResourceSliceList struct { - metav1.TypeMeta - // Standard list metadata - metav1.ListMeta - - // Items is the list of node resource capacity objects. - Items []ResourceSlice -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceClaimParameters defines resource requests for a ResourceClaim in an -// in-tree format understood by Kubernetes. -type ResourceClaimParameters struct { - metav1.TypeMeta - // Standard object metadata - metav1.ObjectMeta - - // 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. - GeneratedFrom *ResourceClaimParametersReference - - // DriverRequests describes all resources that are needed for the - // allocated claim. A single claim may use resources coming from - // different drivers. For each driver, this array has at most one - // entry which then may have one or more per-driver requests. - // - // May be empty, in which case the claim can always be allocated. - DriverRequests []DriverRequests -} - -// DriverRequests describes all resources that are needed from one particular driver. -type DriverRequests struct { - // DriverName is the name used by the DRA driver kubelet plugin. - DriverName string - - // VendorParameters are arbitrary setup parameters for all requests of the - // claim. They are ignored while allocating the claim. - VendorParameters runtime.Object - - // Requests describes all resources that are needed from the driver. - Requests []ResourceRequest -} - -// ResourceRequest is a request for resources from one particular driver. -type ResourceRequest struct { - // VendorParameters are arbitrary setup parameters for the requested - // resource. They are ignored while allocating a claim. - VendorParameters runtime.Object - - ResourceRequestModel -} - -// ResourceRequestModel must have one and only one field set. -type ResourceRequestModel struct { - // NamedResources describes a request for resources with the named resources model. - NamedResources *NamedResourcesRequest -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceClaimParametersList is a collection of ResourceClaimParameters. -type ResourceClaimParametersList struct { - metav1.TypeMeta - // Standard list metadata - metav1.ListMeta - - // Items is the list of node resource capacity objects. - Items []ResourceClaimParameters -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceClassParameters defines resource requests for a ResourceClass in an -// in-tree format understood by Kubernetes. -type ResourceClassParameters struct { - metav1.TypeMeta - // Standard object metadata - metav1.ObjectMeta - - // 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. - GeneratedFrom *ResourceClassParametersReference - - // VendorParameters are arbitrary setup parameters for all claims using - // this class. They are ignored while allocating the claim. There must - // not be more than one entry per driver. - VendorParameters []VendorParameters - - // Filters describes additional contraints that must be met when using the class. - Filters []ResourceFilter -} - -// ResourceFilter is a filter for resources from one particular driver. -type ResourceFilter struct { - // DriverName is the name used by the DRA driver kubelet plugin. - DriverName string - - ResourceFilterModel -} - -// ResourceFilterModel must have one and only one field set. -type ResourceFilterModel struct { - // NamedResources describes a resource filter using the named resources model. - NamedResources *NamedResourcesFilter -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceClassParametersList is a collection of ResourceClassParameters. -type ResourceClassParametersList struct { - metav1.TypeMeta - // Standard list metadata - metav1.ListMeta - - // Items is the list of node resource capacity objects. - Items []ResourceClassParameters -} - -// VendorParameters are opaque parameters for one particular driver. -type VendorParameters struct { - // DriverName is the name used by the DRA driver kubelet plugin. - DriverName string - - // Parameters can be arbitrary setup parameters. They are ignored while - // allocating a claim. - Parameters runtime.Object -} diff --git a/pkg/apis/resource/v1alpha3/conversion.go b/pkg/apis/resource/v1alpha3/conversion.go index 0ca264a883a45..237ea36713005 100644 --- a/pkg/apis/resource/v1alpha3/conversion.go +++ b/pkg/apis/resource/v1alpha3/conversion.go @@ -19,6 +19,7 @@ package v1alpha3 import ( "fmt" + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/runtime" ) @@ -26,7 +27,7 @@ func addConversionFuncs(scheme *runtime.Scheme) error { if err := scheme.AddFieldLabelConversionFunc(SchemeGroupVersion.WithKind("ResourceSlice"), func(label, value string) (string, string, error) { switch label { - case "metadata.name", "nodeName", "driverName": + case "metadata.name", resourceapi.ResourceSliceSelectorNodeName, resourceapi.ResourceSliceSelectorDriver: return label, value, nil default: return "", "", fmt.Errorf("field label not supported for %s: %s", SchemeGroupVersion.WithKind("ResourceSlice"), label) diff --git a/pkg/apis/resource/v1alpha3/defaults.go b/pkg/apis/resource/v1alpha3/defaults.go index 84851c3dbb26d..039f8f11ad37f 100644 --- a/pkg/apis/resource/v1alpha3/defaults.go +++ b/pkg/apis/resource/v1alpha3/defaults.go @@ -17,9 +17,20 @@ limitations under the License. package v1alpha3 import ( + resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/runtime" ) func addDefaultingFuncs(scheme *runtime.Scheme) error { return RegisterDefaults(scheme) } + +func SetDefaults_DeviceRequest(obj *resourceapi.DeviceRequest) { + if obj.CountMode == "" { + obj.CountMode = resourceapi.DeviceCountModeExact + } + + if obj.CountMode == resourceapi.DeviceCountModeExact && obj.Count == 0 { + obj.Count = 1 + } +} diff --git a/pkg/apis/resource/v1alpha3/zz_generated.conversion.go b/pkg/apis/resource/v1alpha3/zz_generated.conversion.go index bf7b5af9c597a..7c12e5e0617da 100644 --- a/pkg/apis/resource/v1alpha3/zz_generated.conversion.go +++ b/pkg/apis/resource/v1alpha3/zz_generated.conversion.go @@ -51,123 +51,183 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.AllocationResultModel)(nil), (*resource.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(a.(*v1alpha3.AllocationResultModel), b.(*resource.AllocationResultModel), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.BasicDevice)(nil), (*resource.BasicDevice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_BasicDevice_To_resource_BasicDevice(a.(*v1alpha3.BasicDevice), b.(*resource.BasicDevice), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.AllocationResultModel)(nil), (*v1alpha3.AllocationResultModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(a.(*resource.AllocationResultModel), b.(*v1alpha3.AllocationResultModel), scope) + if err := s.AddGeneratedConversionFunc((*resource.BasicDevice)(nil), (*v1alpha3.BasicDevice)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_BasicDevice_To_v1alpha3_BasicDevice(a.(*resource.BasicDevice), b.(*v1alpha3.BasicDevice), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.DriverAllocationResult)(nil), (*resource.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(a.(*v1alpha3.DriverAllocationResult), b.(*resource.DriverAllocationResult), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.CELDeviceSelector)(nil), (*resource.CELDeviceSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_CELDeviceSelector_To_resource_CELDeviceSelector(a.(*v1alpha3.CELDeviceSelector), b.(*resource.CELDeviceSelector), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.DriverAllocationResult)(nil), (*v1alpha3.DriverAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(a.(*resource.DriverAllocationResult), b.(*v1alpha3.DriverAllocationResult), scope) + if err := s.AddGeneratedConversionFunc((*resource.CELDeviceSelector)(nil), (*v1alpha3.CELDeviceSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_CELDeviceSelector_To_v1alpha3_CELDeviceSelector(a.(*resource.CELDeviceSelector), b.(*v1alpha3.CELDeviceSelector), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.DriverRequests)(nil), (*resource.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_DriverRequests_To_resource_DriverRequests(a.(*v1alpha3.DriverRequests), b.(*resource.DriverRequests), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.Device)(nil), (*resource.Device)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_Device_To_resource_Device(a.(*v1alpha3.Device), b.(*resource.Device), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.DriverRequests)(nil), (*v1alpha3.DriverRequests)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_DriverRequests_To_v1alpha3_DriverRequests(a.(*resource.DriverRequests), b.(*v1alpha3.DriverRequests), scope) + if err := s.AddGeneratedConversionFunc((*resource.Device)(nil), (*v1alpha3.Device)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_Device_To_v1alpha3_Device(a.(*resource.Device), b.(*v1alpha3.Device), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesAllocationResult)(nil), (*resource.NamedResourcesAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(a.(*v1alpha3.NamedResourcesAllocationResult), b.(*resource.NamedResourcesAllocationResult), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceAllocationConfiguration)(nil), (*resource.DeviceAllocationConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceAllocationConfiguration_To_resource_DeviceAllocationConfiguration(a.(*v1alpha3.DeviceAllocationConfiguration), b.(*resource.DeviceAllocationConfiguration), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAllocationResult)(nil), (*v1alpha3.NamedResourcesAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(a.(*resource.NamedResourcesAllocationResult), b.(*v1alpha3.NamedResourcesAllocationResult), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceAllocationConfiguration)(nil), (*v1alpha3.DeviceAllocationConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceAllocationConfiguration_To_v1alpha3_DeviceAllocationConfiguration(a.(*resource.DeviceAllocationConfiguration), b.(*v1alpha3.DeviceAllocationConfiguration), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesAttribute)(nil), (*resource.NamedResourcesAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(a.(*v1alpha3.NamedResourcesAttribute), b.(*resource.NamedResourcesAttribute), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceAllocationResult)(nil), (*resource.DeviceAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceAllocationResult_To_resource_DeviceAllocationResult(a.(*v1alpha3.DeviceAllocationResult), b.(*resource.DeviceAllocationResult), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAttribute)(nil), (*v1alpha3.NamedResourcesAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(a.(*resource.NamedResourcesAttribute), b.(*v1alpha3.NamedResourcesAttribute), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceAllocationResult)(nil), (*v1alpha3.DeviceAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceAllocationResult_To_v1alpha3_DeviceAllocationResult(a.(*resource.DeviceAllocationResult), b.(*v1alpha3.DeviceAllocationResult), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesAttributeValue)(nil), (*resource.NamedResourcesAttributeValue)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(a.(*v1alpha3.NamedResourcesAttributeValue), b.(*resource.NamedResourcesAttributeValue), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceAttribute)(nil), (*resource.DeviceAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceAttribute_To_resource_DeviceAttribute(a.(*v1alpha3.DeviceAttribute), b.(*resource.DeviceAttribute), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesAttributeValue)(nil), (*v1alpha3.NamedResourcesAttributeValue)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(a.(*resource.NamedResourcesAttributeValue), b.(*v1alpha3.NamedResourcesAttributeValue), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceAttribute)(nil), (*v1alpha3.DeviceAttribute)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceAttribute_To_v1alpha3_DeviceAttribute(a.(*resource.DeviceAttribute), b.(*v1alpha3.DeviceAttribute), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesFilter)(nil), (*resource.NamedResourcesFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(a.(*v1alpha3.NamedResourcesFilter), b.(*resource.NamedResourcesFilter), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceClaim)(nil), (*resource.DeviceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceClaim_To_resource_DeviceClaim(a.(*v1alpha3.DeviceClaim), b.(*resource.DeviceClaim), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesFilter)(nil), (*v1alpha3.NamedResourcesFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(a.(*resource.NamedResourcesFilter), b.(*v1alpha3.NamedResourcesFilter), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceClaim)(nil), (*v1alpha3.DeviceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceClaim_To_v1alpha3_DeviceClaim(a.(*resource.DeviceClaim), b.(*v1alpha3.DeviceClaim), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesInstance)(nil), (*resource.NamedResourcesInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(a.(*v1alpha3.NamedResourcesInstance), b.(*resource.NamedResourcesInstance), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceClaimConfiguration)(nil), (*resource.DeviceClaimConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceClaimConfiguration_To_resource_DeviceClaimConfiguration(a.(*v1alpha3.DeviceClaimConfiguration), b.(*resource.DeviceClaimConfiguration), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesInstance)(nil), (*v1alpha3.NamedResourcesInstance)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(a.(*resource.NamedResourcesInstance), b.(*v1alpha3.NamedResourcesInstance), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceClaimConfiguration)(nil), (*v1alpha3.DeviceClaimConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceClaimConfiguration_To_v1alpha3_DeviceClaimConfiguration(a.(*resource.DeviceClaimConfiguration), b.(*v1alpha3.DeviceClaimConfiguration), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesIntSlice)(nil), (*resource.NamedResourcesIntSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(a.(*v1alpha3.NamedResourcesIntSlice), b.(*resource.NamedResourcesIntSlice), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceClass)(nil), (*resource.DeviceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceClass_To_resource_DeviceClass(a.(*v1alpha3.DeviceClass), b.(*resource.DeviceClass), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesIntSlice)(nil), (*v1alpha3.NamedResourcesIntSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(a.(*resource.NamedResourcesIntSlice), b.(*v1alpha3.NamedResourcesIntSlice), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceClass)(nil), (*v1alpha3.DeviceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceClass_To_v1alpha3_DeviceClass(a.(*resource.DeviceClass), b.(*v1alpha3.DeviceClass), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesRequest)(nil), (*resource.NamedResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(a.(*v1alpha3.NamedResourcesRequest), b.(*resource.NamedResourcesRequest), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceClassConfiguration)(nil), (*resource.DeviceClassConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceClassConfiguration_To_resource_DeviceClassConfiguration(a.(*v1alpha3.DeviceClassConfiguration), b.(*resource.DeviceClassConfiguration), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesRequest)(nil), (*v1alpha3.NamedResourcesRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(a.(*resource.NamedResourcesRequest), b.(*v1alpha3.NamedResourcesRequest), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceClassConfiguration)(nil), (*v1alpha3.DeviceClassConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceClassConfiguration_To_v1alpha3_DeviceClassConfiguration(a.(*resource.DeviceClassConfiguration), b.(*v1alpha3.DeviceClassConfiguration), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesResources)(nil), (*resource.NamedResourcesResources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(a.(*v1alpha3.NamedResourcesResources), b.(*resource.NamedResourcesResources), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceClassList)(nil), (*resource.DeviceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceClassList_To_resource_DeviceClassList(a.(*v1alpha3.DeviceClassList), b.(*resource.DeviceClassList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesResources)(nil), (*v1alpha3.NamedResourcesResources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(a.(*resource.NamedResourcesResources), b.(*v1alpha3.NamedResourcesResources), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceClassList)(nil), (*v1alpha3.DeviceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceClassList_To_v1alpha3_DeviceClassList(a.(*resource.DeviceClassList), b.(*v1alpha3.DeviceClassList), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.NamedResourcesStringSlice)(nil), (*resource.NamedResourcesStringSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(a.(*v1alpha3.NamedResourcesStringSlice), b.(*resource.NamedResourcesStringSlice), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceClassSpec)(nil), (*resource.DeviceClassSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceClassSpec_To_resource_DeviceClassSpec(a.(*v1alpha3.DeviceClassSpec), b.(*resource.DeviceClassSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.NamedResourcesStringSlice)(nil), (*v1alpha3.NamedResourcesStringSlice)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(a.(*resource.NamedResourcesStringSlice), b.(*v1alpha3.NamedResourcesStringSlice), scope) + if err := s.AddGeneratedConversionFunc((*resource.DeviceClassSpec)(nil), (*v1alpha3.DeviceClassSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceClassSpec_To_v1alpha3_DeviceClassSpec(a.(*resource.DeviceClassSpec), b.(*v1alpha3.DeviceClassSpec), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceConfiguration)(nil), (*resource.DeviceConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration(a.(*v1alpha3.DeviceConfiguration), b.(*resource.DeviceConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DeviceConfiguration)(nil), (*v1alpha3.DeviceConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration(a.(*resource.DeviceConfiguration), b.(*v1alpha3.DeviceConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceConstraint)(nil), (*resource.DeviceConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceConstraint_To_resource_DeviceConstraint(a.(*v1alpha3.DeviceConstraint), b.(*resource.DeviceConstraint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DeviceConstraint)(nil), (*v1alpha3.DeviceConstraint)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceConstraint_To_v1alpha3_DeviceConstraint(a.(*resource.DeviceConstraint), b.(*v1alpha3.DeviceConstraint), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceRequest)(nil), (*resource.DeviceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceRequest_To_resource_DeviceRequest(a.(*v1alpha3.DeviceRequest), b.(*resource.DeviceRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DeviceRequest)(nil), (*v1alpha3.DeviceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceRequest_To_v1alpha3_DeviceRequest(a.(*resource.DeviceRequest), b.(*v1alpha3.DeviceRequest), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceRequestAllocationResult)(nil), (*resource.DeviceRequestAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceRequestAllocationResult_To_resource_DeviceRequestAllocationResult(a.(*v1alpha3.DeviceRequestAllocationResult), b.(*resource.DeviceRequestAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DeviceRequestAllocationResult)(nil), (*v1alpha3.DeviceRequestAllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceRequestAllocationResult_To_v1alpha3_DeviceRequestAllocationResult(a.(*resource.DeviceRequestAllocationResult), b.(*v1alpha3.DeviceRequestAllocationResult), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.DeviceSelector)(nil), (*resource.DeviceSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_DeviceSelector_To_resource_DeviceSelector(a.(*v1alpha3.DeviceSelector), b.(*resource.DeviceSelector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.DeviceSelector)(nil), (*v1alpha3.DeviceSelector)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_DeviceSelector_To_v1alpha3_DeviceSelector(a.(*resource.DeviceSelector), b.(*v1alpha3.DeviceSelector), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*v1alpha3.OpaqueDeviceConfiguration)(nil), (*resource.OpaqueDeviceConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(a.(*v1alpha3.OpaqueDeviceConfiguration), b.(*resource.OpaqueDeviceConfiguration), scope) + }); err != nil { + return err + } + if err := s.AddGeneratedConversionFunc((*resource.OpaqueDeviceConfiguration)(nil), (*v1alpha3.OpaqueDeviceConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_OpaqueDeviceConfiguration_To_v1alpha3_OpaqueDeviceConfiguration(a.(*resource.OpaqueDeviceConfiguration), b.(*v1alpha3.OpaqueDeviceConfiguration), scope) }); err != nil { return err } @@ -241,36 +301,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimParameters)(nil), (*resource.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(a.(*v1alpha3.ResourceClaimParameters), b.(*resource.ResourceClaimParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParameters)(nil), (*v1alpha3.ResourceClaimParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(a.(*resource.ResourceClaimParameters), b.(*v1alpha3.ResourceClaimParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimParametersList)(nil), (*resource.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(a.(*v1alpha3.ResourceClaimParametersList), b.(*resource.ResourceClaimParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersList)(nil), (*v1alpha3.ResourceClaimParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(a.(*resource.ResourceClaimParametersList), b.(*v1alpha3.ResourceClaimParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimParametersReference)(nil), (*resource.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(a.(*v1alpha3.ResourceClaimParametersReference), b.(*resource.ResourceClaimParametersReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersReference)(nil), (*v1alpha3.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(a.(*resource.ResourceClaimParametersReference), b.(*v1alpha3.ResourceClaimParametersReference), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClaimSchedulingStatus)(nil), (*resource.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1alpha3_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(a.(*v1alpha3.ResourceClaimSchedulingStatus), b.(*resource.ResourceClaimSchedulingStatus), scope) }); err != nil { @@ -331,113 +361,13 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClass)(nil), (*resource.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClass_To_resource_ResourceClass(a.(*v1alpha3.ResourceClass), b.(*resource.ResourceClass), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourcePool)(nil), (*resource.ResourcePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourcePool_To_resource_ResourcePool(a.(*v1alpha3.ResourcePool), b.(*resource.ResourcePool), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClass)(nil), (*v1alpha3.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClass_To_v1alpha3_ResourceClass(a.(*resource.ResourceClass), b.(*v1alpha3.ResourceClass), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassList)(nil), (*resource.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(a.(*v1alpha3.ResourceClassList), b.(*resource.ResourceClassList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassList)(nil), (*v1alpha3.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(a.(*resource.ResourceClassList), b.(*v1alpha3.ResourceClassList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassParameters)(nil), (*resource.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(a.(*v1alpha3.ResourceClassParameters), b.(*resource.ResourceClassParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParameters)(nil), (*v1alpha3.ResourceClassParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(a.(*resource.ResourceClassParameters), b.(*v1alpha3.ResourceClassParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassParametersList)(nil), (*resource.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(a.(*v1alpha3.ResourceClassParametersList), b.(*resource.ResourceClassParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersList)(nil), (*v1alpha3.ResourceClassParametersList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(a.(*resource.ResourceClassParametersList), b.(*v1alpha3.ResourceClassParametersList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceClassParametersReference)(nil), (*resource.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(a.(*v1alpha3.ResourceClassParametersReference), b.(*resource.ResourceClassParametersReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersReference)(nil), (*v1alpha3.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(a.(*resource.ResourceClassParametersReference), b.(*v1alpha3.ResourceClassParametersReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceFilter)(nil), (*resource.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(a.(*v1alpha3.ResourceFilter), b.(*resource.ResourceFilter), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceFilter)(nil), (*v1alpha3.ResourceFilter)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(a.(*resource.ResourceFilter), b.(*v1alpha3.ResourceFilter), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceFilterModel)(nil), (*resource.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(a.(*v1alpha3.ResourceFilterModel), b.(*resource.ResourceFilterModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceFilterModel)(nil), (*v1alpha3.ResourceFilterModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(a.(*resource.ResourceFilterModel), b.(*v1alpha3.ResourceFilterModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceHandle)(nil), (*resource.ResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(a.(*v1alpha3.ResourceHandle), b.(*resource.ResourceHandle), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceHandle)(nil), (*v1alpha3.ResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(a.(*resource.ResourceHandle), b.(*v1alpha3.ResourceHandle), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceModel)(nil), (*resource.ResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceModel_To_resource_ResourceModel(a.(*v1alpha3.ResourceModel), b.(*resource.ResourceModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceModel)(nil), (*v1alpha3.ResourceModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceModel_To_v1alpha3_ResourceModel(a.(*resource.ResourceModel), b.(*v1alpha3.ResourceModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceRequest)(nil), (*resource.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(a.(*v1alpha3.ResourceRequest), b.(*resource.ResourceRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceRequest)(nil), (*v1alpha3.ResourceRequest)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(a.(*resource.ResourceRequest), b.(*v1alpha3.ResourceRequest), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceRequestModel)(nil), (*resource.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(a.(*v1alpha3.ResourceRequestModel), b.(*resource.ResourceRequestModel), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.ResourceRequestModel)(nil), (*v1alpha3.ResourceRequestModel)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(a.(*resource.ResourceRequestModel), b.(*v1alpha3.ResourceRequestModel), scope) + if err := s.AddGeneratedConversionFunc((*resource.ResourcePool)(nil), (*v1alpha3.ResourcePool)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourcePool_To_v1alpha3_ResourcePool(a.(*resource.ResourcePool), b.(*v1alpha3.ResourcePool), scope) }); err != nil { return err } @@ -461,23 +391,13 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*v1alpha3.StructuredResourceHandle)(nil), (*resource.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(a.(*v1alpha3.StructuredResourceHandle), b.(*resource.StructuredResourceHandle), scope) + if err := s.AddGeneratedConversionFunc((*v1alpha3.ResourceSliceSpec)(nil), (*resource.ResourceSliceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1alpha3_ResourceSliceSpec_To_resource_ResourceSliceSpec(a.(*v1alpha3.ResourceSliceSpec), b.(*resource.ResourceSliceSpec), scope) }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*resource.StructuredResourceHandle)(nil), (*v1alpha3.StructuredResourceHandle)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(a.(*resource.StructuredResourceHandle), b.(*v1alpha3.StructuredResourceHandle), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*v1alpha3.VendorParameters)(nil), (*resource.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1alpha3_VendorParameters_To_resource_VendorParameters(a.(*v1alpha3.VendorParameters), b.(*resource.VendorParameters), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*resource.VendorParameters)(nil), (*v1alpha3.VendorParameters)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_resource_VendorParameters_To_v1alpha3_VendorParameters(a.(*resource.VendorParameters), b.(*v1alpha3.VendorParameters), scope) + if err := s.AddGeneratedConversionFunc((*resource.ResourceSliceSpec)(nil), (*v1alpha3.ResourceSliceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(a.(*resource.ResourceSliceSpec), b.(*v1alpha3.ResourceSliceSpec), scope) }); err != nil { return err } @@ -485,18 +405,11 @@ func RegisterConversions(s *runtime.Scheme) error { } func autoConvert_v1alpha3_AllocationResult_To_resource_AllocationResult(in *v1alpha3.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error { - if in.ResourceHandles != nil { - in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]resource.ResourceHandle, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.ResourceHandles = nil + if err := Convert_v1alpha3_DeviceAllocationResult_To_resource_DeviceAllocationResult(&in.Devices, &out.Devices, s); err != nil { + return err } - out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) + out.NodeSelector = (*core.NodeSelector)(unsafe.Pointer(in.NodeSelector)) + out.Controller = in.Controller return nil } @@ -506,18 +419,11 @@ func Convert_v1alpha3_AllocationResult_To_resource_AllocationResult(in *v1alpha3 } func autoConvert_resource_AllocationResult_To_v1alpha3_AllocationResult(in *resource.AllocationResult, out *v1alpha3.AllocationResult, s conversion.Scope) error { - if in.ResourceHandles != nil { - in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]v1alpha3.ResourceHandle, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.ResourceHandles = nil + if err := Convert_resource_DeviceAllocationResult_To_v1alpha3_DeviceAllocationResult(&in.Devices, &out.Devices, s); err != nil { + return err } - out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes)) + out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector)) + out.Controller = in.Controller return nil } @@ -526,302 +432,430 @@ func Convert_resource_AllocationResult_To_v1alpha3_AllocationResult(in *resource return autoConvert_resource_AllocationResult_To_v1alpha3_AllocationResult(in, out, s) } -func autoConvert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha3.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesAllocationResult)(unsafe.Pointer(in.NamedResources)) +func autoConvert_v1alpha3_BasicDevice_To_resource_BasicDevice(in *v1alpha3.BasicDevice, out *resource.BasicDevice, s conversion.Scope) error { + out.Attributes = *(*map[resource.QualifiedName]resource.DeviceAttribute)(unsafe.Pointer(&in.Attributes)) + out.Capacity = *(*map[resource.QualifiedName]apiresource.Quantity)(unsafe.Pointer(&in.Capacity)) return nil } -// Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel is an autogenerated conversion function. -func Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(in *v1alpha3.AllocationResultModel, out *resource.AllocationResultModel, s conversion.Scope) error { - return autoConvert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(in, out, s) +// Convert_v1alpha3_BasicDevice_To_resource_BasicDevice is an autogenerated conversion function. +func Convert_v1alpha3_BasicDevice_To_resource_BasicDevice(in *v1alpha3.BasicDevice, out *resource.BasicDevice, s conversion.Scope) error { + return autoConvert_v1alpha3_BasicDevice_To_resource_BasicDevice(in, out, s) } -func autoConvert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha3.AllocationResultModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha3.NamedResourcesAllocationResult)(unsafe.Pointer(in.NamedResources)) +func autoConvert_resource_BasicDevice_To_v1alpha3_BasicDevice(in *resource.BasicDevice, out *v1alpha3.BasicDevice, s conversion.Scope) error { + out.Attributes = *(*map[v1alpha3.QualifiedName]v1alpha3.DeviceAttribute)(unsafe.Pointer(&in.Attributes)) + out.Capacity = *(*map[v1alpha3.QualifiedName]apiresource.Quantity)(unsafe.Pointer(&in.Capacity)) return nil } -// Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel is an autogenerated conversion function. -func Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(in *resource.AllocationResultModel, out *v1alpha3.AllocationResultModel, s conversion.Scope) error { - return autoConvert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(in, out, s) +// Convert_resource_BasicDevice_To_v1alpha3_BasicDevice is an autogenerated conversion function. +func Convert_resource_BasicDevice_To_v1alpha3_BasicDevice(in *resource.BasicDevice, out *v1alpha3.BasicDevice, s conversion.Scope) error { + return autoConvert_resource_BasicDevice_To_v1alpha3_BasicDevice(in, out, s) } -func autoConvert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha3.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { - return err - } - if err := Convert_v1alpha3_AllocationResultModel_To_resource_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { - return err - } +func autoConvert_v1alpha3_CELDeviceSelector_To_resource_CELDeviceSelector(in *v1alpha3.CELDeviceSelector, out *resource.CELDeviceSelector, s conversion.Scope) error { + out.Expression = in.Expression return nil } -// Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult is an autogenerated conversion function. -func Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(in *v1alpha3.DriverAllocationResult, out *resource.DriverAllocationResult, s conversion.Scope) error { - return autoConvert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(in, out, s) +// Convert_v1alpha3_CELDeviceSelector_To_resource_CELDeviceSelector is an autogenerated conversion function. +func Convert_v1alpha3_CELDeviceSelector_To_resource_CELDeviceSelector(in *v1alpha3.CELDeviceSelector, out *resource.CELDeviceSelector, s conversion.Scope) error { + return autoConvert_v1alpha3_CELDeviceSelector_To_resource_CELDeviceSelector(in, out, s) } -func autoConvert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha3.DriverAllocationResult, s conversion.Scope) error { - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorRequestParameters, &out.VendorRequestParameters, s); err != nil { +func autoConvert_resource_CELDeviceSelector_To_v1alpha3_CELDeviceSelector(in *resource.CELDeviceSelector, out *v1alpha3.CELDeviceSelector, s conversion.Scope) error { + out.Expression = in.Expression + return nil +} + +// Convert_resource_CELDeviceSelector_To_v1alpha3_CELDeviceSelector is an autogenerated conversion function. +func Convert_resource_CELDeviceSelector_To_v1alpha3_CELDeviceSelector(in *resource.CELDeviceSelector, out *v1alpha3.CELDeviceSelector, s conversion.Scope) error { + return autoConvert_resource_CELDeviceSelector_To_v1alpha3_CELDeviceSelector(in, out, s) +} + +func autoConvert_v1alpha3_Device_To_resource_Device(in *v1alpha3.Device, out *resource.Device, s conversion.Scope) error { + out.Name = in.Name + out.Basic = (*resource.BasicDevice)(unsafe.Pointer(in.Basic)) + return nil +} + +// Convert_v1alpha3_Device_To_resource_Device is an autogenerated conversion function. +func Convert_v1alpha3_Device_To_resource_Device(in *v1alpha3.Device, out *resource.Device, s conversion.Scope) error { + return autoConvert_v1alpha3_Device_To_resource_Device(in, out, s) +} + +func autoConvert_resource_Device_To_v1alpha3_Device(in *resource.Device, out *v1alpha3.Device, s conversion.Scope) error { + out.Name = in.Name + out.Basic = (*v1alpha3.BasicDevice)(unsafe.Pointer(in.Basic)) + return nil +} + +// Convert_resource_Device_To_v1alpha3_Device is an autogenerated conversion function. +func Convert_resource_Device_To_v1alpha3_Device(in *resource.Device, out *v1alpha3.Device, s conversion.Scope) error { + return autoConvert_resource_Device_To_v1alpha3_Device(in, out, s) +} + +func autoConvert_v1alpha3_DeviceAllocationConfiguration_To_resource_DeviceAllocationConfiguration(in *v1alpha3.DeviceAllocationConfiguration, out *resource.DeviceAllocationConfiguration, s conversion.Scope) error { + out.Source = resource.AllocationConfigSource(in.Source) + out.Requests = *(*[]string)(unsafe.Pointer(&in.Requests)) + if err := Convert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration(&in.DeviceConfiguration, &out.DeviceConfiguration, s); err != nil { return err } - if err := Convert_resource_AllocationResultModel_To_v1alpha3_AllocationResultModel(&in.AllocationResultModel, &out.AllocationResultModel, s); err != nil { + return nil +} + +// Convert_v1alpha3_DeviceAllocationConfiguration_To_resource_DeviceAllocationConfiguration is an autogenerated conversion function. +func Convert_v1alpha3_DeviceAllocationConfiguration_To_resource_DeviceAllocationConfiguration(in *v1alpha3.DeviceAllocationConfiguration, out *resource.DeviceAllocationConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceAllocationConfiguration_To_resource_DeviceAllocationConfiguration(in, out, s) +} + +func autoConvert_resource_DeviceAllocationConfiguration_To_v1alpha3_DeviceAllocationConfiguration(in *resource.DeviceAllocationConfiguration, out *v1alpha3.DeviceAllocationConfiguration, s conversion.Scope) error { + out.Source = v1alpha3.AllocationConfigSource(in.Source) + out.Requests = *(*[]string)(unsafe.Pointer(&in.Requests)) + if err := Convert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration(&in.DeviceConfiguration, &out.DeviceConfiguration, s); err != nil { return err } return nil } -// Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult is an autogenerated conversion function. -func Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(in *resource.DriverAllocationResult, out *v1alpha3.DriverAllocationResult, s conversion.Scope) error { - return autoConvert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(in, out, s) +// Convert_resource_DeviceAllocationConfiguration_To_v1alpha3_DeviceAllocationConfiguration is an autogenerated conversion function. +func Convert_resource_DeviceAllocationConfiguration_To_v1alpha3_DeviceAllocationConfiguration(in *resource.DeviceAllocationConfiguration, out *v1alpha3.DeviceAllocationConfiguration, s conversion.Scope) error { + return autoConvert_resource_DeviceAllocationConfiguration_To_v1alpha3_DeviceAllocationConfiguration(in, out, s) +} + +func autoConvert_v1alpha3_DeviceAllocationResult_To_resource_DeviceAllocationResult(in *v1alpha3.DeviceAllocationResult, out *resource.DeviceAllocationResult, s conversion.Scope) error { + out.Results = *(*[]resource.DeviceRequestAllocationResult)(unsafe.Pointer(&in.Results)) + out.Config = *(*[]resource.DeviceAllocationConfiguration)(unsafe.Pointer(&in.Config)) + return nil +} + +// Convert_v1alpha3_DeviceAllocationResult_To_resource_DeviceAllocationResult is an autogenerated conversion function. +func Convert_v1alpha3_DeviceAllocationResult_To_resource_DeviceAllocationResult(in *v1alpha3.DeviceAllocationResult, out *resource.DeviceAllocationResult, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceAllocationResult_To_resource_DeviceAllocationResult(in, out, s) +} + +func autoConvert_resource_DeviceAllocationResult_To_v1alpha3_DeviceAllocationResult(in *resource.DeviceAllocationResult, out *v1alpha3.DeviceAllocationResult, s conversion.Scope) error { + out.Results = *(*[]v1alpha3.DeviceRequestAllocationResult)(unsafe.Pointer(&in.Results)) + out.Config = *(*[]v1alpha3.DeviceAllocationConfiguration)(unsafe.Pointer(&in.Config)) + return nil +} + +// Convert_resource_DeviceAllocationResult_To_v1alpha3_DeviceAllocationResult is an autogenerated conversion function. +func Convert_resource_DeviceAllocationResult_To_v1alpha3_DeviceAllocationResult(in *resource.DeviceAllocationResult, out *v1alpha3.DeviceAllocationResult, s conversion.Scope) error { + return autoConvert_resource_DeviceAllocationResult_To_v1alpha3_DeviceAllocationResult(in, out, s) +} + +func autoConvert_v1alpha3_DeviceAttribute_To_resource_DeviceAttribute(in *v1alpha3.DeviceAttribute, out *resource.DeviceAttribute, s conversion.Scope) error { + out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) + out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) + out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) + out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) + return nil +} + +// Convert_v1alpha3_DeviceAttribute_To_resource_DeviceAttribute is an autogenerated conversion function. +func Convert_v1alpha3_DeviceAttribute_To_resource_DeviceAttribute(in *v1alpha3.DeviceAttribute, out *resource.DeviceAttribute, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceAttribute_To_resource_DeviceAttribute(in, out, s) +} + +func autoConvert_resource_DeviceAttribute_To_v1alpha3_DeviceAttribute(in *resource.DeviceAttribute, out *v1alpha3.DeviceAttribute, s conversion.Scope) error { + out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) + out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) + out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) + out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) + return nil } -func autoConvert_v1alpha3_DriverRequests_To_resource_DriverRequests(in *v1alpha3.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { +// Convert_resource_DeviceAttribute_To_v1alpha3_DeviceAttribute is an autogenerated conversion function. +func Convert_resource_DeviceAttribute_To_v1alpha3_DeviceAttribute(in *resource.DeviceAttribute, out *v1alpha3.DeviceAttribute, s conversion.Scope) error { + return autoConvert_resource_DeviceAttribute_To_v1alpha3_DeviceAttribute(in, out, s) +} + +func autoConvert_v1alpha3_DeviceClaim_To_resource_DeviceClaim(in *v1alpha3.DeviceClaim, out *resource.DeviceClaim, s conversion.Scope) error { + out.Requests = *(*[]resource.DeviceRequest)(unsafe.Pointer(&in.Requests)) + out.Constraints = *(*[]resource.DeviceConstraint)(unsafe.Pointer(&in.Constraints)) + out.Config = *(*[]resource.DeviceClaimConfiguration)(unsafe.Pointer(&in.Config)) + return nil +} + +// Convert_v1alpha3_DeviceClaim_To_resource_DeviceClaim is an autogenerated conversion function. +func Convert_v1alpha3_DeviceClaim_To_resource_DeviceClaim(in *v1alpha3.DeviceClaim, out *resource.DeviceClaim, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceClaim_To_resource_DeviceClaim(in, out, s) +} + +func autoConvert_resource_DeviceClaim_To_v1alpha3_DeviceClaim(in *resource.DeviceClaim, out *v1alpha3.DeviceClaim, s conversion.Scope) error { + out.Requests = *(*[]v1alpha3.DeviceRequest)(unsafe.Pointer(&in.Requests)) + out.Constraints = *(*[]v1alpha3.DeviceConstraint)(unsafe.Pointer(&in.Constraints)) + out.Config = *(*[]v1alpha3.DeviceClaimConfiguration)(unsafe.Pointer(&in.Config)) + return nil +} + +// Convert_resource_DeviceClaim_To_v1alpha3_DeviceClaim is an autogenerated conversion function. +func Convert_resource_DeviceClaim_To_v1alpha3_DeviceClaim(in *resource.DeviceClaim, out *v1alpha3.DeviceClaim, s conversion.Scope) error { + return autoConvert_resource_DeviceClaim_To_v1alpha3_DeviceClaim(in, out, s) +} + +func autoConvert_v1alpha3_DeviceClaimConfiguration_To_resource_DeviceClaimConfiguration(in *v1alpha3.DeviceClaimConfiguration, out *resource.DeviceClaimConfiguration, s conversion.Scope) error { + out.Requests = *(*[]string)(unsafe.Pointer(&in.Requests)) + if err := Convert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration(&in.DeviceConfiguration, &out.DeviceConfiguration, s); err != nil { return err } - if in.Requests != nil { - in, out := &in.Requests, &out.Requests - *out = make([]resource.ResourceRequest, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Requests = nil - } return nil } -// Convert_v1alpha3_DriverRequests_To_resource_DriverRequests is an autogenerated conversion function. -func Convert_v1alpha3_DriverRequests_To_resource_DriverRequests(in *v1alpha3.DriverRequests, out *resource.DriverRequests, s conversion.Scope) error { - return autoConvert_v1alpha3_DriverRequests_To_resource_DriverRequests(in, out, s) +// Convert_v1alpha3_DeviceClaimConfiguration_To_resource_DeviceClaimConfiguration is an autogenerated conversion function. +func Convert_v1alpha3_DeviceClaimConfiguration_To_resource_DeviceClaimConfiguration(in *v1alpha3.DeviceClaimConfiguration, out *resource.DeviceClaimConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceClaimConfiguration_To_resource_DeviceClaimConfiguration(in, out, s) } -func autoConvert_resource_DriverRequests_To_v1alpha3_DriverRequests(in *resource.DriverRequests, out *v1alpha3.DriverRequests, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { +func autoConvert_resource_DeviceClaimConfiguration_To_v1alpha3_DeviceClaimConfiguration(in *resource.DeviceClaimConfiguration, out *v1alpha3.DeviceClaimConfiguration, s conversion.Scope) error { + out.Requests = *(*[]string)(unsafe.Pointer(&in.Requests)) + if err := Convert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration(&in.DeviceConfiguration, &out.DeviceConfiguration, s); err != nil { return err } - if in.Requests != nil { - in, out := &in.Requests, &out.Requests - *out = make([]v1alpha3.ResourceRequest, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Requests = nil - } return nil } -// Convert_resource_DriverRequests_To_v1alpha3_DriverRequests is an autogenerated conversion function. -func Convert_resource_DriverRequests_To_v1alpha3_DriverRequests(in *resource.DriverRequests, out *v1alpha3.DriverRequests, s conversion.Scope) error { - return autoConvert_resource_DriverRequests_To_v1alpha3_DriverRequests(in, out, s) +// Convert_resource_DeviceClaimConfiguration_To_v1alpha3_DeviceClaimConfiguration is an autogenerated conversion function. +func Convert_resource_DeviceClaimConfiguration_To_v1alpha3_DeviceClaimConfiguration(in *resource.DeviceClaimConfiguration, out *v1alpha3.DeviceClaimConfiguration, s conversion.Scope) error { + return autoConvert_resource_DeviceClaimConfiguration_To_v1alpha3_DeviceClaimConfiguration(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in *v1alpha3.NamedResourcesAllocationResult, out *resource.NamedResourcesAllocationResult, s conversion.Scope) error { - out.Name = in.Name +func autoConvert_v1alpha3_DeviceClass_To_resource_DeviceClass(in *v1alpha3.DeviceClass, out *resource.DeviceClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_v1alpha3_DeviceClassSpec_To_resource_DeviceClassSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } return nil } -// Convert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in *v1alpha3.NamedResourcesAllocationResult, out *resource.NamedResourcesAllocationResult, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesAllocationResult_To_resource_NamedResourcesAllocationResult(in, out, s) +// Convert_v1alpha3_DeviceClass_To_resource_DeviceClass is an autogenerated conversion function. +func Convert_v1alpha3_DeviceClass_To_resource_DeviceClass(in *v1alpha3.DeviceClass, out *resource.DeviceClass, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceClass_To_resource_DeviceClass(in, out, s) } -func autoConvert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(in *resource.NamedResourcesAllocationResult, out *v1alpha3.NamedResourcesAllocationResult, s conversion.Scope) error { - out.Name = in.Name +func autoConvert_resource_DeviceClass_To_v1alpha3_DeviceClass(in *resource.DeviceClass, out *v1alpha3.DeviceClass, s conversion.Scope) error { + out.ObjectMeta = in.ObjectMeta + if err := Convert_resource_DeviceClassSpec_To_v1alpha3_DeviceClassSpec(&in.Spec, &out.Spec, s); err != nil { + return err + } return nil } -// Convert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult is an autogenerated conversion function. -func Convert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(in *resource.NamedResourcesAllocationResult, out *v1alpha3.NamedResourcesAllocationResult, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesAllocationResult_To_v1alpha3_NamedResourcesAllocationResult(in, out, s) +// Convert_resource_DeviceClass_To_v1alpha3_DeviceClass is an autogenerated conversion function. +func Convert_resource_DeviceClass_To_v1alpha3_DeviceClass(in *resource.DeviceClass, out *v1alpha3.DeviceClass, s conversion.Scope) error { + return autoConvert_resource_DeviceClass_To_v1alpha3_DeviceClass(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in *v1alpha3.NamedResourcesAttribute, out *resource.NamedResourcesAttribute, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(&in.NamedResourcesAttributeValue, &out.NamedResourcesAttributeValue, s); err != nil { +func autoConvert_v1alpha3_DeviceClassConfiguration_To_resource_DeviceClassConfiguration(in *v1alpha3.DeviceClassConfiguration, out *resource.DeviceClassConfiguration, s conversion.Scope) error { + if err := Convert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration(&in.DeviceConfiguration, &out.DeviceConfiguration, s); err != nil { return err } return nil } -// Convert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in *v1alpha3.NamedResourcesAttribute, out *resource.NamedResourcesAttribute, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesAttribute_To_resource_NamedResourcesAttribute(in, out, s) +// Convert_v1alpha3_DeviceClassConfiguration_To_resource_DeviceClassConfiguration is an autogenerated conversion function. +func Convert_v1alpha3_DeviceClassConfiguration_To_resource_DeviceClassConfiguration(in *v1alpha3.DeviceClassConfiguration, out *resource.DeviceClassConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceClassConfiguration_To_resource_DeviceClassConfiguration(in, out, s) } -func autoConvert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(in *resource.NamedResourcesAttribute, out *v1alpha3.NamedResourcesAttribute, s conversion.Scope) error { - out.Name = in.Name - if err := Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(&in.NamedResourcesAttributeValue, &out.NamedResourcesAttributeValue, s); err != nil { +func autoConvert_resource_DeviceClassConfiguration_To_v1alpha3_DeviceClassConfiguration(in *resource.DeviceClassConfiguration, out *v1alpha3.DeviceClassConfiguration, s conversion.Scope) error { + if err := Convert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration(&in.DeviceConfiguration, &out.DeviceConfiguration, s); err != nil { return err } return nil } -// Convert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute is an autogenerated conversion function. -func Convert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(in *resource.NamedResourcesAttribute, out *v1alpha3.NamedResourcesAttribute, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesAttribute_To_v1alpha3_NamedResourcesAttribute(in, out, s) +// Convert_resource_DeviceClassConfiguration_To_v1alpha3_DeviceClassConfiguration is an autogenerated conversion function. +func Convert_resource_DeviceClassConfiguration_To_v1alpha3_DeviceClassConfiguration(in *resource.DeviceClassConfiguration, out *v1alpha3.DeviceClassConfiguration, s conversion.Scope) error { + return autoConvert_resource_DeviceClassConfiguration_To_v1alpha3_DeviceClassConfiguration(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in *v1alpha3.NamedResourcesAttributeValue, out *resource.NamedResourcesAttributeValue, s conversion.Scope) error { - out.QuantityValue = (*apiresource.Quantity)(unsafe.Pointer(in.QuantityValue)) - out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) - out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) - out.IntSliceValue = (*resource.NamedResourcesIntSlice)(unsafe.Pointer(in.IntSliceValue)) - out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) - out.StringSliceValue = (*resource.NamedResourcesStringSlice)(unsafe.Pointer(in.StringSliceValue)) - out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) +func autoConvert_v1alpha3_DeviceClassList_To_resource_DeviceClassList(in *v1alpha3.DeviceClassList, out *resource.DeviceClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]resource.DeviceClass)(unsafe.Pointer(&in.Items)) return nil } -// Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in *v1alpha3.NamedResourcesAttributeValue, out *resource.NamedResourcesAttributeValue, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesAttributeValue_To_resource_NamedResourcesAttributeValue(in, out, s) +// Convert_v1alpha3_DeviceClassList_To_resource_DeviceClassList is an autogenerated conversion function. +func Convert_v1alpha3_DeviceClassList_To_resource_DeviceClassList(in *v1alpha3.DeviceClassList, out *resource.DeviceClassList, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceClassList_To_resource_DeviceClassList(in, out, s) } -func autoConvert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(in *resource.NamedResourcesAttributeValue, out *v1alpha3.NamedResourcesAttributeValue, s conversion.Scope) error { - out.QuantityValue = (*apiresource.Quantity)(unsafe.Pointer(in.QuantityValue)) - out.BoolValue = (*bool)(unsafe.Pointer(in.BoolValue)) - out.IntValue = (*int64)(unsafe.Pointer(in.IntValue)) - out.IntSliceValue = (*v1alpha3.NamedResourcesIntSlice)(unsafe.Pointer(in.IntSliceValue)) - out.StringValue = (*string)(unsafe.Pointer(in.StringValue)) - out.StringSliceValue = (*v1alpha3.NamedResourcesStringSlice)(unsafe.Pointer(in.StringSliceValue)) - out.VersionValue = (*string)(unsafe.Pointer(in.VersionValue)) +func autoConvert_resource_DeviceClassList_To_v1alpha3_DeviceClassList(in *resource.DeviceClassList, out *v1alpha3.DeviceClassList, s conversion.Scope) error { + out.ListMeta = in.ListMeta + out.Items = *(*[]v1alpha3.DeviceClass)(unsafe.Pointer(&in.Items)) return nil } -// Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue is an autogenerated conversion function. -func Convert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(in *resource.NamedResourcesAttributeValue, out *v1alpha3.NamedResourcesAttributeValue, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesAttributeValue_To_v1alpha3_NamedResourcesAttributeValue(in, out, s) +// Convert_resource_DeviceClassList_To_v1alpha3_DeviceClassList is an autogenerated conversion function. +func Convert_resource_DeviceClassList_To_v1alpha3_DeviceClassList(in *resource.DeviceClassList, out *v1alpha3.DeviceClassList, s conversion.Scope) error { + return autoConvert_resource_DeviceClassList_To_v1alpha3_DeviceClassList(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(in *v1alpha3.NamedResourcesFilter, out *resource.NamedResourcesFilter, s conversion.Scope) error { - out.Selector = in.Selector +func autoConvert_v1alpha3_DeviceClassSpec_To_resource_DeviceClassSpec(in *v1alpha3.DeviceClassSpec, out *resource.DeviceClassSpec, s conversion.Scope) error { + out.Selectors = *(*[]resource.DeviceSelector)(unsafe.Pointer(&in.Selectors)) + out.Config = *(*[]resource.DeviceClassConfiguration)(unsafe.Pointer(&in.Config)) + out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) return nil } -// Convert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(in *v1alpha3.NamedResourcesFilter, out *resource.NamedResourcesFilter, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesFilter_To_resource_NamedResourcesFilter(in, out, s) +// Convert_v1alpha3_DeviceClassSpec_To_resource_DeviceClassSpec is an autogenerated conversion function. +func Convert_v1alpha3_DeviceClassSpec_To_resource_DeviceClassSpec(in *v1alpha3.DeviceClassSpec, out *resource.DeviceClassSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceClassSpec_To_resource_DeviceClassSpec(in, out, s) } -func autoConvert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(in *resource.NamedResourcesFilter, out *v1alpha3.NamedResourcesFilter, s conversion.Scope) error { - out.Selector = in.Selector +func autoConvert_resource_DeviceClassSpec_To_v1alpha3_DeviceClassSpec(in *resource.DeviceClassSpec, out *v1alpha3.DeviceClassSpec, s conversion.Scope) error { + out.Selectors = *(*[]v1alpha3.DeviceSelector)(unsafe.Pointer(&in.Selectors)) + out.Config = *(*[]v1alpha3.DeviceClassConfiguration)(unsafe.Pointer(&in.Config)) + out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) return nil } -// Convert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter is an autogenerated conversion function. -func Convert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(in *resource.NamedResourcesFilter, out *v1alpha3.NamedResourcesFilter, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesFilter_To_v1alpha3_NamedResourcesFilter(in, out, s) +// Convert_resource_DeviceClassSpec_To_v1alpha3_DeviceClassSpec is an autogenerated conversion function. +func Convert_resource_DeviceClassSpec_To_v1alpha3_DeviceClassSpec(in *resource.DeviceClassSpec, out *v1alpha3.DeviceClassSpec, s conversion.Scope) error { + return autoConvert_resource_DeviceClassSpec_To_v1alpha3_DeviceClassSpec(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(in *v1alpha3.NamedResourcesInstance, out *resource.NamedResourcesInstance, s conversion.Scope) error { - out.Name = in.Name - out.Attributes = *(*[]resource.NamedResourcesAttribute)(unsafe.Pointer(&in.Attributes)) +func autoConvert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration(in *v1alpha3.DeviceConfiguration, out *resource.DeviceConfiguration, s conversion.Scope) error { + out.Opaque = (*resource.OpaqueDeviceConfiguration)(unsafe.Pointer(in.Opaque)) return nil } -// Convert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(in *v1alpha3.NamedResourcesInstance, out *resource.NamedResourcesInstance, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesInstance_To_resource_NamedResourcesInstance(in, out, s) +// Convert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration is an autogenerated conversion function. +func Convert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration(in *v1alpha3.DeviceConfiguration, out *resource.DeviceConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceConfiguration_To_resource_DeviceConfiguration(in, out, s) } -func autoConvert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(in *resource.NamedResourcesInstance, out *v1alpha3.NamedResourcesInstance, s conversion.Scope) error { - out.Name = in.Name - out.Attributes = *(*[]v1alpha3.NamedResourcesAttribute)(unsafe.Pointer(&in.Attributes)) +func autoConvert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration(in *resource.DeviceConfiguration, out *v1alpha3.DeviceConfiguration, s conversion.Scope) error { + out.Opaque = (*v1alpha3.OpaqueDeviceConfiguration)(unsafe.Pointer(in.Opaque)) + return nil +} + +// Convert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration is an autogenerated conversion function. +func Convert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration(in *resource.DeviceConfiguration, out *v1alpha3.DeviceConfiguration, s conversion.Scope) error { + return autoConvert_resource_DeviceConfiguration_To_v1alpha3_DeviceConfiguration(in, out, s) +} + +func autoConvert_v1alpha3_DeviceConstraint_To_resource_DeviceConstraint(in *v1alpha3.DeviceConstraint, out *resource.DeviceConstraint, s conversion.Scope) error { + out.Requests = *(*[]string)(unsafe.Pointer(&in.Requests)) + out.MatchAttribute = (*resource.FullyQualifiedName)(unsafe.Pointer(in.MatchAttribute)) + return nil +} + +// Convert_v1alpha3_DeviceConstraint_To_resource_DeviceConstraint is an autogenerated conversion function. +func Convert_v1alpha3_DeviceConstraint_To_resource_DeviceConstraint(in *v1alpha3.DeviceConstraint, out *resource.DeviceConstraint, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceConstraint_To_resource_DeviceConstraint(in, out, s) +} + +func autoConvert_resource_DeviceConstraint_To_v1alpha3_DeviceConstraint(in *resource.DeviceConstraint, out *v1alpha3.DeviceConstraint, s conversion.Scope) error { + out.Requests = *(*[]string)(unsafe.Pointer(&in.Requests)) + out.MatchAttribute = (*v1alpha3.FullyQualifiedName)(unsafe.Pointer(in.MatchAttribute)) return nil } -// Convert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance is an autogenerated conversion function. -func Convert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(in *resource.NamedResourcesInstance, out *v1alpha3.NamedResourcesInstance, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesInstance_To_v1alpha3_NamedResourcesInstance(in, out, s) +// Convert_resource_DeviceConstraint_To_v1alpha3_DeviceConstraint is an autogenerated conversion function. +func Convert_resource_DeviceConstraint_To_v1alpha3_DeviceConstraint(in *resource.DeviceConstraint, out *v1alpha3.DeviceConstraint, s conversion.Scope) error { + return autoConvert_resource_DeviceConstraint_To_v1alpha3_DeviceConstraint(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in *v1alpha3.NamedResourcesIntSlice, out *resource.NamedResourcesIntSlice, s conversion.Scope) error { - out.Ints = *(*[]int64)(unsafe.Pointer(&in.Ints)) +func autoConvert_v1alpha3_DeviceRequest_To_resource_DeviceRequest(in *v1alpha3.DeviceRequest, out *resource.DeviceRequest, s conversion.Scope) error { + out.Name = in.Name + out.DeviceClassName = in.DeviceClassName + out.Selectors = *(*[]resource.DeviceSelector)(unsafe.Pointer(&in.Selectors)) + out.CountMode = resource.DeviceCountMode(in.CountMode) + out.Count = in.Count + out.AdminAccess = in.AdminAccess return nil } -// Convert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in *v1alpha3.NamedResourcesIntSlice, out *resource.NamedResourcesIntSlice, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesIntSlice_To_resource_NamedResourcesIntSlice(in, out, s) +// Convert_v1alpha3_DeviceRequest_To_resource_DeviceRequest is an autogenerated conversion function. +func Convert_v1alpha3_DeviceRequest_To_resource_DeviceRequest(in *v1alpha3.DeviceRequest, out *resource.DeviceRequest, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceRequest_To_resource_DeviceRequest(in, out, s) } -func autoConvert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(in *resource.NamedResourcesIntSlice, out *v1alpha3.NamedResourcesIntSlice, s conversion.Scope) error { - out.Ints = *(*[]int64)(unsafe.Pointer(&in.Ints)) +func autoConvert_resource_DeviceRequest_To_v1alpha3_DeviceRequest(in *resource.DeviceRequest, out *v1alpha3.DeviceRequest, s conversion.Scope) error { + out.Name = in.Name + out.DeviceClassName = in.DeviceClassName + out.Selectors = *(*[]v1alpha3.DeviceSelector)(unsafe.Pointer(&in.Selectors)) + out.CountMode = v1alpha3.DeviceCountMode(in.CountMode) + out.Count = in.Count + out.AdminAccess = in.AdminAccess return nil } -// Convert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice is an autogenerated conversion function. -func Convert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(in *resource.NamedResourcesIntSlice, out *v1alpha3.NamedResourcesIntSlice, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesIntSlice_To_v1alpha3_NamedResourcesIntSlice(in, out, s) +// Convert_resource_DeviceRequest_To_v1alpha3_DeviceRequest is an autogenerated conversion function. +func Convert_resource_DeviceRequest_To_v1alpha3_DeviceRequest(in *resource.DeviceRequest, out *v1alpha3.DeviceRequest, s conversion.Scope) error { + return autoConvert_resource_DeviceRequest_To_v1alpha3_DeviceRequest(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(in *v1alpha3.NamedResourcesRequest, out *resource.NamedResourcesRequest, s conversion.Scope) error { - out.Selector = in.Selector +func autoConvert_v1alpha3_DeviceRequestAllocationResult_To_resource_DeviceRequestAllocationResult(in *v1alpha3.DeviceRequestAllocationResult, out *resource.DeviceRequestAllocationResult, s conversion.Scope) error { + out.Request = in.Request + out.Driver = in.Driver + out.Pool = in.Pool + out.Device = in.Device return nil } -// Convert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(in *v1alpha3.NamedResourcesRequest, out *resource.NamedResourcesRequest, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesRequest_To_resource_NamedResourcesRequest(in, out, s) +// Convert_v1alpha3_DeviceRequestAllocationResult_To_resource_DeviceRequestAllocationResult is an autogenerated conversion function. +func Convert_v1alpha3_DeviceRequestAllocationResult_To_resource_DeviceRequestAllocationResult(in *v1alpha3.DeviceRequestAllocationResult, out *resource.DeviceRequestAllocationResult, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceRequestAllocationResult_To_resource_DeviceRequestAllocationResult(in, out, s) } -func autoConvert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(in *resource.NamedResourcesRequest, out *v1alpha3.NamedResourcesRequest, s conversion.Scope) error { - out.Selector = in.Selector +func autoConvert_resource_DeviceRequestAllocationResult_To_v1alpha3_DeviceRequestAllocationResult(in *resource.DeviceRequestAllocationResult, out *v1alpha3.DeviceRequestAllocationResult, s conversion.Scope) error { + out.Request = in.Request + out.Driver = in.Driver + out.Pool = in.Pool + out.Device = in.Device return nil } -// Convert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest is an autogenerated conversion function. -func Convert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(in *resource.NamedResourcesRequest, out *v1alpha3.NamedResourcesRequest, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesRequest_To_v1alpha3_NamedResourcesRequest(in, out, s) +// Convert_resource_DeviceRequestAllocationResult_To_v1alpha3_DeviceRequestAllocationResult is an autogenerated conversion function. +func Convert_resource_DeviceRequestAllocationResult_To_v1alpha3_DeviceRequestAllocationResult(in *resource.DeviceRequestAllocationResult, out *v1alpha3.DeviceRequestAllocationResult, s conversion.Scope) error { + return autoConvert_resource_DeviceRequestAllocationResult_To_v1alpha3_DeviceRequestAllocationResult(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(in *v1alpha3.NamedResourcesResources, out *resource.NamedResourcesResources, s conversion.Scope) error { - out.Instances = *(*[]resource.NamedResourcesInstance)(unsafe.Pointer(&in.Instances)) +func autoConvert_v1alpha3_DeviceSelector_To_resource_DeviceSelector(in *v1alpha3.DeviceSelector, out *resource.DeviceSelector, s conversion.Scope) error { + out.CEL = (*resource.CELDeviceSelector)(unsafe.Pointer(in.CEL)) return nil } -// Convert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(in *v1alpha3.NamedResourcesResources, out *resource.NamedResourcesResources, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesResources_To_resource_NamedResourcesResources(in, out, s) +// Convert_v1alpha3_DeviceSelector_To_resource_DeviceSelector is an autogenerated conversion function. +func Convert_v1alpha3_DeviceSelector_To_resource_DeviceSelector(in *v1alpha3.DeviceSelector, out *resource.DeviceSelector, s conversion.Scope) error { + return autoConvert_v1alpha3_DeviceSelector_To_resource_DeviceSelector(in, out, s) } -func autoConvert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(in *resource.NamedResourcesResources, out *v1alpha3.NamedResourcesResources, s conversion.Scope) error { - out.Instances = *(*[]v1alpha3.NamedResourcesInstance)(unsafe.Pointer(&in.Instances)) +func autoConvert_resource_DeviceSelector_To_v1alpha3_DeviceSelector(in *resource.DeviceSelector, out *v1alpha3.DeviceSelector, s conversion.Scope) error { + out.CEL = (*v1alpha3.CELDeviceSelector)(unsafe.Pointer(in.CEL)) return nil } -// Convert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources is an autogenerated conversion function. -func Convert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(in *resource.NamedResourcesResources, out *v1alpha3.NamedResourcesResources, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesResources_To_v1alpha3_NamedResourcesResources(in, out, s) +// Convert_resource_DeviceSelector_To_v1alpha3_DeviceSelector is an autogenerated conversion function. +func Convert_resource_DeviceSelector_To_v1alpha3_DeviceSelector(in *resource.DeviceSelector, out *v1alpha3.DeviceSelector, s conversion.Scope) error { + return autoConvert_resource_DeviceSelector_To_v1alpha3_DeviceSelector(in, out, s) } -func autoConvert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in *v1alpha3.NamedResourcesStringSlice, out *resource.NamedResourcesStringSlice, s conversion.Scope) error { - out.Strings = *(*[]string)(unsafe.Pointer(&in.Strings)) +func autoConvert_v1alpha3_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(in *v1alpha3.OpaqueDeviceConfiguration, out *resource.OpaqueDeviceConfiguration, s conversion.Scope) error { + out.Driver = in.Driver + out.Parameters = in.Parameters return nil } -// Convert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice is an autogenerated conversion function. -func Convert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in *v1alpha3.NamedResourcesStringSlice, out *resource.NamedResourcesStringSlice, s conversion.Scope) error { - return autoConvert_v1alpha3_NamedResourcesStringSlice_To_resource_NamedResourcesStringSlice(in, out, s) +// Convert_v1alpha3_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration is an autogenerated conversion function. +func Convert_v1alpha3_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(in *v1alpha3.OpaqueDeviceConfiguration, out *resource.OpaqueDeviceConfiguration, s conversion.Scope) error { + return autoConvert_v1alpha3_OpaqueDeviceConfiguration_To_resource_OpaqueDeviceConfiguration(in, out, s) } -func autoConvert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(in *resource.NamedResourcesStringSlice, out *v1alpha3.NamedResourcesStringSlice, s conversion.Scope) error { - out.Strings = *(*[]string)(unsafe.Pointer(&in.Strings)) +func autoConvert_resource_OpaqueDeviceConfiguration_To_v1alpha3_OpaqueDeviceConfiguration(in *resource.OpaqueDeviceConfiguration, out *v1alpha3.OpaqueDeviceConfiguration, s conversion.Scope) error { + out.Driver = in.Driver + out.Parameters = in.Parameters return nil } -// Convert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice is an autogenerated conversion function. -func Convert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(in *resource.NamedResourcesStringSlice, out *v1alpha3.NamedResourcesStringSlice, s conversion.Scope) error { - return autoConvert_resource_NamedResourcesStringSlice_To_v1alpha3_NamedResourcesStringSlice(in, out, s) +// Convert_resource_OpaqueDeviceConfiguration_To_v1alpha3_OpaqueDeviceConfiguration is an autogenerated conversion function. +func Convert_resource_OpaqueDeviceConfiguration_To_v1alpha3_OpaqueDeviceConfiguration(in *resource.OpaqueDeviceConfiguration, out *v1alpha3.OpaqueDeviceConfiguration, s conversion.Scope) error { + return autoConvert_resource_OpaqueDeviceConfiguration_To_v1alpha3_OpaqueDeviceConfiguration(in, out, s) } func autoConvert_v1alpha3_PodSchedulingContext_To_resource_PodSchedulingContext(in *v1alpha3.PodSchedulingContext, out *resource.PodSchedulingContext, s conversion.Scope) error { @@ -980,17 +1014,7 @@ func Convert_resource_ResourceClaimConsumerReference_To_v1alpha3_ResourceClaimCo func autoConvert_v1alpha3_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha3.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]resource.ResourceClaim, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_ResourceClaim_To_resource_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]resource.ResourceClaim)(unsafe.Pointer(&in.Items)) return nil } @@ -1001,17 +1025,7 @@ func Convert_v1alpha3_ResourceClaimList_To_resource_ResourceClaimList(in *v1alph func autoConvert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha3.ResourceClaimList, s conversion.Scope) error { out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha3.ResourceClaim, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceClaim_To_v1alpha3_ResourceClaim(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } + out.Items = *(*[]v1alpha3.ResourceClaim)(unsafe.Pointer(&in.Items)) return nil } @@ -1020,116 +1034,6 @@ func Convert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList(in *resour return autoConvert_resource_ResourceClaimList_To_v1alpha3_ResourceClaimList(in, out, s) } -func autoConvert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha3.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.DriverRequests != nil { - in, out := &in.DriverRequests, &out.DriverRequests - *out = make([]resource.DriverRequests, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_DriverRequests_To_resource_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.DriverRequests = nil - } - return nil -} - -// Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(in *v1alpha3.ResourceClaimParameters, out *resource.ResourceClaimParameters, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(in, out, s) -} - -func autoConvert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha3.ResourceClaimParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*v1alpha3.ResourceClaimParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.DriverRequests != nil { - in, out := &in.DriverRequests, &out.DriverRequests - *out = make([]v1alpha3.DriverRequests, len(*in)) - for i := range *in { - if err := Convert_resource_DriverRequests_To_v1alpha3_DriverRequests(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.DriverRequests = nil - } - return nil -} - -// Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters is an autogenerated conversion function. -func Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(in *resource.ResourceClaimParameters, out *v1alpha3.ResourceClaimParameters, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(in, out, s) -} - -func autoConvert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha3.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]resource.ResourceClaimParameters, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_ResourceClaimParameters_To_resource_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in *v1alpha3.ResourceClaimParametersList, out *resource.ResourceClaimParametersList, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClaimParametersList_To_resource_ResourceClaimParametersList(in, out, s) -} - -func autoConvert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha3.ResourceClaimParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha3.ResourceClaimParameters, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceClaimParameters_To_v1alpha3_ResourceClaimParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList is an autogenerated conversion function. -func Convert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(in *resource.ResourceClaimParametersList, out *v1alpha3.ResourceClaimParametersList, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimParametersList_To_v1alpha3_ResourceClaimParametersList(in, out, s) -} - -func autoConvert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha3.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name - return nil -} - -// Convert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha3.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in, out, s) -} - -func autoConvert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha3.ResourceClaimParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind - out.Name = in.Name - return nil -} - -// Convert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference is an autogenerated conversion function. -func Convert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha3.ResourceClaimParametersReference, s conversion.Scope) error { - return autoConvert_resource_ResourceClaimParametersReference_To_v1alpha3_ResourceClaimParametersReference(in, out, s) -} - func autoConvert_v1alpha3_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha3.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error { out.Name = in.Name out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes)) @@ -1153,8 +1057,10 @@ func Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha3_ResourceClaimSch } func autoConvert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha3.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error { - out.ResourceClassName = in.ResourceClassName - out.ParametersRef = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) + if err := Convert_v1alpha3_DeviceClaim_To_resource_DeviceClaim(&in.Devices, &out.Devices, s); err != nil { + return err + } + out.Controller = in.Controller return nil } @@ -1164,8 +1070,10 @@ func Convert_v1alpha3_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alph } func autoConvert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha3.ResourceClaimSpec, s conversion.Scope) error { - out.ResourceClassName = in.ResourceClassName - out.ParametersRef = (*v1alpha3.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef)) + if err := Convert_resource_DeviceClaim_To_v1alpha3_DeviceClaim(&in.Devices, &out.Devices, s); err != nil { + return err + } + out.Controller = in.Controller return nil } @@ -1175,16 +1083,7 @@ func Convert_resource_ResourceClaimSpec_To_v1alpha3_ResourceClaimSpec(in *resour } func autoConvert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha3.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error { - out.DriverName = in.DriverName - if in.Allocation != nil { - in, out := &in.Allocation, &out.Allocation - *out = new(resource.AllocationResult) - if err := Convert_v1alpha3_AllocationResult_To_resource_AllocationResult(*in, *out, s); err != nil { - return err - } - } else { - out.Allocation = nil - } + out.Allocation = (*resource.AllocationResult)(unsafe.Pointer(in.Allocation)) out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) out.DeallocationRequested = in.DeallocationRequested return nil @@ -1196,16 +1095,7 @@ func Convert_v1alpha3_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1 } func autoConvert_resource_ResourceClaimStatus_To_v1alpha3_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha3.ResourceClaimStatus, s conversion.Scope) error { - out.DriverName = in.DriverName - if in.Allocation != nil { - in, out := &in.Allocation, &out.Allocation - *out = new(v1alpha3.AllocationResult) - if err := Convert_resource_AllocationResult_To_v1alpha3_AllocationResult(*in, *out, s); err != nil { - return err - } - } else { - out.Allocation = nil - } + out.Allocation = (*v1alpha3.AllocationResult)(unsafe.Pointer(in.Allocation)) out.ReservedFor = *(*[]v1alpha3.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor)) out.DeallocationRequested = in.DeallocationRequested return nil @@ -1290,331 +1180,33 @@ func Convert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplat return autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha3_ResourceClaimTemplateSpec(in, out, s) } -func autoConvert_v1alpha3_ResourceClass_To_resource_ResourceClass(in *v1alpha3.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.DriverName = in.DriverName - out.ParametersRef = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) - out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) - out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) - return nil -} - -// Convert_v1alpha3_ResourceClass_To_resource_ResourceClass is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClass_To_resource_ResourceClass(in *v1alpha3.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClass_To_resource_ResourceClass(in, out, s) -} - -func autoConvert_resource_ResourceClass_To_v1alpha3_ResourceClass(in *resource.ResourceClass, out *v1alpha3.ResourceClass, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.DriverName = in.DriverName - out.ParametersRef = (*v1alpha3.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef)) - out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes)) - out.StructuredParameters = (*bool)(unsafe.Pointer(in.StructuredParameters)) - return nil -} - -// Convert_resource_ResourceClass_To_v1alpha3_ResourceClass is an autogenerated conversion function. -func Convert_resource_ResourceClass_To_v1alpha3_ResourceClass(in *resource.ResourceClass, out *v1alpha3.ResourceClass, s conversion.Scope) error { - return autoConvert_resource_ResourceClass_To_v1alpha3_ResourceClass(in, out, s) -} - -func autoConvert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(in *v1alpha3.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]resource.ResourceClass)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_v1alpha3_ResourceClassList_To_resource_ResourceClassList is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(in *v1alpha3.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClassList_To_resource_ResourceClassList(in, out, s) -} - -func autoConvert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(in *resource.ResourceClassList, out *v1alpha3.ResourceClassList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - out.Items = *(*[]v1alpha3.ResourceClass)(unsafe.Pointer(&in.Items)) - return nil -} - -// Convert_resource_ResourceClassList_To_v1alpha3_ResourceClassList is an autogenerated conversion function. -func Convert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(in *resource.ResourceClassList, out *v1alpha3.ResourceClassList, s conversion.Scope) error { - return autoConvert_resource_ResourceClassList_To_v1alpha3_ResourceClassList(in, out, s) -} - -func autoConvert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha3.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.VendorParameters != nil { - in, out := &in.VendorParameters, &out.VendorParameters - *out = make([]resource.VendorParameters, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_VendorParameters_To_resource_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.VendorParameters = nil - } - out.Filters = *(*[]resource.ResourceFilter)(unsafe.Pointer(&in.Filters)) - return nil -} - -// Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(in *v1alpha3.ResourceClassParameters, out *resource.ResourceClassParameters, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(in, out, s) -} - -func autoConvert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha3.ResourceClassParameters, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - out.GeneratedFrom = (*v1alpha3.ResourceClassParametersReference)(unsafe.Pointer(in.GeneratedFrom)) - if in.VendorParameters != nil { - in, out := &in.VendorParameters, &out.VendorParameters - *out = make([]v1alpha3.VendorParameters, len(*in)) - for i := range *in { - if err := Convert_resource_VendorParameters_To_v1alpha3_VendorParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.VendorParameters = nil - } - out.Filters = *(*[]v1alpha3.ResourceFilter)(unsafe.Pointer(&in.Filters)) - return nil -} - -// Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters is an autogenerated conversion function. -func Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(in *resource.ResourceClassParameters, out *v1alpha3.ResourceClassParameters, s conversion.Scope) error { - return autoConvert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(in, out, s) -} - -func autoConvert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha3.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]resource.ResourceClassParameters, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_ResourceClassParameters_To_resource_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(in *v1alpha3.ResourceClassParametersList, out *resource.ResourceClassParametersList, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClassParametersList_To_resource_ResourceClassParametersList(in, out, s) -} - -func autoConvert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha3.ResourceClassParametersList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]v1alpha3.ResourceClassParameters, len(*in)) - for i := range *in { - if err := Convert_resource_ResourceClassParameters_To_v1alpha3_ResourceClassParameters(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList is an autogenerated conversion function. -func Convert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(in *resource.ResourceClassParametersList, out *v1alpha3.ResourceClassParametersList, s conversion.Scope) error { - return autoConvert_resource_ResourceClassParametersList_To_v1alpha3_ResourceClassParametersList(in, out, s) -} - -func autoConvert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha3.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind +func autoConvert_v1alpha3_ResourcePool_To_resource_ResourcePool(in *v1alpha3.ResourcePool, out *resource.ResourcePool, s conversion.Scope) error { out.Name = in.Name - out.Namespace = in.Namespace + out.Generation = in.Generation + out.ResourceSliceCount = in.ResourceSliceCount return nil } -// Convert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference is an autogenerated conversion function. -func Convert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha3.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in, out, s) +// Convert_v1alpha3_ResourcePool_To_resource_ResourcePool is an autogenerated conversion function. +func Convert_v1alpha3_ResourcePool_To_resource_ResourcePool(in *v1alpha3.ResourcePool, out *resource.ResourcePool, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourcePool_To_resource_ResourcePool(in, out, s) } -func autoConvert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha3.ResourceClassParametersReference, s conversion.Scope) error { - out.APIGroup = in.APIGroup - out.Kind = in.Kind +func autoConvert_resource_ResourcePool_To_v1alpha3_ResourcePool(in *resource.ResourcePool, out *v1alpha3.ResourcePool, s conversion.Scope) error { out.Name = in.Name - out.Namespace = in.Namespace - return nil -} - -// Convert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference is an autogenerated conversion function. -func Convert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha3.ResourceClassParametersReference, s conversion.Scope) error { - return autoConvert_resource_ResourceClassParametersReference_To_v1alpha3_ResourceClassParametersReference(in, out, s) -} - -func autoConvert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(in *v1alpha3.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_ResourceFilter_To_resource_ResourceFilter is an autogenerated conversion function. -func Convert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(in *v1alpha3.ResourceFilter, out *resource.ResourceFilter, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceFilter_To_resource_ResourceFilter(in, out, s) -} - -func autoConvert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(in *resource.ResourceFilter, out *v1alpha3.ResourceFilter, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(&in.ResourceFilterModel, &out.ResourceFilterModel, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceFilter_To_v1alpha3_ResourceFilter is an autogenerated conversion function. -func Convert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(in *resource.ResourceFilter, out *v1alpha3.ResourceFilter, s conversion.Scope) error { - return autoConvert_resource_ResourceFilter_To_v1alpha3_ResourceFilter(in, out, s) -} - -func autoConvert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha3.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesFilter)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel is an autogenerated conversion function. -func Convert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(in *v1alpha3.ResourceFilterModel, out *resource.ResourceFilterModel, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceFilterModel_To_resource_ResourceFilterModel(in, out, s) -} - -func autoConvert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha3.ResourceFilterModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha3.NamedResourcesFilter)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel is an autogenerated conversion function. -func Convert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(in *resource.ResourceFilterModel, out *v1alpha3.ResourceFilterModel, s conversion.Scope) error { - return autoConvert_resource_ResourceFilterModel_To_v1alpha3_ResourceFilterModel(in, out, s) -} - -func autoConvert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(in *v1alpha3.ResourceHandle, out *resource.ResourceHandle, s conversion.Scope) error { - out.DriverName = in.DriverName - out.Data = in.Data - if in.StructuredData != nil { - in, out := &in.StructuredData, &out.StructuredData - *out = new(resource.StructuredResourceHandle) - if err := Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(*in, *out, s); err != nil { - return err - } - } else { - out.StructuredData = nil - } - return nil -} - -// Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle is an autogenerated conversion function. -func Convert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(in *v1alpha3.ResourceHandle, out *resource.ResourceHandle, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceHandle_To_resource_ResourceHandle(in, out, s) -} - -func autoConvert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(in *resource.ResourceHandle, out *v1alpha3.ResourceHandle, s conversion.Scope) error { - out.DriverName = in.DriverName - out.Data = in.Data - if in.StructuredData != nil { - in, out := &in.StructuredData, &out.StructuredData - *out = new(v1alpha3.StructuredResourceHandle) - if err := Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(*in, *out, s); err != nil { - return err - } - } else { - out.StructuredData = nil - } - return nil -} - -// Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle is an autogenerated conversion function. -func Convert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(in *resource.ResourceHandle, out *v1alpha3.ResourceHandle, s conversion.Scope) error { - return autoConvert_resource_ResourceHandle_To_v1alpha3_ResourceHandle(in, out, s) -} - -func autoConvert_v1alpha3_ResourceModel_To_resource_ResourceModel(in *v1alpha3.ResourceModel, out *resource.ResourceModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesResources)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_v1alpha3_ResourceModel_To_resource_ResourceModel is an autogenerated conversion function. -func Convert_v1alpha3_ResourceModel_To_resource_ResourceModel(in *v1alpha3.ResourceModel, out *resource.ResourceModel, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceModel_To_resource_ResourceModel(in, out, s) -} - -func autoConvert_resource_ResourceModel_To_v1alpha3_ResourceModel(in *resource.ResourceModel, out *v1alpha3.ResourceModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha3.NamedResourcesResources)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_resource_ResourceModel_To_v1alpha3_ResourceModel is an autogenerated conversion function. -func Convert_resource_ResourceModel_To_v1alpha3_ResourceModel(in *resource.ResourceModel, out *v1alpha3.ResourceModel, s conversion.Scope) error { - return autoConvert_resource_ResourceModel_To_v1alpha3_ResourceModel(in, out, s) -} - -func autoConvert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(in *v1alpha3.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorParameters, &out.VendorParameters, s); err != nil { - return err - } - if err := Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { - return err - } + out.Generation = in.Generation + out.ResourceSliceCount = in.ResourceSliceCount return nil } -// Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest is an autogenerated conversion function. -func Convert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(in *v1alpha3.ResourceRequest, out *resource.ResourceRequest, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceRequest_To_resource_ResourceRequest(in, out, s) -} - -func autoConvert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(in *resource.ResourceRequest, out *v1alpha3.ResourceRequest, s conversion.Scope) error { - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorParameters, &out.VendorParameters, s); err != nil { - return err - } - if err := Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(&in.ResourceRequestModel, &out.ResourceRequestModel, s); err != nil { - return err - } - return nil -} - -// Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest is an autogenerated conversion function. -func Convert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(in *resource.ResourceRequest, out *v1alpha3.ResourceRequest, s conversion.Scope) error { - return autoConvert_resource_ResourceRequest_To_v1alpha3_ResourceRequest(in, out, s) -} - -func autoConvert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha3.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { - out.NamedResources = (*resource.NamedResourcesRequest)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel is an autogenerated conversion function. -func Convert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(in *v1alpha3.ResourceRequestModel, out *resource.ResourceRequestModel, s conversion.Scope) error { - return autoConvert_v1alpha3_ResourceRequestModel_To_resource_ResourceRequestModel(in, out, s) -} - -func autoConvert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha3.ResourceRequestModel, s conversion.Scope) error { - out.NamedResources = (*v1alpha3.NamedResourcesRequest)(unsafe.Pointer(in.NamedResources)) - return nil -} - -// Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel is an autogenerated conversion function. -func Convert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(in *resource.ResourceRequestModel, out *v1alpha3.ResourceRequestModel, s conversion.Scope) error { - return autoConvert_resource_ResourceRequestModel_To_v1alpha3_ResourceRequestModel(in, out, s) +// Convert_resource_ResourcePool_To_v1alpha3_ResourcePool is an autogenerated conversion function. +func Convert_resource_ResourcePool_To_v1alpha3_ResourcePool(in *resource.ResourcePool, out *v1alpha3.ResourcePool, s conversion.Scope) error { + return autoConvert_resource_ResourcePool_To_v1alpha3_ResourcePool(in, out, s) } func autoConvert_v1alpha3_ResourceSlice_To_resource_ResourceSlice(in *v1alpha3.ResourceSlice, out *resource.ResourceSlice, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - out.NodeName = in.NodeName - out.DriverName = in.DriverName - if err := Convert_v1alpha3_ResourceModel_To_resource_ResourceModel(&in.ResourceModel, &out.ResourceModel, s); err != nil { + if err := Convert_v1alpha3_ResourceSliceSpec_To_resource_ResourceSliceSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil @@ -1627,9 +1219,7 @@ func Convert_v1alpha3_ResourceSlice_To_resource_ResourceSlice(in *v1alpha3.Resou func autoConvert_resource_ResourceSlice_To_v1alpha3_ResourceSlice(in *resource.ResourceSlice, out *v1alpha3.ResourceSlice, s conversion.Scope) error { out.ObjectMeta = in.ObjectMeta - out.NodeName = in.NodeName - out.DriverName = in.DriverName - if err := Convert_resource_ResourceModel_To_v1alpha3_ResourceModel(&in.ResourceModel, &out.ResourceModel, s); err != nil { + if err := Convert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(&in.Spec, &out.Spec, s); err != nil { return err } return nil @@ -1662,82 +1252,36 @@ func Convert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(in *resour return autoConvert_resource_ResourceSliceList_To_v1alpha3_ResourceSliceList(in, out, s) } -func autoConvert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha3.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { - return err - } - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { +func autoConvert_v1alpha3_ResourceSliceSpec_To_resource_ResourceSliceSpec(in *v1alpha3.ResourceSliceSpec, out *resource.ResourceSliceSpec, s conversion.Scope) error { + out.Driver = in.Driver + if err := Convert_v1alpha3_ResourcePool_To_resource_ResourcePool(&in.Pool, &out.Pool, s); err != nil { return err } out.NodeName = in.NodeName - if in.Results != nil { - in, out := &in.Results, &out.Results - *out = make([]resource.DriverAllocationResult, len(*in)) - for i := range *in { - if err := Convert_v1alpha3_DriverAllocationResult_To_resource_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Results = nil - } + out.NodeSelector = (*core.NodeSelector)(unsafe.Pointer(in.NodeSelector)) + out.AllNodes = in.AllNodes + out.Devices = *(*[]resource.Device)(unsafe.Pointer(&in.Devices)) return nil } -// Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle is an autogenerated conversion function. -func Convert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(in *v1alpha3.StructuredResourceHandle, out *resource.StructuredResourceHandle, s conversion.Scope) error { - return autoConvert_v1alpha3_StructuredResourceHandle_To_resource_StructuredResourceHandle(in, out, s) +// Convert_v1alpha3_ResourceSliceSpec_To_resource_ResourceSliceSpec is an autogenerated conversion function. +func Convert_v1alpha3_ResourceSliceSpec_To_resource_ResourceSliceSpec(in *v1alpha3.ResourceSliceSpec, out *resource.ResourceSliceSpec, s conversion.Scope) error { + return autoConvert_v1alpha3_ResourceSliceSpec_To_resource_ResourceSliceSpec(in, out, s) } -func autoConvert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha3.StructuredResourceHandle, s conversion.Scope) error { - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClassParameters, &out.VendorClassParameters, s); err != nil { - return err - } - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.VendorClaimParameters, &out.VendorClaimParameters, s); err != nil { +func autoConvert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(in *resource.ResourceSliceSpec, out *v1alpha3.ResourceSliceSpec, s conversion.Scope) error { + out.Driver = in.Driver + if err := Convert_resource_ResourcePool_To_v1alpha3_ResourcePool(&in.Pool, &out.Pool, s); err != nil { return err } out.NodeName = in.NodeName - if in.Results != nil { - in, out := &in.Results, &out.Results - *out = make([]v1alpha3.DriverAllocationResult, len(*in)) - for i := range *in { - if err := Convert_resource_DriverAllocationResult_To_v1alpha3_DriverAllocationResult(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Results = nil - } - return nil -} - -// Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle is an autogenerated conversion function. -func Convert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(in *resource.StructuredResourceHandle, out *v1alpha3.StructuredResourceHandle, s conversion.Scope) error { - return autoConvert_resource_StructuredResourceHandle_To_v1alpha3_StructuredResourceHandle(in, out, s) -} - -func autoConvert_v1alpha3_VendorParameters_To_resource_VendorParameters(in *v1alpha3.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_RawExtension_To_runtime_Object(&in.Parameters, &out.Parameters, s); err != nil { - return err - } - return nil -} - -// Convert_v1alpha3_VendorParameters_To_resource_VendorParameters is an autogenerated conversion function. -func Convert_v1alpha3_VendorParameters_To_resource_VendorParameters(in *v1alpha3.VendorParameters, out *resource.VendorParameters, s conversion.Scope) error { - return autoConvert_v1alpha3_VendorParameters_To_resource_VendorParameters(in, out, s) -} - -func autoConvert_resource_VendorParameters_To_v1alpha3_VendorParameters(in *resource.VendorParameters, out *v1alpha3.VendorParameters, s conversion.Scope) error { - out.DriverName = in.DriverName - if err := runtime.Convert_runtime_Object_To_runtime_RawExtension(&in.Parameters, &out.Parameters, s); err != nil { - return err - } + out.NodeSelector = (*v1.NodeSelector)(unsafe.Pointer(in.NodeSelector)) + out.AllNodes = in.AllNodes + out.Devices = *(*[]v1alpha3.Device)(unsafe.Pointer(&in.Devices)) return nil } -// Convert_resource_VendorParameters_To_v1alpha3_VendorParameters is an autogenerated conversion function. -func Convert_resource_VendorParameters_To_v1alpha3_VendorParameters(in *resource.VendorParameters, out *v1alpha3.VendorParameters, s conversion.Scope) error { - return autoConvert_resource_VendorParameters_To_v1alpha3_VendorParameters(in, out, s) +// Convert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec is an autogenerated conversion function. +func Convert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(in *resource.ResourceSliceSpec, out *v1alpha3.ResourceSliceSpec, s conversion.Scope) error { + return autoConvert_resource_ResourceSliceSpec_To_v1alpha3_ResourceSliceSpec(in, out, s) } diff --git a/pkg/apis/resource/v1alpha3/zz_generated.defaults.go b/pkg/apis/resource/v1alpha3/zz_generated.defaults.go index 8b3ec1e1c4aa6..e5386fbc9216e 100644 --- a/pkg/apis/resource/v1alpha3/zz_generated.defaults.go +++ b/pkg/apis/resource/v1alpha3/zz_generated.defaults.go @@ -22,6 +22,7 @@ limitations under the License. package v1alpha3 import ( + v1alpha3 "k8s.io/api/resource/v1alpha3" runtime "k8s.io/apimachinery/pkg/runtime" ) @@ -29,5 +30,39 @@ import ( // Public to allow building arbitrary schemes. // All generated defaulters are covering - they call all nested defaulters. func RegisterDefaults(scheme *runtime.Scheme) error { + scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*v1alpha3.ResourceClaim)) }) + scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*v1alpha3.ResourceClaimList)) }) + scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaimTemplate{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimTemplate(obj.(*v1alpha3.ResourceClaimTemplate)) }) + scheme.AddTypeDefaultingFunc(&v1alpha3.ResourceClaimTemplateList{}, func(obj interface{}) { + SetObjectDefaults_ResourceClaimTemplateList(obj.(*v1alpha3.ResourceClaimTemplateList)) + }) return nil } + +func SetObjectDefaults_ResourceClaim(in *v1alpha3.ResourceClaim) { + for i := range in.Spec.Devices.Requests { + a := &in.Spec.Devices.Requests[i] + SetDefaults_DeviceRequest(a) + } +} + +func SetObjectDefaults_ResourceClaimList(in *v1alpha3.ResourceClaimList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ResourceClaim(a) + } +} + +func SetObjectDefaults_ResourceClaimTemplate(in *v1alpha3.ResourceClaimTemplate) { + for i := range in.Spec.Spec.Devices.Requests { + a := &in.Spec.Spec.Devices.Requests[i] + SetDefaults_DeviceRequest(a) + } +} + +func SetObjectDefaults_ResourceClaimTemplateList(in *v1alpha3.ResourceClaimTemplateList) { + for i := range in.Items { + a := &in.Items[i] + SetObjectDefaults_ResourceClaimTemplate(a) + } +} diff --git a/pkg/apis/resource/validation/validation.go b/pkg/apis/resource/validation/validation.go index e1c9f6430f5e1..f49e60f8ff808 100644 --- a/pkg/apis/resource/validation/validation.go +++ b/pkg/apis/resource/validation/validation.go @@ -17,164 +17,264 @@ limitations under the License. package validation import ( + "encoding/json" + "errors" + "fmt" + "regexp" + "strings" + apiequality "k8s.io/apimachinery/pkg/api/equality" + apiresource "k8s.io/apimachinery/pkg/api/resource" apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" - pathvalidation "k8s.io/apimachinery/pkg/api/validation/path" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" - utilvalidation "k8s.io/apimachinery/pkg/util/validation" + "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/cel" + "k8s.io/apiserver/pkg/cel/environment" + dracel "k8s.io/dynamic-resource-allocation/cel" corevalidation "k8s.io/kubernetes/pkg/apis/core/validation" "k8s.io/kubernetes/pkg/apis/resource" - namedresourcesvalidation "k8s.io/kubernetes/pkg/apis/resource/structured/namedresources/validation" ) -// validateResourceDriverName reuses the validation of a CSI driver because -// the allowed values are exactly the same. -var validateResourceDriverName = corevalidation.ValidateCSIDriverName +var ( + // validateResourceDriverName reuses the validation of a CSI driver because + // the allowed values are exactly the same. + validateDriverName = corevalidation.ValidateCSIDriverName + validateDeviceName = corevalidation.ValidateDNS1123Subdomain + validateDeviceClassName = corevalidation.ValidateDNS1123Subdomain + validateRequestName = corevalidation.ValidateDNS1123Label +) -// ValidateClaim validates a ResourceClaim. -func ValidateClaim(resourceClaim *resource.ResourceClaim) field.ErrorList { - allErrs := corevalidation.ValidateObjectMeta(&resourceClaim.ObjectMeta, true, corevalidation.ValidateResourceClaimName, field.NewPath("metadata")) - allErrs = append(allErrs, validateResourceClaimSpec(&resourceClaim.Spec, field.NewPath("spec"))...) +func validatePoolName(name string, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + if name == "" { + allErrs = append(allErrs, field.Required(fldPath, "")) + } else { + if len(name) > resource.PoolNameMaxLength { + allErrs = append(allErrs, field.TooLongMaxLength(fldPath, name, resource.PoolNameMaxLength)) + } + parts := strings.Split(name, "/") + for i, part := range parts { + idxPath := fldPath + if len(parts) > 1 { + idxPath = idxPath.Index(i) + } + allErrs = append(allErrs, corevalidation.ValidateDNS1123Subdomain(part, idxPath)...) + } + } return allErrs } -func validateResourceClaimSpec(spec *resource.ResourceClaimSpec, fldPath *field.Path) field.ErrorList { - allErrs := field.ErrorList{} - for _, msg := range corevalidation.ValidateClassName(spec.ResourceClassName, false) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceClassName"), spec.ResourceClassName, msg)) - } - allErrs = append(allErrs, validateResourceClaimParametersRef(spec.ParametersRef, fldPath.Child("parametersRef"))...) +// ValidateResourceClaim validates a ResourceClaim. +func ValidateResourceClaim(resourceClaim *resource.ResourceClaim) field.ErrorList { + allErrs := corevalidation.ValidateObjectMeta(&resourceClaim.ObjectMeta, true, corevalidation.ValidateResourceClaimName, field.NewPath("metadata")) + allErrs = append(allErrs, validateResourceClaimSpec(&resourceClaim.Spec, field.NewPath("spec"), false)...) return allErrs } -// It would have been nice to use Go generics to reuse the same validation -// function for Kind and Name in both types, but generics cannot be used to -// access common fields in structs. - -func validateResourceClaimParametersRef(ref *resource.ResourceClaimParametersReference, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList +// ValidateResourceClaimUpdate tests if an update to ResourceClaim is valid. +func ValidateResourceClaimUpdate(resourceClaim, oldClaim *resource.ResourceClaim) field.ErrorList { + allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClaim.ObjectMeta, &oldClaim.ObjectMeta, field.NewPath("metadata")) + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(resourceClaim.Spec, oldClaim.Spec, field.NewPath("spec"))...) + // Because the spec is immutable, all CEL expressions in it must have been stored. + // If the user tries an update, this is not true and checking is less strict, but + // as there are errors, it doesn't matter. + allErrs = append(allErrs, validateResourceClaimSpec(&resourceClaim.Spec, field.NewPath("spec"), true)...) + return allErrs +} - if ref == nil { - return allErrs - } +// ValidateResourceClaimStatusUpdate tests if an update to the status of a ResourceClaim is valid. +func ValidateResourceClaimStatusUpdate(resourceClaim, oldClaim *resource.ResourceClaim) field.ErrorList { + allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClaim.ObjectMeta, &oldClaim.ObjectMeta, field.NewPath("metadata")) + requestNames := gatherRequestNames(&resourceClaim.Spec.Devices) + allErrs = append(allErrs, validateResourceClaimStatusUpdate(&resourceClaim.Status, &oldClaim.Status, resourceClaim.DeletionTimestamp != nil, requestNames, field.NewPath("status"))...) + return allErrs +} - // group is required but the Core group is the empty value, so it can not be enforced. - if ref.APIGroup != "" { - for _, msg := range utilvalidation.IsDNS1123Subdomain(ref.APIGroup) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("apiGroup"), ref.APIGroup, msg)) - } +func validateResourceClaimSpec(spec *resource.ResourceClaimSpec, fldPath *field.Path, stored bool) field.ErrorList { + allErrs := field.ErrorList{} + allErrs = append(allErrs, validateDeviceClaim(&spec.Devices, fldPath.Child("devices"), stored)...) + if spec.Controller != "" { + allErrs = append(allErrs, validateDriverName(spec.Controller, fldPath.Child("controller"))...) } + return allErrs +} - if ref.Kind == "" { - allErrs = append(allErrs, field.Required(fldPath.Child("kind"), "")) +func validateDeviceClaim(deviceClaim *resource.DeviceClaim, fldPath *field.Path, stored bool) field.ErrorList { + allErrs := field.ErrorList{} + requestNames := gatherRequestNames(deviceClaim) + allErrs = append(allErrs, validateSet(deviceClaim.Requests, resource.DeviceRequestsMaxSize, + func(request resource.DeviceRequest, fldPath *field.Path) field.ErrorList { + return validateDeviceRequest(request, fldPath, stored) + }, + func(request resource.DeviceRequest) (string, string) { + return request.Name, "name" + }, + fldPath.Child("requests"))...) + allErrs = append(allErrs, validateSlice(deviceClaim.Constraints, resource.DeviceConstraintsMaxSize, + func(constraint resource.DeviceConstraint, fldPath *field.Path) field.ErrorList { + return validateDeviceConstraint(constraint, fldPath, requestNames) + }, fldPath.Child("constraints"))...) + allErrs = append(allErrs, validateSlice(deviceClaim.Config, resource.DeviceConfigMaxSize, + func(config resource.DeviceClaimConfiguration, fldPath *field.Path) field.ErrorList { + return validateDeviceClaimConfiguration(config, fldPath, requestNames) + }, fldPath.Child("config"))...) + return allErrs +} + +func gatherRequestNames(deviceClaim *resource.DeviceClaim) sets.Set[string] { + requestNames := sets.New[string]() + for _, request := range deviceClaim.Requests { + requestNames.Insert(request.Name) + } + return requestNames +} + +func validateDeviceRequest(request resource.DeviceRequest, fldPath *field.Path, stored bool) field.ErrorList { + allErrs := validateRequestName(request.Name, fldPath.Child("name")) + if request.DeviceClassName == "" { + allErrs = append(allErrs, field.Required(fldPath.Child("deviceClassName"), "")) } else { - for _, msg := range pathvalidation.IsValidPathSegmentName(ref.Kind) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("kind"), ref.Kind, msg)) + allErrs = append(allErrs, validateDeviceClassName(request.DeviceClassName, fldPath.Child("deviceClassName"))...) + } + allErrs = append(allErrs, validateSlice(request.Selectors, resource.DeviceSelectorsMaxSize, + func(selector resource.DeviceSelector, fldPath *field.Path) field.ErrorList { + return validateSelector(selector, fldPath, stored) + }, + fldPath.Child("selectors"))...) + switch request.CountMode { + case resource.DeviceCountModeAll: + if request.Count != 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("count"), request.Count, "a non-zero count is not valid for countMode="+string(request.CountMode))) } + case resource.DeviceCountModeExact: + if request.Count <= 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("count"), request.Count, "must be greater than zero")) + } + default: + allErrs = append(allErrs, field.Invalid(fldPath.Child("countMode"), request.Count, fmt.Sprintf("must be one of: %s", strings.Join([]string{string(resource.DeviceCountModeAll), string(resource.DeviceCountModeExact)}, ", ")))) } + return allErrs +} - if ref.Name == "" { - allErrs = append(allErrs, field.Required(fldPath.Child("name"), "")) +func validateSelector(selector resource.DeviceSelector, fldPath *field.Path, stored bool) field.ErrorList { + var allErrs field.ErrorList + if selector.CEL == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("cel"), "")) } else { - for _, msg := range pathvalidation.IsValidPathSegmentName(ref.Name) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), ref.Name, msg)) - } + allErrs = append(allErrs, validateCELSelector(*selector.CEL, fldPath.Child("cel"), stored)...) } return allErrs } -func validateClassParameters(ref *resource.ResourceClassParametersReference, fldPath *field.Path) field.ErrorList { +func validateCELSelector(celSelector resource.CELDeviceSelector, fldPath *field.Path, stored bool) field.ErrorList { var allErrs field.ErrorList - - if ref == nil { - return allErrs + envType := environment.NewExpressions + if stored { + envType = environment.StoredExpressions } - - // group is required but the Core group is the empty value, so it can not be enforced. - if ref.APIGroup != "" { - for _, msg := range utilvalidation.IsDNS1123Subdomain(ref.APIGroup) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("apiGroup"), ref.APIGroup, msg)) - } + result := dracel.Compiler.CompileCELExpression(celSelector.Expression, envType) + if result.Error != nil { + allErrs = append(allErrs, convertCELErrorToValidationError(fldPath, celSelector.Expression, result.Error)) } + return allErrs +} - if ref.Kind == "" { - allErrs = append(allErrs, field.Required(fldPath.Child("kind"), "")) - } else { - for _, msg := range pathvalidation.IsValidPathSegmentName(ref.Kind) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("kind"), ref.Kind, msg)) +func convertCELErrorToValidationError(fldPath *field.Path, expression string, err error) *field.Error { + var celErr *cel.Error + if errors.As(err, &celErr) { + switch celErr.Type { + case cel.ErrorTypeRequired: + return field.Required(fldPath, celErr.Detail) + case cel.ErrorTypeInvalid: + return field.Invalid(fldPath, expression, celErr.Detail) + case cel.ErrorTypeInternal: + return field.InternalError(fldPath, celErr) } } + return field.InternalError(fldPath, fmt.Errorf("unsupported error type: %w", err)) +} - if ref.Name == "" { - allErrs = append(allErrs, field.Required(fldPath.Child("name"), "")) +func validateDeviceConstraint(constraint resource.DeviceConstraint, fldPath *field.Path, requestNames sets.Set[string]) field.ErrorList { + var allErrs field.ErrorList + allErrs = append(allErrs, validateSet(constraint.Requests, resource.DeviceRequestsMaxSize, + func(name string, fldPath *field.Path) field.ErrorList { + return validateRequestNameRef(name, fldPath, requestNames) + }, + stringKey, fldPath.Child("requests"))...) + if constraint.MatchAttribute == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("matchAttribute"), "")) } else { - for _, msg := range pathvalidation.IsValidPathSegmentName(ref.Name) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("name"), ref.Name, msg)) - } - } - - // namespace is optional. - if ref.Namespace != "" { - for _, msg := range apimachineryvalidation.ValidateNamespaceName(ref.Namespace, false) { - allErrs = append(allErrs, field.Invalid(fldPath.Child("namespace"), ref.Namespace, msg)) - } + allErrs = append(allErrs, validateFullyQualifiedName(*constraint.MatchAttribute, fldPath.Child("matchAttribute"))...) } return allErrs } -// ValidateClass validates a ResourceClass. -func ValidateClass(resourceClass *resource.ResourceClass) field.ErrorList { - allErrs := corevalidation.ValidateObjectMeta(&resourceClass.ObjectMeta, false, corevalidation.ValidateClassName, field.NewPath("metadata")) - allErrs = append(allErrs, validateResourceDriverName(resourceClass.DriverName, field.NewPath("driverName"))...) - allErrs = append(allErrs, validateClassParameters(resourceClass.ParametersRef, field.NewPath("parametersRef"))...) - if resourceClass.SuitableNodes != nil { - allErrs = append(allErrs, corevalidation.ValidateNodeSelector(resourceClass.SuitableNodes, field.NewPath("suitableNodes"))...) - } - +func validateDeviceClaimConfiguration(config resource.DeviceClaimConfiguration, fldPath *field.Path, requestNames sets.Set[string]) field.ErrorList { + var allErrs field.ErrorList + allErrs = append(allErrs, validateSet(config.Requests, resource.DeviceRequestsMaxSize, + func(name string, fldPath *field.Path) field.ErrorList { + return validateRequestNameRef(name, fldPath, requestNames) + }, stringKey, fldPath.Child("requests"))...) + allErrs = append(allErrs, validateDeviceConfiguration(config.DeviceConfiguration, fldPath)...) return allErrs } -// ValidateClassUpdate tests if an update to ResourceClass is valid. -func ValidateClassUpdate(resourceClass, oldClass *resource.ResourceClass) field.ErrorList { - allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClass.ObjectMeta, &oldClass.ObjectMeta, field.NewPath("metadata")) - allErrs = append(allErrs, ValidateClass(resourceClass)...) +func validateRequestNameRef(name string, fldPath *field.Path, requestNames sets.Set[string]) field.ErrorList { + allErrs := validateRequestName(name, fldPath) + if !requestNames.Has(name) { + allErrs = append(allErrs, field.Invalid(fldPath, name, "must be the name of a request in the claim")) + } return allErrs } -// ValidateClaimUpdate tests if an update to ResourceClaim is valid. -func ValidateClaimUpdate(resourceClaim, oldClaim *resource.ResourceClaim) field.ErrorList { - allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClaim.ObjectMeta, &oldClaim.ObjectMeta, field.NewPath("metadata")) - allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(resourceClaim.Spec, oldClaim.Spec, field.NewPath("spec"))...) - allErrs = append(allErrs, ValidateClaim(resourceClaim)...) +func validateDeviceConfiguration(config resource.DeviceConfiguration, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + if config.Opaque == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("opaque"), "")) + } else { + allErrs = append(allErrs, validateOpaqueConfiguration(*config.Opaque, fldPath.Child("opaque"))...) + } return allErrs } -// ValidateClaimStatusUpdate tests if an update to the status of a ResourceClaim is valid. -func ValidateClaimStatusUpdate(resourceClaim, oldClaim *resource.ResourceClaim) field.ErrorList { - allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClaim.ObjectMeta, &oldClaim.ObjectMeta, field.NewPath("metadata")) - fldPath := field.NewPath("status") - // The name might not be set yet. - if resourceClaim.Status.DriverName != "" { - allErrs = append(allErrs, validateResourceDriverName(resourceClaim.Status.DriverName, fldPath.Child("driverName"))...) - } else if resourceClaim.Status.Allocation != nil { - allErrs = append(allErrs, field.Required(fldPath.Child("driverName"), "must be specified when `allocation` is set")) +func validateOpaqueConfiguration(config resource.OpaqueDeviceConfiguration, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + allErrs = append(allErrs, validateDriverName(config.Driver, fldPath.Child("driver"))...) + // Validation of RawExtension as in https://github.com/kubernetes/kubernetes/pull/125549/ + var v any + if len(config.Parameters.Raw) == 0 { + allErrs = append(allErrs, field.Required(fldPath.Child("parameters"), "")) + } else if err := json.Unmarshal(config.Parameters.Raw, &v); err != nil { + allErrs = append(allErrs, field.Invalid(fldPath.Child("parameters"), "", fmt.Sprintf("error parsing data: %v", err.Error()))) + } else if v == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("parameters"), "")) + } else if _, isObject := v.(map[string]any); !isObject { + allErrs = append(allErrs, field.Invalid(fldPath.Child("parameters"), "", "parameters must be a valid JSON object")) } - allErrs = append(allErrs, validateAllocationResult(resourceClaim.Status.Allocation, fldPath.Child("allocation"))...) - allErrs = append(allErrs, validateResourceClaimConsumers(resourceClaim.Status.ReservedFor, resource.ResourceClaimReservedForMaxSize, fldPath.Child("reservedFor"))...) + return allErrs +} + +func validateResourceClaimStatusUpdate(status, oldStatus *resource.ResourceClaimStatus, claimDeleted bool, requestNames sets.Set[string], fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + allErrs = append(allErrs, validateAllocationResult(status.Allocation, fldPath.Child("allocation"), requestNames)...) + allErrs = append(allErrs, validateSet(status.ReservedFor, resource.ResourceClaimReservedForMaxSize, + validateResourceClaimUserReference, + func(consumer resource.ResourceClaimConsumerReference) (types.UID, string) { return consumer.UID, "uid" }, + fldPath.Child("reservedFor"))...) // Now check for invariants that must be valid for a ResourceClaim. - if len(resourceClaim.Status.ReservedFor) > 0 { - if resourceClaim.Status.Allocation == nil { + if len(status.ReservedFor) > 0 { + if status.Allocation == nil { allErrs = append(allErrs, field.Forbidden(fldPath.Child("reservedFor"), "may not be specified when `allocated` is not set")) } else { // Items may be removed from ReservedFor while the claim is meant to be deallocated, // but not added. - if resourceClaim.DeletionTimestamp != nil || resourceClaim.Status.DeallocationRequested { - oldSet := sets.New(oldClaim.Status.ReservedFor...) - newSet := sets.New(resourceClaim.Status.ReservedFor...) + if claimDeleted || status.DeallocationRequested { + oldSet := sets.New(oldStatus.ReservedFor...) + newSet := sets.New(status.ReservedFor...) newItems := newSet.Difference(oldSet) if len(newItems) > 0 { allErrs = append(allErrs, field.Forbidden(fldPath.Child("reservedFor"), "new entries may not be added while `deallocationRequested` or `deletionTimestamp` are set")) @@ -183,19 +283,19 @@ func ValidateClaimStatusUpdate(resourceClaim, oldClaim *resource.ResourceClaim) } } - // Updates to a populated resourceClaim.Status.Allocation are not allowed - if oldClaim.Status.Allocation != nil && resourceClaim.Status.Allocation != nil { - allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(resourceClaim.Status.Allocation, oldClaim.Status.Allocation, fldPath.Child("allocation"))...) + // Updates to a populated status.Allocation are not allowed + if oldStatus.Allocation != nil && status.Allocation != nil { + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(status.Allocation, oldStatus.Allocation, fldPath.Child("allocation"))...) } - if !oldClaim.Status.DeallocationRequested && - resourceClaim.Status.DeallocationRequested && - len(resourceClaim.Status.ReservedFor) > 0 { + if !oldStatus.DeallocationRequested && + status.DeallocationRequested && + len(status.ReservedFor) > 0 { allErrs = append(allErrs, field.Forbidden(fldPath.Child("deallocationRequested"), "deallocation cannot be requested while `reservedFor` is set")) } - if resourceClaim.Status.Allocation == nil && - resourceClaim.Status.DeallocationRequested { + if status.Allocation == nil && + status.DeallocationRequested { // Either one or the other field was modified incorrectly. // For the sake of simplicity this only reports the invalid // end result. @@ -206,146 +306,130 @@ func ValidateClaimStatusUpdate(resourceClaim, oldClaim *resource.ResourceClaim) // anymore because the deallocation may already have started. The field // can only get reset by the driver together with removing the // allocation. - if oldClaim.Status.DeallocationRequested && - !resourceClaim.Status.DeallocationRequested && - resourceClaim.Status.Allocation != nil { + if oldStatus.DeallocationRequested && + !status.DeallocationRequested && + status.Allocation != nil { allErrs = append(allErrs, field.Forbidden(fldPath.Child("deallocationRequested"), "may not be cleared when `allocation` is set")) } return allErrs } -func validateAllocationResult(allocation *resource.AllocationResult, fldPath *field.Path) field.ErrorList { +func validateResourceClaimUserReference(ref resource.ResourceClaimConsumerReference, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - if allocation != nil { - if len(allocation.ResourceHandles) > 0 { - allErrs = append(allErrs, validateResourceHandles(allocation.ResourceHandles, resource.AllocationResultResourceHandlesMaxSize, fldPath.Child("resourceHandles"))...) - } - if allocation.AvailableOnNodes != nil { - allErrs = append(allErrs, corevalidation.ValidateNodeSelector(allocation.AvailableOnNodes, fldPath.Child("availableOnNodes"))...) - } + if ref.Resource == "" { + allErrs = append(allErrs, field.Required(fldPath.Child("resource"), "")) + } + if ref.Name == "" { + allErrs = append(allErrs, field.Required(fldPath.Child("name"), "")) + } + if ref.UID == "" { + allErrs = append(allErrs, field.Required(fldPath.Child("uid"), "")) } return allErrs } -func validateResourceHandles(resourceHandles []resource.ResourceHandle, maxSize int, fldPath *field.Path) field.ErrorList { +func validateAllocationResult(allocation *resource.AllocationResult, fldPath *field.Path, requestNames sets.Set[string]) field.ErrorList { + if allocation == nil { + return nil + } + var allErrs field.ErrorList - for i, resourceHandle := range resourceHandles { - idxPath := fldPath.Index(i) - allErrs = append(allErrs, validateResourceDriverName(resourceHandle.DriverName, idxPath.Child("driverName"))...) - if len(resourceHandle.Data) > resource.ResourceHandleDataMaxSize { - allErrs = append(allErrs, field.TooLongMaxLength(idxPath.Child("data"), len(resourceHandle.Data), resource.ResourceHandleDataMaxSize)) - } - if resourceHandle.StructuredData != nil { - allErrs = append(allErrs, validateStructuredResourceHandle(resourceHandle.StructuredData, idxPath.Child("structuredData"))...) - } - if len(resourceHandle.Data) > 0 && resourceHandle.StructuredData != nil { - allErrs = append(allErrs, field.Invalid(idxPath, nil, "data and structuredData are mutually exclusive")) - } + allErrs = append(allErrs, validateDeviceAllocationResult(allocation.Devices, fldPath.Child("devices"), requestNames)...) + if allocation.NodeSelector != nil { + allErrs = append(allErrs, corevalidation.ValidateNodeSelector(allocation.NodeSelector, fldPath.Child("nodeSelector"))...) } - if len(resourceHandles) > maxSize { - // Dumping the entire field into the error message is likely to be too long, - // in particular when it is already beyond the maximum size. Instead this - // just shows the number of entries. - allErrs = append(allErrs, field.TooLongMaxLength(fldPath, len(resourceHandles), maxSize)) + if allocation.Controller != "" { + allErrs = append(allErrs, validateDriverName(allocation.Controller, fldPath.Child("controller"))...) } return allErrs } -func validateStructuredResourceHandle(handle *resource.StructuredResourceHandle, fldPath *field.Path) field.ErrorList { +func validateDeviceAllocationResult(allocation resource.DeviceAllocationResult, fldPath *field.Path, requestNames sets.Set[string]) field.ErrorList { var allErrs field.ErrorList - if handle.NodeName != "" { - allErrs = append(allErrs, validateNodeName(handle.NodeName, fldPath.Child("nodeName"))...) - } - allErrs = append(allErrs, validateDriverAllocationResults(handle.Results, fldPath.Child("results"))...) + allErrs = append(allErrs, validateSlice(allocation.Results, resource.AllocationResultsMaxSize, + func(result resource.DeviceRequestAllocationResult, fldPath *field.Path) field.ErrorList { + return validateDeviceRequestAllocationResult(result, fldPath, requestNames) + }, fldPath.Child("results"))...) + allErrs = append(allErrs, validateSlice(allocation.Config, 2*resource.DeviceConfigMaxSize, /* class + claim */ + func(config resource.DeviceAllocationConfiguration, fldPath *field.Path) field.ErrorList { + return validateDeviceAllocationConfiguration(config, fldPath, requestNames) + }, fldPath.Child("config"))...) + return allErrs } -func validateDriverAllocationResults(results []resource.DriverAllocationResult, fldPath *field.Path) field.ErrorList { +func validateDeviceRequestAllocationResult(result resource.DeviceRequestAllocationResult, fldPath *field.Path, requestNames sets.Set[string]) field.ErrorList { var allErrs field.ErrorList - for index, result := range results { - idxPath := fldPath.Index(index) - allErrs = append(allErrs, validateAllocationResultModel(&result.AllocationResultModel, idxPath)...) - } + allErrs = append(allErrs, validateRequestNameRef(result.Request, fldPath.Child("request"), requestNames)...) + allErrs = append(allErrs, validateDriverName(result.Driver, fldPath.Child("driver"))...) + allErrs = append(allErrs, validatePoolName(result.Pool, fldPath.Child("pool"))...) + allErrs = append(allErrs, validateDeviceName(result.Device, fldPath.Child("device"))...) return allErrs } -func validateAllocationResultModel(model *resource.AllocationResultModel, fldPath *field.Path) field.ErrorList { +func validateDeviceAllocationConfiguration(config resource.DeviceAllocationConfiguration, fldPath *field.Path, requestNames sets.Set[string]) field.ErrorList { var allErrs field.ErrorList - entries := sets.New[string]() - if model.NamedResources != nil { - entries.Insert("namedResources") - allErrs = append(allErrs, namedresourcesvalidation.ValidateAllocationResult(model.NamedResources, fldPath.Child("namedResources"))...) - } - switch len(entries) { - case 0: - allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) - case 1: - // Okay. - default: - allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) - } + allErrs = append(allErrs, validateAllocationConfigSource(config.Source, fldPath.Child("source"))...) + allErrs = append(allErrs, validateSet(config.Requests, resource.DeviceRequestsMaxSize, + func(name string, fldPath *field.Path) field.ErrorList { + return validateRequestNameRef(name, fldPath, requestNames) + }, stringKey, fldPath.Child("requests"))...) + allErrs = append(allErrs, validateDeviceConfiguration(config.DeviceConfiguration, fldPath)...) return allErrs } -func validateResourceClaimUserReference(ref resource.ResourceClaimConsumerReference, fldPath *field.Path) field.ErrorList { +func validateAllocationConfigSource(source resource.AllocationConfigSource, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - if ref.Resource == "" { - allErrs = append(allErrs, field.Required(fldPath.Child("resource"), "")) - } - if ref.Name == "" { - allErrs = append(allErrs, field.Required(fldPath.Child("name"), "")) - } - if ref.UID == "" { - allErrs = append(allErrs, field.Required(fldPath.Child("uid"), "")) + switch source { + case "": + allErrs = append(allErrs, field.Required(fldPath, "")) + case resource.AllocationConfigSourceClaim, resource.AllocationConfigSourceClass: + default: + allErrs = append(allErrs, field.Invalid(fldPath, source, fmt.Sprintf("must be one of: %s", strings.Join([]string{string(resource.AllocationConfigSourceClaim), string(resource.AllocationConfigSourceClass)}, ", ")))) } return allErrs } -// validateSliceIsASet ensures that a slice contains no duplicates and does not exceed a certain maximum size. -func validateSliceIsASet[T comparable](slice []T, maxSize int, validateItem func(item T, fldPath *field.Path) field.ErrorList, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - allItems := sets.New[T]() - for i, item := range slice { - idxPath := fldPath.Index(i) - if allItems.Has(item) { - allErrs = append(allErrs, field.Duplicate(idxPath, item)) - } else { - allErrs = append(allErrs, validateItem(item, idxPath)...) - allItems.Insert(item) - } - } - if len(slice) > maxSize { - // Dumping the entire field into the error message is likely to be too long, - // in particular when it is already beyond the maximum size. Instead this - // just shows the number of entries. - allErrs = append(allErrs, field.TooLongMaxLength(fldPath, len(slice), maxSize)) - } +// ValidateClass validates a DeviceClass. +func ValidateDeviceClass(class *resource.DeviceClass) field.ErrorList { + allErrs := corevalidation.ValidateObjectMeta(&class.ObjectMeta, false, corevalidation.ValidateClassName, field.NewPath("metadata")) + allErrs = append(allErrs, validateDeviceClassSpec(&class.Spec, nil, field.NewPath("spec"))...) + return allErrs +} + +// ValidateClassUpdate tests if an update to DeviceClass is valid. +func ValidateDeviceClassUpdate(class, oldClass *resource.DeviceClass) field.ErrorList { + allErrs := corevalidation.ValidateObjectMetaUpdate(&class.ObjectMeta, &oldClass.ObjectMeta, field.NewPath("metadata")) + allErrs = append(allErrs, validateDeviceClassSpec(&class.Spec, &oldClass.Spec, field.NewPath("spec"))...) return allErrs } -// validateResourceClaimConsumers ensures that the slice contains no duplicate UIDs and does not exceed a certain maximum size. -func validateResourceClaimConsumers(consumers []resource.ResourceClaimConsumerReference, maxSize int, fldPath *field.Path) field.ErrorList { +func validateDeviceClassSpec(spec, oldSpec *resource.DeviceClassSpec, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - allUIDs := sets.New[types.UID]() - for i, consumer := range consumers { - idxPath := fldPath.Index(i) - if allUIDs.Has(consumer.UID) { - allErrs = append(allErrs, field.Duplicate(idxPath.Child("uid"), consumer.UID)) - } else { - allErrs = append(allErrs, validateResourceClaimUserReference(consumer, idxPath)...) - allUIDs.Insert(consumer.UID) - } + // If the selectors are exactly as before, we treat the CEL expressions as "stored". + // Any change, including merely reordering selectors, triggers validation as new + // expressions. + stored := false + if oldSpec != nil { + stored = apiequality.Semantic.DeepEqual(spec.Selectors, oldSpec.Selectors) } - if len(consumers) > maxSize { - // Dumping the entire field into the error message is likely to be too long, - // in particular when it is already beyond the maximum size. Instead this - // just shows the number of entries. - allErrs = append(allErrs, field.TooLongMaxLength(fldPath, len(consumers), maxSize)) + allErrs = append(allErrs, validateSlice(spec.Selectors, resource.DeviceSelectorsMaxSize, + func(selector resource.DeviceSelector, fldPath *field.Path) field.ErrorList { + return validateSelector(selector, fldPath, stored) + }, + fldPath.Child("selectors"))...) + allErrs = append(allErrs, validateSlice(spec.Config, resource.DeviceConfigMaxSize, validateDeviceClassConfiguration, fldPath.Child("config"))...) + if spec.SuitableNodes != nil { + allErrs = append(allErrs, corevalidation.ValidateNodeSelector(spec.SuitableNodes, field.NewPath("suitableNodes"))...) } return allErrs } +func validateDeviceClassConfiguration(config resource.DeviceClassConfiguration, fldPath *field.Path) field.ErrorList { + return validateDeviceConfiguration(config.DeviceConfiguration, fldPath) +} + // ValidatePodSchedulingContext validates a PodSchedulingContext. func ValidatePodSchedulingContexts(schedulingCtx *resource.PodSchedulingContext) field.ErrorList { allErrs := corevalidation.ValidateObjectMeta(&schedulingCtx.ObjectMeta, true, corevalidation.ValidatePodName, field.NewPath("metadata")) @@ -354,7 +438,7 @@ func ValidatePodSchedulingContexts(schedulingCtx *resource.PodSchedulingContext) } func validatePodSchedulingSpec(spec *resource.PodSchedulingContextSpec, fldPath *field.Path) field.ErrorList { - allErrs := validateSliceIsASet(spec.PotentialNodes, resource.PodSchedulingNodeListMaxSize, validateNodeName, fldPath.Child("potentialNodes")) + allErrs := validateSet(spec.PotentialNodes, resource.PodSchedulingNodeListMaxSize, validateNodeName, stringKey, fldPath.Child("potentialNodes")) return allErrs } @@ -391,28 +475,31 @@ func validatePodSchedulingClaims(claimStatuses []resource.ResourceClaimSchedulin } func validatePodSchedulingClaim(status resource.ResourceClaimSchedulingStatus, fldPath *field.Path) field.ErrorList { - allErrs := validateSliceIsASet(status.UnsuitableNodes, resource.PodSchedulingNodeListMaxSize, validateNodeName, fldPath.Child("unsuitableNodes")) + allErrs := validateSet(status.UnsuitableNodes, resource.PodSchedulingNodeListMaxSize, validateNodeName, stringKey, fldPath.Child("unsuitableNodes")) return allErrs } -// ValidateClaimTemplace validates a ResourceClaimTemplate. -func ValidateClaimTemplate(template *resource.ResourceClaimTemplate) field.ErrorList { +// ValidateResourceClaimTemplate validates a ResourceClaimTemplate. +func ValidateResourceClaimTemplate(template *resource.ResourceClaimTemplate) field.ErrorList { allErrs := corevalidation.ValidateObjectMeta(&template.ObjectMeta, true, corevalidation.ValidateResourceClaimTemplateName, field.NewPath("metadata")) - allErrs = append(allErrs, validateResourceClaimTemplateSpec(&template.Spec, field.NewPath("spec"))...) + allErrs = append(allErrs, validateResourceClaimTemplateSpec(&template.Spec, field.NewPath("spec"), false)...) return allErrs } -func validateResourceClaimTemplateSpec(spec *resource.ResourceClaimTemplateSpec, fldPath *field.Path) field.ErrorList { +func validateResourceClaimTemplateSpec(spec *resource.ResourceClaimTemplateSpec, fldPath *field.Path, stored bool) field.ErrorList { allErrs := corevalidation.ValidateTemplateObjectMeta(&spec.ObjectMeta, fldPath.Child("metadata")) - allErrs = append(allErrs, validateResourceClaimSpec(&spec.Spec, fldPath.Child("spec"))...) + allErrs = append(allErrs, validateResourceClaimSpec(&spec.Spec, fldPath.Child("spec"), stored)...) return allErrs } -// ValidateClaimTemplateUpdate tests if an update to template is valid. -func ValidateClaimTemplateUpdate(template, oldTemplate *resource.ResourceClaimTemplate) field.ErrorList { +// ValidateResourceClaimTemplateUpdate tests if an update to template is valid. +func ValidateResourceClaimTemplateUpdate(template, oldTemplate *resource.ResourceClaimTemplate) field.ErrorList { allErrs := corevalidation.ValidateObjectMetaUpdate(&template.ObjectMeta, &oldTemplate.ObjectMeta, field.NewPath("metadata")) allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(template.Spec, oldTemplate.Spec, field.NewPath("spec"))...) - allErrs = append(allErrs, ValidateClaimTemplate(template)...) + // Because the spec is immutable, all CEL expressions in it must have been stored. + // If the user tries an update, this is not true and checking is less strict, but + // as there are errors, it doesn't matter. + allErrs = append(allErrs, validateResourceClaimTemplateSpec(&template.Spec, field.NewPath("spec"), true)...) return allErrs } @@ -425,179 +512,244 @@ func validateNodeName(name string, fldPath *field.Path) field.ErrorList { } // ValidateResourceSlice tests if a ResourceSlice object is valid. -func ValidateResourceSlice(resourceSlice *resource.ResourceSlice) field.ErrorList { - allErrs := corevalidation.ValidateObjectMeta(&resourceSlice.ObjectMeta, false, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) - if resourceSlice.NodeName != "" { - allErrs = append(allErrs, validateNodeName(resourceSlice.NodeName, field.NewPath("nodeName"))...) - } - allErrs = append(allErrs, validateResourceDriverName(resourceSlice.DriverName, field.NewPath("driverName"))...) - allErrs = append(allErrs, validateResourceModel(&resourceSlice.ResourceModel, nil)...) +func ValidateResourceSlice(slice *resource.ResourceSlice) field.ErrorList { + allErrs := corevalidation.ValidateObjectMeta(&slice.ObjectMeta, false, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) + allErrs = append(allErrs, validateResourceSliceSpec(&slice.Spec, nil, field.NewPath("spec"))...) return allErrs } -func validateResourceModel(model *resource.ResourceModel, fldPath *field.Path) field.ErrorList { +// ValidateResourceSlice tests if a ResourceSlice update is valid. +func ValidateResourceSliceUpdate(resourceSlice, oldResourceSlice *resource.ResourceSlice) field.ErrorList { + allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceSlice.ObjectMeta, &oldResourceSlice.ObjectMeta, field.NewPath("metadata")) + allErrs = append(allErrs, validateResourceSliceSpec(&resourceSlice.Spec, &oldResourceSlice.Spec, field.NewPath("spec"))...) + return allErrs +} + +func validateResourceSliceSpec(spec, oldSpec *resource.ResourceSliceSpec, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - entries := sets.New[string]() - if model.NamedResources != nil { - entries.Insert("namedResources") - allErrs = append(allErrs, namedresourcesvalidation.ValidateResources(model.NamedResources, fldPath.Child("namedResources"))...) + allErrs = append(allErrs, validateDriverName(spec.Driver, fldPath.Child("driver"))...) + allErrs = append(allErrs, validateResourcePool(spec.Pool, fldPath.Child("pool"))...) + nodeSelectionFields := sets.New[string]() + if spec.NodeName != "" { + nodeSelectionFields.Insert("nodeName") + allErrs = append(allErrs, validateNodeName(spec.NodeName, fldPath.Child("nodeName"))...) + } + if spec.NodeSelector != nil { + nodeSelectionFields.Insert("nodeSelector") + allErrs = append(allErrs, corevalidation.ValidateNodeSelector(spec.NodeSelector, fldPath.Child("nodeSelector"))...) } - switch len(entries) { + if spec.AllNodes { + nodeSelectionFields.Insert("allNodes") + } + switch nodeSelectionFields.Len() { case 0: - allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) + allErrs = append(allErrs, field.Required(fldPath, "exactly one of nodeName, nodeSelector or allNodes is required")) case 1: - // Okay. default: - allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) + allErrs = append(allErrs, field.Invalid(fldPath, sets.List(nodeSelectionFields), "these fields are mutually exclusive")) + } + allErrs = append(allErrs, validateSet(spec.Devices, resource.ResourceSliceMaxDevices, validateDevice, + func(device resource.Device) (string, string) { + return device.Name, "name" + }, fldPath.Child("devices"))...) + if oldSpec != nil { + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(spec.Pool, oldSpec.Pool, fldPath.Child("pool"))...) + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(spec.Driver, oldSpec.Driver, fldPath.Child("driver"))...) + allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(spec.NodeName, oldSpec.NodeName, fldPath.Child("nodeName"))...) } return allErrs } -// ValidateResourceSlice tests if a ResourceSlice update is valid. -func ValidateResourceSliceUpdate(resourceSlice, oldResourceSlice *resource.ResourceSlice) field.ErrorList { - allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceSlice.ObjectMeta, &oldResourceSlice.ObjectMeta, field.NewPath("metadata")) - allErrs = append(allErrs, ValidateResourceSlice(resourceSlice)...) - allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(resourceSlice.NodeName, oldResourceSlice.NodeName, field.NewPath("nodeName"))...) - allErrs = append(allErrs, apimachineryvalidation.ValidateImmutableField(resourceSlice.DriverName, oldResourceSlice.DriverName, field.NewPath("driverName"))...) - return allErrs -} - -// ValidateResourceClaimParameters tests if a ResourceClaimParameters object is valid for creation. -func ValidateResourceClaimParameters(parameters *resource.ResourceClaimParameters) field.ErrorList { - return validateResourceClaimParameters(parameters, false) -} - -func validateResourceClaimParameters(parameters *resource.ResourceClaimParameters, requestStored bool) field.ErrorList { - allErrs := corevalidation.ValidateObjectMeta(¶meters.ObjectMeta, true, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) - allErrs = append(allErrs, validateResourceClaimParametersRef(parameters.GeneratedFrom, field.NewPath("generatedFrom"))...) - allErrs = append(allErrs, validateDriverRequests(parameters.DriverRequests, field.NewPath("driverRequests"), requestStored)...) +func validateResourcePool(pool resource.ResourcePool, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + allErrs = append(allErrs, validatePoolName(pool.Name, fldPath.Child("name"))...) + if pool.ResourceSliceCount <= 0 { + allErrs = append(allErrs, field.Invalid(fldPath.Child("resourceSliceCount"), pool.ResourceSliceCount, "must be greater than zero")) + } return allErrs } -func validateDriverRequests(requests []resource.DriverRequests, fldPath *field.Path, requestStored bool) field.ErrorList { +func validateDevice(device resource.Device, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - driverNames := sets.New[string]() - for i, request := range requests { - idxPath := fldPath.Index(i) - driverName := request.DriverName - allErrs = append(allErrs, validateResourceDriverName(driverName, idxPath.Child("driverName"))...) - if driverNames.Has(driverName) { - allErrs = append(allErrs, field.Duplicate(idxPath.Child("driverName"), driverName)) - } else { - driverNames.Insert(driverName) - } - allErrs = append(allErrs, validateResourceRequests(request.Requests, idxPath.Child("requests"), requestStored)...) + allErrs = append(allErrs, validateDeviceName(device.Name, fldPath.Child("name"))...) + if device.Basic == nil { + allErrs = append(allErrs, field.Required(fldPath.Child("basic"), "")) + } else { + allErrs = append(allErrs, validateBasicDevice(*device.Basic, fldPath.Child("basic"))...) } return allErrs } -func validateResourceRequests(requests []resource.ResourceRequest, fldPath *field.Path, requestStored bool) field.ErrorList { +func validateBasicDevice(device resource.BasicDevice, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - for i, request := range requests { - idxPath := fldPath.Index(i) - allErrs = append(allErrs, validateResourceRequestModel(&request.ResourceRequestModel, idxPath, requestStored)...) - } - if len(requests) == 0 { - // We could allow this, it just doesn't make sense: the entire entry would get ignored and thus - // should have been left out entirely. - allErrs = append(allErrs, field.Required(fldPath, "empty entries with no requests are not allowed")) + allErrs = append(allErrs, validateMap(device.Attributes, resource.ResourceSliceMaxAttributesAndCapacitiesPerDevice, validateQualifiedName, validateDeviceAttribute, fldPath.Child("attributes"))...) + allErrs = append(allErrs, validateMap(device.Capacity, resource.ResourceSliceMaxAttributesAndCapacitiesPerDevice, validateQualifiedName, validateQuantity, fldPath.Child("capacity"))...) + if combinedLen, max := len(device.Attributes)+len(device.Capacity), resource.ResourceSliceMaxAttributesAndCapacitiesPerDevice; combinedLen > max { + allErrs = append(allErrs, field.Invalid(fldPath, combinedLen, fmt.Sprintf("the total number of attributes and capacities must not exceed %d", max))) } return allErrs } -func validateResourceRequestModel(model *resource.ResourceRequestModel, fldPath *field.Path, requestStored bool) field.ErrorList { +var ( + numericIdentifier = `(0|[1-9]\d*)` + + preReleaseIdentifier = `(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)` + + buildIdentifier = `[0-9a-zA-Z-]+` + + semverRe = regexp.MustCompile(`^` + + + // dot-separated version segments (e.g. 1.2.3) + numericIdentifier + `\.` + numericIdentifier + `\.` + numericIdentifier + + + // optional dot-separated prerelease segments (e.g. -alpha.PRERELEASE.1) + `(-` + preReleaseIdentifier + `(\.` + preReleaseIdentifier + `)*)?` + + + // optional dot-separated build identifier segments (e.g. +build.id.20240305) + `(\+` + buildIdentifier + `(\.` + buildIdentifier + `)*)?` + + + `$`) +) + +func validateDeviceAttribute(attribute resource.DeviceAttribute, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - entries := sets.New[string]() - if model.NamedResources != nil { - entries.Insert("namedResources") - allErrs = append(allErrs, namedresourcesvalidation.ValidateRequest(namedresourcesvalidation.Options{StoredExpressions: requestStored}, model.NamedResources, fldPath.Child("namedResources"))...) + numFields := 0 + if attribute.BoolValue != nil { + numFields++ + } + if attribute.IntValue != nil { + numFields++ + } + if attribute.StringValue != nil { + if len(*attribute.StringValue) > resource.DeviceAttributeMaxValueLength { + allErrs = append(allErrs, field.TooLongMaxLength(fldPath.Child("string"), *attribute.StringValue, resource.DeviceAttributeMaxValueLength)) + } + numFields++ + } + if attribute.VersionValue != nil { + numFields++ + if !semverRe.MatchString(*attribute.VersionValue) { + allErrs = append(allErrs, field.Invalid(fldPath.Child("version"), *attribute.VersionValue, "must be a string compatible with semver.org spec 2.0.0")) + } + if len(*attribute.VersionValue) > resource.DeviceAttributeMaxValueLength { + allErrs = append(allErrs, field.TooLongMaxLength(fldPath.Child("version"), *attribute.VersionValue, resource.DeviceAttributeMaxValueLength)) + } } - switch len(entries) { + + switch numFields { case 0: - allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) + allErrs = append(allErrs, field.Required(fldPath, "exactly one value must be set")) case 1: // Okay. default: - allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) + allErrs = append(allErrs, field.Invalid(fldPath, attribute, "exactly one field must be set, not several")) } return allErrs } -// ValidateResourceClaimParameters tests if a ResourceClaimParameters update is valid. -func ValidateResourceClaimParametersUpdate(resourceClaimParameters, oldResourceClaimParameters *resource.ResourceClaimParameters) field.ErrorList { - allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClaimParameters.ObjectMeta, &oldResourceClaimParameters.ObjectMeta, field.NewPath("metadata")) - requestStored := apiequality.Semantic.DeepEqual(oldResourceClaimParameters.DriverRequests, resourceClaimParameters.DriverRequests) - allErrs = append(allErrs, validateResourceClaimParameters(resourceClaimParameters, requestStored)...) - return allErrs +func validateQuantity(quantity apiresource.Quantity, fldPath *field.Path) field.ErrorList { + // Any parsed quantity is valid. + return nil } -// ValidateResourceClassParameters tests if a ResourceClassParameters object is valid for creation. -func ValidateResourceClassParameters(parameters *resource.ResourceClassParameters) field.ErrorList { - return validateResourceClassParameters(parameters, false) +func validateQualifiedName(name resource.QualifiedName, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + if name == "" { + allErrs = append(allErrs, field.Required(fldPath, "name required")) + return allErrs + } + + // Naming the two parts in a field path is tricky. Treating them as a child field + // is not quite right, but close enough... + parts := strings.Split(string(name), "/") + switch len(parts) { + case 1: + allErrs = append(allErrs, validateCIdentifier(parts[0], fldPath.Child("identifier"))...) + case 2: + allErrs = append(allErrs, validateDriverName(parts[0], fldPath.Child("domain"))...) + allErrs = append(allErrs, validateCIdentifier(parts[1], fldPath.Child("identifier"))...) + + } + return allErrs } -func validateResourceClassParameters(parameters *resource.ResourceClassParameters, filtersStored bool) field.ErrorList { - allErrs := corevalidation.ValidateObjectMeta(¶meters.ObjectMeta, true, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata")) - allErrs = append(allErrs, validateClassParameters(parameters.GeneratedFrom, field.NewPath("generatedFrom"))...) - allErrs = append(allErrs, validateResourceFilters(parameters.Filters, field.NewPath("filters"), filtersStored)...) - allErrs = append(allErrs, validateVendorParameters(parameters.VendorParameters, field.NewPath("vendorParameters"))...) +func validateFullyQualifiedName(name resource.FullyQualifiedName, fldPath *field.Path) field.ErrorList { + allErrs := validateQualifiedName(resource.QualifiedName(name), fldPath) + if !strings.Contains(string(name), "/") { + allErrs = append(allErrs, field.Required(fldPath.Child("domain"), "a fully-qualified name must include a domain prefix")) + } return allErrs } -func validateResourceFilters(filters []resource.ResourceFilter, fldPath *field.Path, filtersStored bool) field.ErrorList { +// cIdentifierFmt is the same as in https://github.com/google/cel-spec/blob/master/doc/langdef.md#overview for IDENT. +const cIdentifierFmt string = "[_a-zA-Z][_a-zA-Z0-9]*" +const cIdentifierErrMsg string = "a C identifier must consist of alphanumeric characters or '_', and must start with an alphabetic character or '_'" + +var cIdentifierRegexp = regexp.MustCompile("^" + cIdentifierFmt + "$") + +func validateCIdentifier(id string, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - driverNames := sets.New[string]() - for i, filter := range filters { - idxPath := fldPath.Index(i) - driverName := filter.DriverName - allErrs = append(allErrs, validateResourceDriverName(driverName, idxPath.Child("driverName"))...) - if driverNames.Has(driverName) { - allErrs = append(allErrs, field.Duplicate(idxPath.Child("driverName"), driverName)) - } else { - driverNames.Insert(driverName) - } - allErrs = append(allErrs, validateResourceFilterModel(&filter.ResourceFilterModel, idxPath, filtersStored)...) + if len(id) > resource.DeviceMaxIDLength { + allErrs = append(allErrs, field.TooLongMaxLength(fldPath, id, resource.DeviceMaxIDLength)) + } + if !cIdentifierRegexp.MatchString(id) { + allErrs = append(allErrs, field.TypeInvalid(fldPath, id, validation.RegexError(cIdentifierErrMsg, cIdentifierFmt, "myName", "_abc42"))) } return allErrs } -func validateResourceFilterModel(model *resource.ResourceFilterModel, fldPath *field.Path, filtersStored bool) field.ErrorList { +// validateSlice ensures that a slice does not exceed a certain maximum size +// and that all entries are valid. +func validateSlice[T any](slice []T, maxSize int, validateItem func(T, *field.Path) field.ErrorList, fldPath *field.Path) field.ErrorList { var allErrs field.ErrorList - entries := sets.New[string]() - if model.NamedResources != nil { - entries.Insert("namedResources") - allErrs = append(allErrs, namedresourcesvalidation.ValidateFilter(namedresourcesvalidation.Options{StoredExpressions: filtersStored}, model.NamedResources, fldPath.Child("namedResources"))...) + for i, item := range slice { + idxPath := fldPath.Index(i) + allErrs = append(allErrs, validateItem(item, idxPath)...) } - switch len(entries) { - case 0: - allErrs = append(allErrs, field.Required(fldPath, "exactly one structured model field must be set")) - case 1: - // Okay. - default: - allErrs = append(allErrs, field.Invalid(fldPath, sets.List(entries), "exactly one field must be set, not several")) + if len(slice) > maxSize { + // Dumping the entire field into the error message is likely to be too long, + // in particular when it is already beyond the maximum size. Instead this + // just shows the number of entries. + allErrs = append(allErrs, field.TooLongMaxLength(fldPath, len(slice), maxSize)) } return allErrs } -func validateVendorParameters(parameters []resource.VendorParameters, fldPath *field.Path) field.ErrorList { - var allErrs field.ErrorList - driverNames := sets.New[string]() - for i, parameters := range parameters { +// validateSet ensures that a slice contains no duplicates, does not +// exceed a certain maximum size and that all entries are valid. +func validateSet[T any, K comparable](slice []T, maxSize int, validateItem func(item T, fldPath *field.Path) field.ErrorList, itemKey func(T) (K, string), fldPath *field.Path) field.ErrorList { + allErrs := validateSlice(slice, maxSize, validateItem, fldPath) + allItems := sets.New[K]() + for i, item := range slice { idxPath := fldPath.Index(i) - driverName := parameters.DriverName - allErrs = append(allErrs, validateResourceDriverName(driverName, idxPath.Child("driverName"))...) - if driverNames.Has(driverName) { - allErrs = append(allErrs, field.Duplicate(idxPath.Child("driverName"), driverName)) + key, fieldName := itemKey(item) + childPath := idxPath + if fieldName != "" { + childPath = childPath.Child(fieldName) + } + if allItems.Has(key) { + allErrs = append(allErrs, field.Duplicate(childPath, key)) } else { - driverNames.Insert(driverName) + allItems.Insert(key) } } return allErrs } -// ValidateResourceClassParameters tests if a ResourceClassParameters update is valid. -func ValidateResourceClassParametersUpdate(resourceClassParameters, oldResourceClassParameters *resource.ResourceClassParameters) field.ErrorList { - allErrs := corevalidation.ValidateObjectMetaUpdate(&resourceClassParameters.ObjectMeta, &oldResourceClassParameters.ObjectMeta, field.NewPath("metadata")) - allErrs = append(allErrs, ValidateResourceClassParameters(resourceClassParameters)...) +// stringKey uses the item itself as a key for validateSet. +func stringKey(item string) (string, string) { + return item, "" +} + +// validateMap validates keys, items and the maximum length of a map. +func validateMap[K ~string, T any](m map[K]T, maxSize int, validateKey func(K, *field.Path) field.ErrorList, validateItem func(T, *field.Path) field.ErrorList, fldPath *field.Path) field.ErrorList { + var allErrs field.ErrorList + if len(m) > maxSize { + allErrs = append(allErrs, field.TooLongMaxLength(fldPath, len(m), maxSize)) + } + for key, item := range m { + allErrs = append(allErrs, validateKey(key, fldPath)...) + allErrs = append(allErrs, validateItem(item, fldPath.Key(string(key)))...) + } return allErrs } diff --git a/pkg/apis/resource/validation/validation_deviceclass_test.go b/pkg/apis/resource/validation/validation_deviceclass_test.go new file mode 100644 index 0000000000000..3acc4be9d186f --- /dev/null +++ b/pkg/apis/resource/validation/validation_deviceclass_test.go @@ -0,0 +1,247 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package validation + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/utils/ptr" +) + +func testClass(name string) *resource.DeviceClass { + return &resource.DeviceClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + }, + } +} + +func TestValidateClass(t *testing.T) { + goodName := "foo" + now := metav1.Now() + badName := "!@#$%^" + badValue := "spaces not allowed" + + scenarios := map[string]struct { + class *resource.DeviceClass + wantFailures field.ErrorList + }{ + "good-class": { + class: testClass(goodName), + }, + "missing-name": { + wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, + class: testClass(""), + }, + "bad-name": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + class: testClass(badName), + }, + "generate-name": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.GenerateName = "pvc-" + return class + }(), + }, + "uid": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" + return class + }(), + }, + "resource-version": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.ResourceVersion = "1" + return class + }(), + }, + "generation": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Generation = 100 + return class + }(), + }, + "creation-timestamp": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.CreationTimestamp = now + return class + }(), + }, + "deletion-grace-period-seconds": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.DeletionGracePeriodSeconds = ptr.To(int64(10)) + return class + }(), + }, + "owner-references": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.OwnerReferences = []metav1.OwnerReference{ + { + APIVersion: "v1", + Kind: "pod", + Name: "foo", + UID: "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d", + }, + } + return class + }(), + }, + "finalizers": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Finalizers = []string{ + "example.com/foo", + } + return class + }(), + }, + "managed-fields": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.ManagedFields = []metav1.ManagedFieldsEntry{ + { + FieldsType: "FieldsV1", + Operation: "Apply", + APIVersion: "apps/v1", + Manager: "foo", + }, + } + return class + }(), + }, + "good-labels": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Labels = map[string]string{ + "apps.kubernetes.io/name": "test", + } + return class + }(), + }, + "bad-labels": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Labels = map[string]string{ + "hello-world": badValue, + } + return class + }(), + }, + "good-annotations": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Annotations = map[string]string{ + "foo": "bar", + } + return class + }(), + }, + "bad-annotations": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Annotations = map[string]string{ + badName: "hello world", + } + return class + }(), + }, + "invalid-node-selector": { + wantFailures: field.ErrorList{field.Required(field.NewPath("suitableNodes", "nodeSelectorTerms"), "must have at least one node selector term")}, + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Spec.SuitableNodes = &core.NodeSelector{ + // Must not be empty. + } + return class + }(), + }, + "valid-node-selector": { + class: func() *resource.DeviceClass { + class := testClass(goodName) + class.Spec.SuitableNodes = &core.NodeSelector{ + NodeSelectorTerms: []core.NodeSelectorTerm{{ + MatchExpressions: []core.NodeSelectorRequirement{{ + Key: "foo", + Operator: core.NodeSelectorOpDoesNotExist, + }}, + }}, + } + return class + }(), + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + errs := ValidateDeviceClass(scenario.class) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} + +func TestValidateClassUpdate(t *testing.T) { + validClass := testClass(goodName) + + scenarios := map[string]struct { + oldClass *resource.DeviceClass + update func(class *resource.DeviceClass) *resource.DeviceClass + wantFailures field.ErrorList + }{ + "valid-no-op-update": { + oldClass: validClass, + update: func(class *resource.DeviceClass) *resource.DeviceClass { return class }, + }, + "update-node-selector": { + oldClass: validClass, + update: func(class *resource.DeviceClass) *resource.DeviceClass { + class = class.DeepCopy() + class.Spec.SuitableNodes = &core.NodeSelector{ + NodeSelectorTerms: []core.NodeSelectorTerm{{ + MatchExpressions: []core.NodeSelectorRequirement{{ + Key: "foo", + Operator: core.NodeSelectorOpDoesNotExist, + }}, + }}, + } + return class + }, + }, + } + + for name, scenario := range scenarios { + t.Run(name, func(t *testing.T) { + scenario.oldClass.ResourceVersion = "1" + errs := ValidateDeviceClassUpdate(scenario.update(scenario.oldClass.DeepCopy()), scenario.oldClass) + assert.Equal(t, scenario.wantFailures, errs) + }) + } +} diff --git a/pkg/apis/resource/validation/validation_resourceclaim_test.go b/pkg/apis/resource/validation/validation_resourceclaim_test.go index 0f1062f9c40b1..75051cbd97c00 100644 --- a/pkg/apis/resource/validation/validation_resourceclaim_test.go +++ b/pkg/apis/resource/validation/validation_resourceclaim_test.go @@ -18,17 +18,18 @@ package validation import ( "fmt" - "strings" "testing" "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/apis/resource" "k8s.io/utils/pointer" + "k8s.io/utils/ptr" ) func testClaim(name, namespace string, spec resource.ResourceClaimSpec) *resource.ResourceClaim { @@ -37,86 +38,98 @@ func testClaim(name, namespace string, spec resource.ResourceClaimSpec) *resourc Name: name, Namespace: namespace, }, - Spec: spec, + Spec: *spec.DeepCopy(), } } -func TestValidateClaim(t *testing.T) { - goodName := "foo" - badName := "!@#$%^" - goodNS := "ns" - goodClaimSpec := resource.ResourceClaimSpec{ - ResourceClassName: goodName, +const ( + goodName = "foo" + badName = "!@#$%^" + goodNS = "ns" +) + +var ( + validClaimSpec = resource.ResourceClaimSpec{ + Devices: resource.DeviceClaim{ + Requests: []resource.DeviceRequest{{ + Name: goodName, + DeviceClassName: goodName, + CountMode: resource.DeviceCountModeExact, + Count: 1, + }}, + }, } + validClaim = testClaim(goodName, goodNS, validClaimSpec) +) + +func TestValidateClaim(t *testing.T) { now := metav1.Now() badValue := "spaces not allowed" - badAPIGroup := "example.com/v1" - goodAPIGroup := "example.com" scenarios := map[string]struct { claim *resource.ResourceClaim wantFailures field.ErrorList }{ "good-claim": { - claim: testClaim(goodName, goodNS, goodClaimSpec), + claim: testClaim(goodName, goodNS, validClaimSpec), }, "missing-name": { wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, - claim: testClaim("", goodNS, goodClaimSpec), + claim: testClaim("", goodNS, validClaimSpec), }, "bad-name": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - claim: testClaim(badName, goodNS, goodClaimSpec), + claim: testClaim(badName, goodNS, validClaimSpec), }, "missing-namespace": { wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "namespace"), "")}, - claim: testClaim(goodName, "", goodClaimSpec), + claim: testClaim(goodName, "", validClaimSpec), }, "generate-name": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.GenerateName = "pvc-" return claim }(), }, "uid": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" return claim }(), }, "resource-version": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.ResourceVersion = "1" return claim }(), }, "generation": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.Generation = 100 return claim }(), }, "creation-timestamp": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.CreationTimestamp = now return claim }(), }, "deletion-grace-period-seconds": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.DeletionGracePeriodSeconds = pointer.Int64(10) return claim }(), }, "owner-references": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.OwnerReferences = []metav1.OwnerReference{ { APIVersion: "v1", @@ -130,7 +143,7 @@ func TestValidateClaim(t *testing.T) { }, "finalizers": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.Finalizers = []string{ "example.com/foo", } @@ -139,7 +152,7 @@ func TestValidateClaim(t *testing.T) { }, "managed-fields": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.ManagedFields = []metav1.ManagedFieldsEntry{ { FieldsType: "FieldsV1", @@ -153,7 +166,7 @@ func TestValidateClaim(t *testing.T) { }, "good-labels": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.Labels = map[string]string{ "apps.kubernetes.io/name": "test", } @@ -163,7 +176,7 @@ func TestValidateClaim(t *testing.T) { "bad-labels": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.Labels = map[string]string{ "hello-world": badValue, } @@ -172,7 +185,7 @@ func TestValidateClaim(t *testing.T) { }, "good-annotations": { claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.Annotations = map[string]string{ "foo": "bar", } @@ -182,7 +195,7 @@ func TestValidateClaim(t *testing.T) { "bad-annotations": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) + claim := testClaim(goodName, goodNS, validClaimSpec) claim.Annotations = map[string]string{ badName: "hello world", } @@ -190,62 +203,115 @@ func TestValidateClaim(t *testing.T) { }(), }, "bad-classname": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "resourceClassName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) - claim.Spec.ResourceClassName = badName - return claim - }(), - }, - "good-parameters": { - claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) - claim.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - Kind: "foo", - Name: "bar", - } - return claim - }(), - }, - "good-parameters-apigroup": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "devices", "requests").Index(0).Child("deviceClassName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) - claim.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - APIGroup: goodAPIGroup, - Kind: "foo", - Name: "bar", - } + claim := testClaim(goodName, goodNS, validClaimSpec) + claim.Spec.Devices.Requests[0].DeviceClassName = badName return claim }(), }, - "bad-parameters-apigroup": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "parametersRef", "apiGroup"), badAPIGroup, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + "invalid-request-name": { + wantFailures: field.ErrorList{ + field.Invalid(field.NewPath("spec", "devices", "constraints").Index(0).Child("requests").Index(1), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"), + field.Invalid(field.NewPath("spec", "devices", "constraints").Index(0).Child("requests").Index(1), badName, "must be the name of a request in the claim"), + field.Invalid(field.NewPath("spec", "devices", "config").Index(0).Child("requests").Index(1), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"), + field.Invalid(field.NewPath("spec", "devices", "config").Index(0).Child("requests").Index(1), badName, "must be the name of a request in the claim"), + }, claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) - claim.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - APIGroup: badAPIGroup, - Kind: "foo", - Name: "bar", - } + claim := testClaim(goodName, goodNS, validClaimSpec) + claim.Spec.Devices.Constraints = []resource.DeviceConstraint{{ + Requests: []string{claim.Spec.Devices.Requests[0].Name, badName}, + MatchAttribute: ptr.To(resource.FullyQualifiedName("dra.example.com/numa")), + }} + claim.Spec.Devices.Config = []resource.DeviceClaimConfiguration{{ + Requests: []string{claim.Spec.Devices.Requests[0].Name, badName}, + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "dra.example.com", + Parameters: runtime.RawExtension{ + Raw: []byte(`{"kind": "foo", "apiVersion": "dra.example.com/v1"}`), + }, + }, + }, + }} return claim }(), }, - "missing-parameters-kind": { - wantFailures: field.ErrorList{field.Required(field.NewPath("spec", "parametersRef", "kind"), "")}, + "invalid-config-json": { + wantFailures: field.ErrorList{ + field.Required(field.NewPath("spec", "devices", "config").Index(0).Child("opaque", "parameters"), ""), + field.Invalid(field.NewPath("spec", "devices", "config").Index(1).Child("opaque", "parameters"), "", "error parsing data: unexpected end of JSON input"), + field.Invalid(field.NewPath("spec", "devices", "config").Index(2).Child("opaque", "parameters"), "", "parameters must be a valid JSON object"), + field.Required(field.NewPath("spec", "devices", "config").Index(3).Child("opaque", "parameters"), ""), + }, claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) - claim.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - Name: "bar", + claim := testClaim(goodName, goodNS, validClaimSpec) + claim.Spec.Devices.Config = []resource.DeviceClaimConfiguration{ + { + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "dra.example.com", + Parameters: runtime.RawExtension{ + Raw: []byte(``), + }, + }, + }, + }, + { + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "dra.example.com", + Parameters: runtime.RawExtension{ + Raw: []byte(`{`), + }, + }, + }, + }, + { + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "dra.example.com", + Parameters: runtime.RawExtension{ + Raw: []byte(`"hello-world"`), + }, + }, + }, + }, + { + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "dra.example.com", + Parameters: runtime.RawExtension{ + Raw: []byte(`null`), + }, + }, + }, + }, } return claim }(), }, - "missing-parameters-name": { - wantFailures: field.ErrorList{field.Required(field.NewPath("spec", "parametersRef", "name"), "")}, + "CEL-compile-errors": { + wantFailures: field.ErrorList{ + field.Invalid(field.NewPath("spec", "devices", "requests").Index(1).Child("selectors").Index(1).Child("cel"), `device.attributes[true].someBoolean`, "compilation failed: ERROR: :1:18: found no matching overload for '_[_]' applied to '(map(string, map(string, any)), bool)'\n | device.attributes[true].someBoolean\n | .................^"), + }, claim: func() *resource.ResourceClaim { - claim := testClaim(goodName, goodNS, goodClaimSpec) - claim.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - Kind: "foo", + claim := testClaim(goodName, goodNS, validClaimSpec) + claim.Spec.Devices.Requests = append(claim.Spec.Devices.Requests, claim.Spec.Devices.Requests[0]) + claim.Spec.Devices.Requests[1].Name += "-2" + claim.Spec.Devices.Requests[1].Selectors = []resource.DeviceSelector{ + { + // Good selector. + CEL: &resource.CELDeviceSelector{ + Expression: `device.driver == "dra.example.com"`, + }, + }, + { + // Bad selector. + CEL: &resource.CELDeviceSelector{ + Expression: `device.attributes[true].someBoolean`, + }, + }, } return claim }(), @@ -254,23 +320,13 @@ func TestValidateClaim(t *testing.T) { for name, scenario := range scenarios { t.Run(name, func(t *testing.T) { - errs := ValidateClaim(scenario.claim) + errs := ValidateResourceClaim(scenario.claim) assert.Equal(t, scenario.wantFailures, errs) }) } } func TestValidateClaimUpdate(t *testing.T) { - name := "valid" - parameters := &resource.ResourceClaimParametersReference{ - Kind: "foo", - Name: "bar", - } - validClaim := testClaim("foo", "ns", resource.ResourceClaimSpec{ - ResourceClassName: name, - ParametersRef: parameters, - }) - scenarios := map[string]struct { oldClaim *resource.ResourceClaim update func(claim *resource.ResourceClaim) *resource.ResourceClaim @@ -283,24 +339,12 @@ func TestValidateClaimUpdate(t *testing.T) { "invalid-update-class": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec"), func() resource.ResourceClaimSpec { spec := validClaim.Spec.DeepCopy() - spec.ResourceClassName += "2" - return *spec - }(), "field is immutable")}, - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Spec.ResourceClassName += "2" - return claim - }, - }, - "invalid-update-remove-parameters": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec"), func() resource.ResourceClaimSpec { - spec := validClaim.Spec.DeepCopy() - spec.ParametersRef = nil + spec.Devices.Requests[0].DeviceClassName += "2" return *spec }(), "field is immutable")}, oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Spec.ParametersRef = nil + claim.Spec.Devices.Requests[0].DeviceClassName += "2" return claim }, }, @@ -309,33 +353,24 @@ func TestValidateClaimUpdate(t *testing.T) { for name, scenario := range scenarios { t.Run(name, func(t *testing.T) { scenario.oldClaim.ResourceVersion = "1" - errs := ValidateClaimUpdate(scenario.update(scenario.oldClaim.DeepCopy()), scenario.oldClaim) + errs := ValidateResourceClaimUpdate(scenario.update(scenario.oldClaim.DeepCopy()), scenario.oldClaim) assert.Equal(t, scenario.wantFailures, errs) }) } } func TestValidateClaimStatusUpdate(t *testing.T) { - invalidName := "!@#$%^" - validClaim := testClaim("foo", "ns", resource.ResourceClaimSpec{ - ResourceClassName: "valid", - }) - validAllocatedClaim := validClaim.DeepCopy() validAllocatedClaim.Status = resource.ResourceClaimStatus{ - DriverName: "valid", Allocation: &resource.AllocationResult{ - ResourceHandles: func() []resource.ResourceHandle { - var handles []resource.ResourceHandle - for i := 0; i < resource.AllocationResultResourceHandlesMaxSize; i++ { - handle := resource.ResourceHandle{ - DriverName: "valid", - Data: strings.Repeat(" ", resource.ResourceHandleDataMaxSize), - } - handles = append(handles, handle) - } - return handles - }(), + Devices: resource.DeviceAllocationResult{ + Results: []resource.DeviceRequestAllocationResult{{ + Request: goodName, + Driver: goodName, + Pool: goodName, + Device: goodName, + }}, + }, }, } @@ -348,176 +383,55 @@ func TestValidateClaimStatusUpdate(t *testing.T) { oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { return claim }, }, - "add-driver": { + "valid-add-allocation-empty": { oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" - return claim - }, - }, - "invalid-add-allocation": { - wantFailures: field.ErrorList{field.Required(field.NewPath("status", "driverName"), "must be specified when `allocation` is set")}, - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - // DriverName must also get set here! claim.Status.Allocation = &resource.AllocationResult{} return claim }, }, - "valid-add-allocation": { + "valid-add-allocation-non-empty": { oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: []resource.ResourceHandle{ - { - DriverName: "valid", - Data: strings.Repeat(" ", resource.ResourceHandleDataMaxSize), - }, + Devices: resource.DeviceAllocationResult{ + Results: []resource.DeviceRequestAllocationResult{{ + Request: goodName, + Driver: goodName, + Pool: goodName, + Device: goodName, + }}, }, } return claim }, }, - "valid-add-empty-allocation-structured": { - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" - claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: []resource.ResourceHandle{ - { - DriverName: "valid", - StructuredData: &resource.StructuredResourceHandle{}, - }, - }, - } - return claim - }, - }, - "valid-add-allocation-structured": { - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" - claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: []resource.ResourceHandle{ - { - DriverName: "valid", - StructuredData: &resource.StructuredResourceHandle{ - NodeName: "worker", - }, - }, - }, - } - return claim - }, - }, - "invalid-add-allocation-structured": { + "invalid-add-allocation-bad-request": { wantFailures: field.ErrorList{ - field.Invalid(field.NewPath("status", "allocation", "resourceHandles").Index(0).Child("structuredData", "nodeName"), "&^!", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), - field.Required(field.NewPath("status", "allocation", "resourceHandles").Index(0).Child("structuredData", "results").Index(1), "exactly one structured model field must be set"), + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("request"), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"), + field.Invalid(field.NewPath("status", "allocation", "devices", "results").Index(0).Child("request"), badName, "must be the name of a request in the claim"), }, oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" - claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: []resource.ResourceHandle{ - { - DriverName: "valid", - StructuredData: &resource.StructuredResourceHandle{ - NodeName: "&^!", - Results: []resource.DriverAllocationResult{ - { - AllocationResultModel: resource.AllocationResultModel{ - NamedResources: &resource.NamedResourcesAllocationResult{ - Name: "some-resource-instance", - }, - }, - }, - { - AllocationResultModel: resource.AllocationResultModel{}, // invalid - }, - }, - }, - }, - }, - } - return claim - }, - }, - "invalid-duplicated-data": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("status", "allocation", "resourceHandles").Index(0), nil, "data and structuredData are mutually exclusive")}, - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" - claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: []resource.ResourceHandle{ - { - DriverName: "valid", - Data: "something", - StructuredData: &resource.StructuredResourceHandle{ - NodeName: "worker", - }, - }, - }, - } - return claim - }, - }, - "invalid-allocation-resourceHandles": { - wantFailures: field.ErrorList{field.TooLongMaxLength(field.NewPath("status", "allocation", "resourceHandles"), resource.AllocationResultResourceHandlesMaxSize+1, resource.AllocationResultResourceHandlesMaxSize)}, - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" - claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: func() []resource.ResourceHandle { - var handles []resource.ResourceHandle - for i := 0; i < resource.AllocationResultResourceHandlesMaxSize+1; i++ { - handles = append(handles, resource.ResourceHandle{DriverName: "valid"}) - } - return handles - }(), - } - return claim - }, - }, - "invalid-allocation-resource-handle-drivername": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("status", "allocation", "resourceHandles[0]", "driverName"), invalidName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: []resource.ResourceHandle{ - { - DriverName: invalidName, - }, - }, - } - return claim - }, - }, - "invalid-allocation-resource-handle-data": { - wantFailures: field.ErrorList{field.TooLongMaxLength(field.NewPath("status", "allocation", "resourceHandles").Index(0).Child("data"), resource.ResourceHandleDataMaxSize+1, resource.ResourceHandleDataMaxSize)}, - oldClaim: validClaim, - update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" - claim.Status.Allocation = &resource.AllocationResult{ - ResourceHandles: []resource.ResourceHandle{ - { - DriverName: "valid", - Data: strings.Repeat(" ", resource.ResourceHandleDataMaxSize+1), - }, + Devices: resource.DeviceAllocationResult{ + Results: []resource.DeviceRequestAllocationResult{{ + Request: badName, + Driver: goodName, + Pool: goodName, + Device: goodName, + }}, }, } return claim }, }, "invalid-node-selector": { - wantFailures: field.ErrorList{field.Required(field.NewPath("status", "allocation", "availableOnNodes", "nodeSelectorTerms"), "must have at least one node selector term")}, + wantFailures: field.ErrorList{field.Required(field.NewPath("status", "allocation", "nodeSelector", "nodeSelectorTerms"), "must have at least one node selector term")}, oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" claim.Status.Allocation = &resource.AllocationResult{ - AvailableOnNodes: &core.NodeSelector{ + NodeSelector: &core.NodeSelector{ // Must not be empty. }, } @@ -587,7 +501,6 @@ func TestValidateClaimStatusUpdate(t *testing.T) { wantFailures: field.ErrorList{field.Forbidden(field.NewPath("status", "reservedFor"), "may not be specified when `allocated` is not set")}, oldClaim: validClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.DriverName = "valid" claim.Status.ReservedFor = []resource.ResourceClaimConsumerReference{ { Resource: "pods", @@ -708,26 +621,12 @@ func TestValidateClaimStatusUpdate(t *testing.T) { "invalid-allocation-modification": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("status.allocation"), func() *resource.AllocationResult { claim := validAllocatedClaim.DeepCopy() - claim.Status.Allocation.ResourceHandles = []resource.ResourceHandle{ - { - DriverName: "valid", - Data: strings.Repeat(" ", resource.ResourceHandleDataMaxSize/2), - }, - } + claim.Status.Allocation.Devices.Results[0].Driver += "-2" return claim.Status.Allocation }(), "field is immutable")}, - oldClaim: func() *resource.ResourceClaim { - claim := validAllocatedClaim.DeepCopy() - claim.Status.DeallocationRequested = false - return claim - }(), + oldClaim: validAllocatedClaim, update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { - claim.Status.Allocation.ResourceHandles = []resource.ResourceHandle{ - { - DriverName: "valid", - Data: strings.Repeat(" ", resource.ResourceHandleDataMaxSize/2), - }, - } + claim.Status.Allocation.Devices.Results[0].Driver += "-2" return claim }, }, @@ -769,12 +668,36 @@ func TestValidateClaimStatusUpdate(t *testing.T) { return claim }, }, + "invalid-request-name": { + wantFailures: field.ErrorList{ + field.Invalid(field.NewPath("status", "allocation", "devices", "config").Index(0).Child("requests").Index(1), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')"), + field.Invalid(field.NewPath("status", "allocation", "devices", "config").Index(0).Child("requests").Index(1), badName, "must be the name of a request in the claim"), + }, + oldClaim: validClaim, + update: func(claim *resource.ResourceClaim) *resource.ResourceClaim { + claim = claim.DeepCopy() + claim.Status.Allocation = validAllocatedClaim.Status.Allocation.DeepCopy() + claim.Status.Allocation.Devices.Config = []resource.DeviceAllocationConfiguration{{ + Source: resource.AllocationConfigSourceClaim, + Requests: []string{claim.Spec.Devices.Requests[0].Name, badName}, + DeviceConfiguration: resource.DeviceConfiguration{ + Opaque: &resource.OpaqueDeviceConfiguration{ + Driver: "dra.example.com", + Parameters: runtime.RawExtension{ + Raw: []byte(`{"kind": "foo", "apiVersion": "dra.example.com/v1"}`), + }, + }, + }, + }} + return claim + }, + }, } for name, scenario := range scenarios { t.Run(name, func(t *testing.T) { scenario.oldClaim.ResourceVersion = "1" - errs := ValidateClaimStatusUpdate(scenario.update(scenario.oldClaim.DeepCopy()), scenario.oldClaim) + errs := ValidateResourceClaimStatusUpdate(scenario.update(scenario.oldClaim.DeepCopy()), scenario.oldClaim) assert.Equal(t, scenario.wantFailures, errs) }) } diff --git a/pkg/apis/resource/validation/validation_resourceclaimparameters_test.go b/pkg/apis/resource/validation/validation_resourceclaimparameters_test.go deleted file mode 100644 index f4af43f8b4610..0000000000000 --- a/pkg/apis/resource/validation/validation_resourceclaimparameters_test.go +++ /dev/null @@ -1,306 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/utils/ptr" -) - -func testResourceClaimParameters(name, namespace string, requests []resource.DriverRequests) *resource.ResourceClaimParameters { - return &resource.ResourceClaimParameters{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - }, - DriverRequests: requests, - } -} - -var goodRequests []resource.DriverRequests - -func TestValidateResourceClaimParameters(t *testing.T) { - goodName := "foo" - badName := "!@#$%^" - badValue := "spaces not allowed" - now := metav1.Now() - - scenarios := map[string]struct { - parameters *resource.ResourceClaimParameters - wantFailures field.ErrorList - }{ - "good": { - parameters: testResourceClaimParameters(goodName, goodName, goodRequests), - }, - "missing-name": { - wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, - parameters: testResourceClaimParameters("", goodName, goodRequests), - }, - "missing-namespace": { - wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "namespace"), "")}, - parameters: testResourceClaimParameters(goodName, "", goodRequests), - }, - "bad-name": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - parameters: testResourceClaimParameters(badName, goodName, goodRequests), - }, - "bad-namespace": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "namespace"), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')")}, - parameters: testResourceClaimParameters(goodName, badName, goodRequests), - }, - "generate-name": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.GenerateName = "prefix-" - return parameters - }(), - }, - "uid": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" - return parameters - }(), - }, - "resource-version": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.ResourceVersion = "1" - return parameters - }(), - }, - "generation": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.Generation = 100 - return parameters - }(), - }, - "creation-timestamp": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.CreationTimestamp = now - return parameters - }(), - }, - "deletion-grace-period-seconds": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.DeletionGracePeriodSeconds = ptr.To[int64](10) - return parameters - }(), - }, - "owner-references": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.OwnerReferences = []metav1.OwnerReference{ - { - APIVersion: "v1", - Kind: "pod", - Name: "foo", - UID: "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d", - }, - } - return parameters - }(), - }, - "finalizers": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.Finalizers = []string{ - "example.com/foo", - } - return parameters - }(), - }, - "managed-fields": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.ManagedFields = []metav1.ManagedFieldsEntry{ - { - FieldsType: "FieldsV1", - Operation: "Apply", - APIVersion: "apps/v1", - Manager: "foo", - }, - } - return parameters - }(), - }, - "good-labels": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.Labels = map[string]string{ - "apps.kubernetes.io/name": "test", - } - return parameters - }(), - }, - "bad-labels": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.Labels = map[string]string{ - "hello-world": badValue, - } - return parameters - }(), - }, - "good-annotations": { - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.Annotations = map[string]string{ - "foo": "bar", - } - return parameters - }(), - }, - "bad-annotations": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.Annotations = map[string]string{ - badName: "hello world", - } - return parameters - }(), - }, - - "empty-model": { - wantFailures: field.ErrorList{field.Required(field.NewPath("driverRequests").Index(0).Child("requests").Index(0), "exactly one structured model field must be set")}, - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.DriverRequests = []resource.DriverRequests{{DriverName: goodName, Requests: []resource.ResourceRequest{{}}}} - return parameters - }(), - }, - - "empty-requests": { - wantFailures: field.ErrorList{field.Required(field.NewPath("driverRequests").Index(0).Child("requests"), "empty entries with no requests are not allowed")}, - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.DriverRequests = []resource.DriverRequests{{DriverName: goodName}} - return parameters - }(), - }, - - "invalid-driver": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverRequests").Index(1).Child("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.DriverRequests = []resource.DriverRequests{ - { - DriverName: goodName, - Requests: []resource.ResourceRequest{ - { - ResourceRequestModel: resource.ResourceRequestModel{ - NamedResources: &resource.NamedResourcesRequest{Selector: "true"}, - }, - }, - }, - }, - { - DriverName: badName, - Requests: []resource.ResourceRequest{ - { - ResourceRequestModel: resource.ResourceRequestModel{ - NamedResources: &resource.NamedResourcesRequest{Selector: "true"}, - }, - }, - }, - }, - } - return parameters - }(), - }, - - "duplicate-driver": { - wantFailures: field.ErrorList{field.Duplicate(field.NewPath("driverRequests").Index(1).Child("driverName"), goodName)}, - parameters: func() *resource.ResourceClaimParameters { - parameters := testResourceClaimParameters(goodName, goodName, goodRequests) - parameters.DriverRequests = []resource.DriverRequests{ - { - DriverName: goodName, - Requests: []resource.ResourceRequest{ - { - ResourceRequestModel: resource.ResourceRequestModel{ - NamedResources: &resource.NamedResourcesRequest{Selector: "true"}, - }, - }, - }, - }, - { - DriverName: goodName, - Requests: []resource.ResourceRequest{ - { - ResourceRequestModel: resource.ResourceRequestModel{ - NamedResources: &resource.NamedResourcesRequest{Selector: "true"}, - }, - }, - }, - }, - } - return parameters - }(), - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - errs := ValidateResourceClaimParameters(scenario.parameters) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} - -func TestValidateResourceClaimParametersUpdate(t *testing.T) { - name := "valid" - validResourceClaimParameters := testResourceClaimParameters(name, name, nil) - - scenarios := map[string]struct { - oldResourceClaimParameters *resource.ResourceClaimParameters - update func(claim *resource.ResourceClaimParameters) *resource.ResourceClaimParameters - wantFailures field.ErrorList - }{ - "valid-no-op-update": { - oldResourceClaimParameters: validResourceClaimParameters, - update: func(claim *resource.ResourceClaimParameters) *resource.ResourceClaimParameters { return claim }, - }, - "invalid-name-update": { - oldResourceClaimParameters: validResourceClaimParameters, - update: func(claim *resource.ResourceClaimParameters) *resource.ResourceClaimParameters { - claim.Name += "-update" - return claim - }, - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), name+"-update", "field is immutable")}, - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - scenario.oldResourceClaimParameters.ResourceVersion = "1" - errs := ValidateResourceClaimParametersUpdate(scenario.update(scenario.oldResourceClaimParameters.DeepCopy()), scenario.oldResourceClaimParameters) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} diff --git a/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go b/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go index ba51420c26888..9c4640fb75b8b 100644 --- a/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go +++ b/pkg/apis/resource/validation/validation_resourceclaimtemplate_test.go @@ -34,87 +34,79 @@ func testClaimTemplate(name, namespace string, spec resource.ResourceClaimSpec) Namespace: namespace, }, Spec: resource.ResourceClaimTemplateSpec{ - Spec: spec, + Spec: *spec.DeepCopy(), }, } } func TestValidateClaimTemplate(t *testing.T) { - goodName := "foo" - badName := "!@#$%^" - goodNS := "ns" - goodClaimSpec := resource.ResourceClaimSpec{ - ResourceClassName: goodName, - } now := metav1.Now() badValue := "spaces not allowed" - badAPIGroup := "example.com/v1" - goodAPIGroup := "example.com" scenarios := map[string]struct { template *resource.ResourceClaimTemplate wantFailures field.ErrorList }{ "good-claim": { - template: testClaimTemplate(goodName, goodNS, goodClaimSpec), + template: testClaimTemplate(goodName, goodNS, validClaimSpec), }, "missing-name": { wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, - template: testClaimTemplate("", goodNS, goodClaimSpec), + template: testClaimTemplate("", goodNS, validClaimSpec), }, "bad-name": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - template: testClaimTemplate(badName, goodNS, goodClaimSpec), + template: testClaimTemplate(badName, goodNS, validClaimSpec), }, "missing-namespace": { wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "namespace"), "")}, - template: testClaimTemplate(goodName, "", goodClaimSpec), + template: testClaimTemplate(goodName, "", validClaimSpec), }, "generate-name": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.GenerateName = "pvc-" return template }(), }, "uid": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" return template }(), }, "resource-version": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.ResourceVersion = "1" return template }(), }, "generation": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.Generation = 100 return template }(), }, "creation-timestamp": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.CreationTimestamp = now return template }(), }, "deletion-grace-period-seconds": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.DeletionGracePeriodSeconds = pointer.Int64(10) return template }(), }, "owner-references": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.OwnerReferences = []metav1.OwnerReference{ { APIVersion: "v1", @@ -128,7 +120,7 @@ func TestValidateClaimTemplate(t *testing.T) { }, "finalizers": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.Finalizers = []string{ "example.com/foo", } @@ -137,7 +129,7 @@ func TestValidateClaimTemplate(t *testing.T) { }, "managed-fields": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.ManagedFields = []metav1.ManagedFieldsEntry{ { FieldsType: "FieldsV1", @@ -151,7 +143,7 @@ func TestValidateClaimTemplate(t *testing.T) { }, "good-labels": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.Labels = map[string]string{ "apps.kubernetes.io/name": "test", } @@ -161,7 +153,7 @@ func TestValidateClaimTemplate(t *testing.T) { "bad-labels": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.Labels = map[string]string{ "hello-world": badValue, } @@ -170,7 +162,7 @@ func TestValidateClaimTemplate(t *testing.T) { }, "good-annotations": { template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.Annotations = map[string]string{ "foo": "bar", } @@ -180,7 +172,7 @@ func TestValidateClaimTemplate(t *testing.T) { "bad-annotations": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) + template := testClaimTemplate(goodName, goodNS, validClaimSpec) template.Annotations = map[string]string{ badName: "hello world", } @@ -188,63 +180,10 @@ func TestValidateClaimTemplate(t *testing.T) { }(), }, "bad-classname": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "spec", "resourceClassName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) - template.Spec.Spec.ResourceClassName = badName - return template - }(), - }, - "good-parameters": { - template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) - template.Spec.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - Kind: "foo", - Name: "bar", - } - return template - }(), - }, - "good-parameters-apigroup": { - template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) - template.Spec.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - APIGroup: goodAPIGroup, - Kind: "foo", - Name: "bar", - } - return template - }(), - }, - "bad-parameters-apigroup": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "spec", "parametersRef", "apiGroup"), badAPIGroup, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) - template.Spec.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - APIGroup: badAPIGroup, - Kind: "foo", - Name: "bar", - } - return template - }(), - }, - "missing-parameters-kind": { - wantFailures: field.ErrorList{field.Required(field.NewPath("spec", "spec", "parametersRef", "kind"), "")}, + wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "spec", "devices", "requests").Index(0).Child("deviceClassName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) - template.Spec.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - Name: "bar", - } - return template - }(), - }, - "missing-parameters-name": { - wantFailures: field.ErrorList{field.Required(field.NewPath("spec", "spec", "parametersRef", "name"), "")}, - template: func() *resource.ResourceClaimTemplate { - template := testClaimTemplate(goodName, goodNS, goodClaimSpec) - template.Spec.Spec.ParametersRef = &resource.ResourceClaimParametersReference{ - Kind: "foo", - } + template := testClaimTemplate(goodName, goodNS, validClaimSpec) + template.Spec.Spec.Devices.Requests[0].DeviceClassName = badName return template }(), }, @@ -252,22 +191,14 @@ func TestValidateClaimTemplate(t *testing.T) { for name, scenario := range scenarios { t.Run(name, func(t *testing.T) { - errs := ValidateClaimTemplate(scenario.template) + errs := ValidateResourceClaimTemplate(scenario.template) assert.Equal(t, scenario.wantFailures, errs) }) } } func TestValidateClaimTemplateUpdate(t *testing.T) { - name := "valid" - parameters := &resource.ResourceClaimParametersReference{ - Kind: "foo", - Name: "bar", - } - validClaimTemplate := testClaimTemplate("foo", "ns", resource.ResourceClaimSpec{ - ResourceClassName: name, - ParametersRef: parameters, - }) + validClaimTemplate := testClaimTemplate(goodName, goodNS, validClaimSpec) scenarios := map[string]struct { oldClaimTemplate *resource.ResourceClaimTemplate @@ -281,24 +212,12 @@ func TestValidateClaimTemplateUpdate(t *testing.T) { "invalid-update-class": { wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec"), func() resource.ResourceClaimTemplateSpec { spec := validClaimTemplate.Spec.DeepCopy() - spec.Spec.ResourceClassName += "2" - return *spec - }(), "field is immutable")}, - oldClaimTemplate: validClaimTemplate, - update: func(template *resource.ResourceClaimTemplate) *resource.ResourceClaimTemplate { - template.Spec.Spec.ResourceClassName += "2" - return template - }, - }, - "invalid-update-remove-parameters": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec"), func() resource.ResourceClaimTemplateSpec { - spec := validClaimTemplate.Spec.DeepCopy() - spec.Spec.ParametersRef = nil + spec.Spec.Devices.Requests[0].DeviceClassName += "2" return *spec }(), "field is immutable")}, oldClaimTemplate: validClaimTemplate, update: func(template *resource.ResourceClaimTemplate) *resource.ResourceClaimTemplate { - template.Spec.Spec.ParametersRef = nil + template.Spec.Spec.Devices.Requests[0].DeviceClassName += "2" return template }, }, @@ -307,7 +226,7 @@ func TestValidateClaimTemplateUpdate(t *testing.T) { for name, scenario := range scenarios { t.Run(name, func(t *testing.T) { scenario.oldClaimTemplate.ResourceVersion = "1" - errs := ValidateClaimTemplateUpdate(scenario.update(scenario.oldClaimTemplate.DeepCopy()), scenario.oldClaimTemplate) + errs := ValidateResourceClaimTemplateUpdate(scenario.update(scenario.oldClaimTemplate.DeepCopy()), scenario.oldClaimTemplate) assert.Equal(t, scenario.wantFailures, errs) }) } diff --git a/pkg/apis/resource/validation/validation_resourceclass_test.go b/pkg/apis/resource/validation/validation_resourceclass_test.go deleted file mode 100644 index e4de81d04e52e..0000000000000 --- a/pkg/apis/resource/validation/validation_resourceclass_test.go +++ /dev/null @@ -1,301 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/utils/pointer" -) - -func testClass(name, driverName string) *resource.ResourceClass { - return &resource.ResourceClass{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - }, - DriverName: driverName, - } -} - -func TestValidateClass(t *testing.T) { - goodName := "foo" - now := metav1.Now() - goodParameters := resource.ResourceClassParametersReference{ - Name: "valid", - Namespace: "valid", - Kind: "foo", - } - badName := "!@#$%^" - badValue := "spaces not allowed" - badAPIGroup := "example.com/v1" - goodAPIGroup := "example.com" - - scenarios := map[string]struct { - class *resource.ResourceClass - wantFailures field.ErrorList - }{ - "good-class": { - class: testClass(goodName, goodName), - }, - "good-long-driver-name": { - class: testClass(goodName, "acme.example.com"), - }, - "missing-name": { - wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, - class: testClass("", goodName), - }, - "bad-name": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - class: testClass(badName, goodName), - }, - "generate-name": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.GenerateName = "pvc-" - return class - }(), - }, - "uid": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" - return class - }(), - }, - "resource-version": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ResourceVersion = "1" - return class - }(), - }, - "generation": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.Generation = 100 - return class - }(), - }, - "creation-timestamp": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.CreationTimestamp = now - return class - }(), - }, - "deletion-grace-period-seconds": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.DeletionGracePeriodSeconds = pointer.Int64(10) - return class - }(), - }, - "owner-references": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.OwnerReferences = []metav1.OwnerReference{ - { - APIVersion: "v1", - Kind: "pod", - Name: "foo", - UID: "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d", - }, - } - return class - }(), - }, - "finalizers": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.Finalizers = []string{ - "example.com/foo", - } - return class - }(), - }, - "managed-fields": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ManagedFields = []metav1.ManagedFieldsEntry{ - { - FieldsType: "FieldsV1", - Operation: "Apply", - APIVersion: "apps/v1", - Manager: "foo", - }, - } - return class - }(), - }, - "good-labels": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.Labels = map[string]string{ - "apps.kubernetes.io/name": "test", - } - return class - }(), - }, - "bad-labels": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.Labels = map[string]string{ - "hello-world": badValue, - } - return class - }(), - }, - "good-annotations": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.Annotations = map[string]string{ - "foo": "bar", - } - return class - }(), - }, - "bad-annotations": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.Annotations = map[string]string{ - badName: "hello world", - } - return class - }(), - }, - "missing-driver-name": { - wantFailures: field.ErrorList{field.Required(field.NewPath("driverName"), ""), - field.Invalid(field.NewPath("driverName"), "", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), - }, - class: testClass(goodName, ""), - }, - "invalid-driver-name": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - class: testClass(goodName, badName), - }, - "invalid-qualified-driver-name": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverName"), goodName+"/path", "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - class: testClass(goodName, goodName+"/path"), - }, - "good-parameters": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ParametersRef = goodParameters.DeepCopy() - return class - }(), - }, - "good-parameters-apigroup": { - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ParametersRef = goodParameters.DeepCopy() - class.ParametersRef.APIGroup = goodAPIGroup - return class - }(), - }, - "bad-parameters-apigroup": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("parametersRef", "apiGroup"), badAPIGroup, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ParametersRef = goodParameters.DeepCopy() - class.ParametersRef.APIGroup = badAPIGroup - return class - }(), - }, - "missing-parameters-name": { - wantFailures: field.ErrorList{field.Required(field.NewPath("parametersRef", "name"), "")}, - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ParametersRef = goodParameters.DeepCopy() - class.ParametersRef.Name = "" - return class - }(), - }, - "bad-parameters-namespace": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("parametersRef", "namespace"), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')")}, - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ParametersRef = goodParameters.DeepCopy() - class.ParametersRef.Namespace = badName - return class - }(), - }, - "missing-parameters-kind": { - wantFailures: field.ErrorList{field.Required(field.NewPath("parametersRef", "kind"), "")}, - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.ParametersRef = goodParameters.DeepCopy() - class.ParametersRef.Kind = "" - return class - }(), - }, - "invalid-node-selector": { - wantFailures: field.ErrorList{field.Required(field.NewPath("suitableNodes", "nodeSelectorTerms"), "must have at least one node selector term")}, - class: func() *resource.ResourceClass { - class := testClass(goodName, goodName) - class.SuitableNodes = &core.NodeSelector{ - // Must not be empty. - } - return class - }(), - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - errs := ValidateClass(scenario.class) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} - -func TestValidateClassUpdate(t *testing.T) { - validClass := testClass("foo", "valid") - - scenarios := map[string]struct { - oldClass *resource.ResourceClass - update func(class *resource.ResourceClass) *resource.ResourceClass - wantFailures field.ErrorList - }{ - "valid-no-op-update": { - oldClass: validClass, - update: func(class *resource.ResourceClass) *resource.ResourceClass { return class }, - }, - "update-driver": { - oldClass: validClass, - update: func(class *resource.ResourceClass) *resource.ResourceClass { - class.DriverName += "2" - return class - }, - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - scenario.oldClass.ResourceVersion = "1" - errs := ValidateClassUpdate(scenario.update(scenario.oldClass.DeepCopy()), scenario.oldClass) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} diff --git a/pkg/apis/resource/validation/validation_resourceclassparameters_test.go b/pkg/apis/resource/validation/validation_resourceclassparameters_test.go deleted file mode 100644 index 8286bf44d3261..0000000000000 --- a/pkg/apis/resource/validation/validation_resourceclassparameters_test.go +++ /dev/null @@ -1,313 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package validation - -import ( - "testing" - - "github.com/stretchr/testify/assert" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/utils/ptr" -) - -func testResourceClassParameters(name, namespace string, filters []resource.ResourceFilter) *resource.ResourceClassParameters { - return &resource.ResourceClassParameters{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: namespace, - }, - Filters: filters, - } -} - -var goodFilters []resource.ResourceFilter - -func TestValidateResourceClassParameters(t *testing.T) { - goodName := "foo" - badName := "!@#$%^" - badValue := "spaces not allowed" - now := metav1.Now() - - scenarios := map[string]struct { - parameters *resource.ResourceClassParameters - wantFailures field.ErrorList - }{ - "good": { - parameters: testResourceClassParameters(goodName, goodName, goodFilters), - }, - "missing-name": { - wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")}, - parameters: testResourceClassParameters("", goodName, goodFilters), - }, - "missing-namespace": { - wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "namespace"), "")}, - parameters: testResourceClassParameters(goodName, "", goodFilters), - }, - "bad-name": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - parameters: testResourceClassParameters(badName, goodName, goodFilters), - }, - "bad-namespace": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "namespace"), badName, "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')")}, - parameters: testResourceClassParameters(goodName, badName, goodFilters), - }, - "generate-name": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.GenerateName = "prefix-" - return parameters - }(), - }, - "uid": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.UID = "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d" - return parameters - }(), - }, - "resource-version": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.ResourceVersion = "1" - return parameters - }(), - }, - "generation": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Generation = 100 - return parameters - }(), - }, - "creation-timestamp": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.CreationTimestamp = now - return parameters - }(), - }, - "deletion-grace-period-seconds": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.DeletionGracePeriodSeconds = ptr.To[int64](10) - return parameters - }(), - }, - "owner-references": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.OwnerReferences = []metav1.OwnerReference{ - { - APIVersion: "v1", - Kind: "pod", - Name: "foo", - UID: "ac051fac-2ead-46d9-b8b4-4e0fbeb7455d", - }, - } - return parameters - }(), - }, - "finalizers": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Finalizers = []string{ - "example.com/foo", - } - return parameters - }(), - }, - "managed-fields": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.ManagedFields = []metav1.ManagedFieldsEntry{ - { - FieldsType: "FieldsV1", - Operation: "Apply", - APIVersion: "apps/v1", - Manager: "foo", - }, - } - return parameters - }(), - }, - "good-labels": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Labels = map[string]string{ - "apps.kubernetes.io/name": "test", - } - return parameters - }(), - }, - "bad-labels": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "labels"), badValue, "a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')")}, - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Labels = map[string]string{ - "hello-world": badValue, - } - return parameters - }(), - }, - "good-annotations": { - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Annotations = map[string]string{ - "foo": "bar", - } - return parameters - }(), - }, - "bad-annotations": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "annotations"), badName, "name part must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]')")}, - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Annotations = map[string]string{ - badName: "hello world", - } - return parameters - }(), - }, - - "empty-model": { - wantFailures: field.ErrorList{field.Required(field.NewPath("filters").Index(0), "exactly one structured model field must be set")}, - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Filters = []resource.ResourceFilter{{DriverName: goodName}} - return parameters - }(), - }, - - "filters-invalid-driver": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("filters").Index(1).Child("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Filters = []resource.ResourceFilter{ - { - DriverName: goodName, - ResourceFilterModel: resource.ResourceFilterModel{ - NamedResources: &resource.NamedResourcesFilter{Selector: "true"}, - }, - }, - { - DriverName: badName, - ResourceFilterModel: resource.ResourceFilterModel{ - NamedResources: &resource.NamedResourcesFilter{Selector: "true"}, - }, - }, - } - return parameters - }(), - }, - - "filters-duplicate-driver": { - wantFailures: field.ErrorList{field.Duplicate(field.NewPath("filters").Index(1).Child("driverName"), goodName)}, - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.Filters = []resource.ResourceFilter{ - { - DriverName: goodName, - ResourceFilterModel: resource.ResourceFilterModel{ - NamedResources: &resource.NamedResourcesFilter{Selector: "true"}, - }, - }, - { - DriverName: goodName, - ResourceFilterModel: resource.ResourceFilterModel{ - NamedResources: &resource.NamedResourcesFilter{Selector: "true"}, - }, - }, - } - return parameters - }(), - }, - - "parameters-invalid-driver": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("vendorParameters").Index(1).Child("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.VendorParameters = []resource.VendorParameters{ - { - DriverName: goodName, - }, - { - DriverName: badName, - }, - } - return parameters - }(), - }, - - "parameters-duplicate-driver": { - wantFailures: field.ErrorList{field.Duplicate(field.NewPath("vendorParameters").Index(1).Child("driverName"), goodName)}, - parameters: func() *resource.ResourceClassParameters { - parameters := testResourceClassParameters(goodName, goodName, goodFilters) - parameters.VendorParameters = []resource.VendorParameters{ - { - DriverName: goodName, - }, - { - DriverName: goodName, - }, - } - return parameters - }(), - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - errs := ValidateResourceClassParameters(scenario.parameters) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} - -func TestValidateResourceClassParametersUpdate(t *testing.T) { - name := "valid" - validResourceClassParameters := testResourceClassParameters(name, name, nil) - - scenarios := map[string]struct { - oldResourceClassParameters *resource.ResourceClassParameters - update func(class *resource.ResourceClassParameters) *resource.ResourceClassParameters - wantFailures field.ErrorList - }{ - "valid-no-op-update": { - oldResourceClassParameters: validResourceClassParameters, - update: func(class *resource.ResourceClassParameters) *resource.ResourceClassParameters { return class }, - }, - "invalid-name-update": { - oldResourceClassParameters: validResourceClassParameters, - update: func(class *resource.ResourceClassParameters) *resource.ResourceClassParameters { - class.Name += "-update" - return class - }, - wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), name+"-update", "field is immutable")}, - }, - } - - for name, scenario := range scenarios { - t.Run(name, func(t *testing.T) { - scenario.oldResourceClassParameters.ResourceVersion = "1" - errs := ValidateResourceClassParametersUpdate(scenario.update(scenario.oldResourceClassParameters.DeepCopy()), scenario.oldResourceClassParameters) - assert.Equal(t, scenario.wantFailures, errs) - }) - } -} diff --git a/pkg/apis/resource/validation/validation_resourceslice_test.go b/pkg/apis/resource/validation/validation_resourceslice_test.go index 8e68fdcefb2e3..1b830a1acc2e2 100644 --- a/pkg/apis/resource/validation/validation_resourceslice_test.go +++ b/pkg/apis/resource/validation/validation_resourceslice_test.go @@ -32,10 +32,13 @@ func testResourceSlice(name, nodeName, driverName string) *resource.ResourceSlic ObjectMeta: metav1.ObjectMeta{ Name: name, }, - NodeName: nodeName, - DriverName: driverName, - ResourceModel: resource.ResourceModel{ - NamedResources: &resource.NamedResourcesResources{}, + Spec: resource.ResourceSliceSpec{ + NodeName: nodeName, + Driver: driverName, + Pool: resource.ResourcePool{ + Name: nodeName, + ResourceSliceCount: 1, + }, }, } } @@ -180,22 +183,24 @@ func TestValidateResourceSlice(t *testing.T) { }(), }, "bad-nodename": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("nodeName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, - slice: testResourceSlice(goodName, badName, driverName), + wantFailures: field.ErrorList{ + field.Invalid(field.NewPath("spec", "pool", "name"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + field.Invalid(field.NewPath("spec", "nodeName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + }, + slice: testResourceSlice(goodName, badName, driverName), + }, + "bad-multi-pool-name": { + wantFailures: field.ErrorList{ + field.Invalid(field.NewPath("spec", "pool", "name").Index(0), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + field.Invalid(field.NewPath("spec", "pool", "name").Index(1), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + field.Invalid(field.NewPath("spec", "nodeName"), badName+"/"+badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')"), + }, + slice: testResourceSlice(goodName, badName+"/"+badName, driverName), }, "bad-drivername": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverName"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, + wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "driver"), badName, "a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')")}, slice: testResourceSlice(goodName, goodName, badName), }, - - "empty-model": { - wantFailures: field.ErrorList{field.Required(nil, "exactly one structured model field must be set")}, - slice: func() *resource.ResourceSlice { - slice := testResourceSlice(goodName, goodName, driverName) - slice.ResourceModel = resource.ResourceModel{} - return slice - }(), - }, } for name, scenario := range scenarios { @@ -228,18 +233,30 @@ func TestValidateResourceSliceUpdate(t *testing.T) { wantFailures: field.ErrorList{field.Invalid(field.NewPath("metadata", "name"), name+"-update", "field is immutable")}, }, "invalid-update-nodename": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("nodeName"), name+"-updated", "field is immutable")}, + wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "nodeName"), name+"-updated", "field is immutable")}, oldResourceSlice: validResourceSlice, update: func(slice *resource.ResourceSlice) *resource.ResourceSlice { - slice.NodeName += "-updated" + slice.Spec.NodeName += "-updated" return slice }, }, "invalid-update-drivername": { - wantFailures: field.ErrorList{field.Invalid(field.NewPath("driverName"), name+"-updated", "field is immutable")}, + wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "driver"), name+"-updated", "field is immutable")}, + oldResourceSlice: validResourceSlice, + update: func(slice *resource.ResourceSlice) *resource.ResourceSlice { + slice.Spec.Driver += "-updated" + return slice + }, + }, + "invalid-update-pool": { + wantFailures: field.ErrorList{field.Invalid(field.NewPath("spec", "pool"), func() any { + slice := validResourceSlice.DeepCopy() + slice.Spec.Pool.Name += "-updated" + return slice.Spec.Pool + }(), "field is immutable")}, oldResourceSlice: validResourceSlice, update: func(slice *resource.ResourceSlice) *resource.ResourceSlice { - slice.DriverName += "-updated" + slice.Spec.Pool.Name += "-updated" return slice }, }, diff --git a/pkg/apis/resource/zz_generated.deepcopy.go b/pkg/apis/resource/zz_generated.deepcopy.go index ec26381c01b83..54b43208f4041 100644 --- a/pkg/apis/resource/zz_generated.deepcopy.go +++ b/pkg/apis/resource/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ limitations under the License. package resource import ( + apiresource "k8s.io/apimachinery/pkg/api/resource" runtime "k8s.io/apimachinery/pkg/runtime" core "k8s.io/kubernetes/pkg/apis/core" ) @@ -29,15 +30,9 @@ import ( // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { *out = *in - if in.ResourceHandles != nil { - in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]ResourceHandle, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AvailableOnNodes != nil { - in, out := &in.AvailableOnNodes, &out.AvailableOnNodes + in.Devices.DeepCopyInto(&out.Devices) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector *out = new(core.NodeSelector) (*in).DeepCopyInto(*out) } @@ -55,138 +50,140 @@ func (in *AllocationResult) DeepCopy() *AllocationResult { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AllocationResultModel) DeepCopyInto(out *AllocationResultModel) { +func (in *BasicDevice) DeepCopyInto(out *BasicDevice) { *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesAllocationResult) - **out = **in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[QualifiedName]DeviceAttribute, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(map[QualifiedName]apiresource.Quantity, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResultModel. -func (in *AllocationResultModel) DeepCopy() *AllocationResultModel { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicDevice. +func (in *BasicDevice) DeepCopy() *BasicDevice { if in == nil { return nil } - out := new(AllocationResultModel) + out := new(BasicDevice) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DriverAllocationResult) DeepCopyInto(out *DriverAllocationResult) { +func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector) { *out = *in - if in.VendorRequestParameters != nil { - out.VendorRequestParameters = in.VendorRequestParameters.DeepCopyObject() - } - in.AllocationResultModel.DeepCopyInto(&out.AllocationResultModel) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverAllocationResult. -func (in *DriverAllocationResult) DeepCopy() *DriverAllocationResult { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CELDeviceSelector. +func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector { if in == nil { return nil } - out := new(DriverAllocationResult) + out := new(CELDeviceSelector) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DriverRequests) DeepCopyInto(out *DriverRequests) { +func (in *Device) DeepCopyInto(out *Device) { *out = *in - if in.VendorParameters != nil { - out.VendorParameters = in.VendorParameters.DeepCopyObject() - } - if in.Requests != nil { - in, out := &in.Requests, &out.Requests - *out = make([]ResourceRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.Basic != nil { + in, out := &in.Basic, &out.Basic + *out = new(BasicDevice) + (*in).DeepCopyInto(*out) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverRequests. -func (in *DriverRequests) DeepCopy() *DriverRequests { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device. +func (in *Device) DeepCopy() *Device { if in == nil { return nil } - out := new(DriverRequests) + out := new(Device) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesAllocationResult) DeepCopyInto(out *NamedResourcesAllocationResult) { +func (in *DeviceAllocationConfiguration) DeepCopyInto(out *DeviceAllocationConfiguration) { *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAllocationResult. -func (in *NamedResourcesAllocationResult) DeepCopy() *NamedResourcesAllocationResult { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationConfiguration. +func (in *DeviceAllocationConfiguration) DeepCopy() *DeviceAllocationConfiguration { if in == nil { return nil } - out := new(NamedResourcesAllocationResult) + out := new(DeviceAllocationConfiguration) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesAttribute) DeepCopyInto(out *NamedResourcesAttribute) { +func (in *DeviceAllocationResult) DeepCopyInto(out *DeviceAllocationResult) { *out = *in - in.NamedResourcesAttributeValue.DeepCopyInto(&out.NamedResourcesAttributeValue) + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]DeviceRequestAllocationResult, len(*in)) + copy(*out, *in) + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceAllocationConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttribute. -func (in *NamedResourcesAttribute) DeepCopy() *NamedResourcesAttribute { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationResult. +func (in *DeviceAllocationResult) DeepCopy() *DeviceAllocationResult { if in == nil { return nil } - out := new(NamedResourcesAttribute) + out := new(DeviceAllocationResult) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesAttributeValue) DeepCopyInto(out *NamedResourcesAttributeValue) { +func (in *DeviceAttribute) DeepCopyInto(out *DeviceAttribute) { *out = *in - if in.QuantityValue != nil { - in, out := &in.QuantityValue, &out.QuantityValue - x := (*in).DeepCopy() - *out = &x - } - if in.BoolValue != nil { - in, out := &in.BoolValue, &out.BoolValue - *out = new(bool) - **out = **in - } if in.IntValue != nil { in, out := &in.IntValue, &out.IntValue *out = new(int64) **out = **in } - if in.IntSliceValue != nil { - in, out := &in.IntSliceValue, &out.IntSliceValue - *out = new(NamedResourcesIntSlice) - (*in).DeepCopyInto(*out) + if in.BoolValue != nil { + in, out := &in.BoolValue, &out.BoolValue + *out = new(bool) + **out = **in } if in.StringValue != nil { in, out := &in.StringValue, &out.StringValue *out = new(string) **out = **in } - if in.StringSliceValue != nil { - in, out := &in.StringSliceValue, &out.StringSliceValue - *out = new(NamedResourcesStringSlice) - (*in).DeepCopyInto(*out) - } if in.VersionValue != nil { in, out := &in.VersionValue, &out.VersionValue *out = new(string) @@ -195,98 +192,240 @@ func (in *NamedResourcesAttributeValue) DeepCopyInto(out *NamedResourcesAttribut return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttributeValue. -func (in *NamedResourcesAttributeValue) DeepCopy() *NamedResourcesAttributeValue { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAttribute. +func (in *DeviceAttribute) DeepCopy() *DeviceAttribute { if in == nil { return nil } - out := new(NamedResourcesAttributeValue) + out := new(DeviceAttribute) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesFilter) DeepCopyInto(out *NamedResourcesFilter) { +func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) { *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]DeviceRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = make([]DeviceConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceClaimConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesFilter. -func (in *NamedResourcesFilter) DeepCopy() *NamedResourcesFilter { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaim. +func (in *DeviceClaim) DeepCopy() *DeviceClaim { if in == nil { return nil } - out := new(NamedResourcesFilter) + out := new(DeviceClaim) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesInstance) DeepCopyInto(out *NamedResourcesInstance) { +func (in *DeviceClaimConfiguration) DeepCopyInto(out *DeviceClaimConfiguration) { *out = *in - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make([]NamedResourcesAttribute, len(*in)) + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaimConfiguration. +func (in *DeviceClaimConfiguration) DeepCopy() *DeviceClaimConfiguration { + if in == nil { + return nil + } + out := new(DeviceClaimConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClass) DeepCopyInto(out *DeviceClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClass. +func (in *DeviceClass) DeepCopy() *DeviceClass { + if in == nil { + return nil + } + out := new(DeviceClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviceClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassConfiguration) DeepCopyInto(out *DeviceClassConfiguration) { + *out = *in + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassConfiguration. +func (in *DeviceClassConfiguration) DeepCopy() *DeviceClassConfiguration { + if in == nil { + return nil + } + out := new(DeviceClassConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassList) DeepCopyInto(out *DeviceClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DeviceClass, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassList. +func (in *DeviceClassList) DeepCopy() *DeviceClassList { + if in == nil { + return nil + } + out := new(DeviceClassList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviceClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassSpec) DeepCopyInto(out *DeviceClassSpec) { + *out = *in + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = make([]DeviceSelector, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceClassConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SuitableNodes != nil { + in, out := &in.SuitableNodes, &out.SuitableNodes + *out = new(core.NodeSelector) + (*in).DeepCopyInto(*out) + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesInstance. -func (in *NamedResourcesInstance) DeepCopy() *NamedResourcesInstance { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassSpec. +func (in *DeviceClassSpec) DeepCopy() *DeviceClassSpec { if in == nil { return nil } - out := new(NamedResourcesInstance) + out := new(DeviceClassSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesIntSlice) DeepCopyInto(out *NamedResourcesIntSlice) { +func (in *DeviceConfiguration) DeepCopyInto(out *DeviceConfiguration) { *out = *in - if in.Ints != nil { - in, out := &in.Ints, &out.Ints - *out = make([]int64, len(*in)) - copy(*out, *in) + if in.Opaque != nil { + in, out := &in.Opaque, &out.Opaque + *out = new(OpaqueDeviceConfiguration) + (*in).DeepCopyInto(*out) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesIntSlice. -func (in *NamedResourcesIntSlice) DeepCopy() *NamedResourcesIntSlice { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConfiguration. +func (in *DeviceConfiguration) DeepCopy() *DeviceConfiguration { if in == nil { return nil } - out := new(NamedResourcesIntSlice) + out := new(DeviceConfiguration) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesRequest) DeepCopyInto(out *NamedResourcesRequest) { +func (in *DeviceConstraint) DeepCopyInto(out *DeviceConstraint) { *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MatchAttribute != nil { + in, out := &in.MatchAttribute, &out.MatchAttribute + *out = new(FullyQualifiedName) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesRequest. -func (in *NamedResourcesRequest) DeepCopy() *NamedResourcesRequest { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConstraint. +func (in *DeviceConstraint) DeepCopy() *DeviceConstraint { if in == nil { return nil } - out := new(NamedResourcesRequest) + out := new(DeviceConstraint) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesResources) DeepCopyInto(out *NamedResourcesResources) { +func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) { *out = *in - if in.Instances != nil { - in, out := &in.Instances, &out.Instances - *out = make([]NamedResourcesInstance, len(*in)) + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = make([]DeviceSelector, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -294,33 +433,66 @@ func (in *NamedResourcesResources) DeepCopyInto(out *NamedResourcesResources) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesResources. -func (in *NamedResourcesResources) DeepCopy() *NamedResourcesResources { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequest. +func (in *DeviceRequest) DeepCopy() *DeviceRequest { if in == nil { return nil } - out := new(NamedResourcesResources) + out := new(DeviceRequest) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesStringSlice) DeepCopyInto(out *NamedResourcesStringSlice) { +func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocationResult) { *out = *in - if in.Strings != nil { - in, out := &in.Strings, &out.Strings - *out = make([]string, len(*in)) - copy(*out, *in) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequestAllocationResult. +func (in *DeviceRequestAllocationResult) DeepCopy() *DeviceRequestAllocationResult { + if in == nil { + return nil + } + out := new(DeviceRequestAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector) { + *out = *in + if in.CEL != nil { + in, out := &in.CEL, &out.CEL + *out = new(CELDeviceSelector) + **out = **in } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesStringSlice. -func (in *NamedResourcesStringSlice) DeepCopy() *NamedResourcesStringSlice { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector. +func (in *DeviceSelector) DeepCopy() *DeviceSelector { if in == nil { return nil } - out := new(NamedResourcesStringSlice) + out := new(DeviceSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration. +func (in *OpaqueDeviceConfiguration) DeepCopy() *OpaqueDeviceConfiguration { + if in == nil { + return nil + } + out := new(OpaqueDeviceConfiguration) in.DeepCopyInto(out) return out } @@ -507,93 +679,6 @@ func (in *ResourceClaimList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClaimParameters) DeepCopyInto(out *ResourceClaimParameters) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.GeneratedFrom != nil { - in, out := &in.GeneratedFrom, &out.GeneratedFrom - *out = new(ResourceClaimParametersReference) - **out = **in - } - if in.DriverRequests != nil { - in, out := &in.DriverRequests, &out.DriverRequests - *out = make([]DriverRequests, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParameters. -func (in *ResourceClaimParameters) DeepCopy() *ResourceClaimParameters { - if in == nil { - return nil - } - out := new(ResourceClaimParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClaimParameters) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClaimParametersList) DeepCopyInto(out *ResourceClaimParametersList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceClaimParameters, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersList. -func (in *ResourceClaimParametersList) DeepCopy() *ResourceClaimParametersList { - if in == nil { - return nil - } - out := new(ResourceClaimParametersList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClaimParametersList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersReference. -func (in *ResourceClaimParametersReference) DeepCopy() *ResourceClaimParametersReference { - if in == nil { - return nil - } - out := new(ResourceClaimParametersReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClaimSchedulingStatus) DeepCopyInto(out *ResourceClaimSchedulingStatus) { *out = *in @@ -618,11 +703,7 @@ func (in *ResourceClaimSchedulingStatus) DeepCopy() *ResourceClaimSchedulingStat // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec) { *out = *in - if in.ParametersRef != nil { - in, out := &in.ParametersRef, &out.ParametersRef - *out = new(ResourceClaimParametersReference) - **out = **in - } + in.Devices.DeepCopyInto(&out.Devices) return } @@ -741,290 +822,17 @@ func (in *ResourceClaimTemplateSpec) DeepCopy() *ResourceClaimTemplateSpec { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClass) DeepCopyInto(out *ResourceClass) { +func (in *ResourcePool) DeepCopyInto(out *ResourcePool) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.ParametersRef != nil { - in, out := &in.ParametersRef, &out.ParametersRef - *out = new(ResourceClassParametersReference) - **out = **in - } - if in.SuitableNodes != nil { - in, out := &in.SuitableNodes, &out.SuitableNodes - *out = new(core.NodeSelector) - (*in).DeepCopyInto(*out) - } - if in.StructuredParameters != nil { - in, out := &in.StructuredParameters, &out.StructuredParameters - *out = new(bool) - **out = **in - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClass. -func (in *ResourceClass) DeepCopy() *ResourceClass { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePool. +func (in *ResourcePool) DeepCopy() *ResourcePool { if in == nil { return nil } - out := new(ResourceClass) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClass) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassList) DeepCopyInto(out *ResourceClassList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceClass, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassList. -func (in *ResourceClassList) DeepCopy() *ResourceClassList { - if in == nil { - return nil - } - out := new(ResourceClassList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClassList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassParameters) DeepCopyInto(out *ResourceClassParameters) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.GeneratedFrom != nil { - in, out := &in.GeneratedFrom, &out.GeneratedFrom - *out = new(ResourceClassParametersReference) - **out = **in - } - if in.VendorParameters != nil { - in, out := &in.VendorParameters, &out.VendorParameters - *out = make([]VendorParameters, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Filters != nil { - in, out := &in.Filters, &out.Filters - *out = make([]ResourceFilter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParameters. -func (in *ResourceClassParameters) DeepCopy() *ResourceClassParameters { - if in == nil { - return nil - } - out := new(ResourceClassParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClassParameters) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassParametersList) DeepCopyInto(out *ResourceClassParametersList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceClassParameters, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersList. -func (in *ResourceClassParametersList) DeepCopy() *ResourceClassParametersList { - if in == nil { - return nil - } - out := new(ResourceClassParametersList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClassParametersList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersReference. -func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersReference { - if in == nil { - return nil - } - out := new(ResourceClassParametersReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter) { - *out = *in - in.ResourceFilterModel.DeepCopyInto(&out.ResourceFilterModel) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilter. -func (in *ResourceFilter) DeepCopy() *ResourceFilter { - if in == nil { - return nil - } - out := new(ResourceFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceFilterModel) DeepCopyInto(out *ResourceFilterModel) { - *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesFilter) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilterModel. -func (in *ResourceFilterModel) DeepCopy() *ResourceFilterModel { - if in == nil { - return nil - } - out := new(ResourceFilterModel) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceHandle) DeepCopyInto(out *ResourceHandle) { - *out = *in - if in.StructuredData != nil { - in, out := &in.StructuredData, &out.StructuredData - *out = new(StructuredResourceHandle) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceHandle. -func (in *ResourceHandle) DeepCopy() *ResourceHandle { - if in == nil { - return nil - } - out := new(ResourceHandle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceModel) DeepCopyInto(out *ResourceModel) { - *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesResources) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceModel. -func (in *ResourceModel) DeepCopy() *ResourceModel { - if in == nil { - return nil - } - out := new(ResourceModel) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { - *out = *in - if in.VendorParameters != nil { - out.VendorParameters = in.VendorParameters.DeepCopyObject() - } - in.ResourceRequestModel.DeepCopyInto(&out.ResourceRequestModel) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. -func (in *ResourceRequest) DeepCopy() *ResourceRequest { - if in == nil { - return nil - } - out := new(ResourceRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceRequestModel) DeepCopyInto(out *ResourceRequestModel) { - *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesRequest) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequestModel. -func (in *ResourceRequestModel) DeepCopy() *ResourceRequestModel { - if in == nil { - return nil - } - out := new(ResourceRequestModel) + out := new(ResourcePool) in.DeepCopyInto(out) return out } @@ -1034,7 +842,7 @@ func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.ResourceModel.DeepCopyInto(&out.ResourceModel) + in.Spec.DeepCopyInto(&out.Spec) return } @@ -1090,17 +898,17 @@ func (in *ResourceSliceList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) { +func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) { *out = *in - if in.VendorClassParameters != nil { - out.VendorClassParameters = in.VendorClassParameters.DeepCopyObject() - } - if in.VendorClaimParameters != nil { - out.VendorClaimParameters = in.VendorClaimParameters.DeepCopyObject() + out.Pool = in.Pool + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = new(core.NodeSelector) + (*in).DeepCopyInto(*out) } - if in.Results != nil { - in, out := &in.Results, &out.Results - *out = make([]DriverAllocationResult, len(*in)) + if in.Devices != nil { + in, out := &in.Devices, &out.Devices + *out = make([]Device, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1108,31 +916,12 @@ func (in *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredResourceHandle. -func (in *StructuredResourceHandle) DeepCopy() *StructuredResourceHandle { - if in == nil { - return nil - } - out := new(StructuredResourceHandle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VendorParameters) DeepCopyInto(out *VendorParameters) { - *out = *in - if in.Parameters != nil { - out.Parameters = in.Parameters.DeepCopyObject() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VendorParameters. -func (in *VendorParameters) DeepCopy() *VendorParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceSpec. +func (in *ResourceSliceSpec) DeepCopy() *ResourceSliceSpec { if in == nil { return nil } - out := new(VendorParameters) + out := new(ResourceSliceSpec) in.DeepCopyInto(out) return out } diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index d6165814a398c..fc4148ed5b695 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -883,18 +883,24 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "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/resource/v1alpha3.AllocationResult": schema_k8sio_api_resource_v1alpha3_AllocationResult(ref), - "k8s.io/api/resource/v1alpha3.AllocationResultModel": schema_k8sio_api_resource_v1alpha3_AllocationResultModel(ref), - "k8s.io/api/resource/v1alpha3.DriverAllocationResult": schema_k8sio_api_resource_v1alpha3_DriverAllocationResult(ref), - "k8s.io/api/resource/v1alpha3.DriverRequests": schema_k8sio_api_resource_v1alpha3_DriverRequests(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult": schema_k8sio_api_resource_v1alpha3_NamedResourcesAllocationResult(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesAttribute": schema_k8sio_api_resource_v1alpha3_NamedResourcesAttribute(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesAttributeValue": schema_k8sio_api_resource_v1alpha3_NamedResourcesAttributeValue(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesFilter": schema_k8sio_api_resource_v1alpha3_NamedResourcesFilter(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesInstance": schema_k8sio_api_resource_v1alpha3_NamedResourcesInstance(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice": schema_k8sio_api_resource_v1alpha3_NamedResourcesIntSlice(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesRequest": schema_k8sio_api_resource_v1alpha3_NamedResourcesRequest(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesResources": schema_k8sio_api_resource_v1alpha3_NamedResourcesResources(ref), - "k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice": schema_k8sio_api_resource_v1alpha3_NamedResourcesStringSlice(ref), + "k8s.io/api/resource/v1alpha3.BasicDevice": schema_k8sio_api_resource_v1alpha3_BasicDevice(ref), + "k8s.io/api/resource/v1alpha3.CELDeviceSelector": schema_k8sio_api_resource_v1alpha3_CELDeviceSelector(ref), + "k8s.io/api/resource/v1alpha3.Device": schema_k8sio_api_resource_v1alpha3_Device(ref), + "k8s.io/api/resource/v1alpha3.DeviceAllocationConfiguration": schema_k8sio_api_resource_v1alpha3_DeviceAllocationConfiguration(ref), + "k8s.io/api/resource/v1alpha3.DeviceAllocationResult": schema_k8sio_api_resource_v1alpha3_DeviceAllocationResult(ref), + "k8s.io/api/resource/v1alpha3.DeviceAttribute": schema_k8sio_api_resource_v1alpha3_DeviceAttribute(ref), + "k8s.io/api/resource/v1alpha3.DeviceClaim": schema_k8sio_api_resource_v1alpha3_DeviceClaim(ref), + "k8s.io/api/resource/v1alpha3.DeviceClaimConfiguration": schema_k8sio_api_resource_v1alpha3_DeviceClaimConfiguration(ref), + "k8s.io/api/resource/v1alpha3.DeviceClass": schema_k8sio_api_resource_v1alpha3_DeviceClass(ref), + "k8s.io/api/resource/v1alpha3.DeviceClassConfiguration": schema_k8sio_api_resource_v1alpha3_DeviceClassConfiguration(ref), + "k8s.io/api/resource/v1alpha3.DeviceClassList": schema_k8sio_api_resource_v1alpha3_DeviceClassList(ref), + "k8s.io/api/resource/v1alpha3.DeviceClassSpec": schema_k8sio_api_resource_v1alpha3_DeviceClassSpec(ref), + "k8s.io/api/resource/v1alpha3.DeviceConfiguration": schema_k8sio_api_resource_v1alpha3_DeviceConfiguration(ref), + "k8s.io/api/resource/v1alpha3.DeviceConstraint": schema_k8sio_api_resource_v1alpha3_DeviceConstraint(ref), + "k8s.io/api/resource/v1alpha3.DeviceRequest": schema_k8sio_api_resource_v1alpha3_DeviceRequest(ref), + "k8s.io/api/resource/v1alpha3.DeviceRequestAllocationResult": schema_k8sio_api_resource_v1alpha3_DeviceRequestAllocationResult(ref), + "k8s.io/api/resource/v1alpha3.DeviceSelector": schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref), + "k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration": schema_k8sio_api_resource_v1alpha3_OpaqueDeviceConfiguration(ref), "k8s.io/api/resource/v1alpha3.PodSchedulingContext": schema_k8sio_api_resource_v1alpha3_PodSchedulingContext(ref), "k8s.io/api/resource/v1alpha3.PodSchedulingContextList": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref), "k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec": schema_k8sio_api_resource_v1alpha3_PodSchedulingContextSpec(ref), @@ -902,30 +908,16 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "k8s.io/api/resource/v1alpha3.ResourceClaim": schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha3_ResourceClaimConsumerReference(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimList": schema_k8sio_api_resource_v1alpha3_ResourceClaimList(ref), - "k8s.io/api/resource/v1alpha3.ResourceClaimParameters": schema_k8sio_api_resource_v1alpha3_ResourceClaimParameters(ref), - "k8s.io/api/resource/v1alpha3.ResourceClaimParametersList": schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersList(ref), - "k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersReference(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha3_ResourceClaimSchedulingStatus(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha3_ResourceClaimSpec(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimStatus": schema_k8sio_api_resource_v1alpha3_ResourceClaimStatus(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimTemplate": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplate(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateList": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateList(ref), "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateSpec(ref), - "k8s.io/api/resource/v1alpha3.ResourceClass": schema_k8sio_api_resource_v1alpha3_ResourceClass(ref), - "k8s.io/api/resource/v1alpha3.ResourceClassList": schema_k8sio_api_resource_v1alpha3_ResourceClassList(ref), - "k8s.io/api/resource/v1alpha3.ResourceClassParameters": schema_k8sio_api_resource_v1alpha3_ResourceClassParameters(ref), - "k8s.io/api/resource/v1alpha3.ResourceClassParametersList": schema_k8sio_api_resource_v1alpha3_ResourceClassParametersList(ref), - "k8s.io/api/resource/v1alpha3.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha3_ResourceClassParametersReference(ref), - "k8s.io/api/resource/v1alpha3.ResourceFilter": schema_k8sio_api_resource_v1alpha3_ResourceFilter(ref), - "k8s.io/api/resource/v1alpha3.ResourceFilterModel": schema_k8sio_api_resource_v1alpha3_ResourceFilterModel(ref), - "k8s.io/api/resource/v1alpha3.ResourceHandle": schema_k8sio_api_resource_v1alpha3_ResourceHandle(ref), - "k8s.io/api/resource/v1alpha3.ResourceModel": schema_k8sio_api_resource_v1alpha3_ResourceModel(ref), - "k8s.io/api/resource/v1alpha3.ResourceRequest": schema_k8sio_api_resource_v1alpha3_ResourceRequest(ref), - "k8s.io/api/resource/v1alpha3.ResourceRequestModel": schema_k8sio_api_resource_v1alpha3_ResourceRequestModel(ref), + "k8s.io/api/resource/v1alpha3.ResourcePool": schema_k8sio_api_resource_v1alpha3_ResourcePool(ref), "k8s.io/api/resource/v1alpha3.ResourceSlice": schema_k8sio_api_resource_v1alpha3_ResourceSlice(ref), "k8s.io/api/resource/v1alpha3.ResourceSliceList": schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref), - "k8s.io/api/resource/v1alpha3.StructuredResourceHandle": schema_k8sio_api_resource_v1alpha3_StructuredResourceHandle(ref), - "k8s.io/api/resource/v1alpha3.VendorParameters": schema_k8sio_api_resource_v1alpha3_VendorParameters(ref), + "k8s.io/api/resource/v1alpha3.ResourceSliceSpec": schema_k8sio_api_resource_v1alpha3_ResourceSliceSpec(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/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), @@ -29027,6 +29019,13 @@ func schema_k8sio_api_core_v1_ResourceClaim(ref common.ReferenceCallback) common Format: "", }, }, + "request": { + SchemaProps: spec.SchemaProps{ + Description: "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.", + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"name"}, }, @@ -45348,107 +45347,145 @@ func schema_k8sio_api_resource_v1alpha3_AllocationResult(ref common.ReferenceCal Description: "AllocationResult contains attributes of an allocated resource.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "resourceHandles": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, + "devices": { + SchemaProps: spec.SchemaProps{ + Description: "Devices is the result of allocating devices.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceAllocationResult"), }, + }, + "nodeSelector": { SchemaProps: spec.SchemaProps{ - Description: "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ + Description: "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", + Ref: ref("k8s.io/api/core/v1.NodeSelector"), + }, + }, + "controller": { + SchemaProps: spec.SchemaProps{ + Description: "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha3.DeviceAllocationResult"}, + } +} + +func schema_k8sio_api_resource_v1alpha3_BasicDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BasicDevice defines one device instance using fields that are supported by all clients which support DRA.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "attributes": { + SchemaProps: spec.SchemaProps{ + Description: "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceHandle"), + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceAttribute"), }, }, }, }, }, - "availableOnNodes": { + "capacity": { SchemaProps: spec.SchemaProps{ - Description: "This field will get set by the resource driver after it has allocated the resource to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), + Description: "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + }, + }, + }, }, }, }, }, }, Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha3.ResourceHandle"}, + "k8s.io/api/resource/v1alpha3.DeviceAttribute", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_resource_v1alpha3_AllocationResultModel(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_CELDeviceSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "AllocationResultModel must have one and only one field set.", + Description: "CELDeviceSelector contains a CEL expression for selecting a device.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namedResources": { + "expression": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes the allocation result when using the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult"), + Description: "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"expression"}, }, }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult"}, } } -func schema_k8sio_api_resource_v1alpha3_DriverAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_Device(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DriverAllocationResult contains vendor parameters and the allocation result for one request.", + Description: "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "vendorRequestParameters": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "namedResources": { + "basic": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes the allocation result when using the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult"), + Description: "Basic defines one device instance using fields that are supported by all clients which support DRA.", + Ref: ref("k8s.io/api/resource/v1alpha3.BasicDevice"), }, }, }, + Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesAllocationResult", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/api/resource/v1alpha3.BasicDevice"}, } } -func schema_k8sio_api_resource_v1alpha3_DriverRequests(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceAllocationConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "DriverRequests describes all resources that are needed from one particular driver.", + Description: "DeviceAllocationConfiguration gets embedded in an AllocationResult.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driverName": { + "source": { SchemaProps: spec.SchemaProps{ - Description: "DriverName is the name used by the DRA driver kubelet plugin.", + Description: "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "vendorParameters": { - SchemaProps: spec.SchemaProps{ - Description: "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, "requests": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ @@ -45456,129 +45493,99 @@ func schema_k8sio_api_resource_v1alpha3_DriverRequests(ref common.ReferenceCallb }, }, SchemaProps: spec.SchemaProps{ - Description: "Requests describes all resources that are needed from the driver.", + Description: "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceRequest"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceRequest", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_NamedResourcesAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesAllocationResult is used in AllocationResultModel.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { + "opaque": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the selected resource instance.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "Opaque provides driver-specific configuration parameters.", + Ref: ref("k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"), }, }, }, - Required: []string{"name"}, + Required: []string{"source"}, }, }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"}, } } -func schema_k8sio_api_resource_v1alpha3_NamedResourcesAttribute(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesAttribute is a combination of an attribute name and its value.", + Description: "DeviceAllocationResult is the result of allocating devices.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "quantity": { - SchemaProps: spec.SchemaProps{ - Description: "QuantityValue is a quantity.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - "bool": { - SchemaProps: spec.SchemaProps{ - Description: "BoolValue is a true/false value.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "int": { - SchemaProps: spec.SchemaProps{ - Description: "IntValue is a 64-bit integer.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "intSlice": { - SchemaProps: spec.SchemaProps{ - Description: "IntSliceValue is an array of 64-bit integers.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice"), + "results": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "string": { SchemaProps: spec.SchemaProps{ - Description: "StringValue is a string.", - Type: []string{"string"}, - Format: "", + Description: "Results lists all allocated devices.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceRequestAllocationResult"), + }, + }, + }, }, }, - "stringSlice": { - SchemaProps: spec.SchemaProps{ - Description: "StringSliceValue is an array of strings.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice"), + "config": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, }, - }, - "version": { SchemaProps: spec.SchemaProps{ - Description: "VersionValue is a semantic version according to semver.org spec 2.0.0.", - Type: []string{"string"}, - Format: "", + Description: "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceAllocationConfiguration"), + }, + }, + }, }, }, }, - Required: []string{"name"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice", "k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, + "k8s.io/api/resource/v1alpha3.DeviceAllocationConfiguration", "k8s.io/api/resource/v1alpha3.DeviceRequestAllocationResult"}, } } -func schema_k8sio_api_resource_v1alpha3_NamedResourcesAttributeValue(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceAttribute(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesAttributeValue must have one and only one field set.", + Description: "DeviceAttribute must have exactly one field set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "quantity": { + "int": { SchemaProps: spec.SchemaProps{ - Description: "QuantityValue is a quantity.", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), + Description: "IntValue is a number.", + Type: []string{"integer"}, + Format: "int64", }, }, "bool": { @@ -45588,35 +45595,16 @@ func schema_k8sio_api_resource_v1alpha3_NamedResourcesAttributeValue(ref common. Format: "", }, }, - "int": { - SchemaProps: spec.SchemaProps{ - Description: "IntValue is a 64-bit integer.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "intSlice": { - SchemaProps: spec.SchemaProps{ - Description: "IntSliceValue is an array of 64-bit integers.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice"), - }, - }, "string": { SchemaProps: spec.SchemaProps{ - Description: "StringValue is a string.", + Description: "StringValue is a string. Must not be longer than 64 characters.", Type: []string{"string"}, Format: "", }, }, - "stringSlice": { - SchemaProps: spec.SchemaProps{ - Description: "StringSliceValue is an array of strings.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice"), - }, - }, "version": { SchemaProps: spec.SchemaProps{ - Description: "VersionValue is a semantic version according to semver.org spec 2.0.0.", + Description: "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.", Type: []string{"string"}, Format: "", }, @@ -45624,182 +45612,96 @@ func schema_k8sio_api_resource_v1alpha3_NamedResourcesAttributeValue(ref common. }, }, }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesIntSlice", "k8s.io/api/resource/v1alpha3.NamedResourcesStringSlice", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, } } -func schema_k8sio_api_resource_v1alpha3_NamedResourcesFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesFilter is used in ResourceFilterModel.", + Description: "DeviceClaim defines how to request devices with a ResourceClaim.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type in NamedResourcesAttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"selector"}, - }, - }, - } -} - -func schema_k8sio_api_resource_v1alpha3_NamedResourcesInstance(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "attributes": { + "requests": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "Attributes defines the attributes of this resource instance. The name of each attribute must be unique.", + Description: "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesAttribute"), + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceRequest"), }, }, }, }, }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesAttribute"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_NamedResourcesIntSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesIntSlice contains a slice of 64-bit integers.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ints": { + "constraints": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "Ints is the slice of 64-bit integers.", + Description: "These constraints must be satisfied by the set of devices that get allocated for the claim.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int64", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceConstraint"), }, }, }, }, }, - }, - Required: []string{"ints"}, - }, - }, - } -} - -func schema_k8sio_api_resource_v1alpha3_NamedResourcesRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesRequest is used in ResourceRequestModel.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/\n\nIn addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:\n\n attributes.quantity[\"a\"].isGreaterThan(quantity(\"0\")) &&\n attributes.stringslice[\"b\"].isSorted()", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"selector"}, - }, - }, - } -} - -func schema_k8sio_api_resource_v1alpha3_NamedResourcesResources(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesResources is used in ResourceModel.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "instances": { + "config": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "The list of all individual resources instances currently available.", + Description: "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesInstance"), + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceClaimConfiguration"), }, }, }, }, }, }, - Required: []string{"instances"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesInstance"}, + "k8s.io/api/resource/v1alpha3.DeviceClaimConfiguration", "k8s.io/api/resource/v1alpha3.DeviceConstraint", "k8s.io/api/resource/v1alpha3.DeviceRequest"}, } } -func schema_k8sio_api_resource_v1alpha3_NamedResourcesStringSlice(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceClaimConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "NamedResourcesStringSlice contains a slice of strings.", + Description: "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "strings": { + "requests": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "Strings is the slice of strings.", + Description: "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -45812,18 +45714,25 @@ func schema_k8sio_api_resource_v1alpha3_NamedResourcesStringSlice(ref common.Ref }, }, }, + "opaque": { + SchemaProps: spec.SchemaProps{ + Description: "Opaque provides driver-specific configuration parameters.", + Ref: ref("k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"), + }, + }, }, - Required: []string{"strings"}, }, }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"}, } } -func schema_k8sio_api_resource_v1alpha3_PodSchedulingContext(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceClass(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + Description: "DeviceClass is a vendor or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -45849,32 +45758,46 @@ func schema_k8sio_api_resource_v1alpha3_PodSchedulingContext(ref common.Referenc }, "spec": { SchemaProps: spec.SchemaProps{ - Description: "Spec describes where resources for the Pod are needed.", + Description: "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec"), + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceClassSpec"), }, }, - "status": { + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha3.DeviceClassSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_k8sio_api_resource_v1alpha3_DeviceClassConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeviceClassConfiguration is used in DeviceClass.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "opaque": { SchemaProps: spec.SchemaProps{ - Description: "Status describes where resources for the Pod can be allocated.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus"), + Description: "Opaque provides driver-specific configuration parameters.", + Ref: ref("k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"), }, }, }, - Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec", "k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"}, } } -func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSchedulingContextList is a collection of Pod scheduling objects.", + Description: "DeviceClassList is a collection of classes.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -45900,13 +45823,13 @@ func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref common.Refe }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of PodSchedulingContext objects.", + Description: "Items is the list of resource classes.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContext"), + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceClass"), }, }, }, @@ -45917,239 +45840,306 @@ func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref common.Refe }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.PodSchedulingContext", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/resource/v1alpha3.DeviceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceClassSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSchedulingContextSpec describes where resources for the Pod are needed.", + Description: "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "selectedNode": { + "selectors": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.", - Type: []string{"string"}, - Format: "", + Description: "Each selector must be satisfied by a device which is claimed via this class.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceSelector"), + }, + }, + }, }, }, - "potentialNodes": { + "config": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.", + Description: "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceClassConfiguration"), }, }, }, }, }, + "suitableNodes": { + SchemaProps: spec.SchemaProps{ + Description: "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + Ref: ref("k8s.io/api/core/v1.NodeSelector"), + }, + }, }, }, }, + Dependencies: []string{ + "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha3.DeviceClassConfiguration", "k8s.io/api/resource/v1alpha3.DeviceSelector"}, } } -func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", + Description: "DeviceConfiguration must have exactly one field set. It gets embedded inline in some other structs which have other fields, so field names must not conflict with those.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "resourceClaims": { + "opaque": { + SchemaProps: spec.SchemaProps{ + Description: "Opaque provides driver-specific configuration parameters.", + Ref: ref("k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha3.OpaqueDeviceConfiguration"}, + } +} + +func schema_k8sio_api_resource_v1alpha3_DeviceConstraint(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeviceConstraint must have exactly one field set besides Requests.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "requests": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", + "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", + Description: "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, + "matchAttribute": { + SchemaProps: spec.SchemaProps{ + Description: "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + Description: "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Description: "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "deviceClassName": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Description: "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { + "selectors": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Description: "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceSelector"), + }, + }, + }, }, }, - "spec": { + "countMode": { 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.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"), + Description: "CountMode and its related fields define how many devices are needed to satisfy this request. Supported values are:\n\n- Exact: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf countMode is not specified, the default countMode is Exact. If countMode is Exact and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + Type: []string{"string"}, + Format: "", }, }, - "status": { + "count": { SchemaProps: spec.SchemaProps{ - Description: "Status describes whether the resource is available and with which attributes.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimStatus"), + Description: "Count is used only when the count mode is \"Exact\". Must be greater than zero. If CountMode is Exact and this field is not specified, the default is one.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "adminAccess": { + SchemaProps: spec.SchemaProps{ + Description: "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, - Required: []string{"spec"}, + Required: []string{"name", "deviceClassName"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaimSpec", "k8s.io/api/resource/v1alpha3.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/resource/v1alpha3.DeviceSelector"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceClaimConsumerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceRequestAllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", + Description: "DeviceRequestAllocationResult contains the allocation result for one request.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { + "request": { SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", + Description: "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "resource": { + "driver": { SchemaProps: spec.SchemaProps{ - Description: "Resource is the type of resource being referenced, for example \"pods\".", + Description: "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", Default: "", Type: []string{"string"}, Format: "", }, }, - "name": { + "pool": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced.", + Description: "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", Default: "", Type: []string{"string"}, Format: "", }, }, - "uid": { + "device": { SchemaProps: spec.SchemaProps{ - Description: "UID identifies exactly one incarnation of the resource.", + Description: "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", Default: "", Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"resource", "name", "uid"}, + Required: []string{"request", "driver", "pool", "device"}, }, }, } } -func schema_k8sio_api_resource_v1alpha3_ResourceClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_DeviceSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimList is a collection of claims.", + Description: "DeviceSelector must have exactly one field set.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "cel": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", + Description: "CEL contains a CEL expression for selecting a device.", + Ref: ref("k8s.io/api/resource/v1alpha3.CELDeviceSelector"), }, }, - "apiVersion": { + }, + Required: []string{"cel"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha3.CELDeviceSelector"}, + } +} + +func schema_k8sio_api_resource_v1alpha3_OpaqueDeviceConfiguration(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "driver": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Description: "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { + "parameters": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of resource claims.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaim"), - }, - }, - }, + Description: "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, - Required: []string{"items"}, + Required: []string{"driver", "parameters"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceClaimParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_PodSchedulingContext(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", + Description: "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DRAControlPlaneController feature gate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -46173,44 +46163,34 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClaimParameters(ref common.Refer Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "generatedFrom": { + "spec": { 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.", - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"), + Description: "Spec describes where resources for the Pod are needed.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextSpec"), }, }, - "driverRequests": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, + "status": { SchemaProps: spec.SchemaProps{ - Description: "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.DriverRequests"), - }, - }, - }, + Description: "Status describes where resources for the Pod can be allocated.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContextStatus"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.DriverRequests", "k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference", "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_v1alpha3_ResourceClaimParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimParametersList is a collection of ResourceClaimParameters.", + Description: "PodSchedulingContextList is a collection of Pod scheduling objects.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -46236,13 +46216,13 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersList(ref common.R }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of node resource capacity objects.", + Description: "Items is the list of PodSchedulingContext objects.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParameters"), + Ref: ref("k8s.io/api/resource/v1alpha3.PodSchedulingContext"), }, }, }, @@ -46253,69 +46233,32 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersList(ref common.R }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaimParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_ResourceClaimParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata, for example \"ConfigMap\".", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, + "k8s.io/api/resource/v1alpha3.PodSchedulingContext", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceClaimSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", + Description: "PodSchedulingContextSpec describes where resources for the Pod are needed.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { + "selectedNode": { SchemaProps: spec.SchemaProps{ - Description: "Name matches the pod.spec.resourceClaims[*].Name field.", + Description: "SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use \"WaitForFirstConsumer\" allocation is to be attempted.", Type: []string{"string"}, Format: "", }, }, - "unsuitableNodes": { + "potentialNodes": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.", + Description: "PotentialNodes lists nodes where the Pod might be able to run.\n\nThe size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -46334,100 +46277,48 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClaimSchedulingStatus(ref common } } -func schema_k8sio_api_resource_v1alpha3_ResourceClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimSpec defines how a resource is to be allocated.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resourceClassName": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "parametersRef": { - 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.", - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"), - }, - }, - }, - Required: []string{"resourceClassName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaimParametersReference"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_ResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_PodSchedulingContextStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.", + Description: "PodSchedulingContextStatus describes where resources for the Pod can be allocated.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driverName": { - SchemaProps: spec.SchemaProps{ - Description: "DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.", - Type: []string{"string"}, - Format: "", - }, - }, - "allocation": { - 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.", - Ref: ref("k8s.io/api/resource/v1alpha3.AllocationResult"), - }, - }, - "reservedFor": { + "resourceClaims": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-map-keys": []interface{}{ - "uid", + "name", }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge", + "x-kubernetes-list-type": "map", }, }, SchemaProps: spec.SchemaProps{ - Description: "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + Description: "ResourceClaims describes resource availability for each pod.spec.resourceClaim entry where the corresponding ResourceClaim uses \"WaitForFirstConsumer\" allocation mode.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus"), }, }, }, }, }, - "deallocationRequested": { - SchemaProps: spec.SchemaProps{ - Description: "DeallocationRequested indicates that a ResourceClaim is to be deallocated.\n\nThe driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nWhile DeallocationRequested is set, no new consumers may be added to ReservedFor.", - Type: []string{"boolean"}, - Format: "", - }, - }, }, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.AllocationResult", "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"}, + "k8s.io/api/resource/v1alpha3.ResourceClaimSchedulingStatus"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimTemplate is used to produce ResourceClaim objects.", + Description: "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -46453,90 +46344,16 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplate(ref common.Referen }, "spec": { 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.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimTemplateList is a collection of claim templates.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata", + Description: "Spec describes what is being requested and how to configure it. The spec is immutable.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of resource claim templates.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"), }, }, - "spec": { + "status": { 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: "Status describes whether the claim is ready to use and what has been allocated.", Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimStatus"), }, }, }, @@ -46544,79 +46361,60 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateSpec(ref common.Ref }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClaimSpec", "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_v1alpha3_ResourceClass(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimConsumerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + Description: "ResourceClaimConsumerReference contains enough information to let you locate the consumer of a ResourceClaim. The user must be a resource in the same namespace as the ResourceClaim.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "apiGroup": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Description: "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", Type: []string{"string"}, Format: "", }, }, - "apiVersion": { + "resource": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Description: "Resource is the type of resource being referenced, for example \"pods\".", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "driverName": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", + Description: "Name is the name of resource being referenced.", Default: "", Type: []string{"string"}, Format: "", }, }, - "parametersRef": { - 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.", - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParametersReference"), - }, - }, - "suitableNodes": { - SchemaProps: spec.SchemaProps{ - Description: "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), - }, - }, - "structuredParameters": { + "uid": { SchemaProps: spec.SchemaProps{ - Description: "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", - Type: []string{"boolean"}, + Description: "UID identifies exactly one incarnation of the resource.", + Default: "", + Type: []string{"string"}, Format: "", }, }, }, - Required: []string{"driverName"}, + Required: []string{"resource", "name", "uid"}, }, }, - Dependencies: []string{ - "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_v1alpha3_ResourceClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClassList is a collection of classes.", + Description: "ResourceClaimList is a collection of claims.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -46642,13 +46440,13 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClassList(ref common.ReferenceCa }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of resource classes.", + Description: "Items is the list of resource claims.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClass"), + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaim"), }, }, }, @@ -46659,337 +46457,293 @@ func schema_k8sio_api_resource_v1alpha3_ResourceClassList(ref common.ReferenceCa }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClass", "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_v1alpha3_ResourceClassParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", + Description: "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Description: "Name matches the pod.spec.resourceClaims[*].Name field.", + Default: "", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "generatedFrom": { - 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.", - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParametersReference"), - }, - }, - "vendorParameters": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.VendorParameters"), - }, - }, - }, - }, - }, - "filters": { + "unsuitableNodes": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "Filters describes additional contraints that must be met when using the class.", + Description: "UnsuitableNodes lists nodes that the ResourceClaim cannot be allocated for.\n\nThe size of this field is limited to 128, the same as for PodSchedulingSpec.PotentialNodes. This may get increased in the future, but not reduced.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceFilter"), + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, }, }, }, + Required: []string{"name"}, }, }, - Dependencies: []string{ - "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_v1alpha3_ResourceClassParametersList(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClassParametersList is a collection of ResourceClassParameters.", + Description: "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "kind": { + "devices": { SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", + Description: "Devices defines how to request devices.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.DeviceClaim"), }, }, - "apiVersion": { + "controller": { SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Description: "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", Type: []string{"string"}, Format: "", }, }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of node resource capacity objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClassParameters"), - }, - }, - }, - }, - }, }, - Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.ResourceClassParameters", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + "k8s.io/api/resource/v1alpha3.DeviceClaim"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", + Description: "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "apiGroup": { + "allocation": { SchemaProps: spec.SchemaProps{ - Description: "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - Type: []string{"string"}, - Format: "", + Description: "Allocation is set once the claim has been allocated successfully.", + Ref: ref("k8s.io/api/resource/v1alpha3.AllocationResult"), }, }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata.", - Default: "", - Type: []string{"string"}, - Format: "", + "reservedFor": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-map-keys": []interface{}{ + "uid", + }, + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge", + }, }, - }, - "name": { SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced.", - Default: "", - Type: []string{"string"}, - Format: "", + Description: "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"), + }, + }, + }, }, }, - "namespace": { + "deallocationRequested": { SchemaProps: spec.SchemaProps{ - Description: "Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources.", - Type: []string{"string"}, + Description: "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", + Type: []string{"boolean"}, Format: "", }, }, }, - Required: []string{"kind", "name"}, }, }, + Dependencies: []string{ + "k8s.io/api/resource/v1alpha3.AllocationResult", "k8s.io/api/resource/v1alpha3.ResourceClaimConsumerReference"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceFilter(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceFilter is a filter for resources from one particular driver.", + Description: "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driverName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "DriverName is the name used by the DRA driver kubelet plugin.", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, - "namedResources": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes a resource filter using the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesFilter"), + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", }, }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesFilter"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_ResourceFilterModel(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceFilterModel must have one and only one field set.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "namedResources": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes a resource filter using the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesFilter"), + Description: "Standard object metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + 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.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesFilter"}, + "k8s.io/api/resource/v1alpha3.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", + Description: "ResourceClaimTemplateList is a collection of claim templates.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "driverName": { + "kind": { SchemaProps: spec.SchemaProps{ - Description: "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", - Default: "", + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", Type: []string{"string"}, Format: "", }, }, - "data": { + "apiVersion": { SchemaProps: spec.SchemaProps{ - Description: "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", Type: []string{"string"}, Format: "", }, }, - "structuredData": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "If StructuredData is set, then it needs to be used instead of Data.", - Ref: ref("k8s.io/api/resource/v1alpha3.StructuredResourceHandle"), + Description: "Standard list metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, - }, - Required: []string{"driverName"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.StructuredResourceHandle"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_ResourceModel(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceModel must have one and only one field set.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "namedResources": { + "items": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes available resources using the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesResources"), + Description: "Items is the list of resource claim templates.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimTemplate"), + }, + }, + }, }, }, }, + Required: []string{"items"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesResources"}, + "k8s.io/api/resource/v1alpha3.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceClaimTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceRequest is a request for resources from one particular driver.", + Description: "ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "vendorParameters": { + "metadata": { SchemaProps: spec.SchemaProps{ - Description: "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "namedResources": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes a request for resources with the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesRequest"), + 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{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceClaimSpec"), }, }, }, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesRequest", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/api/resource/v1alpha3.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } -func schema_k8sio_api_resource_v1alpha3_ResourceRequestModel(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourcePool(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceRequestModel must have one and only one field set.", + Description: "ResourcePool describes the pool that ResourceSlices belong to.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "namedResources": { + "name": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes a request for resources with the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesRequest"), + Description: "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "generation": { + SchemaProps: spec.SchemaProps{ + Description: "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", + }, + }, + "resourceSliceCount": { + SchemaProps: spec.SchemaProps{ + Description: "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be higher than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.", + Default: 0, + Type: []string{"integer"}, + Format: "int64", }, }, }, + Required: []string{"name", "generation", "resourceSliceCount"}, }, }, - Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesRequest"}, } } @@ -46997,7 +46751,7 @@ func schema_k8sio_api_resource_v1alpha3_ResourceSlice(ref common.ReferenceCallba return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "ResourceSlice provides information about available resources on individual nodes.", + Description: "ResourceSlice represents one or more resources in a pool of similar resources, managed by a given driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", Type: []string{"object"}, Properties: map[string]spec.Schema{ "kind": { @@ -47021,33 +46775,19 @@ func schema_k8sio_api_resource_v1alpha3_ResourceSlice(ref common.ReferenceCallba Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "NodeName identifies the node which provides the resources if they are local to a node.\n\nA field selector can be used to list only ResourceSlice objects with a certain node name.", - Type: []string{"string"}, - Format: "", - }, - }, - "driverName": { - SchemaProps: spec.SchemaProps{ - Description: "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "namedResources": { + "spec": { SchemaProps: spec.SchemaProps{ - Description: "NamedResources describes available resources using the named resources model.", - Ref: ref("k8s.io/api/resource/v1alpha3.NamedResourcesResources"), + Description: "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.ResourceSliceSpec"), }, }, }, - Required: []string{"driverName"}, + Required: []string{"spec"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.NamedResourcesResources", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "k8s.io/api/resource/v1alpha3.ResourceSliceSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } @@ -47072,7 +46812,7 @@ func schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref common.ReferenceCa Format: "", }, }, - "metadata": { + "listMeta": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata", Default: map[string]interface{}{}, @@ -47081,7 +46821,7 @@ func schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref common.ReferenceCa }, "items": { SchemaProps: spec.SchemaProps{ - Description: "Items is the list of node resource capacity objects.", + Description: "Items is the list of resource ResourceSlices.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ @@ -47102,85 +46842,73 @@ func schema_k8sio_api_resource_v1alpha3_ResourceSliceList(ref common.ReferenceCa } } -func schema_k8sio_api_resource_v1alpha3_StructuredResourceHandle(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_k8sio_api_resource_v1alpha3_ResourceSliceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ - Description: "StructuredResourceHandle is the in-tree representation of the allocation result.", + Description: "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "vendorClassParameters": { + "driver": { SchemaProps: spec.SchemaProps{ - Description: "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + Default: "", + Type: []string{"string"}, + Format: "", }, }, - "vendorClaimParameters": { + "pool": { SchemaProps: spec.SchemaProps{ - Description: "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Description: "Pool describes the pool that this ResourceSlice belongs to. This field is immutable.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/resource/v1alpha3.ResourcePool"), }, }, "nodeName": { SchemaProps: spec.SchemaProps{ - Description: "NodeName is the name of the node providing the necessary resources if the resources are local to a node.", + Description: "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.", Type: []string{"string"}, Format: "", }, }, - "results": { + "nodeSelector": { + SchemaProps: spec.SchemaProps{ + Description: "NodeSelector defines which nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + Ref: ref("k8s.io/api/core/v1.NodeSelector"), + }, + }, + "allNodes": { + SchemaProps: spec.SchemaProps{ + Description: "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "devices": { VendorExtensible: spec.VendorExtensible{ Extensions: spec.Extensions{ "x-kubernetes-list-type": "atomic", }, }, SchemaProps: spec.SchemaProps{ - Description: "Results lists all allocated driver resources.", + Description: "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/resource/v1alpha3.DriverAllocationResult"), + Ref: ref("k8s.io/api/resource/v1alpha3.Device"), }, }, }, }, }, }, - Required: []string{"results"}, + Required: []string{"driver", "pool"}, }, }, Dependencies: []string{ - "k8s.io/api/resource/v1alpha3.DriverAllocationResult", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_k8sio_api_resource_v1alpha3_VendorParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VendorParameters are opaque parameters for one particular driver.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "driverName": { - SchemaProps: spec.SchemaProps{ - Description: "DriverName is the name used by the DRA driver kubelet plugin.", - Type: []string{"string"}, - Format: "", - }, - }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha3.Device", "k8s.io/api/resource/v1alpha3.ResourcePool"}, } } diff --git a/pkg/kubelet/cm/dra/state/state_checkpoint.go b/pkg/kubelet/cm/dra/state/state_checkpoint.go index 9728151d253c5..097cefe228cf3 100644 --- a/pkg/kubelet/cm/dra/state/state_checkpoint.go +++ b/pkg/kubelet/cm/dra/state/state_checkpoint.go @@ -20,7 +20,6 @@ import ( "fmt" "sync" - resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" @@ -56,9 +55,6 @@ type ClaimInfoState struct { // PodUIDs is a set of pod UIDs that reference a resource PodUIDs sets.Set[string] - // ResourceHandles is a list of opaque resource data for processing by a specific kubelet plugin - ResourceHandles []resourceapi.ResourceHandle - // CDIDevices is a map of DriverName --> CDI devices returned by the // GRPC API call NodePrepareResource CDIDevices map[string][]string diff --git a/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go b/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go index 84a96f2059377..a0ab5191dc42c 100644 --- a/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go +++ b/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go @@ -22,7 +22,6 @@ limitations under the License. package state import ( - v1alpha3 "k8s.io/api/resource/v1alpha3" sets "k8s.io/apimachinery/pkg/util/sets" ) @@ -36,13 +35,6 @@ func (in *ClaimInfoState) DeepCopyInto(out *ClaimInfoState) { (*out)[key] = val } } - if in.ResourceHandles != nil { - in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]v1alpha3.ResourceHandle, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } if in.CDIDevices != nil { in, out := &in.CDIDevices, &out.CDIDevices *out = make(map[string][]string, len(*in)) diff --git a/pkg/printers/internalversion/printers.go b/pkg/printers/internalversion/printers.go index ddd0fc83ea7cb..4e64e2539c9e7 100644 --- a/pkg/printers/internalversion/printers.go +++ b/pkg/printers/internalversion/printers.go @@ -623,17 +623,15 @@ func AddHandlers(h printers.PrintHandler) { } _ = h.TableHandler(scaleColumnDefinitions, printScale) - resourceClassColumnDefinitions := []metav1.TableColumnDefinition{ + deviceClassColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "DriverName", Type: "string", Description: resourceapi.ResourceClass{}.SwaggerDoc()["driverName"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } - _ = h.TableHandler(resourceClassColumnDefinitions, printResourceClass) - _ = h.TableHandler(resourceClassColumnDefinitions, printResourceClassList) + _ = h.TableHandler(deviceClassColumnDefinitions, printDeviceClass) + _ = h.TableHandler(deviceClassColumnDefinitions, printDeviceClassList) resourceClaimColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "ResourceClassName", Type: "string", Description: resourceapi.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, {Name: "State", Type: "string", Description: "A summary of the current state (allocated, pending, reserved, etc.)."}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } @@ -642,7 +640,6 @@ func AddHandlers(h printers.PrintHandler) { resourceClaimTemplateColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "ResourceClassName", Type: "string", Description: resourceapi.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } _ = h.TableHandler(resourceClaimTemplateColumnDefinitions, printResourceClaimTemplate) @@ -656,30 +653,15 @@ func AddHandlers(h printers.PrintHandler) { _ = h.TableHandler(podSchedulingCtxColumnDefinitions, printPodSchedulingContext) _ = h.TableHandler(podSchedulingCtxColumnDefinitions, printPodSchedulingContextList) - resourceClaimParametersColumnDefinitions := []metav1.TableColumnDefinition{ + nodeResourceSliceColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "GeneratedFrom", Type: "string", Description: resourceapi.ResourceClaimParameters{}.SwaggerDoc()["generatedFrom"]}, + {Name: "Node", Type: "string", Description: resourceapi.ResourceSliceSpec{}.SwaggerDoc()["nodeName"]}, + {Name: "Driver", Type: "string", Description: resourceapi.ResourceSliceSpec{}.SwaggerDoc()["driver"]}, + {Name: "Pool", Type: "string", Description: resourceapi.ResourcePool{}.SwaggerDoc()["name"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, } - _ = h.TableHandler(resourceClaimParametersColumnDefinitions, printResourceClaimParameters) - _ = h.TableHandler(resourceClaimParametersColumnDefinitions, printResourceClaimParametersList) - - resourceClassParametersColumnDefinitions := []metav1.TableColumnDefinition{ - {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "GeneratedFrom", Type: "string", Description: resourceapi.ResourceClassParameters{}.SwaggerDoc()["generatedFrom"]}, - {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, - } - _ = h.TableHandler(resourceClassParametersColumnDefinitions, printResourceClassParameters) - _ = h.TableHandler(resourceClassParametersColumnDefinitions, printResourceClassParametersList) - - nodeResourceCapacityColumnDefinitions := []metav1.TableColumnDefinition{ - {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, - {Name: "Node", Type: "string", Description: resourceapi.ResourceSlice{}.SwaggerDoc()["nodeName"]}, - {Name: "Driver", Type: "string", Description: resourceapi.ResourceSlice{}.SwaggerDoc()["driverName"]}, - {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, - } - _ = h.TableHandler(nodeResourceCapacityColumnDefinitions, printResourceSlice) - _ = h.TableHandler(nodeResourceCapacityColumnDefinitions, printResourceSliceList) + _ = h.TableHandler(nodeResourceSliceColumnDefinitions, printResourceSlice) + _ = h.TableHandler(nodeResourceSliceColumnDefinitions, printResourceSliceList) serviceCIDRColumnDefinitions := []metav1.TableColumnDefinition{ {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, @@ -2979,19 +2961,19 @@ func printScale(obj *autoscaling.Scale, options printers.GenerateOptions) ([]met return []metav1.TableRow{row}, nil } -func printResourceClass(obj *resource.ResourceClass, options printers.GenerateOptions) ([]metav1.TableRow, error) { +func printDeviceClass(obj *resource.DeviceClass, options printers.GenerateOptions) ([]metav1.TableRow, error) { row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - row.Cells = append(row.Cells, obj.Name, obj.DriverName, translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } -func printResourceClassList(list *resource.ResourceClassList, options printers.GenerateOptions) ([]metav1.TableRow, error) { +func printDeviceClassList(list *resource.DeviceClassList, options printers.GenerateOptions) ([]metav1.TableRow, error) { rows := make([]metav1.TableRow, 0, len(list.Items)) for i := range list.Items { - r, err := printResourceClass(&list.Items[i], options) + r, err := printDeviceClass(&list.Items[i], options) if err != nil { return nil, err } @@ -3004,7 +2986,7 @@ func printResourceClaim(obj *resource.ResourceClaim, options printers.GenerateOp row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - row.Cells = append(row.Cells, obj.Name, obj.Spec.ResourceClassName, resourceClaimState(obj), translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, resourceClaimState(obj), translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } @@ -3045,7 +3027,7 @@ func printResourceClaimTemplate(obj *resource.ResourceClaimTemplate, options pri row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - row.Cells = append(row.Cells, obj.Name, obj.Spec.Spec.ResourceClassName, translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } @@ -3083,61 +3065,11 @@ func printPodSchedulingContextList(list *resource.PodSchedulingContextList, opti return rows, nil } -func printResourceClaimParameters(obj *resource.ResourceClaimParameters, options printers.GenerateOptions) ([]metav1.TableRow, error) { - row := metav1.TableRow{ - Object: runtime.RawExtension{Object: obj}, - } - generatedFrom := "" - if obj.GeneratedFrom != nil { - generatedFrom = fmt.Sprintf("%s.%s %s", obj.GeneratedFrom.Kind, obj.GeneratedFrom.APIGroup, obj.GeneratedFrom.Name) - } - row.Cells = append(row.Cells, obj.Name, generatedFrom, translateTimestampSince(obj.CreationTimestamp)) - - return []metav1.TableRow{row}, nil -} - -func printResourceClaimParametersList(list *resource.ResourceClaimParametersList, options printers.GenerateOptions) ([]metav1.TableRow, error) { - rows := make([]metav1.TableRow, 0, len(list.Items)) - for i := range list.Items { - r, err := printResourceClaimParameters(&list.Items[i], options) - if err != nil { - return nil, err - } - rows = append(rows, r...) - } - return rows, nil -} - -func printResourceClassParameters(obj *resource.ResourceClassParameters, options printers.GenerateOptions) ([]metav1.TableRow, error) { - row := metav1.TableRow{ - Object: runtime.RawExtension{Object: obj}, - } - generatedFrom := "" - if obj.GeneratedFrom != nil { - generatedFrom = fmt.Sprintf("%s.%s %s", obj.GeneratedFrom.Kind, obj.GeneratedFrom.APIGroup, obj.GeneratedFrom.Name) - } - row.Cells = append(row.Cells, obj.Name, generatedFrom, translateTimestampSince(obj.CreationTimestamp)) - - return []metav1.TableRow{row}, nil -} - -func printResourceClassParametersList(list *resource.ResourceClassParametersList, options printers.GenerateOptions) ([]metav1.TableRow, error) { - rows := make([]metav1.TableRow, 0, len(list.Items)) - for i := range list.Items { - r, err := printResourceClassParameters(&list.Items[i], options) - if err != nil { - return nil, err - } - rows = append(rows, r...) - } - return rows, nil -} - func printResourceSlice(obj *resource.ResourceSlice, options printers.GenerateOptions) ([]metav1.TableRow, error) { row := metav1.TableRow{ Object: runtime.RawExtension{Object: obj}, } - row.Cells = append(row.Cells, obj.Name, obj.NodeName, obj.DriverName, translateTimestampSince(obj.CreationTimestamp)) + row.Cells = append(row.Cells, obj.Name, obj.Spec.NodeName, obj.Spec.Driver, obj.Spec.Pool.Name, translateTimestampSince(obj.CreationTimestamp)) return []metav1.TableRow{row}, nil } diff --git a/pkg/registry/resource/resourceclass/storage/storage.go b/pkg/registry/resource/deviceclass/storage/storage.go similarity index 75% rename from pkg/registry/resource/resourceclass/storage/storage.go rename to pkg/registry/resource/deviceclass/storage/storage.go index ad7d283b954af..875d61e018f18 100644 --- a/pkg/registry/resource/resourceclass/storage/storage.go +++ b/pkg/registry/resource/deviceclass/storage/storage.go @@ -24,25 +24,25 @@ import ( "k8s.io/kubernetes/pkg/printers" printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" printerstorage "k8s.io/kubernetes/pkg/printers/storage" - "k8s.io/kubernetes/pkg/registry/resource/resourceclass" + "k8s.io/kubernetes/pkg/registry/resource/deviceclass" ) -// REST implements a RESTStorage for ResourceClass. +// REST implements a RESTStorage for DeviceClass. type REST struct { *genericregistry.Store } -// NewREST returns a RESTStorage object that will work against ResourceClass. +// NewREST returns a RESTStorage object that will work against DeviceClass. func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { store := &genericregistry.Store{ - NewFunc: func() runtime.Object { return &resource.ResourceClass{} }, - NewListFunc: func() runtime.Object { return &resource.ResourceClassList{} }, - DefaultQualifiedResource: resource.Resource("resourceclasses"), - SingularQualifiedResource: resource.Resource("resourceclass"), - - CreateStrategy: resourceclass.Strategy, - UpdateStrategy: resourceclass.Strategy, - DeleteStrategy: resourceclass.Strategy, + NewFunc: func() runtime.Object { return &resource.DeviceClass{} }, + NewListFunc: func() runtime.Object { return &resource.DeviceClassList{} }, + DefaultQualifiedResource: resource.Resource("deviceclasses"), + SingularQualifiedResource: resource.Resource("deviceclass"), + + CreateStrategy: deviceclass.Strategy, + UpdateStrategy: deviceclass.Strategy, + DeleteStrategy: deviceclass.Strategy, ReturnDeletedObject: true, TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)}, diff --git a/pkg/registry/resource/resourceclass/storage/storage_test.go b/pkg/registry/resource/deviceclass/storage/storage_test.go similarity index 83% rename from pkg/registry/resource/resourceclass/storage/storage_test.go rename to pkg/registry/resource/deviceclass/storage/storage_test.go index 817623e7acc80..01962571c010e 100644 --- a/pkg/registry/resource/resourceclass/storage/storage_test.go +++ b/pkg/registry/resource/deviceclass/storage/storage_test.go @@ -37,21 +37,20 @@ func newStorage(t *testing.T) (*REST, *etcd3testing.EtcdTestServer) { StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1, - ResourcePrefix: "resourceclasses", + ResourcePrefix: "deviceclasses", } - resourceClassStorage, err := NewREST(restOptions) + deviceClassStorage, err := NewREST(restOptions) if err != nil { t.Fatalf("unexpected error from REST storage: %v", err) } - return resourceClassStorage, server + return deviceClassStorage, server } -func validNewClass(name string) *resource.ResourceClass { - return &resource.ResourceClass{ +func validNewClass(name string) *resource.DeviceClass { + return &resource.DeviceClass{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - DriverName: "cdi.example.com", } } @@ -60,13 +59,13 @@ func TestCreate(t *testing.T) { defer server.Terminate(t) defer storage.Store.DestroyFunc() test := genericregistrytest.New(t, storage.Store).ClusterScope() - resourceClass := validNewClass("foo") - resourceClass.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} + deviceClass := validNewClass("foo") + deviceClass.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo"} test.TestCreate( // valid - resourceClass, + deviceClass, // invalid - &resource.ResourceClass{ + &resource.DeviceClass{ ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, }, ) @@ -82,14 +81,22 @@ func TestUpdate(t *testing.T) { validNewClass("foo"), // updateFunc func(obj runtime.Object) runtime.Object { - object := obj.(*resource.ResourceClass) - object.ParametersRef = &resource.ResourceClassParametersReference{Kind: "cdiexample", Name: "some-name"} + object := obj.(*resource.DeviceClass) + object.Spec.Selectors = []resource.DeviceSelector{{ + CEL: &resource.CELDeviceSelector{ + Expression: "true", + }, + }} return object }, //invalid update func(obj runtime.Object) runtime.Object { - object := obj.(*resource.ResourceClass) - object.DriverName = "" + object := obj.(*resource.DeviceClass) + object.Spec.Selectors = []resource.DeviceSelector{{ + CEL: &resource.CELDeviceSelector{ + Expression: "?!#$", + }, + }} return object }, ) diff --git a/pkg/registry/resource/deviceclass/strategy.go b/pkg/registry/resource/deviceclass/strategy.go new file mode 100644 index 0000000000000..fc6d3a38b6638 --- /dev/null +++ b/pkg/registry/resource/deviceclass/strategy.go @@ -0,0 +1,85 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package deviceclass + +import ( + "context" + + apiequality "k8s.io/apimachinery/pkg/api/equality" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/validation/field" + "k8s.io/apiserver/pkg/storage/names" + "k8s.io/kubernetes/pkg/api/legacyscheme" + "k8s.io/kubernetes/pkg/apis/resource" + "k8s.io/kubernetes/pkg/apis/resource/validation" +) + +// deviceClassStrategy implements behavior for DeviceClass objects +type deviceClassStrategy struct { + runtime.ObjectTyper + names.NameGenerator +} + +var Strategy = deviceClassStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} + +func (deviceClassStrategy) NamespaceScoped() bool { + return false +} + +func (deviceClassStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { + class := obj.(*resource.DeviceClass) + class.Generation = 1 +} + +func (deviceClassStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { + deviceClass := obj.(*resource.DeviceClass) + return validation.ValidateDeviceClass(deviceClass) +} + +func (deviceClassStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { + return nil +} + +func (deviceClassStrategy) Canonicalize(obj runtime.Object) { +} + +func (deviceClassStrategy) AllowCreateOnUpdate() bool { + return false +} + +func (deviceClassStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + class := obj.(*resource.DeviceClass) + oldClass := old.(*resource.DeviceClass) + + // Any changes to the spec increment the generation number. + if !apiequality.Semantic.DeepEqual(oldClass.Spec, class.Spec) { + class.Generation = oldClass.Generation + 1 + } +} + +func (deviceClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { + errorList := validation.ValidateDeviceClass(obj.(*resource.DeviceClass)) + return append(errorList, validation.ValidateDeviceClassUpdate(obj.(*resource.DeviceClass), old.(*resource.DeviceClass))...) +} + +func (deviceClassStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { + return nil +} + +func (deviceClassStrategy) AllowUnconditionalUpdate() bool { + return true +} diff --git a/pkg/registry/resource/resourceclass/strategy_test.go b/pkg/registry/resource/deviceclass/strategy_test.go similarity index 67% rename from pkg/registry/resource/resourceclass/strategy_test.go rename to pkg/registry/resource/deviceclass/strategy_test.go index d55f806676924..468b11eac69d8 100644 --- a/pkg/registry/resource/resourceclass/strategy_test.go +++ b/pkg/registry/resource/deviceclass/strategy_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package resourceclass +package deviceclass import ( "testing" @@ -24,28 +24,27 @@ import ( "k8s.io/kubernetes/pkg/apis/resource" ) -var resourceClass = &resource.ResourceClass{ +var deviceClass = &resource.DeviceClass{ ObjectMeta: metav1.ObjectMeta{ Name: "valid-class", }, - DriverName: "resource-driver.example.com", } func TestClassStrategy(t *testing.T) { if Strategy.NamespaceScoped() { - t.Errorf("ResourceClass must not be namespace scoped") + t.Errorf("DeviceClass must not be namespace scoped") } if Strategy.AllowCreateOnUpdate() { - t.Errorf("ResourceClass should not allow create on update") + t.Errorf("DeviceClass should not allow create on update") } } func TestClassStrategyCreate(t *testing.T) { ctx := genericapirequest.NewDefaultContext() - resourceClass := resourceClass.DeepCopy() + deviceClass := deviceClass.DeepCopy() - Strategy.PrepareForCreate(ctx, resourceClass) - errs := Strategy.Validate(ctx, resourceClass) + Strategy.PrepareForCreate(ctx, deviceClass) + errs := Strategy.Validate(ctx, deviceClass) if len(errs) != 0 { t.Errorf("unexpected error validating for create %v", errs) } @@ -54,12 +53,12 @@ func TestClassStrategyCreate(t *testing.T) { func TestClassStrategyUpdate(t *testing.T) { t.Run("no-changes-okay", func(t *testing.T) { ctx := genericapirequest.NewDefaultContext() - resourceClass := resourceClass.DeepCopy() - newClass := resourceClass.DeepCopy() + deviceClass := deviceClass.DeepCopy() + newClass := deviceClass.DeepCopy() newClass.ResourceVersion = "4" - Strategy.PrepareForUpdate(ctx, newClass, resourceClass) - errs := Strategy.ValidateUpdate(ctx, newClass, resourceClass) + Strategy.PrepareForUpdate(ctx, newClass, deviceClass) + errs := Strategy.ValidateUpdate(ctx, newClass, deviceClass) if len(errs) != 0 { t.Errorf("unexpected validation errors: %v", errs) } @@ -67,13 +66,13 @@ func TestClassStrategyUpdate(t *testing.T) { t.Run("name-change-not-allowed", func(t *testing.T) { ctx := genericapirequest.NewDefaultContext() - resourceClass := resourceClass.DeepCopy() - newClass := resourceClass.DeepCopy() + deviceClass := deviceClass.DeepCopy() + newClass := deviceClass.DeepCopy() newClass.Name = "valid-class-2" newClass.ResourceVersion = "4" - Strategy.PrepareForUpdate(ctx, newClass, resourceClass) - errs := Strategy.ValidateUpdate(ctx, newClass, resourceClass) + Strategy.PrepareForUpdate(ctx, newClass, deviceClass) + errs := Strategy.ValidateUpdate(ctx, newClass, deviceClass) if len(errs) == 0 { t.Errorf("expected a validation error") } diff --git a/pkg/registry/resource/resourceclaim/storage/storage_test.go b/pkg/registry/resource/resourceclaim/storage/storage_test.go index 114c5f36b914b..031aa8c95e763 100644 --- a/pkg/registry/resource/resourceclaim/storage/storage_test.go +++ b/pkg/registry/resource/resourceclaim/storage/storage_test.go @@ -56,10 +56,6 @@ func validNewClaim(name, ns string) *resource.ResourceClaim { Name: name, Namespace: ns, }, - Spec: resource.ResourceClaimSpec{ - ResourceClassName: "example", - }, - Status: resource.ResourceClaimStatus{}, } return claim } @@ -98,6 +94,12 @@ func TestUpdate(t *testing.T) { object.Labels["foo"] = "bar" return object }, + // invalid update + func(obj runtime.Object) runtime.Object { + object := obj.(*resource.ResourceClaim) + object.Name = "^%$#@#%" + return object + }, ) } @@ -163,7 +165,6 @@ func TestUpdateStatus(t *testing.T) { } claim := claimStart.DeepCopy() - claim.Status.DriverName = "some-driver.example.com" claim.Status.Allocation = &resource.AllocationResult{} _, _, err = statusStorage.Update(ctx, claim.Name, rest.DefaultUpdatedObjectInfo(claim), rest.ValidateAllObjectFunc, rest.ValidateAllObjectUpdateFunc, false, &metav1.UpdateOptions{}) if err != nil { diff --git a/pkg/registry/resource/resourceclaim/strategy.go b/pkg/registry/resource/resourceclaim/strategy.go index c787bcf8e6bd8..f2a9eb821846a 100644 --- a/pkg/registry/resource/resourceclaim/strategy.go +++ b/pkg/registry/resource/resourceclaim/strategy.go @@ -69,7 +69,7 @@ func (resourceclaimStrategy) PrepareForCreate(ctx context.Context, obj runtime.O func (resourceclaimStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { claim := obj.(*resource.ResourceClaim) - return validation.ValidateClaim(claim) + return validation.ValidateResourceClaim(claim) } func (resourceclaimStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { @@ -92,8 +92,8 @@ func (resourceclaimStrategy) PrepareForUpdate(ctx context.Context, obj, old runt func (resourceclaimStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { newClaim := obj.(*resource.ResourceClaim) oldClaim := old.(*resource.ResourceClaim) - errorList := validation.ValidateClaim(newClaim) - return append(errorList, validation.ValidateClaimUpdate(newClaim, oldClaim)...) + errorList := validation.ValidateResourceClaim(newClaim) + return append(errorList, validation.ValidateResourceClaimUpdate(newClaim, oldClaim)...) } func (resourceclaimStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { @@ -132,7 +132,7 @@ func (resourceclaimStatusStrategy) PrepareForUpdate(ctx context.Context, obj, ol func (resourceclaimStatusStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { newClaim := obj.(*resource.ResourceClaim) oldClaim := old.(*resource.ResourceClaim) - return validation.ValidateClaimStatusUpdate(newClaim, oldClaim) + return validation.ValidateResourceClaimStatusUpdate(newClaim, oldClaim) } // WarningsOnUpdate returns warnings for the given update. diff --git a/pkg/registry/resource/resourceclaim/strategy_test.go b/pkg/registry/resource/resourceclaim/strategy_test.go index e99439234b03d..8b2d8c3e7139e 100644 --- a/pkg/registry/resource/resourceclaim/strategy_test.go +++ b/pkg/registry/resource/resourceclaim/strategy_test.go @@ -29,9 +29,6 @@ var resourceClaim = &resource.ResourceClaim{ Name: "valid-claim", Namespace: "default", }, - Spec: resource.ResourceClaimSpec{ - ResourceClassName: "valid-class", - }, } func TestClaimStrategy(t *testing.T) { diff --git a/pkg/registry/resource/resourceclaimparameters/storage/storage.go b/pkg/registry/resource/resourceclaimparameters/storage/storage.go deleted file mode 100644 index 820411fede946..0000000000000 --- a/pkg/registry/resource/resourceclaimparameters/storage/storage.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/registry/generic" - genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/kubernetes/pkg/printers" - printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" - printerstorage "k8s.io/kubernetes/pkg/printers/storage" - "k8s.io/kubernetes/pkg/registry/resource/resourceclaimparameters" -) - -// REST implements a RESTStorage for ResourceClaimParameters. -type REST struct { - *genericregistry.Store -} - -// NewREST returns a RESTStorage object that will work against ResourceClaimParameters. -func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { - store := &genericregistry.Store{ - NewFunc: func() runtime.Object { return &resource.ResourceClaimParameters{} }, - NewListFunc: func() runtime.Object { return &resource.ResourceClaimParametersList{} }, - PredicateFunc: resourceclaimparameters.Match, - DefaultQualifiedResource: resource.Resource("resourceclaimparameters"), - SingularQualifiedResource: resource.Resource("resourceclaimparameters"), - - CreateStrategy: resourceclaimparameters.Strategy, - UpdateStrategy: resourceclaimparameters.Strategy, - DeleteStrategy: resourceclaimparameters.Strategy, - ReturnDeletedObject: true, - - TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)}, - } - options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: resourceclaimparameters.GetAttrs} - if err := store.CompleteWithOptions(options); err != nil { - return nil, err - } - - return &REST{store}, nil -} diff --git a/pkg/registry/resource/resourceclaimparameters/storage/storage_test.go b/pkg/registry/resource/resourceclaimparameters/storage/storage_test.go deleted file mode 100644 index c5ff63e9d5ff1..0000000000000 --- a/pkg/registry/resource/resourceclaimparameters/storage/storage_test.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/registry/generic" - genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing" - etcd3testing "k8s.io/apiserver/pkg/storage/etcd3/testing" - "k8s.io/kubernetes/pkg/apis/resource" - _ "k8s.io/kubernetes/pkg/apis/resource/install" - "k8s.io/kubernetes/pkg/registry/registrytest" -) - -func newStorage(t *testing.T) (*REST, *etcd3testing.EtcdTestServer) { - etcdStorage, server := registrytest.NewEtcdStorage(t, resource.GroupName) - restOptions := generic.RESTOptions{ - StorageConfig: etcdStorage, - Decorator: generic.UndecoratedStorage, - DeleteCollectionWorkers: 1, - ResourcePrefix: "resourceclaimparameters", - } - resourceClassStorage, err := NewREST(restOptions) - if err != nil { - t.Fatalf("unexpected error from REST storage: %v", err) - } - return resourceClassStorage, server -} - -func validNewResourceClaimParameters(name string) *resource.ResourceClaimParameters { - return &resource.ResourceClaimParameters{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: metav1.NamespaceDefault, - }, - } -} - -func TestCreate(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - resourceClass := validNewResourceClaimParameters("foo") - resourceClass.ObjectMeta = metav1.ObjectMeta{} - test.TestCreate( - // valid - resourceClass, - // invalid - &resource.ResourceClaimParameters{ - ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, - }, - ) -} - -func TestUpdate(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestUpdate( - // valid - validNewResourceClaimParameters("foo"), - // updateFunc - func(obj runtime.Object) runtime.Object { - object := obj.(*resource.ResourceClaimParameters) - object.Labels = map[string]string{"foo": "bar"} - return object - }, - // invalid update - func(obj runtime.Object) runtime.Object { - object := obj.(*resource.ResourceClaimParameters) - object.Labels = map[string]string{"&$^^#%@": "1"} - return object - }, - ) - -} - -func TestDelete(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store).ReturnDeletedObject() - test.TestDelete(validNewResourceClaimParameters("foo")) -} - -func TestGet(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestGet(validNewResourceClaimParameters("foo")) -} - -func TestList(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestList(validNewResourceClaimParameters("foo")) -} - -func TestWatch(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestWatch( - validNewResourceClaimParameters("foo"), - // matching labels - []labels.Set{}, - // not matching labels - []labels.Set{ - {"foo": "bar"}, - }, - // matching fields - []fields.Set{ - {"metadata.name": "foo"}, - }, - // not matching fields - []fields.Set{ - {"metadata.name": "bar"}, - }, - ) -} diff --git a/pkg/registry/resource/resourceclaimparameters/strategy.go b/pkg/registry/resource/resourceclaimparameters/strategy.go deleted file mode 100644 index 9b17f14f2281d..0000000000000 --- a/pkg/registry/resource/resourceclaimparameters/strategy.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resourceclaimparameters - -import ( - "context" - "errors" - - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/registry/generic" - "k8s.io/apiserver/pkg/storage" - "k8s.io/apiserver/pkg/storage/names" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/kubernetes/pkg/apis/resource/validation" -) - -// resourceClaimParametersStrategy implements behavior for ResourceClaimParameters objects -type resourceClaimParametersStrategy struct { - runtime.ObjectTyper - names.NameGenerator -} - -var Strategy = resourceClaimParametersStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} - -func (resourceClaimParametersStrategy) NamespaceScoped() bool { - return true -} - -func (resourceClaimParametersStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { -} - -func (resourceClaimParametersStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { - resourceClaimParameters := obj.(*resource.ResourceClaimParameters) - return validation.ValidateResourceClaimParameters(resourceClaimParameters) -} - -func (resourceClaimParametersStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { - return nil -} - -func (resourceClaimParametersStrategy) Canonicalize(obj runtime.Object) { -} - -func (resourceClaimParametersStrategy) AllowCreateOnUpdate() bool { - return false -} - -func (resourceClaimParametersStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { -} - -func (resourceClaimParametersStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - return validation.ValidateResourceClaimParametersUpdate(obj.(*resource.ResourceClaimParameters), old.(*resource.ResourceClaimParameters)) -} - -func (resourceClaimParametersStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { - return nil -} - -func (resourceClaimParametersStrategy) AllowUnconditionalUpdate() bool { - return true -} - -// Match returns a generic matcher for a given label and field selector. -func Match(label labels.Selector, field fields.Selector) storage.SelectionPredicate { - return storage.SelectionPredicate{ - Label: label, - Field: field, - GetAttrs: GetAttrs, - } -} - -// GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { - parameters, ok := obj.(*resource.ResourceClaimParameters) - if !ok { - return nil, nil, errors.New("not a resourceclaim") - } - return labels.Set(parameters.Labels), toSelectableFields(parameters), nil -} - -// toSelectableFields returns a field set that represents the object -func toSelectableFields(claim *resource.ResourceClaimParameters) fields.Set { - fields := generic.ObjectMetaFieldsSet(&claim.ObjectMeta, true) - return fields -} diff --git a/pkg/registry/resource/resourceclaimparameters/strategy_test.go b/pkg/registry/resource/resourceclaimparameters/strategy_test.go deleted file mode 100644 index 931b4a8316a9a..0000000000000 --- a/pkg/registry/resource/resourceclaimparameters/strategy_test.go +++ /dev/null @@ -1,81 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resourceclaimparameters - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/kubernetes/pkg/apis/resource" -) - -var resourceClaimParameters = &resource.ResourceClaimParameters{ - ObjectMeta: metav1.ObjectMeta{ - Name: "valid", - Namespace: "ns", - }, -} - -func TestClassStrategy(t *testing.T) { - if !Strategy.NamespaceScoped() { - t.Errorf("ResourceClaimParameters must be namespace scoped") - } - if Strategy.AllowCreateOnUpdate() { - t.Errorf("ResourceClaimParameters should not allow create on update") - } -} - -func TestClassStrategyCreate(t *testing.T) { - ctx := genericapirequest.NewDefaultContext() - resourceClaimParameters := resourceClaimParameters.DeepCopy() - - Strategy.PrepareForCreate(ctx, resourceClaimParameters) - errs := Strategy.Validate(ctx, resourceClaimParameters) - if len(errs) != 0 { - t.Errorf("unexpected error validating for create %v", errs) - } -} - -func TestClassStrategyUpdate(t *testing.T) { - t.Run("no-changes-okay", func(t *testing.T) { - ctx := genericapirequest.NewDefaultContext() - resourceClaimParameters := resourceClaimParameters.DeepCopy() - newObj := resourceClaimParameters.DeepCopy() - newObj.ResourceVersion = "4" - - Strategy.PrepareForUpdate(ctx, newObj, resourceClaimParameters) - errs := Strategy.ValidateUpdate(ctx, newObj, resourceClaimParameters) - if len(errs) != 0 { - t.Errorf("unexpected validation errors: %v", errs) - } - }) - - t.Run("name-change-not-allowed", func(t *testing.T) { - ctx := genericapirequest.NewDefaultContext() - resourceClaimParameters := resourceClaimParameters.DeepCopy() - newObj := resourceClaimParameters.DeepCopy() - newObj.Name += "-2" - newObj.ResourceVersion = "4" - - Strategy.PrepareForUpdate(ctx, newObj, resourceClaimParameters) - errs := Strategy.ValidateUpdate(ctx, newObj, resourceClaimParameters) - if len(errs) == 0 { - t.Errorf("expected a validation error") - } - }) -} diff --git a/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go b/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go index 332cfc2e8514e..ab10d139bdc90 100644 --- a/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go +++ b/pkg/registry/resource/resourceclaimtemplate/storage/storage_test.go @@ -52,11 +52,6 @@ func validNewClaimTemplate(name string) *resource.ResourceClaimTemplate { Name: name, Namespace: metav1.NamespaceDefault, }, - Spec: resource.ResourceClaimTemplateSpec{ - Spec: resource.ResourceClaimSpec{ - ResourceClassName: "valid-class", - }, - }, } } @@ -94,7 +89,7 @@ func TestUpdate(t *testing.T) { //invalid update func(obj runtime.Object) runtime.Object { object := obj.(*resource.ResourceClaimTemplate) - object.Spec.Spec.ResourceClassName = "" + object.Name = "^%$#@#%" return object }, ) diff --git a/pkg/registry/resource/resourceclaimtemplate/strategy.go b/pkg/registry/resource/resourceclaimtemplate/strategy.go index 8c625c94d4b6a..02cda68d89dea 100644 --- a/pkg/registry/resource/resourceclaimtemplate/strategy.go +++ b/pkg/registry/resource/resourceclaimtemplate/strategy.go @@ -48,7 +48,7 @@ func (resourceClaimTemplateStrategy) PrepareForCreate(ctx context.Context, obj r func (resourceClaimTemplateStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { resourceClaimTemplate := obj.(*resource.ResourceClaimTemplate) - return validation.ValidateClaimTemplate(resourceClaimTemplate) + return validation.ValidateResourceClaimTemplate(resourceClaimTemplate) } func (resourceClaimTemplateStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { @@ -66,8 +66,8 @@ func (resourceClaimTemplateStrategy) PrepareForUpdate(ctx context.Context, obj, } func (resourceClaimTemplateStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - errorList := validation.ValidateClaimTemplate(obj.(*resource.ResourceClaimTemplate)) - return append(errorList, validation.ValidateClaimTemplateUpdate(obj.(*resource.ResourceClaimTemplate), old.(*resource.ResourceClaimTemplate))...) + errorList := validation.ValidateResourceClaimTemplate(obj.(*resource.ResourceClaimTemplate)) + return append(errorList, validation.ValidateResourceClaimTemplateUpdate(obj.(*resource.ResourceClaimTemplate), old.(*resource.ResourceClaimTemplate))...) } func (resourceClaimTemplateStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { diff --git a/pkg/registry/resource/resourceclaimtemplate/strategy_test.go b/pkg/registry/resource/resourceclaimtemplate/strategy_test.go index 1eb8ad05c77e3..14c9eddaeba4f 100644 --- a/pkg/registry/resource/resourceclaimtemplate/strategy_test.go +++ b/pkg/registry/resource/resourceclaimtemplate/strategy_test.go @@ -29,11 +29,6 @@ var resourceClaimTemplate = &resource.ResourceClaimTemplate{ Name: "valid-claim-template", Namespace: "default", }, - Spec: resource.ResourceClaimTemplateSpec{ - Spec: resource.ResourceClaimSpec{ - ResourceClassName: "valid-class", - }, - }, } func TestClaimTemplateStrategy(t *testing.T) { diff --git a/pkg/registry/resource/resourceclass/strategy.go b/pkg/registry/resource/resourceclass/strategy.go deleted file mode 100644 index 55f98fe4065e7..0000000000000 --- a/pkg/registry/resource/resourceclass/strategy.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resourceclass - -import ( - "context" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/storage/names" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/kubernetes/pkg/apis/resource/validation" -) - -// resourceClassStrategy implements behavior for ResourceClass objects -type resourceClassStrategy struct { - runtime.ObjectTyper - names.NameGenerator -} - -var Strategy = resourceClassStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} - -func (resourceClassStrategy) NamespaceScoped() bool { - return false -} - -func (resourceClassStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { -} - -func (resourceClassStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { - resourceClass := obj.(*resource.ResourceClass) - return validation.ValidateClass(resourceClass) -} - -func (resourceClassStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { - return nil -} - -func (resourceClassStrategy) Canonicalize(obj runtime.Object) { -} - -func (resourceClassStrategy) AllowCreateOnUpdate() bool { - return false -} - -func (resourceClassStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { -} - -func (resourceClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - errorList := validation.ValidateClass(obj.(*resource.ResourceClass)) - return append(errorList, validation.ValidateClassUpdate(obj.(*resource.ResourceClass), old.(*resource.ResourceClass))...) -} - -func (resourceClassStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { - return nil -} - -func (resourceClassStrategy) AllowUnconditionalUpdate() bool { - return true -} diff --git a/pkg/registry/resource/resourceclassparameters/storage/storage.go b/pkg/registry/resource/resourceclassparameters/storage/storage.go deleted file mode 100644 index 1603b27c34abc..0000000000000 --- a/pkg/registry/resource/resourceclassparameters/storage/storage.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/registry/generic" - genericregistry "k8s.io/apiserver/pkg/registry/generic/registry" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/kubernetes/pkg/printers" - printersinternal "k8s.io/kubernetes/pkg/printers/internalversion" - printerstorage "k8s.io/kubernetes/pkg/printers/storage" - "k8s.io/kubernetes/pkg/registry/resource/resourceclassparameters" -) - -// REST implements a RESTStorage for ResourceClassParameters. -type REST struct { - *genericregistry.Store -} - -// NewREST returns a RESTStorage object that will work against ResourceClassParameters. -func NewREST(optsGetter generic.RESTOptionsGetter) (*REST, error) { - store := &genericregistry.Store{ - NewFunc: func() runtime.Object { return &resource.ResourceClassParameters{} }, - NewListFunc: func() runtime.Object { return &resource.ResourceClassParametersList{} }, - PredicateFunc: resourceclassparameters.Match, - DefaultQualifiedResource: resource.Resource("resourceclassparameters"), - SingularQualifiedResource: resource.Resource("resourceclassparameters"), - - CreateStrategy: resourceclassparameters.Strategy, - UpdateStrategy: resourceclassparameters.Strategy, - DeleteStrategy: resourceclassparameters.Strategy, - ReturnDeletedObject: true, - - TableConvertor: printerstorage.TableConvertor{TableGenerator: printers.NewTableGenerator().With(printersinternal.AddHandlers)}, - } - options := &generic.StoreOptions{RESTOptions: optsGetter, AttrFunc: resourceclassparameters.GetAttrs} - if err := store.CompleteWithOptions(options); err != nil { - return nil, err - } - - return &REST{store}, nil -} diff --git a/pkg/registry/resource/resourceclassparameters/storage/storage_test.go b/pkg/registry/resource/resourceclassparameters/storage/storage_test.go deleted file mode 100644 index 83e9544944180..0000000000000 --- a/pkg/registry/resource/resourceclassparameters/storage/storage_test.go +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package storage - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apiserver/pkg/registry/generic" - genericregistrytest "k8s.io/apiserver/pkg/registry/generic/testing" - etcd3testing "k8s.io/apiserver/pkg/storage/etcd3/testing" - "k8s.io/kubernetes/pkg/apis/resource" - _ "k8s.io/kubernetes/pkg/apis/resource/install" - "k8s.io/kubernetes/pkg/registry/registrytest" -) - -func newStorage(t *testing.T) (*REST, *etcd3testing.EtcdTestServer) { - etcdStorage, server := registrytest.NewEtcdStorage(t, resource.GroupName) - restOptions := generic.RESTOptions{ - StorageConfig: etcdStorage, - Decorator: generic.UndecoratedStorage, - DeleteCollectionWorkers: 1, - ResourcePrefix: "resourceclassparameters", - } - resourceClassStorage, err := NewREST(restOptions) - if err != nil { - t.Fatalf("unexpected error from REST storage: %v", err) - } - return resourceClassStorage, server -} - -func validNewResourceClassParameters(name string) *resource.ResourceClassParameters { - return &resource.ResourceClassParameters{ - ObjectMeta: metav1.ObjectMeta{ - Name: name, - Namespace: metav1.NamespaceDefault, - }, - } -} - -func TestCreate(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - resourceClass := validNewResourceClassParameters("foo") - resourceClass.ObjectMeta = metav1.ObjectMeta{} - test.TestCreate( - // valid - resourceClass, - // invalid - &resource.ResourceClassParameters{ - ObjectMeta: metav1.ObjectMeta{Name: "*BadName!"}, - }, - ) -} - -func TestUpdate(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestUpdate( - // valid - validNewResourceClassParameters("foo"), - // updateFunc - func(obj runtime.Object) runtime.Object { - object := obj.(*resource.ResourceClassParameters) - object.Labels = map[string]string{"foo": "bar"} - return object - }, - // invalid update - func(obj runtime.Object) runtime.Object { - object := obj.(*resource.ResourceClassParameters) - object.Labels = map[string]string{"&$^^#%@": "1"} - return object - }, - ) - -} - -func TestDelete(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store).ReturnDeletedObject() - test.TestDelete(validNewResourceClassParameters("foo")) -} - -func TestGet(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestGet(validNewResourceClassParameters("foo")) -} - -func TestList(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestList(validNewResourceClassParameters("foo")) -} - -func TestWatch(t *testing.T) { - storage, server := newStorage(t) - defer server.Terminate(t) - defer storage.Store.DestroyFunc() - test := genericregistrytest.New(t, storage.Store) - test.TestWatch( - validNewResourceClassParameters("foo"), - // matching labels - []labels.Set{}, - // not matching labels - []labels.Set{ - {"foo": "bar"}, - }, - // matching fields - []fields.Set{ - {"metadata.name": "foo"}, - }, - // not matching fields - []fields.Set{ - {"metadata.name": "bar"}, - }, - ) -} diff --git a/pkg/registry/resource/resourceclassparameters/strategy.go b/pkg/registry/resource/resourceclassparameters/strategy.go deleted file mode 100644 index a1cd1b968cd41..0000000000000 --- a/pkg/registry/resource/resourceclassparameters/strategy.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resourceclassparameters - -import ( - "context" - "errors" - - "k8s.io/apimachinery/pkg/fields" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/apiserver/pkg/registry/generic" - "k8s.io/apiserver/pkg/storage" - "k8s.io/apiserver/pkg/storage/names" - "k8s.io/kubernetes/pkg/api/legacyscheme" - "k8s.io/kubernetes/pkg/apis/resource" - "k8s.io/kubernetes/pkg/apis/resource/validation" -) - -// resourceClassParametersStrategy implements behavior for ResourceClassParameters objects -type resourceClassParametersStrategy struct { - runtime.ObjectTyper - names.NameGenerator -} - -var Strategy = resourceClassParametersStrategy{legacyscheme.Scheme, names.SimpleNameGenerator} - -func (resourceClassParametersStrategy) NamespaceScoped() bool { - return true -} - -func (resourceClassParametersStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { -} - -func (resourceClassParametersStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { - resourceClassParameters := obj.(*resource.ResourceClassParameters) - return validation.ValidateResourceClassParameters(resourceClassParameters) -} - -func (resourceClassParametersStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string { - return nil -} - -func (resourceClassParametersStrategy) Canonicalize(obj runtime.Object) { -} - -func (resourceClassParametersStrategy) AllowCreateOnUpdate() bool { - return false -} - -func (resourceClassParametersStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { -} - -func (resourceClassParametersStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { - return validation.ValidateResourceClassParametersUpdate(obj.(*resource.ResourceClassParameters), old.(*resource.ResourceClassParameters)) -} - -func (resourceClassParametersStrategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string { - return nil -} - -func (resourceClassParametersStrategy) AllowUnconditionalUpdate() bool { - return true -} - -// Match returns a generic matcher for a given label and field selector. -func Match(label labels.Selector, field fields.Selector) storage.SelectionPredicate { - return storage.SelectionPredicate{ - Label: label, - Field: field, - GetAttrs: GetAttrs, - } -} - -// GetAttrs returns labels and fields of a given object for filtering purposes. -func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { - parameters, ok := obj.(*resource.ResourceClassParameters) - if !ok { - return nil, nil, errors.New("not a resourceclassparameters") - } - return labels.Set(parameters.Labels), toSelectableFields(parameters), nil -} - -// toSelectableFields returns a field set that represents the object -func toSelectableFields(class *resource.ResourceClassParameters) fields.Set { - fields := generic.ObjectMetaFieldsSet(&class.ObjectMeta, true) - return fields -} diff --git a/pkg/registry/resource/resourceclassparameters/strategy_test.go b/pkg/registry/resource/resourceclassparameters/strategy_test.go deleted file mode 100644 index 079f9279c9b64..0000000000000 --- a/pkg/registry/resource/resourceclassparameters/strategy_test.go +++ /dev/null @@ -1,81 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resourceclassparameters - -import ( - "testing" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - genericapirequest "k8s.io/apiserver/pkg/endpoints/request" - "k8s.io/kubernetes/pkg/apis/resource" -) - -var resourceClassParameters = &resource.ResourceClassParameters{ - ObjectMeta: metav1.ObjectMeta{ - Name: "valid", - Namespace: "ns", - }, -} - -func TestClassStrategy(t *testing.T) { - if !Strategy.NamespaceScoped() { - t.Errorf("ResourceClassParameters must be namespace scoped") - } - if Strategy.AllowCreateOnUpdate() { - t.Errorf("ResourceClassParameters should not allow create on update") - } -} - -func TestClassStrategyCreate(t *testing.T) { - ctx := genericapirequest.NewDefaultContext() - resourceClassParameters := resourceClassParameters.DeepCopy() - - Strategy.PrepareForCreate(ctx, resourceClassParameters) - errs := Strategy.Validate(ctx, resourceClassParameters) - if len(errs) != 0 { - t.Errorf("unexpected error validating for create %v", errs) - } -} - -func TestClassStrategyUpdate(t *testing.T) { - t.Run("no-changes-okay", func(t *testing.T) { - ctx := genericapirequest.NewDefaultContext() - resourceClassParameters := resourceClassParameters.DeepCopy() - newObj := resourceClassParameters.DeepCopy() - newObj.ResourceVersion = "4" - - Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters) - errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters) - if len(errs) != 0 { - t.Errorf("unexpected validation errors: %v", errs) - } - }) - - t.Run("name-change-not-allowed", func(t *testing.T) { - ctx := genericapirequest.NewDefaultContext() - resourceClassParameters := resourceClassParameters.DeepCopy() - newObj := resourceClassParameters.DeepCopy() - newObj.Name += "-2" - newObj.ResourceVersion = "4" - - Strategy.PrepareForUpdate(ctx, newObj, resourceClassParameters) - errs := Strategy.ValidateUpdate(ctx, newObj, resourceClassParameters) - if len(errs) == 0 { - t.Errorf("expected a validation error") - } - }) -} diff --git a/pkg/registry/resource/resourceslice/storage/storage_test.go b/pkg/registry/resource/resourceslice/storage/storage_test.go index 175cff4084f24..793a836303b7b 100644 --- a/pkg/registry/resource/resourceslice/storage/storage_test.go +++ b/pkg/registry/resource/resourceslice/storage/storage_test.go @@ -51,10 +51,13 @@ func validNewResourceSlice(name string) *resource.ResourceSlice { ObjectMeta: metav1.ObjectMeta{ Name: name, }, - NodeName: name, - DriverName: "cdi.example.com", - ResourceModel: resource.ResourceModel{ - NamedResources: &resource.NamedResourcesResources{}, + Spec: resource.ResourceSliceSpec{ + NodeName: name, + Driver: "cdi.example.com", + Pool: resource.ResourcePool{ + Name: "worker-1", + ResourceSliceCount: 1, + }, }, } } @@ -93,7 +96,7 @@ func TestUpdate(t *testing.T) { // invalid update func(obj runtime.Object) runtime.Object { object := obj.(*resource.ResourceSlice) - object.DriverName = "" + object.Spec.Driver = "" return object }, ) diff --git a/pkg/registry/resource/resourceslice/strategy.go b/pkg/registry/resource/resourceslice/strategy.go index e23b7d7ba3669..336de305c2f01 100644 --- a/pkg/registry/resource/resourceslice/strategy.go +++ b/pkg/registry/resource/resourceslice/strategy.go @@ -20,6 +20,7 @@ import ( "context" "fmt" + apiequality "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -46,6 +47,8 @@ func (resourceSliceStrategy) NamespaceScoped() bool { } func (resourceSliceStrategy) PrepareForCreate(ctx context.Context, obj runtime.Object) { + slice := obj.(*resource.ResourceSlice) + slice.Generation = 1 } func (resourceSliceStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList { @@ -65,6 +68,13 @@ func (resourceSliceStrategy) AllowCreateOnUpdate() bool { } func (resourceSliceStrategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { + slice := obj.(*resource.ResourceSlice) + oldSlice := old.(*resource.ResourceSlice) + + // Any changes to the spec increment the generation number. + if !apiequality.Semantic.DeepEqual(oldSlice.Spec, slice.Spec) { + slice.Generation = oldSlice.Generation + 1 + } } func (resourceSliceStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList { @@ -82,17 +92,17 @@ func (resourceSliceStrategy) AllowUnconditionalUpdate() bool { var TriggerFunc = map[string]storage.IndexerFunc{ // Only one index is supported: // https://github.com/kubernetes/kubernetes/blob/3aa8c59fec0bf339e67ca80ea7905c817baeca85/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go#L346-L350 - "nodeName": nodeNameTriggerFunc, + resource.ResourceSliceSelectorNodeName: nodeNameTriggerFunc, } func nodeNameTriggerFunc(obj runtime.Object) string { - return obj.(*resource.ResourceSlice).NodeName + return obj.(*resource.ResourceSlice).Spec.NodeName } // Indexers returns the indexers for ResourceSlice. func Indexers() *cache.Indexers { return &cache.Indexers{ - storage.FieldIndex("nodeName"): nodeNameIndexFunc, + storage.FieldIndex(resource.ResourceSliceSelectorNodeName): nodeNameIndexFunc, } } @@ -101,7 +111,7 @@ func nodeNameIndexFunc(obj interface{}) ([]string, error) { if !ok { return nil, fmt.Errorf("not a ResourceSlice") } - return []string{slice.NodeName}, nil + return []string{slice.Spec.NodeName}, nil } // GetAttrs returns labels and fields of a given object for filtering purposes. @@ -119,7 +129,7 @@ func Match(label labels.Selector, field fields.Selector) storage.SelectionPredic Label: label, Field: field, GetAttrs: GetAttrs, - IndexFields: []string{"nodeName"}, + IndexFields: []string{resource.ResourceSliceSelectorNodeName}, } } @@ -131,8 +141,8 @@ func toSelectableFields(slice *resource.ResourceSlice) fields.Set { // field here or the number of object-meta related fields changes, this should // be adjusted. fields := make(fields.Set, 3) - fields["nodeName"] = slice.NodeName - fields["driverName"] = slice.DriverName + fields[resource.ResourceSliceSelectorNodeName] = slice.Spec.NodeName + fields[resource.ResourceSliceSelectorDriver] = slice.Spec.Driver // Adds one field. return generic.AddObjectMetaFieldsSet(fields, &slice.ObjectMeta, false) diff --git a/pkg/registry/resource/resourceslice/strategy_test.go b/pkg/registry/resource/resourceslice/strategy_test.go index 923c5dfc2d5a2..0ee366655b029 100644 --- a/pkg/registry/resource/resourceslice/strategy_test.go +++ b/pkg/registry/resource/resourceslice/strategy_test.go @@ -28,14 +28,17 @@ var slice = &resource.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{ Name: "valid-class", }, - NodeName: "valid-node-name", - DriverName: "testdriver.example.com", - ResourceModel: resource.ResourceModel{ - NamedResources: &resource.NamedResourcesResources{}, + Spec: resource.ResourceSliceSpec{ + NodeName: "valid-node-name", + Driver: "testdriver.example.com", + Pool: resource.ResourcePool{ + Name: "valid-pool-name", + ResourceSliceCount: 1, + }, }, } -func TestClassStrategy(t *testing.T) { +func TestResourceSliceStrategy(t *testing.T) { if Strategy.NamespaceScoped() { t.Errorf("ResourceSlice must not be namespace scoped") } @@ -44,7 +47,7 @@ func TestClassStrategy(t *testing.T) { } } -func TestClassStrategyCreate(t *testing.T) { +func TestResourceSliceStrategyCreate(t *testing.T) { ctx := genericapirequest.NewDefaultContext() slice := slice.DeepCopy() @@ -55,15 +58,15 @@ func TestClassStrategyCreate(t *testing.T) { } } -func TestClassStrategyUpdate(t *testing.T) { +func TestResourceSliceStrategyUpdate(t *testing.T) { t.Run("no-changes-okay", func(t *testing.T) { ctx := genericapirequest.NewDefaultContext() slice := slice.DeepCopy() - newClass := slice.DeepCopy() - newClass.ResourceVersion = "4" + newSlice := slice.DeepCopy() + newSlice.ResourceVersion = "4" - Strategy.PrepareForUpdate(ctx, newClass, slice) - errs := Strategy.ValidateUpdate(ctx, newClass, slice) + Strategy.PrepareForUpdate(ctx, newSlice, slice) + errs := Strategy.ValidateUpdate(ctx, newSlice, slice) if len(errs) != 0 { t.Errorf("unexpected validation errors: %v", errs) } @@ -72,12 +75,12 @@ func TestClassStrategyUpdate(t *testing.T) { t.Run("name-change-not-allowed", func(t *testing.T) { ctx := genericapirequest.NewDefaultContext() slice := slice.DeepCopy() - newClass := slice.DeepCopy() - newClass.Name = "valid-class-2" - newClass.ResourceVersion = "4" + newSlice := slice.DeepCopy() + newSlice.Name = "valid-slice-2" + newSlice.ResourceVersion = "4" - Strategy.PrepareForUpdate(ctx, newClass, slice) - errs := Strategy.ValidateUpdate(ctx, newClass, slice) + Strategy.PrepareForUpdate(ctx, newSlice, slice) + errs := Strategy.ValidateUpdate(ctx, newSlice, slice) if len(errs) == 0 { t.Errorf("expected a validation error") } diff --git a/pkg/registry/resource/rest/storage_resource.go b/pkg/registry/resource/rest/storage_resource.go index 88d180d8407d9..3be89acf4994f 100644 --- a/pkg/registry/resource/rest/storage_resource.go +++ b/pkg/registry/resource/rest/storage_resource.go @@ -24,12 +24,10 @@ import ( serverstorage "k8s.io/apiserver/pkg/server/storage" "k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/apis/resource" + deviceclassstore "k8s.io/kubernetes/pkg/registry/resource/deviceclass/storage" podschedulingcontextsstore "k8s.io/kubernetes/pkg/registry/resource/podschedulingcontext/storage" resourceclaimstore "k8s.io/kubernetes/pkg/registry/resource/resourceclaim/storage" - resourceclaimparametersstore "k8s.io/kubernetes/pkg/registry/resource/resourceclaimparameters/storage" resourceclaimtemplatestore "k8s.io/kubernetes/pkg/registry/resource/resourceclaimtemplate/storage" - resourceclassstore "k8s.io/kubernetes/pkg/registry/resource/resourceclass/storage" - resourceclassparametersstore "k8s.io/kubernetes/pkg/registry/resource/resourceclassparameters/storage" resourceslicestore "k8s.io/kubernetes/pkg/registry/resource/resourceslice/storage" ) @@ -52,12 +50,12 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag func (p RESTStorageProvider) v1alpha3Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { storage := map[string]rest.Storage{} - if resource := "resourceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) { - resourceClassStorage, err := resourceclassstore.NewREST(restOptionsGetter) + if resource := "deviceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) { + deviceclassStorage, err := deviceclassstore.NewREST(restOptionsGetter) if err != nil { return nil, err } - storage[resource] = resourceClassStorage + storage[resource] = deviceclassStorage } if resource := "resourceclaims"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) { @@ -86,22 +84,6 @@ func (p RESTStorageProvider) v1alpha3Storage(apiResourceConfigSource serverstora storage[resource+"/status"] = podSchedulingStatusStorage } - if resource := "resourceclaimparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) { - resourceClaimParametersStorage, err := resourceclaimparametersstore.NewREST(restOptionsGetter) - if err != nil { - return nil, err - } - storage[resource] = resourceClaimParametersStorage - } - - if resource := "resourceclassparameters"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) { - resourceClassParametersStorage, err := resourceclassparametersstore.NewREST(restOptionsGetter) - if err != nil { - return nil, err - } - storage[resource] = resourceClassParametersStorage - } - if resource := "resourceslices"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha3.SchemeGroupVersion.WithResource(resource)) { resourceSliceStorage, err := resourceslicestore.NewREST(restOptionsGetter) if err != nil { diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go index 59385b3cb31df..cecc5211ae30f 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go @@ -34,7 +34,6 @@ import ( resourceapi "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" apiruntime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" @@ -1363,13 +1362,6 @@ func setup(t *testing.T, nodes []*v1.Node, claims []*resourceapi.ResourceClaim, reactor := createReactor(tc.client.Tracker()) tc.client.PrependReactor("*", "*", reactor) - // Quick-and-dirty workaround for fake client storing ResourceClassParameters and - // ResourceClaimParameters as "resourceclassparameterses" and "resourceclaimparameterses": - // intercept the correct LIST from the informers and reply to them with the incorrect - // LIST result. - tc.client.PrependReactor("list", "resourceclaimparameters", createListReactor(tc.client.Tracker(), "ResourceClaimParameters")) - tc.client.PrependReactor("list", "resourceclassparameters", createListReactor(tc.client.Tracker(), "ResourceClassParameters")) - tc.informerFactory = informers.NewSharedInformerFactory(tc.client, 0) tc.claimAssumeCache = assumecache.NewAssumeCache(tCtx.Logger(), tc.informerFactory.Resource().V1alpha3().ResourceClaims().Informer(), "resource claim", "", nil) opts := []runtime.Option{ @@ -1485,17 +1477,6 @@ func createReactor(tracker cgotesting.ObjectTracker) func(action cgotesting.Acti } } -func createListReactor(tracker cgotesting.ObjectTracker, kind string) func(action cgotesting.Action) (handled bool, ret apiruntime.Object, err error) { - return func(action cgotesting.Action) (handled bool, ret apiruntime.Object, err error) { - // listAction := action.(cgotesting.ListAction) - gvr := action.GetResource() - ns := action.GetNamespace() - gvr.Resource += "es" - list, err := tracker.List(gvr, schema.GroupVersionKind{Group: gvr.Group, Version: gvr.Version, Kind: kind}, ns) - return true, list, err - } -} - func Test_isSchedulableAfterClaimChange(t *testing.T) { testcases := map[string]struct { pod *v1.Pod diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go index 96880b9448cc1..cd100db742a08 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go @@ -54,20 +54,36 @@ type assumeCacheLister interface { // with an unknown structured parameter model silently ignored. An error gets // logged later when parameters required for a pod depend on such an unknown // model. -func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceLister, claimAssumeCache assumeCacheLister, inFlightAllocations *sync.Map) (resources, error) { - model := make(resources) +func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceLister, claimAssumeCache assumeCacheLister, inFlightAllocations *sync.Map) (resourceMap, error) { + model := make(resourceMap) slices, err := resourceSliceLister.List(labels.Everything()) if err != nil { return nil, fmt.Errorf("list node resource slices: %w", err) } for _, slice := range slices { + if slice.NamedResources == nil { + // Ignore unknown resource. We don't know what it is, + // so we cannot allocated anything depending on + // it. This is only an error if we actually see a claim + // which needs this unknown model. + continue + } + instances := slice.NamedResources.Instances if model[slice.NodeName] == nil { - model[slice.NodeName] = make(map[string]ResourceModels) + model[slice.NodeName] = make(map[string]Resources) + } + resources := model[slice.NodeName][slice.DriverName] + resources.Instances = make([]Instance, 0, len(instances)) + for i := range instances { + instance := Instance{ + NodeName: slice.NodeName, + DriverName: slice.DriverName, + NamedResourcesInstance: &instances[i], + } + resources.Instances = append(resources.Instances, instance) } - resource := model[slice.NodeName][slice.DriverName] - namedresourcesmodel.AddResources(&resource.NamedResources, slice.NamedResources) - model[slice.NodeName][slice.DriverName] = resource + model[slice.NodeName][slice.DriverName] = resources } objs := claimAssumeCache.List(nil) @@ -90,12 +106,23 @@ func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceListe continue } if model[structured.NodeName] == nil { - model[structured.NodeName] = make(map[string]ResourceModels) + model[structured.NodeName] = make(map[string]Resources) } - resource := model[structured.NodeName][handle.DriverName] + resources := model[structured.NodeName][handle.DriverName] for _, result := range structured.Results { - // Call AddAllocation for each known model. Each call itself needs to check for nil. - namedresourcesmodel.AddAllocation(&resource.NamedResources, result.NamedResources) + // Same as above: if we don't know the allocation result model, ignore it. + if result.NamedResources == nil { + continue + } + instanceName := result.NamedResources.Name + for i := range resources.Instances { + if resources.Instances[i].NamedResourcesInstance.Name == instanceName { + resources.Instances[i].Allocated = true + break + } + } + // It could be that we don't know the instance. That's okay, + // we simply ignore the allocation result. } } } diff --git a/plugin/pkg/admission/noderestriction/admission.go b/plugin/pkg/admission/noderestriction/admission.go index 7f869d18bdad5..3cefa080ab1ee 100644 --- a/plugin/pkg/admission/noderestriction/admission.go +++ b/plugin/pkg/admission/noderestriction/admission.go @@ -654,7 +654,7 @@ func (p *Plugin) admitResourceSlice(nodeName string, a admission.Attributes) err return admission.NewForbidden(a, fmt.Errorf("unexpected type %T", a.GetObject())) } - if slice.NodeName != nodeName { + if slice.Spec.NodeName != nodeName { return admission.NewForbidden(a, errors.New("can only create ResourceSlice with the same NodeName as the requesting node")) } case admission.Delete: @@ -663,7 +663,7 @@ func (p *Plugin) admitResourceSlice(nodeName string, a admission.Attributes) err return admission.NewForbidden(a, fmt.Errorf("unexpected type %T", a.GetOldObject())) } - if slice.NodeName != nodeName { + if slice.Spec.NodeName != nodeName { return admission.NewForbidden(a, errors.New("can only delete ResourceSlice with the same NodeName as the requesting node")) } } diff --git a/plugin/pkg/admission/noderestriction/admission_test.go b/plugin/pkg/admission/noderestriction/admission_test.go index 6044c33ae4a69..9913b185557d1 100644 --- a/plugin/pkg/admission/noderestriction/admission_test.go +++ b/plugin/pkg/admission/noderestriction/admission_test.go @@ -1614,13 +1614,25 @@ func TestAdmitResourceSlice(t *testing.T) { ObjectMeta: metav1.ObjectMeta{ Name: "something", }, - NodeName: nodename, + Spec: resourceapi.ResourceSliceSpec{ + NodeName: nodename, + }, } sliceOtherNode := &resourceapi.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{ Name: "something", }, - NodeName: nodename + "-other", + Spec: resourceapi.ResourceSliceSpec{ + NodeName: nodename + "-other", + }, + } + sliceNoNode := &resourceapi.ResourceSlice{ + ObjectMeta: metav1.ObjectMeta{ + Name: "something", + }, + Spec: resourceapi.ResourceSliceSpec{ + NodeName: "", + }, } tests := map[string]struct { @@ -1644,6 +1656,13 @@ func TestAdmitResourceSlice(t *testing.T) { featureEnabled: true, expectError: createErr, }, + "create disallowed, no node name, enabled": { + operation: admission.Create, + options: &metav1.CreateOptions{}, + obj: sliceNoNode, + featureEnabled: true, + expectError: createErr, + }, "create allowed, disabled": { operation: admission.Create, options: &metav1.CreateOptions{}, @@ -1658,6 +1677,13 @@ func TestAdmitResourceSlice(t *testing.T) { featureEnabled: false, expectError: createErr, }, + "create disallowed, no node name, disabled": { + operation: admission.Create, + options: &metav1.CreateOptions{}, + obj: sliceNoNode, + featureEnabled: false, + expectError: createErr, + }, "update allowed, same node": { operation: admission.Update, options: &metav1.UpdateOptions{}, @@ -1672,6 +1698,13 @@ func TestAdmitResourceSlice(t *testing.T) { featureEnabled: true, expectError: "", }, + "update allowed, no node": { + operation: admission.Update, + options: &metav1.UpdateOptions{}, + obj: sliceNoNode, + featureEnabled: true, + expectError: "", + }, "delete allowed, enabled": { operation: admission.Delete, options: &metav1.DeleteOptions{}, @@ -1686,6 +1719,13 @@ func TestAdmitResourceSlice(t *testing.T) { featureEnabled: true, expectError: deleteErr, }, + "delete disallowed, no node name, enabled": { + operation: admission.Delete, + options: &metav1.DeleteOptions{}, + oldObj: sliceNoNode, + featureEnabled: true, + expectError: deleteErr, + }, "delete allowed, disabled": { operation: admission.Delete, options: &metav1.DeleteOptions{}, @@ -1700,6 +1740,13 @@ func TestAdmitResourceSlice(t *testing.T) { featureEnabled: false, expectError: deleteErr, }, + "delete disallowed, no node name, disabled": { + operation: admission.Delete, + options: &metav1.DeleteOptions{}, + oldObj: sliceNoNode, + featureEnabled: false, + expectError: deleteErr, + }, } for name, test := range tests { diff --git a/plugin/pkg/auth/authorizer/node/graph_populator.go b/plugin/pkg/auth/authorizer/node/graph_populator.go index 0fcff59bd9667..e0b3c056e8308 100644 --- a/plugin/pkg/auth/authorizer/node/graph_populator.go +++ b/plugin/pkg/auth/authorizer/node/graph_populator.go @@ -206,7 +206,7 @@ func (g *graphPopulator) addResourceSlice(obj interface{}) { klog.Infof("unexpected type %T", obj) return } - g.graph.AddResourceSlice(slice.Name, slice.NodeName) + g.graph.AddResourceSlice(slice.Name, slice.Spec.NodeName) } func (g *graphPopulator) deleteResourceSlice(obj interface{}) { diff --git a/plugin/pkg/auth/authorizer/node/node_authorizer_test.go b/plugin/pkg/auth/authorizer/node/node_authorizer_test.go index ce39bde78de9a..f903c65772b4c 100644 --- a/plugin/pkg/auth/authorizer/node/node_authorizer_test.go +++ b/plugin/pkg/auth/authorizer/node/node_authorizer_test.go @@ -56,7 +56,7 @@ func TestAuthorizer(t *testing.T) { uniqueResourceClaimsPerPod: 1, uniqueResourceClaimTemplatesPerPod: 1, uniqueResourceClaimTemplatesWithClaimPerPod: 1, - nodeResourceCapacitiesPerNode: 2, + nodeResourceSlicesPerNode: 2, } nodes, pods, pvs, attachments, slices := generate(opts) populate(g, nodes, pods, pvs, attachments, slices) @@ -561,7 +561,7 @@ type sampleDataOpts struct { uniqueResourceClaimTemplatesPerPod int uniqueResourceClaimTemplatesWithClaimPerPod int - nodeResourceCapacitiesPerNode int + nodeResourceSlicesPerNode int } func BenchmarkPopulationAllocation(b *testing.B) { @@ -864,7 +864,7 @@ func generate(opts *sampleDataOpts) ([]*corev1.Node, []*corev1.Pod, []*corev1.Pe pods := make([]*corev1.Pod, 0, opts.nodes*opts.podsPerNode) pvs := make([]*corev1.PersistentVolume, 0, (opts.nodes*opts.podsPerNode*opts.uniquePVCsPerPod)+(opts.sharedPVCsPerPod*opts.namespaces)) attachments := make([]*storagev1.VolumeAttachment, 0, opts.nodes*opts.attachmentsPerNode) - slices := make([]*resourceapi.ResourceSlice, 0, opts.nodes*opts.nodeResourceCapacitiesPerNode) + slices := make([]*resourceapi.ResourceSlice, 0, opts.nodes*opts.nodeResourceSlicesPerNode) rand.Seed(12345) @@ -891,11 +891,13 @@ func generate(opts *sampleDataOpts) ([]*corev1.Node, []*corev1.Pod, []*corev1.Pe Spec: corev1.NodeSpec{}, }) - for p := 0; p <= opts.nodeResourceCapacitiesPerNode; p++ { + for p := 0; p <= opts.nodeResourceSlicesPerNode; p++ { name := fmt.Sprintf("slice%d-%s", p, nodeName) slice := &resourceapi.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{Name: name}, - NodeName: nodeName, + Spec: resourceapi.ResourceSliceSpec{ + NodeName: nodeName, + }, } slices = append(slices, slice) } diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go index 8e3f4090c2e97..d330f5c9dcf17 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go @@ -578,13 +578,13 @@ func ClusterRoles() []rbacv1.ClusterRole { // Needed for dynamic resource allocation. if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { kubeSchedulerRules = append(kubeSchedulerRules, - rbacv1helpers.NewRule(Read...).Groups(resourceGroup).Resources("resourceclasses").RuleOrDie(), + rbacv1helpers.NewRule(Read...).Groups(resourceGroup).Resources("deviceclasses").RuleOrDie(), rbacv1helpers.NewRule(ReadUpdate...).Groups(resourceGroup).Resources("resourceclaims").RuleOrDie(), rbacv1helpers.NewRule(ReadUpdate...).Groups(resourceGroup).Resources("resourceclaims/status").RuleOrDie(), rbacv1helpers.NewRule(ReadWrite...).Groups(resourceGroup).Resources("podschedulingcontexts").RuleOrDie(), rbacv1helpers.NewRule(Read...).Groups(resourceGroup).Resources("podschedulingcontexts/status").RuleOrDie(), rbacv1helpers.NewRule(ReadUpdate...).Groups(legacyGroup).Resources("pods/finalizers").RuleOrDie(), - rbacv1helpers.NewRule(Read...).Groups(resourceGroup).Resources("resourceslices", "resourceclassparameters", "resourceclaimparameters").RuleOrDie(), + rbacv1helpers.NewRule(Read...).Groups(resourceGroup).Resources("resourceslices").RuleOrDie(), ) } roles = append(roles, rbacv1.ClusterRole{ diff --git a/staging/src/k8s.io/api/core/v1/generated.pb.go b/staging/src/k8s.io/api/core/v1/generated.pb.go index c31185147b3a9..a73562c520caf 100644 --- a/staging/src/k8s.io/api/core/v1/generated.pb.go +++ b/staging/src/k8s.io/api/core/v1/generated.pb.go @@ -6642,996 +6642,996 @@ func init() { } var fileDescriptor_6c07b07c062484ab = []byte{ - // 15811 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x69, 0x8c, 0x1c, 0xc9, - 0x75, 0x30, 0xa8, 0xac, 0xea, 0xf3, 0xf5, 0x1d, 0x4d, 0x72, 0x9a, 0x3d, 0x24, 0x8b, 0x93, 0x33, - 0xc3, 0xe1, 0x5c, 0x4d, 0x71, 0x0e, 0x0d, 0x35, 0x33, 0x1a, 0xab, 0x4f, 0xb2, 0x86, 0xec, 0x66, - 0x4d, 0x54, 0x93, 0x94, 0x46, 0x23, 0x59, 0xc9, 0xaa, 0xe8, 0xee, 0x54, 0x57, 0x65, 0xd6, 0x64, - 0x66, 0x35, 0xd9, 0x5c, 0x19, 0xb6, 0xe5, 0xb5, 0x6c, 0xc9, 0x5e, 0x40, 0x58, 0x78, 0x0f, 0xc8, - 0x86, 0xb1, 0xf0, 0x7a, 0x7d, 0xac, 0xd6, 0xc6, 0x6a, 0xe5, 0xf5, 0x25, 0x5f, 0x7b, 0x01, 0xf6, - 0xee, 0xc2, 0xeb, 0x35, 0xb0, 0x92, 0xb1, 0xc6, 0xb6, 0x57, 0xed, 0x0f, 0x30, 0xfc, 0xe3, 0xb3, - 0x0d, 0x7f, 0xdf, 0x8f, 0xef, 0x6b, 0xf8, 0xfb, 0xfc, 0x21, 0xce, 0x8c, 0xc8, 0xa3, 0xaa, 0x9a, - 0x43, 0xb6, 0x46, 0xc2, 0xfc, 0xab, 0x7a, 0xef, 0xc5, 0x8b, 0xc8, 0x38, 0x5f, 0xbc, 0xf7, 0xe2, - 0x3d, 0xb0, 0xb7, 0x2f, 0x85, 0x73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 0xe4, 0x82, 0xab, 0xbb, 0xe1, 0xf6, 0x5a, 0xdc, 0x03, 0x6a, - 0xa6, 0x2f, 0x09, 0x38, 0x56, 0x14, 0xe8, 0x79, 0x18, 0xa4, 0xbf, 0x6f, 0xe0, 0xb2, 0xf8, 0xe4, + // 15822 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x59, 0x8c, 0x1c, 0xd9, + 0x75, 0x20, 0xaa, 0xc8, 0xac, 0xf5, 0xd4, 0x7e, 0x8b, 0x4b, 0xb1, 0x9a, 0x64, 0xb2, 0xa3, 0xbb, + 0xd9, 0xec, 0xad, 0x28, 0xf6, 0xa2, 0xa6, 0xba, 0x5b, 0x6d, 0xd5, 0x4a, 0x66, 0x93, 0x55, 0xcc, + 0xbe, 0x59, 0x24, 0xa5, 0x56, 0x4b, 0x56, 0x30, 0xf3, 0x56, 0x55, 0xa8, 0x32, 0x23, 0xb2, 0x23, + 0x22, 0x8b, 0x2c, 0x3e, 0x19, 0xb6, 0xe5, 0x67, 0xd9, 0x92, 0xfd, 0x00, 0xe1, 0xc1, 0x6f, 0x81, + 0x6c, 0x18, 0x0f, 0x7e, 0x7e, 0x5e, 0x9e, 0x9e, 0x8d, 0xa7, 0x91, 0xc7, 0x9b, 0xbc, 0xcd, 0x06, + 0xd8, 0x33, 0x03, 0x8f, 0xc7, 0xc0, 0x48, 0xc6, 0x18, 0x53, 0x1e, 0xd1, 0x03, 0x18, 0xfe, 0x18, + 0xdb, 0xf0, 0xcc, 0xc7, 0x4c, 0xc1, 0x33, 0x1e, 0xdc, 0x35, 0xee, 0x8d, 0x25, 0x33, 0x8b, 0x4d, + 0x96, 0x5a, 0x42, 0xff, 0x65, 0x9e, 0x73, 0xee, 0xb9, 0x37, 0xee, 0x7a, 0xee, 0x39, 0xe7, 0x9e, + 0x03, 0xf6, 0xf6, 0xc5, 0x70, 0xce, 0xf5, 0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 0xcd, 0x07, 0x4d, 0x3f, 0xa8, 0x04, 0xfe, 0x86, 0xdb, 0x20, 0xe8, 0x65, 0xe8, + 0x8b, 0xe8, 0xa8, 0xf1, 0x11, 0x7e, 0x4c, 0x74, 0x6d, 0x1f, 0x1d, 0xab, 0xfd, 0xbd, 0xd2, 0x74, + 0x82, 0x9c, 0x0d, 0x25, 0x2b, 0x80, 0x3e, 0x0a, 0x93, 0x0d, 0xbf, 0xe6, 0x34, 0xb6, 0xfc, 0x30, + 0x12, 0x58, 0x31, 0xf4, 0x47, 0xee, 0xed, 0x95, 0x26, 0xaf, 0x26, 0x70, 0x38, 0x45, 0x6d, 0xdf, + 0x85, 0xf1, 0xf9, 0x28, 0x72, 0x6a, 0x5b, 0xa4, 0xce, 0x27, 0x14, 0x7a, 0x11, 0xfa, 0x3c, 0xa7, + 0x29, 0x1b, 0x73, 0x46, 0x36, 0x66, 0xcd, 0x69, 0xd2, 0xc6, 0x4c, 0x5e, 0xf7, 0xdc, 0x77, 0xda, + 0x62, 0x92, 0x52, 0x18, 0x66, 0xd4, 0xe8, 0x79, 0x80, 0x3a, 0xd9, 0x71, 0x6b, 0xa4, 0xe2, 0x44, + 0x5b, 0xa2, 0x0d, 0x48, 0x94, 0x85, 0x25, 0x85, 0xc1, 0x1a, 0x95, 0x7d, 0x07, 0x86, 0xe7, 0x77, + 0x7c, 0xb7, 0x5e, 0xf1, 0xeb, 0x21, 0xda, 0x86, 0x89, 0x56, 0x40, 0x36, 0x48, 0xa0, 0x40, 0x33, + 0xd6, 0x99, 0xe2, 0xb9, 0x91, 0xe7, 0xcf, 0x65, 0xf6, 0xbd, 0x49, 0xba, 0xec, 0x45, 0xc1, 0xee, + 0xc2, 0x71, 0x51, 0xdf, 0x44, 0x02, 0x8b, 0x93, 0x9c, 0xed, 0x7f, 0x5a, 0x80, 0xa3, 0xf3, 0x77, + 0xdb, 0x01, 0x59, 0x72, 0xc3, 0xed, 0xe4, 0x82, 0xab, 0xbb, 0xe1, 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 0xb3, 0xe0, 0x91, 0x54, 0xcf, 0x08, 0xa5, 0xdf, 0x03, 0x1e, 0x85, 0xa4, 0x12, 0xae, 0xd0, 0x5d, - 0x09, 0x67, 0xff, 0x77, 0x16, 0x1c, 0x5b, 0x6e, 0xb6, 0xa2, 0xdd, 0x25, 0xd7, 0x34, 0xdf, 0xbf, - 0x02, 0x03, 0x4d, 0x52, 0x77, 0xdb, 0x4d, 0x31, 0x72, 0x25, 0x79, 0x80, 0xae, 0x32, 0x28, 0x5d, - 0x84, 0xd5, 0xc8, 0x0f, 0x9c, 0x4d, 0xc2, 0x01, 0x58, 0x90, 0x33, 0x31, 0xc4, 0xbd, 0x47, 0xae, - 0xb9, 0x4d, 0x37, 0xba, 0xbf, 0xd5, 0x25, 0x2c, 0xef, 0x92, 0x09, 0x8e, 0xf9, 0xd9, 0xdf, 0xb6, - 0x60, 0x42, 0xce, 0xfb, 0xf9, 0x7a, 0x3d, 0x20, 0x61, 0x88, 0x66, 0xa1, 0xe0, 0xb6, 0x44, 0x2b, - 0x41, 0xb4, 0xb2, 0x50, 0xae, 0xe0, 0x82, 0xdb, 0x92, 0x37, 0x1e, 0x76, 0x46, 0x17, 0x4d, 0x27, - 0x84, 0x2b, 0x02, 0x8e, 0x15, 0x05, 0x3a, 0x0f, 0x43, 0x9e, 0x5f, 0xe7, 0x97, 0x06, 0x61, 0x86, - 0xa6, 0x94, 0x6b, 0x02, 0x86, 0x15, 0x16, 0x55, 0x60, 0x98, 0xbb, 0xa8, 0xc6, 0x93, 0xb6, 0x27, - 0x47, 0x57, 0xf6, 0x65, 0xeb, 0xb2, 0x24, 0x8e, 0x99, 0xd8, 0x7f, 0x68, 0xc1, 0xa8, 0xfc, 0xb2, - 0x1e, 0xaf, 0x73, 0x74, 0x69, 0xc5, 0x57, 0xb9, 0x78, 0x69, 0xd1, 0xeb, 0x18, 0xc3, 0x18, 0xb7, - 0xb0, 0xe2, 0xa1, 0x6e, 0x61, 0x17, 0x61, 0xc4, 0x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xe3, 0xac, + 0xc2, 0x27, 0xa4, 0x1c, 0x51, 0x36, 0xd1, 0xfb, 0x7b, 0x25, 0x88, 0xff, 0xe1, 0x64, 0x69, 0x74, + 0x8b, 0x19, 0x61, 0xdb, 0x81, 0x1b, 0xed, 0xd2, 0x55, 0x45, 0xee, 0x44, 0x33, 0x13, 0x1d, 0x15, + 0x52, 0x3a, 0xa9, 0xb2, 0xd4, 0xea, 0x40, 0x9c, 0x64, 0x48, 0x8f, 0x82, 0x30, 0xaa, 0xbb, 0xde, + 0xcc, 0x24, 0xbf, 0x4f, 0xc9, 0x9d, 0xb4, 0x4a, 0x81, 0x98, 0xe3, 0x98, 0x01, 0x96, 0xfe, 0xb8, + 0x46, 0x4f, 0xdc, 0x29, 0x46, 0x18, 0x1b, 0x60, 0x25, 0x02, 0xc7, 0x34, 0x54, 0x08, 0x8e, 0xa2, + 0xdd, 0x19, 0xc4, 0x48, 0xd5, 0x86, 0xb8, 0xbe, 0xfe, 0x71, 0x4c, 0xe1, 0xf6, 0x2d, 0x18, 0x57, + 0xdb, 0x04, 0xeb, 0x13, 0x54, 0x82, 0x7e, 0x26, 0xf6, 0x09, 0xf5, 0xe9, 0x30, 0x6d, 0x02, 0x13, + 0x09, 0x31, 0x87, 0xb3, 0x26, 0xb8, 0x77, 0xc9, 0xc2, 0x6e, 0x44, 0xb8, 0x2e, 0xa2, 0xa8, 0x35, + 0x41, 0x22, 0x70, 0x4c, 0x63, 0xff, 0x77, 0x2e, 0x3e, 0xc7, 0xa7, 0x44, 0x0f, 0xe7, 0xe2, 0xb3, + 0x30, 0xc4, 0x1c, 0x3f, 0xfc, 0x80, 0x5b, 0x67, 0xfb, 0x63, 0x81, 0xf9, 0xb2, 0x80, 0x63, 0x45, + 0x81, 0x5e, 0x85, 0xb1, 0x9a, 0x5e, 0x81, 0x38, 0xd4, 0xd5, 0x36, 0x62, 0xd4, 0x8e, 0x4d, 0x5a, + 0x74, 0x11, 0x86, 0x98, 0x8f, 0x53, 0x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 0xd0, 0x9b, 0x30, 0xc0, 0x5e, 0xf1, 0x85, 0x33, 0x43, 0xf9, 0xf6, 0x02, - 0x33, 0xac, 0x66, 0xbc, 0x20, 0xd9, 0xdf, 0x10, 0x0b, 0x0e, 0xe8, 0x8a, 0x7c, 0x23, 0x1b, 0x96, - 0xbd, 0x1b, 0x21, 0x61, 0x6f, 0x64, 0x87, 0x17, 0x9e, 0x88, 0x9f, 0xbf, 0x72, 0x78, 0x66, 0x32, - 0x53, 0xa3, 0x24, 0x95, 0xa7, 0xc4, 0x7f, 0x99, 0x23, 0x55, 0x04, 0x01, 0xcb, 0x6c, 0x9e, 0x99, - 0x47, 0x35, 0xee, 0xce, 0x9b, 0x26, 0x0b, 0x9c, 0xe4, 0x49, 0x65, 0x53, 0xbe, 0xea, 0xc5, 0x9b, - 0xa2, 0x6e, 0x7b, 0x07, 0xbf, 0x92, 0xb3, 0xd3, 0x88, 0x43, 0xb0, 0x28, 0x8f, 0x5c, 0x98, 0x08, - 0x0c, 0x11, 0x41, 0xc6, 0xee, 0x3a, 0xd7, 0x9b, 0x1c, 0xa2, 0x45, 0x85, 0x37, 0xd9, 0xe0, 0x24, - 0xdf, 0xd9, 0x6d, 0x18, 0x33, 0x36, 0x88, 0x87, 0x6a, 0x8f, 0xf3, 0x60, 0x32, 0xb9, 0x1b, 0x3c, - 0x54, 0x33, 0xdc, 0x5f, 0xf7, 0xc1, 0xb8, 0x39, 0x7b, 0xd1, 0x05, 0x18, 0x16, 0x4c, 0x54, 0x4a, - 0x23, 0xb5, 0x20, 0x57, 0x25, 0x02, 0xc7, 0x34, 0x2c, 0x93, 0x15, 0x2b, 0xae, 0xf9, 0xab, 0xc7, - 0x99, 0xac, 0x14, 0x06, 0x6b, 0x54, 0xf4, 0x36, 0x77, 0xdb, 0xf7, 0x23, 0x75, 0xf6, 0xa9, 0x29, - 0xbe, 0xc0, 0xa0, 0x58, 0x60, 0xe9, 0x99, 0xb7, 0x4d, 0x02, 0x8f, 0x34, 0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b, 0x14, 0xe8, 0x65, 0x18, 0x89, 0xfc, 0x96, 0xdf, 0xf0, 0x37, 0x77, 0xaf, - 0x12, 0x19, 0x5d, 0x51, 0x39, 0xfa, 0xae, 0xc7, 0x28, 0xac, 0xd3, 0xa1, 0xbb, 0x30, 0xa5, 0x98, - 0x54, 0x1f, 0x80, 0x79, 0x8d, 0xa9, 0x4d, 0xd6, 0x92, 0x1c, 0x71, 0xba, 0x12, 0xf4, 0x2a, 0x8c, - 0x33, 0x8f, 0x63, 0x56, 0xfe, 0x2a, 0xd9, 0x95, 0x51, 0x77, 0x99, 0x84, 0xbd, 0x6a, 0x60, 0x70, - 0x82, 0x12, 0x2d, 0xc2, 0x54, 0xd3, 0x0d, 0x13, 0xc5, 0x07, 0x58, 0x71, 0xd6, 0x80, 0xd5, 0x24, - 0x12, 0xa7, 0xe9, 0xed, 0x5f, 0x11, 0x63, 0xec, 0x45, 0xee, 0x07, 0xcb, 0xf1, 0xfd, 0xbd, 0x1c, - 0xbf, 0x6d, 0xc1, 0x24, 0xad, 0x9d, 0xb9, 0x51, 0x4a, 0x41, 0x4a, 0xe5, 0x65, 0xb0, 0x3a, 0xe4, - 0x65, 0x38, 0x47, 0xb7, 0xed, 0xba, 0xdf, 0x8e, 0x84, 0x76, 0x54, 0xdb, 0x97, 0x29, 0x14, 0x0b, - 0xac, 0xa0, 0x23, 0x41, 0x20, 0x1e, 0x81, 0xeb, 0x74, 0x24, 0x08, 0xb0, 0xc0, 0xca, 0xb4, 0x0d, - 0x7d, 0xd9, 0x69, 0x1b, 0x78, 0xf4, 0x6d, 0xe1, 0x05, 0x27, 0x44, 0x5a, 0x2d, 0xfa, 0xb6, 0x74, - 0x8f, 0x8b, 0x69, 0xec, 0x6f, 0x14, 0x61, 0xb4, 0xe2, 0xd7, 0x63, 0xc7, 0x8e, 0x97, 0x0c, 0xc7, - 0x8e, 0xb3, 0x09, 0xc7, 0x8e, 0x49, 0x9d, 0xf6, 0x03, 0x37, 0x8e, 0xef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0xb1, 0xce, 0x07, 0xad, 0xf3, 0xf9, 0xce, 0x32, 0xd6, 0x90, 0x50, 0xe4, - 0xe1, 0x3e, 0x9d, 0xe7, 0xa5, 0xc8, 0xc8, 0xcc, 0xe5, 0x20, 0x4a, 0x62, 0x9d, 0x0d, 0xba, 0x0c, - 0x53, 0xad, 0xc0, 0xf5, 0xd9, 0x9c, 0x50, 0x06, 0xea, 0x19, 0x33, 0x3f, 0x65, 0x25, 0x49, 0x80, - 0xd3, 0x65, 0x58, 0xe8, 0x12, 0x01, 0x9c, 0x39, 0xc9, 0x73, 0x6c, 0x71, 0xf5, 0x03, 0x87, 0x61, - 0x85, 0x45, 0xab, 0x6c, 0x27, 0xe6, 0x9a, 0xb3, 0x99, 0xd9, 0xfc, 0x18, 0x73, 0xba, 0x86, 0x8d, - 0x8b, 0xe5, 0xea, 0x2f, 0x8e, 0x39, 0xa0, 0xba, 0x96, 0xda, 0x9a, 0x5e, 0x6e, 0xc2, 0x99, 0x53, - 0x1d, 0xdc, 0x64, 0x13, 0x37, 0xd9, 0x58, 0x20, 0x30, 0xc0, 0x21, 0x4e, 0xf0, 0x44, 0x1f, 0x87, - 0x49, 0xf1, 0xae, 0x3f, 0xee, 0xa6, 0xd3, 0xf1, 0x53, 0x22, 0x9c, 0xc0, 0xe1, 0x14, 0x35, 0xcf, - 0x71, 0xe5, 0xdc, 0x6e, 0x10, 0xb1, 0xf5, 0x5d, 0x73, 0xbd, 0xed, 0x70, 0xe6, 0x0c, 0xdb, 0x1f, - 0x44, 0x8e, 0xab, 0x24, 0x16, 0x67, 0x94, 0x40, 0xeb, 0x30, 0xd9, 0x0a, 0x08, 0x69, 0xb2, 0x2b, - 0x8c, 0x38, 0xcf, 0x4a, 0x3c, 0x72, 0x0f, 0x6d, 0x49, 0x25, 0x81, 0x3b, 0xc8, 0x80, 0xe1, 0x14, - 0x07, 0x74, 0x07, 0x86, 0xfc, 0x1d, 0x12, 0x6c, 0x11, 0xa7, 0x3e, 0x73, 0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xec, 0x8f, 0x32, 0x06, 0xab, 0xaf, 0xe3, 0x60, - 0xd5, 0xe5, 0x02, 0x32, 0xd2, 0xe7, 0x75, 0x09, 0x7d, 0x70, 0xd8, 0xf4, 0x79, 0xf6, 0xdf, 0x5a, - 0x80, 0x78, 0x35, 0x86, 0xe0, 0x46, 0xc5, 0x21, 0x06, 0xd5, 0x0e, 0xba, 0x78, 0x6b, 0x52, 0x18, - 0xac, 0x51, 0x3d, 0x90, 0xee, 0x49, 0x38, 0x5c, 0x14, 0xbb, 0x3b, 0x5c, 0x1c, 0xa2, 0x47, 0xbf, - 0x36, 0x08, 0xc9, 0x97, 0x7d, 0xe8, 0x26, 0x8c, 0xd6, 0x9c, 0x96, 0x73, 0xdb, 0x6d, 0xb8, 0x91, - 0x4b, 0xc2, 0x4e, 0xde, 0x58, 0x8b, 0x1a, 0x9d, 0x30, 0x91, 0x6b, 0x10, 0x6c, 0xf0, 0x41, 0x73, - 0x00, 0xad, 0xc0, 0xdd, 0x71, 0x1b, 0x64, 0x93, 0xa9, 0x5d, 0x58, 0x14, 0x1a, 0xee, 0x1a, 0x26, - 0xa1, 0x58, 0xa3, 0xc8, 0x08, 0x10, 0x51, 0x7c, 0xc8, 0x01, 0x22, 0xe0, 0xc8, 0x02, 0x44, 0xf4, - 0x1d, 0x2a, 0x40, 0xc4, 0xd0, 0xa1, 0x03, 0x44, 0xf4, 0xf7, 0x14, 0x20, 0x02, 0xc3, 0x09, 0x29, - 0x7b, 0xd2, 0xff, 0x2b, 0x6e, 0x83, 0x88, 0x0b, 0x07, 0x0f, 0x9d, 0x33, 0xbb, 0xbf, 0x57, 0x3a, - 0x81, 0x33, 0x29, 0x70, 0x4e, 0x49, 0xf4, 0x09, 0x98, 0x71, 0x1a, 0x0d, 0xff, 0x8e, 0x1a, 0xd4, - 0xe5, 0xb0, 0xe6, 0x34, 0xb8, 0x09, 0x64, 0x90, 0x71, 0x3d, 0xb5, 0xbf, 0x57, 0x9a, 0x99, 0xcf, - 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0xd3, 0x22, 0x4c, 0xc5, 0x01, 0xd7, 0xcc, 0x78, 0x93, 0xec, 0xfc, 0x5e, - 0x4f, 0x22, 0x71, 0x9a, 0xde, 0x26, 0x70, 0x56, 0xc5, 0x9d, 0x12, 0x67, 0x21, 0x73, 0x78, 0xd7, - 0xad, 0xef, 0x5d, 0xfa, 0x29, 0x36, 0x87, 0x17, 0x72, 0xcd, 0xe1, 0xbf, 0x60, 0xc1, 0xb1, 0x64, - 0x3d, 0xec, 0x75, 0xf8, 0x97, 0x2c, 0x38, 0x1e, 0x67, 0x6a, 0x49, 0xbb, 0x20, 0xbc, 0xd4, 0x31, - 0x96, 0x56, 0x4e, 0x8b, 0xe3, 0xe0, 0x22, 0xab, 0x59, 0xac, 0x71, 0x76, 0x8d, 0xf6, 0xbf, 0xe9, - 0x83, 0x99, 0xbc, 0x20, 0x5c, 0xec, 0x3d, 0x8c, 0x73, 0xb7, 0xba, 0x4d, 0xee, 0x88, 0x57, 0x07, - 0xf1, 0x7b, 0x18, 0x0e, 0xc6, 0x12, 0x9f, 0x4c, 0xce, 0x53, 0xe8, 0x31, 0x39, 0xcf, 0x16, 0x4c, - 0xdd, 0xd9, 0x22, 0xde, 0x0d, 0x2f, 0x74, 0x22, 0x37, 0xdc, 0x70, 0x99, 0x01, 0x9d, 0xcf, 0x1b, - 0x99, 0x60, 0x7e, 0xea, 0x56, 0x92, 0xe0, 0x60, 0xaf, 0x74, 0xda, 0x00, 0xc4, 0x4d, 0xe6, 0x1b, - 0x09, 0x4e, 0x33, 0x4d, 0xe7, 0x36, 0xea, 0x7b, 0xc8, 0xb9, 0x8d, 0x9a, 0xae, 0x70, 0xbb, 0x91, - 0x8f, 0x1d, 0xd8, 0xb5, 0x75, 0x55, 0x41, 0xb1, 0x46, 0x81, 0x3e, 0x0d, 0x48, 0x4f, 0x4e, 0x67, - 0xc4, 0x40, 0x7d, 0x7e, 0x7f, 0xaf, 0x84, 0xd6, 0x52, 0xd8, 0x83, 0xbd, 0x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d0, 0x17, 0x2d, 0x38, 0x9e, 0xcc, 0x9d, 0xce, 0x9e, 0x84, 0x09, - 0x37, 0xb5, 0x97, 0x7b, 0x49, 0x66, 0xcf, 0x0a, 0x18, 0x15, 0x32, 0xf3, 0x4b, 0x26, 0x19, 0xce, - 0xae, 0x8e, 0x76, 0x74, 0x70, 0xbb, 0xde, 0x29, 0x93, 0x4c, 0x22, 0x7c, 0x0e, 0xef, 0x68, 0xbc, - 0xb0, 0x84, 0x69, 0x41, 0xb4, 0x0e, 0xb0, 0xd1, 0x20, 0x22, 0x2e, 0xa1, 0x70, 0x8a, 0xca, 0x3c, - 0xfd, 0x57, 0x14, 0x95, 0xe0, 0xc3, 0x6e, 0xa2, 0x31, 0x14, 0x6b, 0x7c, 0xe8, 0x54, 0xaa, 0xb9, - 0x5e, 0x9d, 0x04, 0xcc, 0xb8, 0x95, 0x33, 0x95, 0x16, 0x19, 0x45, 0x7a, 0x2a, 0x71, 0x38, 0x16, - 0x1c, 0x18, 0x2f, 0xd2, 0xda, 0xda, 0x08, 0x3b, 0x25, 0x46, 0x58, 0x24, 0xad, 0xad, 0xc4, 0x84, - 0xe2, 0xbc, 0x18, 0x1c, 0x0b, 0x0e, 0x74, 0xc9, 0x6c, 0xd0, 0x05, 0x44, 0x82, 0x99, 0x89, 0xfc, - 0x25, 0xb3, 0xc2, 0x49, 0xd2, 0x4b, 0x46, 0x20, 0xb0, 0x64, 0x82, 0x3e, 0x63, 0x4a, 0x3b, 0x93, - 0x8c, 0xe7, 0xb3, 0x5d, 0xa4, 0x1d, 0x83, 0x6f, 0x67, 0x79, 0xe7, 0x55, 0x28, 0x6c, 0xd4, 0x98, - 0x51, 0x2c, 0xc7, 0x66, 0xb0, 0xb2, 0x68, 0x70, 0x63, 0x81, 0xc6, 0x57, 0x16, 0x71, 0x61, 0xa3, - 0x46, 0xa7, 0xbe, 0x73, 0xaf, 0x1d, 0x90, 0x15, 0xb7, 0x41, 0x44, 0x92, 0x84, 0xcc, 0xa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x05, 0xce, 0x29, 0x89, 0x56, 0x00, - 0xa5, 0x31, 0x62, 0x84, 0xd9, 0xd5, 0x34, 0xcd, 0x0f, 0x67, 0x94, 0x40, 0xaf, 0xc0, 0x98, 0xf2, - 0xb7, 0xd7, 0x46, 0x9c, 0x6d, 0xec, 0x58, 0x47, 0x60, 0x93, 0x0e, 0x5d, 0xe4, 0xd9, 0x73, 0x44, - 0x9e, 0x25, 0x61, 0xea, 0x9c, 0x90, 0xa9, 0x71, 0x04, 0x18, 0xeb, 0x34, 0x0b, 0x97, 0xfe, 0xf8, - 0x3b, 0x67, 0x3e, 0xf4, 0x67, 0xdf, 0x39, 0xf3, 0xa1, 0xbf, 0xf8, 0xce, 0x99, 0x0f, 0xfd, 0xc8, - 0xfe, 0x19, 0xeb, 0x8f, 0xf7, 0xcf, 0x58, 0x7f, 0xb6, 0x7f, 0xc6, 0xfa, 0x8b, 0xfd, 0x33, 0xd6, - 0xff, 0xbf, 0x7f, 0xc6, 0xfa, 0xca, 0x5f, 0x9f, 0xf9, 0xd0, 0xdb, 0x28, 0x8e, 0x7f, 0x7c, 0x81, - 0x8e, 0xce, 0x85, 0x9d, 0x8b, 0xff, 0x21, 0x00, 0x00, 0xff, 0xff, 0x67, 0x26, 0x7a, 0x2d, 0x22, - 0x20, 0x01, 0x00, + 0x87, 0x30, 0x9b, 0x5f, 0x0a, 0x5d, 0x87, 0xe3, 0x01, 0xa9, 0xb5, 0x83, 0x90, 0xce, 0x53, 0x71, + 0x2b, 0x11, 0x0f, 0x84, 0x2c, 0x76, 0x7b, 0x79, 0xe4, 0xde, 0x5e, 0xe9, 0x38, 0xce, 0x26, 0xc1, + 0x79, 0x65, 0xed, 0xef, 0xe3, 0x87, 0xad, 0x8a, 0x3c, 0xdc, 0x84, 0x29, 0x4f, 0xfb, 0x4f, 0x8f, + 0x16, 0x79, 0x87, 0x7e, 0xbc, 0xdb, 0x71, 0xca, 0xce, 0x21, 0xed, 0xed, 0x75, 0x82, 0x0d, 0x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1, 0x4d, 0x19, 0x8b, 0x20, 0x43, 0xe4, 0x8e, 0x3b, 0xb2, 0x73, 0x84, 0x06, 0xee, 0x0f, 0xa2, + 0x88, 0x70, 0xcc, 0x14, 0xbd, 0x0e, 0x45, 0x6f, 0x23, 0x14, 0x61, 0xd2, 0xb2, 0xdd, 0x52, 0x4d, + 0xc7, 0x5f, 0x1e, 0x06, 0x68, 0x6d, 0xa5, 0x8a, 0x69, 0x41, 0x74, 0x19, 0x8a, 0xc1, 0xad, 0xba, + 0xb0, 0x7e, 0x64, 0x2e, 0x52, 0xbc, 0xb0, 0x94, 0xd3, 0x2a, 0xc6, 0x09, 0x2f, 0x2c, 0x61, 0xca, + 0x02, 0x55, 0xa0, 0x9f, 0x3d, 0xa1, 0x15, 0xa2, 0x6d, 0xe6, 0x55, 0xbe, 0xc3, 0x53, 0x74, 0xfe, + 0x3c, 0x8f, 0x11, 0x60, 0xce, 0x08, 0xad, 0xc3, 0x40, 0x8d, 0x65, 0xcb, 0x17, 0xb2, 0xec, 0x07, + 0x33, 0xed, 0x1c, 0x8c, 0x22, 0x87, 0x27, 0x57, 0xfb, 0x33, 0x0a, 0x2c, 0x78, 0x31, 0xae, 0xa4, + 0xb5, 0xb5, 0x21, 0x4f, 0xac, 0x6c, 0xae, 0xa4, 0xb5, 0xb5, 0x52, 0xed, 0xc8, 0x95, 0x51, 0x60, + 0xc1, 0x0b, 0xbd, 0x02, 0x85, 0x8d, 0x9a, 0x78, 0x1e, 0x9b, 0x69, 0xf0, 0x30, 0x23, 0x39, 0x2d, + 0x0c, 0xdc, 0xdb, 0x2b, 0x15, 0x56, 0x16, 0x71, 0x61, 0xa3, 0x86, 0xd6, 0x60, 0x70, 0x83, 0xc7, + 0x7e, 0x11, 0x36, 0x8d, 0x27, 0xb3, 0xc3, 0xd2, 0xa4, 0xc2, 0xc3, 0xf0, 0xa7, 0x96, 0x02, 0x81, + 0x25, 0x13, 0x96, 0x81, 0x48, 0xc5, 0xb0, 0x11, 0x21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, 0x49, + 0xd2, 0xf9, 0x77, 0xe3, 0xfc, 0x63, 0x69, 0x5c, 0x88, 0xb3, 0xf8, 0xa3, 0xab, 0xc9, 0xd4, 0xaa, + 0x45, 0x43, 0x59, 0x9f, 0x4a, 0xaf, 0x3a, 0xd6, 0x31, 0xab, 0xea, 0x26, 0x9c, 0xd2, 0xb2, 0x53, + 0x5e, 0x0a, 0x1c, 0xe6, 0xce, 0xe3, 0xb2, 0x83, 0x42, 0x93, 0x25, 0x1f, 0xbd, 0xb7, 0x57, 0x3a, + 0xb5, 0xde, 0x89, 0x10, 0x77, 0xe6, 0x83, 0xae, 0xc1, 0x51, 0x1e, 0x45, 0x64, 0x89, 0x38, 0xf5, + 0x86, 0xeb, 0x29, 0x61, 0x95, 0x6f, 0x2b, 0x27, 0xee, 0xed, 0x95, 0x8e, 0xce, 0x67, 0x11, 0xe0, + 0xec, 0x72, 0xe8, 0x35, 0x18, 0xae, 0x7b, 0x72, 0x03, 0x1c, 0x30, 0x12, 0x80, 0x0e, 0x2f, 0xad, + 0x55, 0xd5, 0xf7, 0xc7, 0x7f, 0x70, 0x5c, 0x00, 0x6d, 0x72, 0x6b, 0x91, 0x52, 0xf1, 0x0d, 0xa6, + 0x82, 0x4b, 0x26, 0xb5, 0xe0, 0x46, 0xf4, 0x00, 0x6e, 0x26, 0x55, 0x2f, 0xdd, 0x8c, 0xc0, 0x02, + 0x06, 0x63, 0xf4, 0x06, 0x20, 0x91, 0x68, 0x66, 0xbe, 0xc6, 0xf2, 0xa2, 0x69, 0x2e, 0x9c, 0xea, + 0xe6, 0x5e, 0x4d, 0x51, 0xe0, 0x8c, 0x52, 0xe8, 0x32, 0xdd, 0xb9, 0x74, 0xa8, 0xd8, 0x19, 0x55, + 0x9a, 0xe9, 0x25, 0xd2, 0x0a, 0x08, 0xf3, 0x3a, 0x34, 0x39, 0xe2, 0x44, 0x39, 0x54, 0x87, 0x93, + 0x4e, 0x3b, 0xf2, 0x99, 0x21, 0xce, 0x24, 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, 0x0d, 0xba, 0x28, + 0x3f, 0xe0, 0x9b, 0x32, 0xe3, 0xf2, 0x18, 0x48, 0xd2, 0x84, 0xab, 0xca, 0xa2, 0x57, 0x61, 0x4c, + 0xc4, 0xbe, 0x10, 0x69, 0xd4, 0xa7, 0xcd, 0x57, 0xc3, 0x55, 0x1d, 0x89, 0x4d, 0x5a, 0x74, 0x1d, + 0x46, 0x22, 0xbf, 0xc1, 0x9e, 0xbe, 0x52, 0x01, 0xf6, 0x58, 0x7e, 0x5c, 0xd6, 0x75, 0x45, 0xa6, + 0x9b, 0x1a, 0x54, 0x51, 0xac, 0xf3, 0x41, 0xeb, 0x7c, 0xbe, 0xb3, 0x8c, 0x35, 0x24, 0x14, 0x79, + 0xb8, 0x4f, 0xe5, 0x79, 0x29, 0x32, 0x32, 0x73, 0x39, 0x88, 0x92, 0x58, 0x67, 0x83, 0x2e, 0xc1, + 0x54, 0x2b, 0x70, 0x7d, 0x36, 0x27, 0x94, 0x81, 0x7a, 0xc6, 0xcc, 0x4f, 0x59, 0x49, 0x12, 0xe0, + 0x74, 0x19, 0x16, 0xba, 0x44, 0x00, 0x67, 0x4e, 0xf0, 0x1c, 0x5b, 0x5c, 0xfd, 0xc0, 0x61, 0x58, + 0x61, 0xd1, 0x2a, 0xdb, 0x89, 0xb9, 0xe6, 0x6c, 0x66, 0x36, 0x3f, 0xc6, 0x9c, 0xae, 0x61, 0xe3, + 0x62, 0xb9, 0xfa, 0x8b, 0x63, 0x0e, 0xa8, 0xae, 0xa5, 0xb6, 0xa6, 0x97, 0x9b, 0x70, 0xe6, 0x64, + 0x07, 0x37, 0xd9, 0xc4, 0x4d, 0x36, 0x16, 0x08, 0x0c, 0x70, 0x88, 0x13, 0x3c, 0xd1, 0x47, 0x61, + 0x52, 0xbc, 0xeb, 0x8f, 0xbb, 0xe9, 0x54, 0xfc, 0x94, 0x08, 0x27, 0x70, 0x38, 0x45, 0xcd, 0x73, + 0x5c, 0x39, 0xb7, 0x1a, 0x44,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4, + 0xd9, 0xec, 0x45, 0x94, 0xd4, 0x39, 0x33, 0x95, 0x7d, 0xd7, 0x6e, 0x16, 0x75, 0xb2, 0xe8, 0x45, + 0xe2, 0xa0, 0x92, 0xdb, 0xc7, 0x87, 0x7a, 0x6e, 0x80, 0x38, 0xea, 0xc2, 0x84, 0xf7, 0x92, 0x04, + 0x77, 0xf7, 0x5e, 0x92, 0x35, 0xa3, 0x32, 0x0c, 0xd4, 0xb8, 0x5b, 0x4c, 0xb1, 0xfb, 0x16, 0xc6, + 0x7d, 0x62, 0xd4, 0x06, 0x2c, 0x7c, 0x61, 0x04, 0x83, 0x59, 0x17, 0x46, 0xb4, 0x8e, 0x79, 0xa8, + 0x93, 0x67, 0x9b, 0x1e, 0x7c, 0x5a, 0x17, 0x3c, 0xd4, 0x09, 0xf4, 0x93, 0x16, 0x24, 0x5e, 0xfd, + 0x28, 0xfd, 0x9d, 0x95, 0xab, 0xbf, 0x3b, 0x03, 0x7d, 0x81, 0xdf, 0x20, 0xc9, 0xc4, 0xe3, 0xd8, + 0x6f, 0x10, 0xcc, 0x30, 0x94, 0x22, 0x8a, 0xb5, 0x32, 0xa3, 0xfa, 0x8d, 0x53, 0xdc, 0x25, 0x1f, + 0x83, 0xfe, 0x06, 0xd9, 0x21, 0x8d, 0x64, 0x7e, 0xc8, 0xab, 0x14, 0x88, 0x39, 0xce, 0xfe, 0xd5, + 0x3e, 0x38, 0xd5, 0x31, 0x94, 0x18, 0x95, 0x98, 0x36, 0x9d, 0x88, 0xdc, 0x76, 0x76, 0x93, 0xe9, + 0xdb, 0x2e, 0x71, 0x30, 0x96, 0x78, 0xf6, 0xba, 0x96, 0xa7, 0x46, 0x49, 0x68, 0x3b, 0x45, 0x46, + 0x14, 0x81, 0x35, 0xb5, 0x67, 0xc5, 0x07, 0xa1, 0x3d, 0x7b, 0x1e, 0x20, 0x0c, 0x1b, 0xdc, 0x83, + 0xb0, 0x2e, 0x9e, 0xed, 0xc6, 0x29, 0x74, 0xa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47, 0x57, 0x09, 0x4d, 0x20, 0x01, 0x00, } func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) { @@ -17971,6 +17971,11 @@ func (m *ResourceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + i -= len(m.Request) + copy(dAtA[i:], m.Request) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request))) + i-- + dAtA[i] = 0x12 i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) @@ -25159,6 +25164,8 @@ func (m *ResourceClaim) Size() (n int) { _ = l l = len(m.Name) n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Request) + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -29258,6 +29265,7 @@ func (this *ResourceClaim) String() string { } s := strings.Join([]string{`&ResourceClaim{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Request:` + fmt.Sprintf("%v", this.Request) + `,`, `}`, }, "") return s @@ -63015,6 +63023,38 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Request = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index fa70d7981b558..13407ca271458 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -4958,6 +4958,13 @@ message ResourceClaim { // the Pod where this field is used. It makes that resource available // inside a container. optional string name = 1; + + // Request is the name chosen for a request in the referenced claim. + // If empty, everything from the claim is made available, otherwise + // only the result of this request. + // + // +optional + optional string request = 2; } // ResourceFieldSelector represents container resources (cpu, memory) and their output format diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index ba69881b36d36..7042f63eca07a 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -2649,6 +2649,13 @@ type ResourceClaim struct { // the Pod where this field is used. It makes that resource available // inside a container. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` + + // Request is the name chosen for a request in the referenced claim. + // If empty, everything from the claim is made available, otherwise + // only the result of this request. + // + // +optional + Request string `json:"request,omitempty" protobuf:"bytes,2,opt,name=request"` } const ( diff --git a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index 0e30088853c5a..8f9b038d8baf3 100644 --- a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -2082,8 +2082,9 @@ func (ReplicationControllerStatus) SwaggerDoc() map[string]string { } var map_ResourceClaim = map[string]string{ - "": "ResourceClaim references one entry in PodSpec.ResourceClaims.", - "name": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", + "": "ResourceClaim references one entry in PodSpec.ResourceClaims.", + "name": "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", + "request": "Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.", } func (ResourceClaim) SwaggerDoc() map[string]string { diff --git a/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go b/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go index 0589b6acdaf83..c7a525c0963e1 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/generated.pb.go @@ -25,6 +25,7 @@ import ( io "io" proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/api/core/v1" resource "k8s.io/apimachinery/pkg/api/resource" @@ -75,15 +76,15 @@ func (m *AllocationResult) XXX_DiscardUnknown() { var xxx_messageInfo_AllocationResult proto.InternalMessageInfo -func (m *AllocationResultModel) Reset() { *m = AllocationResultModel{} } -func (*AllocationResultModel) ProtoMessage() {} -func (*AllocationResultModel) Descriptor() ([]byte, []int) { +func (m *BasicDevice) Reset() { *m = BasicDevice{} } +func (*BasicDevice) ProtoMessage() {} +func (*BasicDevice) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{1} } -func (m *AllocationResultModel) XXX_Unmarshal(b []byte) error { +func (m *BasicDevice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AllocationResultModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BasicDevice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -91,27 +92,27 @@ func (m *AllocationResultModel) XXX_Marshal(b []byte, deterministic bool) ([]byt } return b[:n], nil } -func (m *AllocationResultModel) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllocationResultModel.Merge(m, src) +func (m *BasicDevice) XXX_Merge(src proto.Message) { + xxx_messageInfo_BasicDevice.Merge(m, src) } -func (m *AllocationResultModel) XXX_Size() int { +func (m *BasicDevice) XXX_Size() int { return m.Size() } -func (m *AllocationResultModel) XXX_DiscardUnknown() { - xxx_messageInfo_AllocationResultModel.DiscardUnknown(m) +func (m *BasicDevice) XXX_DiscardUnknown() { + xxx_messageInfo_BasicDevice.DiscardUnknown(m) } -var xxx_messageInfo_AllocationResultModel proto.InternalMessageInfo +var xxx_messageInfo_BasicDevice proto.InternalMessageInfo -func (m *DriverAllocationResult) Reset() { *m = DriverAllocationResult{} } -func (*DriverAllocationResult) ProtoMessage() {} -func (*DriverAllocationResult) Descriptor() ([]byte, []int) { +func (m *CELDeviceSelector) Reset() { *m = CELDeviceSelector{} } +func (*CELDeviceSelector) ProtoMessage() {} +func (*CELDeviceSelector) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{2} } -func (m *DriverAllocationResult) XXX_Unmarshal(b []byte) error { +func (m *CELDeviceSelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DriverAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *CELDeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -119,27 +120,27 @@ func (m *DriverAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]by } return b[:n], nil } -func (m *DriverAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_DriverAllocationResult.Merge(m, src) +func (m *CELDeviceSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_CELDeviceSelector.Merge(m, src) } -func (m *DriverAllocationResult) XXX_Size() int { +func (m *CELDeviceSelector) XXX_Size() int { return m.Size() } -func (m *DriverAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_DriverAllocationResult.DiscardUnknown(m) +func (m *CELDeviceSelector) XXX_DiscardUnknown() { + xxx_messageInfo_CELDeviceSelector.DiscardUnknown(m) } -var xxx_messageInfo_DriverAllocationResult proto.InternalMessageInfo +var xxx_messageInfo_CELDeviceSelector proto.InternalMessageInfo -func (m *DriverRequests) Reset() { *m = DriverRequests{} } -func (*DriverRequests) ProtoMessage() {} -func (*DriverRequests) Descriptor() ([]byte, []int) { +func (m *Device) Reset() { *m = Device{} } +func (*Device) ProtoMessage() {} +func (*Device) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{3} } -func (m *DriverRequests) XXX_Unmarshal(b []byte) error { +func (m *Device) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DriverRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -147,27 +148,27 @@ func (m *DriverRequests) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro } return b[:n], nil } -func (m *DriverRequests) XXX_Merge(src proto.Message) { - xxx_messageInfo_DriverRequests.Merge(m, src) +func (m *Device) XXX_Merge(src proto.Message) { + xxx_messageInfo_Device.Merge(m, src) } -func (m *DriverRequests) XXX_Size() int { +func (m *Device) XXX_Size() int { return m.Size() } -func (m *DriverRequests) XXX_DiscardUnknown() { - xxx_messageInfo_DriverRequests.DiscardUnknown(m) +func (m *Device) XXX_DiscardUnknown() { + xxx_messageInfo_Device.DiscardUnknown(m) } -var xxx_messageInfo_DriverRequests proto.InternalMessageInfo +var xxx_messageInfo_Device proto.InternalMessageInfo -func (m *NamedResourcesAllocationResult) Reset() { *m = NamedResourcesAllocationResult{} } -func (*NamedResourcesAllocationResult) ProtoMessage() {} -func (*NamedResourcesAllocationResult) Descriptor() ([]byte, []int) { +func (m *DeviceAllocationConfiguration) Reset() { *m = DeviceAllocationConfiguration{} } +func (*DeviceAllocationConfiguration) ProtoMessage() {} +func (*DeviceAllocationConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{4} } -func (m *NamedResourcesAllocationResult) XXX_Unmarshal(b []byte) error { +func (m *DeviceAllocationConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceAllocationConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -175,27 +176,27 @@ func (m *NamedResourcesAllocationResult) XXX_Marshal(b []byte, deterministic boo } return b[:n], nil } -func (m *NamedResourcesAllocationResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesAllocationResult.Merge(m, src) +func (m *DeviceAllocationConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceAllocationConfiguration.Merge(m, src) } -func (m *NamedResourcesAllocationResult) XXX_Size() int { +func (m *DeviceAllocationConfiguration) XXX_Size() int { return m.Size() } -func (m *NamedResourcesAllocationResult) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesAllocationResult.DiscardUnknown(m) +func (m *DeviceAllocationConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceAllocationConfiguration.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesAllocationResult proto.InternalMessageInfo +var xxx_messageInfo_DeviceAllocationConfiguration proto.InternalMessageInfo -func (m *NamedResourcesAttribute) Reset() { *m = NamedResourcesAttribute{} } -func (*NamedResourcesAttribute) ProtoMessage() {} -func (*NamedResourcesAttribute) Descriptor() ([]byte, []int) { +func (m *DeviceAllocationResult) Reset() { *m = DeviceAllocationResult{} } +func (*DeviceAllocationResult) ProtoMessage() {} +func (*DeviceAllocationResult) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{5} } -func (m *NamedResourcesAttribute) XXX_Unmarshal(b []byte) error { +func (m *DeviceAllocationResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -203,27 +204,27 @@ func (m *NamedResourcesAttribute) XXX_Marshal(b []byte, deterministic bool) ([]b } return b[:n], nil } -func (m *NamedResourcesAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesAttribute.Merge(m, src) +func (m *DeviceAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceAllocationResult.Merge(m, src) } -func (m *NamedResourcesAttribute) XXX_Size() int { +func (m *DeviceAllocationResult) XXX_Size() int { return m.Size() } -func (m *NamedResourcesAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesAttribute.DiscardUnknown(m) +func (m *DeviceAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceAllocationResult.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesAttribute proto.InternalMessageInfo +var xxx_messageInfo_DeviceAllocationResult proto.InternalMessageInfo -func (m *NamedResourcesAttributeValue) Reset() { *m = NamedResourcesAttributeValue{} } -func (*NamedResourcesAttributeValue) ProtoMessage() {} -func (*NamedResourcesAttributeValue) Descriptor() ([]byte, []int) { +func (m *DeviceAttribute) Reset() { *m = DeviceAttribute{} } +func (*DeviceAttribute) ProtoMessage() {} +func (*DeviceAttribute) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{6} } -func (m *NamedResourcesAttributeValue) XXX_Unmarshal(b []byte) error { +func (m *DeviceAttribute) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesAttributeValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -231,27 +232,27 @@ func (m *NamedResourcesAttributeValue) XXX_Marshal(b []byte, deterministic bool) } return b[:n], nil } -func (m *NamedResourcesAttributeValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesAttributeValue.Merge(m, src) +func (m *DeviceAttribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceAttribute.Merge(m, src) } -func (m *NamedResourcesAttributeValue) XXX_Size() int { +func (m *DeviceAttribute) XXX_Size() int { return m.Size() } -func (m *NamedResourcesAttributeValue) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesAttributeValue.DiscardUnknown(m) +func (m *DeviceAttribute) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceAttribute.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesAttributeValue proto.InternalMessageInfo +var xxx_messageInfo_DeviceAttribute proto.InternalMessageInfo -func (m *NamedResourcesFilter) Reset() { *m = NamedResourcesFilter{} } -func (*NamedResourcesFilter) ProtoMessage() {} -func (*NamedResourcesFilter) Descriptor() ([]byte, []int) { +func (m *DeviceClaim) Reset() { *m = DeviceClaim{} } +func (*DeviceClaim) ProtoMessage() {} +func (*DeviceClaim) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{7} } -func (m *NamedResourcesFilter) XXX_Unmarshal(b []byte) error { +func (m *DeviceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceClaim) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -259,27 +260,27 @@ func (m *NamedResourcesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte } return b[:n], nil } -func (m *NamedResourcesFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesFilter.Merge(m, src) +func (m *DeviceClaim) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClaim.Merge(m, src) } -func (m *NamedResourcesFilter) XXX_Size() int { +func (m *DeviceClaim) XXX_Size() int { return m.Size() } -func (m *NamedResourcesFilter) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesFilter.DiscardUnknown(m) +func (m *DeviceClaim) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClaim.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesFilter proto.InternalMessageInfo +var xxx_messageInfo_DeviceClaim proto.InternalMessageInfo -func (m *NamedResourcesInstance) Reset() { *m = NamedResourcesInstance{} } -func (*NamedResourcesInstance) ProtoMessage() {} -func (*NamedResourcesInstance) Descriptor() ([]byte, []int) { +func (m *DeviceClaimConfiguration) Reset() { *m = DeviceClaimConfiguration{} } +func (*DeviceClaimConfiguration) ProtoMessage() {} +func (*DeviceClaimConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{8} } -func (m *NamedResourcesInstance) XXX_Unmarshal(b []byte) error { +func (m *DeviceClaimConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceClaimConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -287,27 +288,27 @@ func (m *NamedResourcesInstance) XXX_Marshal(b []byte, deterministic bool) ([]by } return b[:n], nil } -func (m *NamedResourcesInstance) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesInstance.Merge(m, src) +func (m *DeviceClaimConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClaimConfiguration.Merge(m, src) } -func (m *NamedResourcesInstance) XXX_Size() int { +func (m *DeviceClaimConfiguration) XXX_Size() int { return m.Size() } -func (m *NamedResourcesInstance) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesInstance.DiscardUnknown(m) +func (m *DeviceClaimConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClaimConfiguration.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesInstance proto.InternalMessageInfo +var xxx_messageInfo_DeviceClaimConfiguration proto.InternalMessageInfo -func (m *NamedResourcesIntSlice) Reset() { *m = NamedResourcesIntSlice{} } -func (*NamedResourcesIntSlice) ProtoMessage() {} -func (*NamedResourcesIntSlice) Descriptor() ([]byte, []int) { +func (m *DeviceClass) Reset() { *m = DeviceClass{} } +func (*DeviceClass) ProtoMessage() {} +func (*DeviceClass) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{9} } -func (m *NamedResourcesIntSlice) XXX_Unmarshal(b []byte) error { +func (m *DeviceClass) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesIntSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -315,27 +316,27 @@ func (m *NamedResourcesIntSlice) XXX_Marshal(b []byte, deterministic bool) ([]by } return b[:n], nil } -func (m *NamedResourcesIntSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesIntSlice.Merge(m, src) +func (m *DeviceClass) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClass.Merge(m, src) } -func (m *NamedResourcesIntSlice) XXX_Size() int { +func (m *DeviceClass) XXX_Size() int { return m.Size() } -func (m *NamedResourcesIntSlice) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesIntSlice.DiscardUnknown(m) +func (m *DeviceClass) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClass.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesIntSlice proto.InternalMessageInfo +var xxx_messageInfo_DeviceClass proto.InternalMessageInfo -func (m *NamedResourcesRequest) Reset() { *m = NamedResourcesRequest{} } -func (*NamedResourcesRequest) ProtoMessage() {} -func (*NamedResourcesRequest) Descriptor() ([]byte, []int) { +func (m *DeviceClassConfiguration) Reset() { *m = DeviceClassConfiguration{} } +func (*DeviceClassConfiguration) ProtoMessage() {} +func (*DeviceClassConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{10} } -func (m *NamedResourcesRequest) XXX_Unmarshal(b []byte) error { +func (m *DeviceClassConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceClassConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -343,27 +344,27 @@ func (m *NamedResourcesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt } return b[:n], nil } -func (m *NamedResourcesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesRequest.Merge(m, src) +func (m *DeviceClassConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClassConfiguration.Merge(m, src) } -func (m *NamedResourcesRequest) XXX_Size() int { +func (m *DeviceClassConfiguration) XXX_Size() int { return m.Size() } -func (m *NamedResourcesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesRequest.DiscardUnknown(m) +func (m *DeviceClassConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClassConfiguration.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesRequest proto.InternalMessageInfo +var xxx_messageInfo_DeviceClassConfiguration proto.InternalMessageInfo -func (m *NamedResourcesResources) Reset() { *m = NamedResourcesResources{} } -func (*NamedResourcesResources) ProtoMessage() {} -func (*NamedResourcesResources) Descriptor() ([]byte, []int) { +func (m *DeviceClassList) Reset() { *m = DeviceClassList{} } +func (*DeviceClassList) ProtoMessage() {} +func (*DeviceClassList) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{11} } -func (m *NamedResourcesResources) XXX_Unmarshal(b []byte) error { +func (m *DeviceClassList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -371,27 +372,27 @@ func (m *NamedResourcesResources) XXX_Marshal(b []byte, deterministic bool) ([]b } return b[:n], nil } -func (m *NamedResourcesResources) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesResources.Merge(m, src) +func (m *DeviceClassList) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClassList.Merge(m, src) } -func (m *NamedResourcesResources) XXX_Size() int { +func (m *DeviceClassList) XXX_Size() int { return m.Size() } -func (m *NamedResourcesResources) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesResources.DiscardUnknown(m) +func (m *DeviceClassList) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClassList.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesResources proto.InternalMessageInfo +var xxx_messageInfo_DeviceClassList proto.InternalMessageInfo -func (m *NamedResourcesStringSlice) Reset() { *m = NamedResourcesStringSlice{} } -func (*NamedResourcesStringSlice) ProtoMessage() {} -func (*NamedResourcesStringSlice) Descriptor() ([]byte, []int) { +func (m *DeviceClassSpec) Reset() { *m = DeviceClassSpec{} } +func (*DeviceClassSpec) ProtoMessage() {} +func (*DeviceClassSpec) Descriptor() ([]byte, []int) { return fileDescriptor_66649ee9bbcd89d2, []int{12} } -func (m *NamedResourcesStringSlice) XXX_Unmarshal(b []byte) error { +func (m *DeviceClassSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *NamedResourcesStringSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *DeviceClassSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -399,22 +400,190 @@ func (m *NamedResourcesStringSlice) XXX_Marshal(b []byte, deterministic bool) ([ } return b[:n], nil } -func (m *NamedResourcesStringSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_NamedResourcesStringSlice.Merge(m, src) +func (m *DeviceClassSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceClassSpec.Merge(m, src) } -func (m *NamedResourcesStringSlice) XXX_Size() int { +func (m *DeviceClassSpec) XXX_Size() int { return m.Size() } -func (m *NamedResourcesStringSlice) XXX_DiscardUnknown() { - xxx_messageInfo_NamedResourcesStringSlice.DiscardUnknown(m) +func (m *DeviceClassSpec) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceClassSpec.DiscardUnknown(m) } -var xxx_messageInfo_NamedResourcesStringSlice proto.InternalMessageInfo +var xxx_messageInfo_DeviceClassSpec proto.InternalMessageInfo + +func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} } +func (*DeviceConfiguration) ProtoMessage() {} +func (*DeviceConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{13} +} +func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceConfiguration.Merge(m, src) +} +func (m *DeviceConfiguration) XXX_Size() int { + return m.Size() +} +func (m *DeviceConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo + +func (m *DeviceConstraint) Reset() { *m = DeviceConstraint{} } +func (*DeviceConstraint) ProtoMessage() {} +func (*DeviceConstraint) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{14} +} +func (m *DeviceConstraint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceConstraint) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceConstraint.Merge(m, src) +} +func (m *DeviceConstraint) XXX_Size() int { + return m.Size() +} +func (m *DeviceConstraint) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceConstraint.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceConstraint proto.InternalMessageInfo + +func (m *DeviceRequest) Reset() { *m = DeviceRequest{} } +func (*DeviceRequest) ProtoMessage() {} +func (*DeviceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{15} +} +func (m *DeviceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceRequest.Merge(m, src) +} +func (m *DeviceRequest) XXX_Size() int { + return m.Size() +} +func (m *DeviceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceRequest proto.InternalMessageInfo + +func (m *DeviceRequestAllocationResult) Reset() { *m = DeviceRequestAllocationResult{} } +func (*DeviceRequestAllocationResult) ProtoMessage() {} +func (*DeviceRequestAllocationResult) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{16} +} +func (m *DeviceRequestAllocationResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceRequestAllocationResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceRequestAllocationResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceRequestAllocationResult.Merge(m, src) +} +func (m *DeviceRequestAllocationResult) XXX_Size() int { + return m.Size() +} +func (m *DeviceRequestAllocationResult) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceRequestAllocationResult.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceRequestAllocationResult proto.InternalMessageInfo + +func (m *DeviceSelector) Reset() { *m = DeviceSelector{} } +func (*DeviceSelector) ProtoMessage() {} +func (*DeviceSelector) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{17} +} +func (m *DeviceSelector) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeviceSelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *DeviceSelector) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeviceSelector.Merge(m, src) +} +func (m *DeviceSelector) XXX_Size() int { + return m.Size() +} +func (m *DeviceSelector) XXX_DiscardUnknown() { + xxx_messageInfo_DeviceSelector.DiscardUnknown(m) +} + +var xxx_messageInfo_DeviceSelector proto.InternalMessageInfo + +func (m *OpaqueDeviceConfiguration) Reset() { *m = OpaqueDeviceConfiguration{} } +func (*OpaqueDeviceConfiguration) ProtoMessage() {} +func (*OpaqueDeviceConfiguration) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{18} +} +func (m *OpaqueDeviceConfiguration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OpaqueDeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *OpaqueDeviceConfiguration) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpaqueDeviceConfiguration.Merge(m, src) +} +func (m *OpaqueDeviceConfiguration) XXX_Size() int { + return m.Size() +} +func (m *OpaqueDeviceConfiguration) XXX_DiscardUnknown() { + xxx_messageInfo_OpaqueDeviceConfiguration.DiscardUnknown(m) +} + +var xxx_messageInfo_OpaqueDeviceConfiguration proto.InternalMessageInfo func (m *PodSchedulingContext) Reset() { *m = PodSchedulingContext{} } func (*PodSchedulingContext) ProtoMessage() {} func (*PodSchedulingContext) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{13} + return fileDescriptor_66649ee9bbcd89d2, []int{19} } func (m *PodSchedulingContext) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -442,7 +611,7 @@ var xxx_messageInfo_PodSchedulingContext proto.InternalMessageInfo func (m *PodSchedulingContextList) Reset() { *m = PodSchedulingContextList{} } func (*PodSchedulingContextList) ProtoMessage() {} func (*PodSchedulingContextList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{14} + return fileDescriptor_66649ee9bbcd89d2, []int{20} } func (m *PodSchedulingContextList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +639,7 @@ var xxx_messageInfo_PodSchedulingContextList proto.InternalMessageInfo func (m *PodSchedulingContextSpec) Reset() { *m = PodSchedulingContextSpec{} } func (*PodSchedulingContextSpec) ProtoMessage() {} func (*PodSchedulingContextSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{15} + return fileDescriptor_66649ee9bbcd89d2, []int{21} } func (m *PodSchedulingContextSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -498,7 +667,7 @@ var xxx_messageInfo_PodSchedulingContextSpec proto.InternalMessageInfo func (m *PodSchedulingContextStatus) Reset() { *m = PodSchedulingContextStatus{} } func (*PodSchedulingContextStatus) ProtoMessage() {} func (*PodSchedulingContextStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{16} + return fileDescriptor_66649ee9bbcd89d2, []int{22} } func (m *PodSchedulingContextStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -526,7 +695,7 @@ var xxx_messageInfo_PodSchedulingContextStatus proto.InternalMessageInfo func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{17} + return fileDescriptor_66649ee9bbcd89d2, []int{23} } func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -554,7 +723,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{18} + return fileDescriptor_66649ee9bbcd89d2, []int{24} } func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -582,7 +751,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{19} + return fileDescriptor_66649ee9bbcd89d2, []int{25} } func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -607,94 +776,10 @@ func (m *ResourceClaimList) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo -func (m *ResourceClaimParameters) Reset() { *m = ResourceClaimParameters{} } -func (*ResourceClaimParameters) ProtoMessage() {} -func (*ResourceClaimParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{20} -} -func (m *ResourceClaimParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimParameters.Merge(m, src) -} -func (m *ResourceClaimParameters) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimParameters) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceClaimParameters proto.InternalMessageInfo - -func (m *ResourceClaimParametersList) Reset() { *m = ResourceClaimParametersList{} } -func (*ResourceClaimParametersList) ProtoMessage() {} -func (*ResourceClaimParametersList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{21} -} -func (m *ResourceClaimParametersList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimParametersList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimParametersList.Merge(m, src) -} -func (m *ResourceClaimParametersList) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimParametersList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimParametersList.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceClaimParametersList proto.InternalMessageInfo - -func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} } -func (*ResourceClaimParametersReference) ProtoMessage() {} -func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{22} -} -func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClaimParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClaimParametersReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClaimParametersReference.Merge(m, src) -} -func (m *ResourceClaimParametersReference) XXX_Size() int { - return m.Size() -} -func (m *ResourceClaimParametersReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClaimParametersReference.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceClaimParametersReference proto.InternalMessageInfo - func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } func (*ResourceClaimSchedulingStatus) ProtoMessage() {} func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{23} + return fileDescriptor_66649ee9bbcd89d2, []int{26} } func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -722,7 +807,7 @@ var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{24} + return fileDescriptor_66649ee9bbcd89d2, []int{27} } func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -750,7 +835,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{25} + return fileDescriptor_66649ee9bbcd89d2, []int{28} } func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -778,7 +863,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{26} + return fileDescriptor_66649ee9bbcd89d2, []int{29} } func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -806,7 +891,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{27} + return fileDescriptor_66649ee9bbcd89d2, []int{30} } func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -834,7 +919,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{28} + return fileDescriptor_66649ee9bbcd89d2, []int{31} } func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -859,15 +944,15 @@ func (m *ResourceClaimTemplateSpec) XXX_DiscardUnknown() { var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo -func (m *ResourceClass) Reset() { *m = ResourceClass{} } -func (*ResourceClass) ProtoMessage() {} -func (*ResourceClass) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{29} +func (m *ResourcePool) Reset() { *m = ResourcePool{} } +func (*ResourcePool) ProtoMessage() {} +func (*ResourcePool) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{32} } -func (m *ResourceClass) XXX_Unmarshal(b []byte) error { +func (m *ResourcePool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourcePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -875,27 +960,27 @@ func (m *ResourceClass) XXX_Marshal(b []byte, deterministic bool) ([]byte, error } return b[:n], nil } -func (m *ResourceClass) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClass.Merge(m, src) +func (m *ResourcePool) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourcePool.Merge(m, src) } -func (m *ResourceClass) XXX_Size() int { +func (m *ResourcePool) XXX_Size() int { return m.Size() } -func (m *ResourceClass) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClass.DiscardUnknown(m) +func (m *ResourcePool) XXX_DiscardUnknown() { + xxx_messageInfo_ResourcePool.DiscardUnknown(m) } -var xxx_messageInfo_ResourceClass proto.InternalMessageInfo +var xxx_messageInfo_ResourcePool proto.InternalMessageInfo -func (m *ResourceClassList) Reset() { *m = ResourceClassList{} } -func (*ResourceClassList) ProtoMessage() {} -func (*ResourceClassList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{30} +func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } +func (*ResourceSlice) ProtoMessage() {} +func (*ResourceSlice) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{33} } -func (m *ResourceClassList) XXX_Unmarshal(b []byte) error { +func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -903,27 +988,27 @@ func (m *ResourceClassList) XXX_Marshal(b []byte, deterministic bool) ([]byte, e } return b[:n], nil } -func (m *ResourceClassList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClassList.Merge(m, src) +func (m *ResourceSlice) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSlice.Merge(m, src) } -func (m *ResourceClassList) XXX_Size() int { +func (m *ResourceSlice) XXX_Size() int { return m.Size() } -func (m *ResourceClassList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClassList.DiscardUnknown(m) +func (m *ResourceSlice) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSlice.DiscardUnknown(m) } -var xxx_messageInfo_ResourceClassList proto.InternalMessageInfo +var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo -func (m *ResourceClassParameters) Reset() { *m = ResourceClassParameters{} } -func (*ResourceClassParameters) ProtoMessage() {} -func (*ResourceClassParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{31} +func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } +func (*ResourceSliceList) ProtoMessage() {} +func (*ResourceSliceList) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{34} } -func (m *ResourceClassParameters) XXX_Unmarshal(b []byte) error { +func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceClassParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -931,27 +1016,27 @@ func (m *ResourceClassParameters) XXX_Marshal(b []byte, deterministic bool) ([]b } return b[:n], nil } -func (m *ResourceClassParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClassParameters.Merge(m, src) +func (m *ResourceSliceList) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSliceList.Merge(m, src) } -func (m *ResourceClassParameters) XXX_Size() int { +func (m *ResourceSliceList) XXX_Size() int { return m.Size() } -func (m *ResourceClassParameters) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClassParameters.DiscardUnknown(m) +func (m *ResourceSliceList) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) } -var xxx_messageInfo_ResourceClassParameters proto.InternalMessageInfo +var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo -func (m *ResourceClassParametersList) Reset() { *m = ResourceClassParametersList{} } -func (*ResourceClassParametersList) ProtoMessage() {} -func (*ResourceClassParametersList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{32} +func (m *ResourceSliceSpec) Reset() { *m = ResourceSliceSpec{} } +func (*ResourceSliceSpec) ProtoMessage() {} +func (*ResourceSliceSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_66649ee9bbcd89d2, []int{35} } -func (m *ResourceClassParametersList) XXX_Unmarshal(b []byte) error { +func (m *ResourceSliceSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ResourceClassParametersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ResourceSliceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { @@ -959,520 +1044,249 @@ func (m *ResourceClassParametersList) XXX_Marshal(b []byte, deterministic bool) } return b[:n], nil } -func (m *ResourceClassParametersList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClassParametersList.Merge(m, src) +func (m *ResourceSliceSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceSliceSpec.Merge(m, src) } -func (m *ResourceClassParametersList) XXX_Size() int { +func (m *ResourceSliceSpec) XXX_Size() int { return m.Size() } -func (m *ResourceClassParametersList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClassParametersList.DiscardUnknown(m) +func (m *ResourceSliceSpec) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceSliceSpec.DiscardUnknown(m) } -var xxx_messageInfo_ResourceClassParametersList proto.InternalMessageInfo +var xxx_messageInfo_ResourceSliceSpec proto.InternalMessageInfo -func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } -func (*ResourceClassParametersReference) ProtoMessage() {} -func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{33} -} -func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceClassParametersReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceClassParametersReference) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceClassParametersReference.Merge(m, src) -} -func (m *ResourceClassParametersReference) XXX_Size() int { - return m.Size() -} -func (m *ResourceClassParametersReference) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceClassParametersReference.DiscardUnknown(m) +func init() { + proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha3.AllocationResult") + proto.RegisterType((*BasicDevice)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice") + proto.RegisterMapType((map[QualifiedName]DeviceAttribute)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice.AttributesEntry") + proto.RegisterMapType((map[QualifiedName]resource.Quantity)(nil), "k8s.io.api.resource.v1alpha3.BasicDevice.CapacityEntry") + proto.RegisterType((*CELDeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.CELDeviceSelector") + proto.RegisterType((*Device)(nil), "k8s.io.api.resource.v1alpha3.Device") + proto.RegisterType((*DeviceAllocationConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceAllocationConfiguration") + proto.RegisterType((*DeviceAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DeviceAllocationResult") + proto.RegisterType((*DeviceAttribute)(nil), "k8s.io.api.resource.v1alpha3.DeviceAttribute") + proto.RegisterType((*DeviceClaim)(nil), "k8s.io.api.resource.v1alpha3.DeviceClaim") + proto.RegisterType((*DeviceClaimConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceClaimConfiguration") + proto.RegisterType((*DeviceClass)(nil), "k8s.io.api.resource.v1alpha3.DeviceClass") + proto.RegisterType((*DeviceClassConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceClassConfiguration") + proto.RegisterType((*DeviceClassList)(nil), "k8s.io.api.resource.v1alpha3.DeviceClassList") + proto.RegisterType((*DeviceClassSpec)(nil), "k8s.io.api.resource.v1alpha3.DeviceClassSpec") + proto.RegisterType((*DeviceConfiguration)(nil), "k8s.io.api.resource.v1alpha3.DeviceConfiguration") + proto.RegisterType((*DeviceConstraint)(nil), "k8s.io.api.resource.v1alpha3.DeviceConstraint") + proto.RegisterType((*DeviceRequest)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequest") + proto.RegisterType((*DeviceRequestAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DeviceRequestAllocationResult") + proto.RegisterType((*DeviceSelector)(nil), "k8s.io.api.resource.v1alpha3.DeviceSelector") + proto.RegisterType((*OpaqueDeviceConfiguration)(nil), "k8s.io.api.resource.v1alpha3.OpaqueDeviceConfiguration") + proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContext") + proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextList") + proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextSpec") + proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextStatus") + proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaim") + proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimConsumerReference") + proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimList") + proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSchedulingStatus") + proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSpec") + proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimStatus") + proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplate") + proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateList") + proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateSpec") + proto.RegisterType((*ResourcePool)(nil), "k8s.io.api.resource.v1alpha3.ResourcePool") + proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha3.ResourceSlice") + proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha3.ResourceSliceList") + proto.RegisterType((*ResourceSliceSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceSliceSpec") } -var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo - -func (m *ResourceFilter) Reset() { *m = ResourceFilter{} } -func (*ResourceFilter) ProtoMessage() {} -func (*ResourceFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{34} +func init() { + proto.RegisterFile("k8s.io/api/resource/v1alpha3/generated.proto", fileDescriptor_66649ee9bbcd89d2) } -func (m *ResourceFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + +var fileDescriptor_66649ee9bbcd89d2 = []byte{ + // 2091 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x1a, 0xcd, 0x6f, 0x1c, 0x57, + 0x3d, 0xb3, 0x6b, 0xaf, 0xbd, 0xbf, 0xf5, 0xe7, 0x73, 0x13, 0x5c, 0xd3, 0xec, 0x26, 0xd3, 0x0a, + 0x9c, 0x36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 0x1c, 0x34, 0xaa, 0x8a, 0x69, 0xea, 0x3e, + 0x05, 0x47, 0xa1, 0xaf, 0x43, 0xc5, 0x61, 0xb6, 0x66, 0x74, 0x45, 0x8f, 0x5c, 0x1c, 0x0e, 0x1a, + 0xb5, 0x36, 0x87, 0xf8, 0x64, 0x02, 0x8d, 0x5e, 0x85, 0x99, 0x3e, 0xb5, 0x79, 0x85, 0x4c, 0x73, + 0x4a, 0xde, 0x81, 0xef, 0xf8, 0x20, 0x9f, 0x34, 0x20, 0x90, 0x7f, 0x5b, 0x82, 0x9a, 0x08, 0xa0, + 0x4e, 0xb4, 0x1e, 0xba, 0x1b, 0x4b, 0x28, 0x3f, 0x12, 0xaf, 0x4d, 0x10, 0x09, 0x65, 0x29, 0x68, + 0x5e, 0x19, 0x19, 0x48, 0xa1, 0xa6, 0x9a, 0x86, 0xc3, 0x6c, 0xa2, 0x19, 0x22, 0x5d, 0x93, 0x0d, + 0x62, 0x5c, 0xe2, 0x09, 0x36, 0x65, 0x45, 0x28, 0xa8, 0x45, 0x30, 0x07, 0xc7, 0xe5, 0xa2, 0x8f, + 0xc3, 0x10, 0x97, 0xb9, 0x86, 0xb7, 0x0b, 0x69, 0xf0, 0x9c, 0x2f, 0x16, 0xdd, 0xbf, 0x48, 0xb0, + 0x9a, 0xc7, 0x94, 0xa8, 0x47, 0xe9, 0x99, 0xea, 0xb1, 0x74, 0x72, 0xf5, 0xf8, 0x47, 0x29, 0x16, + 0x7b, 0xc7, 0x41, 0x9f, 0xc0, 0xac, 0xb7, 0xda, 0x74, 0x08, 0x23, 0x62, 0x85, 0x78, 0x63, 0x5c, + 0xfb, 0x76, 0x9a, 0x1e, 0xb5, 0x37, 0xee, 0x6f, 0xee, 0xff, 0x88, 0xaa, 0xec, 0x3a, 0x65, 0x24, + 0x6a, 0xc6, 0x11, 0x0c, 0x87, 0x52, 0xd1, 0x4d, 0x98, 0x72, 0x2c, 0xaa, 0x4e, 0x32, 0x88, 0xb8, + 0x69, 0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0x5c, 0x3f, 0xf5, 0xc5, 0xe3, 0xfa, 0xa9, + 0xfb, 0xc3, 0xba, 0xf4, 0x70, 0x58, 0x97, 0x1e, 0x0d, 0xeb, 0xd2, 0x17, 0xc3, 0xba, 0xf4, 0xe5, + 0xb0, 0x2e, 0x7d, 0xf6, 0xcf, 0xfa, 0xa9, 0xef, 0xbd, 0x34, 0xee, 0x3f, 0x06, 0xfe, 0x1b, 0x00, + 0x00, 0xff, 0xff, 0x74, 0xeb, 0x00, 0x3b, 0x50, 0x20, 0x00, 0x00, } -func (m *ResourceFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) + +func (m *AllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } - return b[:n], nil + return dAtA[:n], nil } -func (m *ResourceFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceFilter.Merge(m, src) -} -func (m *ResourceFilter) XXX_Size() int { - return m.Size() -} -func (m *ResourceFilter) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceFilter proto.InternalMessageInfo - -func (m *ResourceFilterModel) Reset() { *m = ResourceFilterModel{} } -func (*ResourceFilterModel) ProtoMessage() {} -func (*ResourceFilterModel) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{35} -} -func (m *ResourceFilterModel) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceFilterModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceFilterModel) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceFilterModel.Merge(m, src) -} -func (m *ResourceFilterModel) XXX_Size() int { - return m.Size() -} -func (m *ResourceFilterModel) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceFilterModel.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceFilterModel proto.InternalMessageInfo - -func (m *ResourceHandle) Reset() { *m = ResourceHandle{} } -func (*ResourceHandle) ProtoMessage() {} -func (*ResourceHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{36} -} -func (m *ResourceHandle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceHandle) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceHandle.Merge(m, src) -} -func (m *ResourceHandle) XXX_Size() int { - return m.Size() -} -func (m *ResourceHandle) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceHandle.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceHandle proto.InternalMessageInfo - -func (m *ResourceModel) Reset() { *m = ResourceModel{} } -func (*ResourceModel) ProtoMessage() {} -func (*ResourceModel) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{37} -} -func (m *ResourceModel) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceModel) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceModel.Merge(m, src) -} -func (m *ResourceModel) XXX_Size() int { - return m.Size() -} -func (m *ResourceModel) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceModel.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceModel proto.InternalMessageInfo - -func (m *ResourceRequest) Reset() { *m = ResourceRequest{} } -func (*ResourceRequest) ProtoMessage() {} -func (*ResourceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{38} -} -func (m *ResourceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceRequest.Merge(m, src) -} -func (m *ResourceRequest) XXX_Size() int { - return m.Size() -} -func (m *ResourceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceRequest proto.InternalMessageInfo - -func (m *ResourceRequestModel) Reset() { *m = ResourceRequestModel{} } -func (*ResourceRequestModel) ProtoMessage() {} -func (*ResourceRequestModel) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{39} -} -func (m *ResourceRequestModel) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceRequestModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceRequestModel) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceRequestModel.Merge(m, src) -} -func (m *ResourceRequestModel) XXX_Size() int { - return m.Size() -} -func (m *ResourceRequestModel) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceRequestModel.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceRequestModel proto.InternalMessageInfo - -func (m *ResourceSlice) Reset() { *m = ResourceSlice{} } -func (*ResourceSlice) ProtoMessage() {} -func (*ResourceSlice) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{40} -} -func (m *ResourceSlice) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSlice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSlice) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSlice.Merge(m, src) -} -func (m *ResourceSlice) XXX_Size() int { - return m.Size() -} -func (m *ResourceSlice) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSlice.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceSlice proto.InternalMessageInfo -func (m *ResourceSliceList) Reset() { *m = ResourceSliceList{} } -func (*ResourceSliceList) ProtoMessage() {} -func (*ResourceSliceList) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{41} -} -func (m *ResourceSliceList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSliceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil -} -func (m *ResourceSliceList) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSliceList.Merge(m, src) -} -func (m *ResourceSliceList) XXX_Size() int { - return m.Size() -} -func (m *ResourceSliceList) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSliceList.DiscardUnknown(m) +func (m *AllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -var xxx_messageInfo_ResourceSliceList proto.InternalMessageInfo - -func (m *StructuredResourceHandle) Reset() { *m = StructuredResourceHandle{} } -func (*StructuredResourceHandle) ProtoMessage() {} -func (*StructuredResourceHandle) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{42} -} -func (m *StructuredResourceHandle) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StructuredResourceHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x22 + if m.NodeSelector != nil { + { + size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - return b[:n], nil -} -func (m *StructuredResourceHandle) XXX_Merge(src proto.Message) { - xxx_messageInfo_StructuredResourceHandle.Merge(m, src) -} -func (m *StructuredResourceHandle) XXX_Size() int { - return m.Size() -} -func (m *StructuredResourceHandle) XXX_DiscardUnknown() { - xxx_messageInfo_StructuredResourceHandle.DiscardUnknown(m) -} - -var xxx_messageInfo_StructuredResourceHandle proto.InternalMessageInfo - -func (m *VendorParameters) Reset() { *m = VendorParameters{} } -func (*VendorParameters) ProtoMessage() {} -func (*VendorParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_66649ee9bbcd89d2, []int{43} -} -func (m *VendorParameters) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VendorParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + { + size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - return b[:n], nil -} -func (m *VendorParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_VendorParameters.Merge(m, src) -} -func (m *VendorParameters) XXX_Size() int { - return m.Size() -} -func (m *VendorParameters) XXX_DiscardUnknown() { - xxx_messageInfo_VendorParameters.DiscardUnknown(m) -} - -var xxx_messageInfo_VendorParameters proto.InternalMessageInfo - -func init() { - proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha3.AllocationResult") - proto.RegisterType((*AllocationResultModel)(nil), "k8s.io.api.resource.v1alpha3.AllocationResultModel") - proto.RegisterType((*DriverAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.DriverAllocationResult") - proto.RegisterType((*DriverRequests)(nil), "k8s.io.api.resource.v1alpha3.DriverRequests") - proto.RegisterType((*NamedResourcesAllocationResult)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAllocationResult") - proto.RegisterType((*NamedResourcesAttribute)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAttribute") - proto.RegisterType((*NamedResourcesAttributeValue)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesAttributeValue") - proto.RegisterType((*NamedResourcesFilter)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesFilter") - proto.RegisterType((*NamedResourcesInstance)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesInstance") - proto.RegisterType((*NamedResourcesIntSlice)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesIntSlice") - proto.RegisterType((*NamedResourcesRequest)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesRequest") - proto.RegisterType((*NamedResourcesResources)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesResources") - proto.RegisterType((*NamedResourcesStringSlice)(nil), "k8s.io.api.resource.v1alpha3.NamedResourcesStringSlice") - proto.RegisterType((*PodSchedulingContext)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContext") - proto.RegisterType((*PodSchedulingContextList)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextList") - proto.RegisterType((*PodSchedulingContextSpec)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextSpec") - proto.RegisterType((*PodSchedulingContextStatus)(nil), "k8s.io.api.resource.v1alpha3.PodSchedulingContextStatus") - proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaim") - proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimConsumerReference") - proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimList") - proto.RegisterType((*ResourceClaimParameters)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParameters") - proto.RegisterType((*ResourceClaimParametersList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParametersList") - proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimParametersReference") - proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSchedulingStatus") - proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimSpec") - proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimStatus") - proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplate") - proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateList") - proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha3.ResourceClaimTemplateSpec") - proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha3.ResourceClass") - proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassList") - proto.RegisterType((*ResourceClassParameters)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParameters") - proto.RegisterType((*ResourceClassParametersList)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParametersList") - proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha3.ResourceClassParametersReference") - proto.RegisterType((*ResourceFilter)(nil), "k8s.io.api.resource.v1alpha3.ResourceFilter") - proto.RegisterType((*ResourceFilterModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceFilterModel") - proto.RegisterType((*ResourceHandle)(nil), "k8s.io.api.resource.v1alpha3.ResourceHandle") - proto.RegisterType((*ResourceModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceModel") - proto.RegisterType((*ResourceRequest)(nil), "k8s.io.api.resource.v1alpha3.ResourceRequest") - proto.RegisterType((*ResourceRequestModel)(nil), "k8s.io.api.resource.v1alpha3.ResourceRequestModel") - proto.RegisterType((*ResourceSlice)(nil), "k8s.io.api.resource.v1alpha3.ResourceSlice") - proto.RegisterType((*ResourceSliceList)(nil), "k8s.io.api.resource.v1alpha3.ResourceSliceList") - proto.RegisterType((*StructuredResourceHandle)(nil), "k8s.io.api.resource.v1alpha3.StructuredResourceHandle") - proto.RegisterType((*VendorParameters)(nil), "k8s.io.api.resource.v1alpha3.VendorParameters") -} - -func init() { - proto.RegisterFile("k8s.io/api/resource/v1alpha3/generated.proto", fileDescriptor_66649ee9bbcd89d2) -} - -var fileDescriptor_66649ee9bbcd89d2 = []byte{ - // 2197 bytes of a gzipped FileDescriptorProto - 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, 0xba, 0x23, - 0x10, 0x11, 0x38, 0xbb, 0x8d, 0xd3, 0xa6, 0x51, 0x29, 0x48, 0x99, 0xb8, 0x09, 0x16, 0x6d, 0xea, - 0xbe, 0x25, 0x6e, 0x53, 0xfe, 0x3a, 0xde, 0x79, 0xb1, 0x87, 0xcc, 0xce, 0x6c, 0xe6, 0xbd, 0x75, - 0x13, 0x71, 0x89, 0x2a, 0x10, 0x5c, 0x90, 0x8a, 0x84, 0x90, 0x38, 0x71, 0xe2, 0xc0, 0x85, 0x0b, - 0x5c, 0x39, 0x55, 0xd0, 0x1c, 0x83, 0x00, 0x51, 0x71, 0x58, 0x91, 0xe5, 0xc0, 0x81, 0x23, 0x37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, - 0xfd, 0x2e, 0x4c, 0x7b, 0x6c, 0x20, 0xe2, 0xdf, 0x0b, 0xc6, 0x78, 0x77, 0x4c, 0xff, 0x9f, 0x9b, - 0xa8, 0x57, 0xe3, 0xdf, 0x04, 0x05, 0x54, 0xb5, 0x5f, 0x2b, 0x30, 0x94, 0xf3, 0x26, 0xaa, 0x5c, - 0x06, 0x40, 0xf7, 0xff, 0x54, 0x68, 0xc8, 0x22, 0xa6, 0xc5, 0x18, 0x51, 0x5d, 0x7f, 0xf8, 0xb8, - 0x36, 0xf5, 0xe8, 0x71, 0x6d, 0xea, 0xd3, 0xc7, 0xb5, 0xa9, 0x07, 0x83, 0x9a, 0xf2, 0x70, 0x50, - 0x53, 0x1e, 0x0d, 0x6a, 0xca, 0xa7, 0x83, 0x9a, 0xf2, 0x8f, 0x41, 0x4d, 0xf9, 0xe8, 0x9f, 0xb5, - 0xa9, 0xf7, 0xd6, 0x46, 0xfd, 0xb3, 0xdd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xfc, 0x4e, - 0xd3, 0x8b, 0x27, 0x00, 0x00, + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } -func (m *AllocationResult) Marshal() (dAtA []byte, err error) { +func (m *BasicDevice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1482,32 +1296,56 @@ func (m *AllocationResult) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AllocationResult) MarshalTo(dAtA []byte) (int, error) { +func (m *BasicDevice) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BasicDevice) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.AvailableOnNodes != nil { - { - size, err := m.AvailableOnNodes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Capacity) > 0 { + keysForCapacity := make([]string, 0, len(m.Capacity)) + for k := range m.Capacity { + keysForCapacity = append(keysForCapacity, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + for iNdEx := len(keysForCapacity) - 1; iNdEx >= 0; iNdEx-- { + v := m.Capacity[QualifiedName(keysForCapacity[iNdEx])] + baseI := i + { + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + i -= len(keysForCapacity[iNdEx]) + copy(dAtA[i:], keysForCapacity[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForCapacity[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x12 } - if len(m.ResourceHandles) > 0 { - for iNdEx := len(m.ResourceHandles) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Attributes) > 0 { + keysForAttributes := make([]string, 0, len(m.Attributes)) + for k := range m.Attributes { + keysForAttributes = append(keysForAttributes, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + for iNdEx := len(keysForAttributes) - 1; iNdEx >= 0; iNdEx-- { + v := m.Attributes[QualifiedName(keysForAttributes[iNdEx])] + baseI := i { - size, err := m.ResourceHandles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1515,13 +1353,21 @@ func (m *AllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + i -= len(keysForAttributes[iNdEx]) + copy(dAtA[i:], keysForAttributes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAttributes[iNdEx]))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) + i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } -func (m *AllocationResultModel) Marshal() (dAtA []byte, err error) { +func (m *CELDeviceSelector) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1531,32 +1377,25 @@ func (m *AllocationResultModel) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AllocationResultModel) MarshalTo(dAtA []byte) (int, error) { +func (m *CELDeviceSelector) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AllocationResultModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *CELDeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.NamedResources != nil { - { - size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } + i -= len(m.Expression) + copy(dAtA[i:], m.Expression) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Expression))) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DriverAllocationResult) Marshal() (dAtA []byte, err error) { +func (m *Device) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1566,40 +1405,37 @@ func (m *DriverAllocationResult) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DriverAllocationResult) MarshalTo(dAtA []byte) (int, error) { +func (m *Device) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DriverAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.AllocationResultModel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.VendorRequestParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.Basic != nil { + { + size, err := m.Basic.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 } + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *DriverRequests) Marshal() (dAtA []byte, err error) { +func (m *DeviceAllocationConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1609,32 +1445,18 @@ func (m *DriverRequests) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DriverRequests) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceAllocationConfiguration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DriverRequests) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceAllocationConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Requests) > 0 { - for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } { - size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1642,44 +1464,25 @@ func (m *DriverRequests) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NamedResourcesAllocationResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x1a + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requests[iNdEx]) + copy(dAtA[i:], m.Requests[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } - return dAtA[:n], nil -} - -func (m *NamedResourcesAllocationResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NamedResourcesAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Source))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *NamedResourcesAttribute) Marshal() (dAtA []byte, err error) { +func (m *DeviceAllocationResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1689,35 +1492,48 @@ func (m *NamedResourcesAttribute) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesAttribute) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceAllocationResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.NamedResourcesAttributeValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *NamedResourcesAttributeValue) Marshal() (dAtA []byte, err error) { +func (m *DeviceAttribute) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1727,12 +1543,12 @@ func (m *NamedResourcesAttributeValue) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesAttributeValue) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceAttribute) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesAttributeValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1742,55 +1558,14 @@ func (m *NamedResourcesAttributeValue) MarshalToSizedBuffer(dAtA []byte) (int, e copy(dAtA[i:], *m.VersionValue) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.VersionValue))) i-- - dAtA[i] = 0x52 - } - if m.StringSliceValue != nil { - { - size, err := m.StringSliceValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.IntSliceValue != nil { - { - size, err := m.IntSliceValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.IntValue != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.IntValue)) - i-- - dAtA[i] = 0x38 - } - if m.QuantityValue != nil { - { - size, err := m.QuantityValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if m.StringValue != nil { i -= len(*m.StringValue) copy(dAtA[i:], *m.StringValue) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.StringValue))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x22 } if m.BoolValue != nil { i-- @@ -1800,12 +1575,17 @@ func (m *NamedResourcesAttributeValue) MarshalToSizedBuffer(dAtA []byte) (int, e dAtA[i] = 0 } i-- + dAtA[i] = 0x18 + } + if m.IntValue != nil { + i = encodeVarintGenerated(dAtA, i, uint64(*m.IntValue)) + i-- dAtA[i] = 0x10 } return len(dAtA) - i, nil } -func (m *NamedResourcesFilter) Marshal() (dAtA []byte, err error) { +func (m *DeviceClaim) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1815,25 +1595,62 @@ func (m *NamedResourcesFilter) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesFilter) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceClaim) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceClaim) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Selector) - copy(dAtA[i:], m.Selector) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector))) - i-- - dAtA[i] = 0xa + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Constraints) > 0 { + for iNdEx := len(m.Constraints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Constraints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Requests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } return len(dAtA) - i, nil } -func (m *NamedResourcesInstance) Marshal() (dAtA []byte, err error) { +func (m *DeviceClaimConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1843,39 +1660,39 @@ func (m *NamedResourcesInstance) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesInstance) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceClaimConfiguration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesInstance) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceClaimConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + { + size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requests[iNdEx]) + copy(dAtA[i:], m.Requests[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } return len(dAtA) - i, nil } -func (m *NamedResourcesIntSlice) Marshal() (dAtA []byte, err error) { +func (m *DeviceClass) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1885,27 +1702,40 @@ func (m *NamedResourcesIntSlice) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesIntSlice) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceClass) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesIntSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Ints) > 0 { - for iNdEx := len(m.Ints) - 1; iNdEx >= 0; iNdEx-- { - i = encodeVarintGenerated(dAtA, i, uint64(m.Ints[iNdEx])) - i-- - dAtA[i] = 0x8 + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *NamedResourcesRequest) Marshal() (dAtA []byte, err error) { +func (m *DeviceClassConfiguration) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1915,25 +1745,30 @@ func (m *NamedResourcesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceClassConfiguration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceClassConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - i -= len(m.Selector) - copy(dAtA[i:], m.Selector) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Selector))) + { + size, err := m.DeviceConfiguration.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *NamedResourcesResources) Marshal() (dAtA []byte, err error) { +func (m *DeviceClassList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1943,20 +1778,20 @@ func (m *NamedResourcesResources) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesResources) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceClassList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesResources) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Instances) > 0 { - for iNdEx := len(m.Instances) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Items) > 0 { + for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Instances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1964,13 +1799,23 @@ func (m *NamedResourcesResources) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + } + { + size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *NamedResourcesStringSlice) Marshal() (dAtA []byte, err error) { +func (m *DeviceClassSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1980,26 +1825,310 @@ func (m *NamedResourcesStringSlice) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *NamedResourcesStringSlice) MarshalTo(dAtA []byte) (int, error) { +func (m *DeviceClassSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *NamedResourcesStringSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *DeviceClassSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Strings) > 0 { - for iNdEx := len(m.Strings) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Strings[iNdEx]) - copy(dAtA[i:], m.Strings[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strings[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil + if m.SuitableNodes != nil { + { + size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Config) > 0 { + for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Config[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Selectors) > 0 { + for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Opaque != nil { + { + size, err := m.Opaque.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DeviceConstraint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceConstraint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceConstraint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MatchAttribute != nil { + i -= len(*m.MatchAttribute) + copy(dAtA[i:], *m.MatchAttribute) + i = encodeVarintGenerated(dAtA, i, uint64(len(*m.MatchAttribute))) + i-- + dAtA[i] = 0x12 + } + if len(m.Requests) > 0 { + for iNdEx := len(m.Requests) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Requests[iNdEx]) + copy(dAtA[i:], m.Requests[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Requests[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *DeviceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i-- + if m.AdminAccess { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + i = encodeVarintGenerated(dAtA, i, uint64(m.Count)) + i-- + dAtA[i] = 0x28 + i -= len(m.CountMode) + copy(dAtA[i:], m.CountMode) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.CountMode))) + i-- + dAtA[i] = 0x22 + if len(m.Selectors) > 0 { + for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + i -= len(m.DeviceClassName) + copy(dAtA[i:], m.DeviceClassName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.DeviceClassName))) + i-- + dAtA[i] = 0x12 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceRequestAllocationResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceRequestAllocationResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceRequestAllocationResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + i -= len(m.Device) + copy(dAtA[i:], m.Device) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Device))) + i-- + dAtA[i] = 0x22 + i -= len(m.Pool) + copy(dAtA[i:], m.Pool) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pool))) + i-- + dAtA[i] = 0x1a + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- + dAtA[i] = 0x12 + i -= len(m.Request) + copy(dAtA[i:], m.Request) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Request))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *DeviceSelector) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceSelector) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DeviceSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CEL != nil { + { + size, err := m.CEL.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OpaqueDeviceConfiguration) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OpaqueDeviceConfiguration) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OpaqueDeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil } func (m *PodSchedulingContext) Marshal() (dAtA []byte, err error) { @@ -2319,7 +2448,7 @@ func (m *ResourceClaimList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClaimParameters) Marshal() (dAtA []byte, err error) { +func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2329,167 +2458,23 @@ func (m *ResourceClaimParameters) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClaimParameters) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceClaimSchedulingStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClaimParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceClaimSchedulingStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.DriverRequests) > 0 { - for iNdEx := len(m.DriverRequests) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DriverRequests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } + if len(m.UnsuitableNodes) > 0 { + for iNdEx := len(m.UnsuitableNodes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.UnsuitableNodes[iNdEx]) + copy(dAtA[i:], m.UnsuitableNodes[iNdEx]) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.UnsuitableNodes[iNdEx]))) i-- - dAtA[i] = 0x22 - } - } - if m.GeneratedFrom != nil { - { - size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ResourceClaimParametersList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceClaimParametersList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceClaimParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ResourceClaimParametersReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceClaimParametersReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceClaimParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x12 - i -= len(m.APIGroup) - copy(dAtA[i:], m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ResourceClaimSchedulingStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceClaimSchedulingStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceClaimSchedulingStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UnsuitableNodes) > 0 { - for iNdEx := len(m.UnsuitableNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UnsuitableNodes[iNdEx]) - copy(dAtA[i:], m.UnsuitableNodes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UnsuitableNodes[iNdEx]))) - i-- - dAtA[i] = 0x12 + dAtA[i] = 0x12 } } i -= len(m.Name) @@ -2520,21 +2505,19 @@ func (m *ResourceClaimSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.ParametersRef != nil { - { - size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 + { + size, err := m.Devices.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.ResourceClassName) - copy(dAtA[i:], m.ResourceClassName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceClassName))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -2567,7 +2550,7 @@ func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x20 + dAtA[i] = 0x18 if len(m.ReservedFor) > 0 { for iNdEx := len(m.ReservedFor) - 1; iNdEx >= 0; iNdEx-- { { @@ -2579,7 +2562,7 @@ func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } if m.Allocation != nil { @@ -2592,13 +2575,8 @@ func (m *ResourceClaimStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -2735,7 +2713,7 @@ func (m *ResourceClaimTemplateSpec) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *ResourceClass) Marshal() (dAtA []byte, err error) { +func (m *ResourcePool) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2745,53 +2723,58 @@ func (m *ResourceClass) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClass) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourcePool) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourcePool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.StructuredParameters != nil { - i-- - if *m.StructuredParameters { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.SuitableNodes != nil { - { - size, err := m.SuitableNodes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 + i = encodeVarintGenerated(dAtA, i, uint64(m.ResourceSliceCount)) + i-- + dAtA[i] = 0x18 + i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) + i-- + dAtA[i] = 0x10 + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ResourceSlice) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if m.ParametersRef != nil { - { - size, err := m.ParametersRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + return dAtA[:n], nil +} + +func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) i-- dAtA[i] = 0x12 { @@ -2807,7 +2790,7 @@ func (m *ResourceClass) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { +func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2817,12 +2800,12 @@ func (m *ResourceClassList) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClassList) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2854,7 +2837,7 @@ func (m *ResourceClassList) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ResourceClassParameters) Marshal() (dAtA []byte, err error) { +func (m *ResourceSliceSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2864,20 +2847,20 @@ func (m *ResourceClassParameters) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ResourceClassParameters) MarshalTo(dAtA []byte) (int, error) { +func (m *ResourceSliceSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ResourceClassParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResourceSliceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Filters) > 0 { - for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Devices) > 0 { + for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Filters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2885,26 +2868,20 @@ func (m *ResourceClassParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } } - if len(m.VendorParameters) > 0 { - for iNdEx := len(m.VendorParameters) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VendorParameters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } + i-- + if m.AllNodes { + dAtA[i] = 1 + } else { + dAtA[i] = 0 } - if m.GeneratedFrom != nil { + i-- + dAtA[i] = 0x28 + if m.NodeSelector != nil { { - size, err := m.GeneratedFrom.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2912,10 +2889,15 @@ func (m *ResourceClassParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x22 } + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) + i-- + dAtA[i] = 0x1a { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2923,686 +2905,473 @@ func (m *ResourceClassParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + i -= len(m.Driver) + copy(dAtA[i:], m.Driver) + i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) + i-- dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *ResourceClassParametersList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { + offset -= sovGenerated(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *ResourceClassParametersList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *ResourceClassParametersList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *AllocationResult) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + l = m.Devices.Size() + n += 1 + l + sovGenerated(uint64(l)) + if m.NodeSelector != nil { + l = m.NodeSelector.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + l = len(m.Controller) + n += 1 + l + sovGenerated(uint64(l)) + return n +} + +func (m *BasicDevice) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Attributes) > 0 { + for k, v := range m.Attributes { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Capacity) > 0 { + for k, v := range m.Capacity { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) + n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *ResourceClassParametersReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *CELDeviceSelector) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *ResourceClassParametersReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceClassParametersReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x22 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x12 - i -= len(m.APIGroup) - copy(dAtA[i:], m.APIGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroup))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = len(m.Expression) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Device) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *ResourceFilter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if m.Basic != nil { + l = m.Basic.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ResourceFilter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceAllocationConfiguration) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.ResourceFilterModel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + l = len(m.Source) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceFilterModel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DeviceAllocationResult) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *ResourceFilterModel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceFilterModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if m.NamedResources != nil { - { - size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *ResourceHandle) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DeviceAttribute) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + if m.IntValue != nil { + n += 1 + sovGenerated(uint64(*m.IntValue)) + } + if m.BoolValue != nil { + n += 2 + } + if m.StringValue != nil { + l = len(*m.StringValue) + n += 1 + l + sovGenerated(uint64(l)) + } + if m.VersionValue != nil { + l = len(*m.VersionValue) + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ResourceHandle) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DeviceClaim) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Requests) > 0 { + for _, e := range m.Requests { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Constraints) > 0 { + for _, e := range m.Constraints { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *ResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceClaimConfiguration) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.StructuredData != nil { - { - size, err := m.StructuredData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0x2a } - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceModel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DeviceClass) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceModel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DeviceClassConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.DeviceConfiguration.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceClassList) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.NamedResources != nil { - { - size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Items) > 0 { + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + return n } -func (m *ResourceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DeviceClassSpec) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *ResourceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - { - size, err := m.ResourceRequestModel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Selectors) > 0 { + for _, e := range m.Selectors { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 - { - size, err := m.VendorParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Config) > 0 { + for _, e := range m.Config { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ResourceRequestModel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.SuitableNodes != nil { + l = m.SuitableNodes.Size() + n += 1 + l + sovGenerated(uint64(l)) } - return dAtA[:n], nil + return n } -func (m *ResourceRequestModel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DeviceConfiguration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Opaque != nil { + l = m.Opaque.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ResourceRequestModel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceConstraint) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.NamedResources != nil { - { - size, err := m.NamedResources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if len(m.Requests) > 0 { + for _, s := range m.Requests { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0xa } - return len(dAtA) - i, nil + if m.MatchAttribute != nil { + l = len(*m.MatchAttribute) + n += 1 + l + sovGenerated(uint64(l)) + } + return n } -func (m *ResourceSlice) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *DeviceRequest) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.DeviceClassName) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.Selectors) > 0 { + for _, e := range m.Selectors { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } + l = len(m.CountMode) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Count)) + n += 2 + return n } -func (m *ResourceSlice) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *DeviceRequestAllocationResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Request) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Pool) + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Device) + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceSlice) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *DeviceSelector) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.ResourceModel.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0x1a - i -= len(m.NodeName) - copy(dAtA[i:], m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) + if m.CEL != nil { + l = m.CEL.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *ResourceSliceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *OpaqueDeviceConfiguration) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Parameters.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceSliceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *PodSchedulingContext) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n } -func (m *ResourceSliceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *PodSchedulingContextList) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l + l = m.ListMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + for _, e := range m.Items { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *StructuredResourceHandle) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *PodSchedulingContextSpec) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *StructuredResourceHandle) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + l = len(m.SelectedNode) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.PotentialNodes) > 0 { + for _, s := range m.PotentialNodes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) + } + } + return n } -func (m *StructuredResourceHandle) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *PodSchedulingContextStatus) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a + if len(m.ResourceClaims) > 0 { + for _, e := range m.ResourceClaims { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) } } - i -= len(m.NodeName) - copy(dAtA[i:], m.NodeName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.NodeName))) - i-- - dAtA[i] = 0x22 - { - size, err := m.VendorClaimParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.VendorClassParameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *VendorParameters) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VendorParameters) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VendorParameters) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Parameters.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.DriverName) - copy(dAtA[i:], m.DriverName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DriverName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AllocationResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceHandles) > 0 { - for _, e := range m.ResourceHandles { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.AvailableOnNodes != nil { - l = m.AvailableOnNodes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *AllocationResultModel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NamedResources != nil { - l = m.NamedResources.Size() - n += 1 + l + sovGenerated(uint64(l)) - } return n } -func (m *DriverAllocationResult) Size() (n int) { +func (m *ResourceClaim) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.VendorRequestParameters.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.AllocationResultModel.Size() + l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DriverRequests) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DriverName) + l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = m.VendorParameters.Size() + l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.Requests) > 0 { - for _, e := range m.Requests { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } return n } -func (m *NamedResourcesAllocationResult) Size() (n int) { +func (m *ResourceClaimConsumerReference) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) + l = len(m.APIGroup) n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NamedResourcesAttribute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) + l = len(m.Resource) n += 1 + l + sovGenerated(uint64(l)) - l = m.NamedResourcesAttributeValue.Size() + l = len(m.Name) n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NamedResourcesAttributeValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BoolValue != nil { - n += 2 - } - if m.StringValue != nil { - l = len(*m.StringValue) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.QuantityValue != nil { - l = m.QuantityValue.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.IntValue != nil { - n += 1 + sovGenerated(uint64(*m.IntValue)) - } - if m.IntSliceValue != nil { - l = m.IntSliceValue.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.StringSliceValue != nil { - l = m.StringSliceValue.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.VersionValue != nil { - l = len(*m.VersionValue) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *NamedResourcesFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Selector) + l = len(m.UID) n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *NamedResourcesInstance) Size() (n int) { +func (m *ResourceClaimList) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) + l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { + if len(m.Items) > 0 { + for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } @@ -3610,62 +3379,57 @@ func (m *NamedResourcesInstance) Size() (n int) { return n } -func (m *NamedResourcesIntSlice) Size() (n int) { +func (m *ResourceClaimSchedulingStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Ints) > 0 { - for _, e := range m.Ints { - n += 1 + sovGenerated(uint64(e)) + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + if len(m.UnsuitableNodes) > 0 { + for _, s := range m.UnsuitableNodes { + l = len(s) + n += 1 + l + sovGenerated(uint64(l)) } } return n } -func (m *NamedResourcesRequest) Size() (n int) { +func (m *ResourceClaimSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Selector) + l = m.Devices.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = len(m.Controller) n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *NamedResourcesResources) Size() (n int) { +func (m *ResourceClaimStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Instances) > 0 { - for _, e := range m.Instances { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *NamedResourcesStringSlice) Size() (n int) { - if m == nil { - return 0 + if m.Allocation != nil { + l = m.Allocation.Size() + n += 1 + l + sovGenerated(uint64(l)) } - var l int - _ = l - if len(m.Strings) > 0 { - for _, s := range m.Strings { - l = len(s) + if len(m.ReservedFor) > 0 { + for _, e := range m.ReservedFor { + l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } + n += 2 return n } -func (m *PodSchedulingContext) Size() (n int) { +func (m *ResourceClaimTemplate) Size() (n int) { if m == nil { return 0 } @@ -3675,12 +3439,10 @@ func (m *PodSchedulingContext) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *PodSchedulingContextList) Size() (n int) { +func (m *ResourceClaimTemplateList) Size() (n int) { if m == nil { return 0 } @@ -3697,39 +3459,33 @@ func (m *PodSchedulingContextList) Size() (n int) { return n } -func (m *PodSchedulingContextSpec) Size() (n int) { +func (m *ResourceClaimTemplateSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.SelectedNode) + l = m.ObjectMeta.Size() + n += 1 + l + sovGenerated(uint64(l)) + l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - if len(m.PotentialNodes) > 0 { - for _, s := range m.PotentialNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } return n } -func (m *PodSchedulingContextStatus) Size() (n int) { +func (m *ResourcePool) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.ResourceClaims) > 0 { - for _, e := range m.ResourceClaims { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } + l = len(m.Name) + n += 1 + l + sovGenerated(uint64(l)) + n += 1 + sovGenerated(uint64(m.Generation)) + n += 1 + sovGenerated(uint64(m.ResourceSliceCount)) return n } -func (m *ResourceClaim) Size() (n int) { +func (m *ResourceSlice) Size() (n int) { if m == nil { return 0 } @@ -3739,29 +3495,10 @@ func (m *ResourceClaim) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceClaimConsumerReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.APIGroup) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) return n } -func (m *ResourceClaimList) Size() (n int) { +func (m *ResourceSliceList) Size() (n int) { if m == nil { return 0 } @@ -3778,20 +3515,25 @@ func (m *ResourceClaimList) Size() (n int) { return n } -func (m *ResourceClaimParameters) Size() (n int) { +func (m *ResourceSliceSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.ObjectMeta.Size() + l = len(m.Driver) + n += 1 + l + sovGenerated(uint64(l)) + l = m.Pool.Size() n += 1 + l + sovGenerated(uint64(l)) - if m.GeneratedFrom != nil { - l = m.GeneratedFrom.Size() + l = len(m.NodeName) + n += 1 + l + sovGenerated(uint64(l)) + if m.NodeSelector != nil { + l = m.NodeSelector.Size() n += 1 + l + sovGenerated(uint64(l)) } - if len(m.DriverRequests) > 0 { - for _, e := range m.DriverRequests { + n += 2 + if len(m.Devices) > 0 { + for _, e := range m.Devices { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } @@ -3799,551 +3541,290 @@ func (m *ResourceClaimParameters) Size() (n int) { return n } -func (m *ResourceClaimParametersList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n +func sovGenerated(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 } - -func (m *ResourceClaimParametersReference) Size() (n int) { - if m == nil { - return 0 +func sozGenerated(x uint64) (n int) { + return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *AllocationResult) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.APIGroup) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&AllocationResult{`, + `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceAllocationResult", "DeviceAllocationResult", 1), `&`, ``, 1) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `Controller:` + fmt.Sprintf("%v", this.Controller) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimSchedulingStatus) Size() (n int) { - if m == nil { - return 0 +func (this *BasicDevice) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.UnsuitableNodes) > 0 { - for _, s := range m.UnsuitableNodes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } + keysForAttributes := make([]string, 0, len(this.Attributes)) + for k := range this.Attributes { + keysForAttributes = append(keysForAttributes, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForAttributes) + mapStringForAttributes := "map[QualifiedName]DeviceAttribute{" + for _, k := range keysForAttributes { + mapStringForAttributes += fmt.Sprintf("%v: %v,", k, this.Attributes[QualifiedName(k)]) + } + mapStringForAttributes += "}" + keysForCapacity := make([]string, 0, len(this.Capacity)) + for k := range this.Capacity { + keysForCapacity = append(keysForCapacity, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForCapacity) + mapStringForCapacity := "map[QualifiedName]resource.Quantity{" + for _, k := range keysForCapacity { + mapStringForCapacity += fmt.Sprintf("%v: %v,", k, this.Capacity[QualifiedName(k)]) + } + mapStringForCapacity += "}" + s := strings.Join([]string{`&BasicDevice{`, + `Attributes:` + mapStringForAttributes + `,`, + `Capacity:` + mapStringForCapacity + `,`, + `}`, + }, "") + return s +} +func (this *CELDeviceSelector) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&CELDeviceSelector{`, + `Expression:` + fmt.Sprintf("%v", this.Expression) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimSpec) Size() (n int) { - if m == nil { - return 0 +func (this *Device) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.ResourceClassName) - n += 1 + l + sovGenerated(uint64(l)) - if m.ParametersRef != nil { - l = m.ParametersRef.Size() - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&Device{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Basic:` + strings.Replace(this.Basic.String(), "BasicDevice", "BasicDevice", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAllocationConfiguration) String() string { + if this == nil { + return "nil" } - return n + s := strings.Join([]string{`&DeviceAllocationConfiguration{`, + `Source:` + fmt.Sprintf("%v", this.Source) + `,`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimStatus) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceAllocationResult) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - if m.Allocation != nil { - l = m.Allocation.Size() - n += 1 + l + sovGenerated(uint64(l)) + repeatedStringForResults := "[]DeviceRequestAllocationResult{" + for _, f := range this.Results { + repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DeviceRequestAllocationResult", "DeviceRequestAllocationResult", 1), `&`, ``, 1) + "," } - if len(m.ReservedFor) > 0 { - for _, e := range m.ReservedFor { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForResults += "}" + repeatedStringForConfig := "[]DeviceAllocationConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceAllocationConfiguration", "DeviceAllocationConfiguration", 1), `&`, ``, 1) + "," } - n += 2 - return n + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceAllocationResult{`, + `Results:` + repeatedStringForResults + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimTemplate) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceAttribute) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&DeviceAttribute{`, + `IntValue:` + valueToStringGenerated(this.IntValue) + `,`, + `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`, + `StringValue:` + valueToStringGenerated(this.StringValue) + `,`, + `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimTemplateList) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceClaim) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForRequests := "[]DeviceRequest{" + for _, f := range this.Requests { + repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "DeviceRequest", "DeviceRequest", 1), `&`, ``, 1) + "," } - return n + repeatedStringForRequests += "}" + repeatedStringForConstraints := "[]DeviceConstraint{" + for _, f := range this.Constraints { + repeatedStringForConstraints += strings.Replace(strings.Replace(f.String(), "DeviceConstraint", "DeviceConstraint", 1), `&`, ``, 1) + "," + } + repeatedStringForConstraints += "}" + repeatedStringForConfig := "[]DeviceClaimConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClaimConfiguration", "DeviceClaimConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceClaim{`, + `Requests:` + repeatedStringForRequests + `,`, + `Constraints:` + repeatedStringForConstraints + `,`, + `Config:` + repeatedStringForConfig + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClaimTemplateSpec) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceClaimConfiguration) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n + s := strings.Join([]string{`&DeviceClaimConfiguration{`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClass) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceClass) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - if m.ParametersRef != nil { - l = m.ParametersRef.Size() - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&DeviceClass{`, + `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeviceClassSpec", "DeviceClassSpec", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClassConfiguration) String() string { + if this == nil { + return "nil" } - if m.SuitableNodes != nil { - l = m.SuitableNodes.Size() - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&DeviceClassConfiguration{`, + `DeviceConfiguration:` + strings.Replace(strings.Replace(this.DeviceConfiguration.String(), "DeviceConfiguration", "DeviceConfiguration", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceClassList) String() string { + if this == nil { + return "nil" } - if m.StructuredParameters != nil { - n += 2 + repeatedStringForItems := "[]DeviceClass{" + for _, f := range this.Items { + repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeviceClass", "DeviceClass", 1), `&`, ``, 1) + "," } - return n + repeatedStringForItems += "}" + s := strings.Join([]string{`&DeviceClassList{`, + `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, + `Items:` + repeatedStringForItems + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClassList) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceClassSpec) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForSelectors := "[]DeviceSelector{" + for _, f := range this.Selectors { + repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," } - return n + repeatedStringForSelectors += "}" + repeatedStringForConfig := "[]DeviceClassConfiguration{" + for _, f := range this.Config { + repeatedStringForConfig += strings.Replace(strings.Replace(f.String(), "DeviceClassConfiguration", "DeviceClassConfiguration", 1), `&`, ``, 1) + "," + } + repeatedStringForConfig += "}" + s := strings.Join([]string{`&DeviceClassSpec{`, + `Selectors:` + repeatedStringForSelectors + `,`, + `Config:` + repeatedStringForConfig + `,`, + `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClassParameters) Size() (n int) { - if m == nil { - return 0 +func (this *DeviceConfiguration) String() string { + if this == nil { + return "nil" } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.GeneratedFrom != nil { - l = m.GeneratedFrom.Size() - n += 1 + l + sovGenerated(uint64(l)) + s := strings.Join([]string{`&DeviceConfiguration{`, + `Opaque:` + strings.Replace(this.Opaque.String(), "OpaqueDeviceConfiguration", "OpaqueDeviceConfiguration", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceConstraint) String() string { + if this == nil { + return "nil" } - if len(m.VendorParameters) > 0 { - for _, e := range m.VendorParameters { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + s := strings.Join([]string{`&DeviceConstraint{`, + `Requests:` + fmt.Sprintf("%v", this.Requests) + `,`, + `MatchAttribute:` + valueToStringGenerated(this.MatchAttribute) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceRequest) String() string { + if this == nil { + return "nil" } - if len(m.Filters) > 0 { - for _, e := range m.Filters { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } + repeatedStringForSelectors := "[]DeviceSelector{" + for _, f := range this.Selectors { + repeatedStringForSelectors += strings.Replace(strings.Replace(f.String(), "DeviceSelector", "DeviceSelector", 1), `&`, ``, 1) + "," } - return n + repeatedStringForSelectors += "}" + s := strings.Join([]string{`&DeviceRequest{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `DeviceClassName:` + fmt.Sprintf("%v", this.DeviceClassName) + `,`, + `Selectors:` + repeatedStringForSelectors + `,`, + `CountMode:` + fmt.Sprintf("%v", this.CountMode) + `,`, + `Count:` + fmt.Sprintf("%v", this.Count) + `,`, + `AdminAccess:` + fmt.Sprintf("%v", this.AdminAccess) + `,`, + `}`, + }, "") + return s } - -func (m *ResourceClassParametersList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ResourceClassParametersReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.APIGroup) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - l = m.ResourceFilterModel.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceFilterModel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NamedResources != nil { - l = m.NamedResources.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ResourceHandle) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Data) - n += 1 + l + sovGenerated(uint64(l)) - if m.StructuredData != nil { - l = m.StructuredData.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ResourceModel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NamedResources != nil { - l = m.NamedResources.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ResourceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.VendorParameters.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ResourceRequestModel.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceRequestModel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NamedResources != nil { - l = m.NamedResources.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ResourceSlice) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - l = m.ResourceModel.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceSliceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *StructuredResourceHandle) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.VendorClassParameters.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.VendorClaimParameters.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.NodeName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *VendorParameters) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DriverName) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Parameters.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AllocationResult) String() string { - if this == nil { - return "nil" - } - repeatedStringForResourceHandles := "[]ResourceHandle{" - for _, f := range this.ResourceHandles { - repeatedStringForResourceHandles += strings.Replace(strings.Replace(f.String(), "ResourceHandle", "ResourceHandle", 1), `&`, ``, 1) + "," - } - repeatedStringForResourceHandles += "}" - s := strings.Join([]string{`&AllocationResult{`, - `ResourceHandles:` + repeatedStringForResourceHandles + `,`, - `AvailableOnNodes:` + strings.Replace(fmt.Sprintf("%v", this.AvailableOnNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `}`, - }, "") - return s -} -func (this *AllocationResultModel) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllocationResultModel{`, - `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesAllocationResult", "NamedResourcesAllocationResult", 1) + `,`, - `}`, - }, "") - return s -} -func (this *DriverAllocationResult) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DriverAllocationResult{`, - `VendorRequestParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorRequestParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `AllocationResultModel:` + strings.Replace(strings.Replace(this.AllocationResultModel.String(), "AllocationResultModel", "AllocationResultModel", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DriverRequests) String() string { - if this == nil { - return "nil" - } - repeatedStringForRequests := "[]ResourceRequest{" - for _, f := range this.Requests { - repeatedStringForRequests += strings.Replace(strings.Replace(f.String(), "ResourceRequest", "ResourceRequest", 1), `&`, ``, 1) + "," - } - repeatedStringForRequests += "}" - s := strings.Join([]string{`&DriverRequests{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `Requests:` + repeatedStringForRequests + `,`, - `}`, - }, "") - return s -} -func (this *NamedResourcesAllocationResult) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedResourcesAllocationResult{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *NamedResourcesAttribute) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedResourcesAttribute{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `NamedResourcesAttributeValue:` + strings.Replace(strings.Replace(this.NamedResourcesAttributeValue.String(), "NamedResourcesAttributeValue", "NamedResourcesAttributeValue", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NamedResourcesAttributeValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedResourcesAttributeValue{`, - `BoolValue:` + valueToStringGenerated(this.BoolValue) + `,`, - `StringValue:` + valueToStringGenerated(this.StringValue) + `,`, - `QuantityValue:` + strings.Replace(fmt.Sprintf("%v", this.QuantityValue), "Quantity", "resource.Quantity", 1) + `,`, - `IntValue:` + valueToStringGenerated(this.IntValue) + `,`, - `IntSliceValue:` + strings.Replace(this.IntSliceValue.String(), "NamedResourcesIntSlice", "NamedResourcesIntSlice", 1) + `,`, - `StringSliceValue:` + strings.Replace(this.StringSliceValue.String(), "NamedResourcesStringSlice", "NamedResourcesStringSlice", 1) + `,`, - `VersionValue:` + valueToStringGenerated(this.VersionValue) + `,`, - `}`, - }, "") - return s -} -func (this *NamedResourcesFilter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedResourcesFilter{`, - `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, - `}`, - }, "") - return s -} -func (this *NamedResourcesInstance) String() string { - if this == nil { - return "nil" - } - repeatedStringForAttributes := "[]NamedResourcesAttribute{" - for _, f := range this.Attributes { - repeatedStringForAttributes += strings.Replace(strings.Replace(f.String(), "NamedResourcesAttribute", "NamedResourcesAttribute", 1), `&`, ``, 1) + "," - } - repeatedStringForAttributes += "}" - s := strings.Join([]string{`&NamedResourcesInstance{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Attributes:` + repeatedStringForAttributes + `,`, - `}`, - }, "") - return s -} -func (this *NamedResourcesIntSlice) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedResourcesIntSlice{`, - `Ints:` + fmt.Sprintf("%v", this.Ints) + `,`, - `}`, - }, "") - return s -} -func (this *NamedResourcesRequest) String() string { +func (this *DeviceRequestAllocationResult) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&NamedResourcesRequest{`, - `Selector:` + fmt.Sprintf("%v", this.Selector) + `,`, + s := strings.Join([]string{`&DeviceRequestAllocationResult{`, + `Request:` + fmt.Sprintf("%v", this.Request) + `,`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + fmt.Sprintf("%v", this.Pool) + `,`, + `Device:` + fmt.Sprintf("%v", this.Device) + `,`, `}`, }, "") return s } -func (this *NamedResourcesResources) String() string { +func (this *DeviceSelector) String() string { if this == nil { return "nil" } - repeatedStringForInstances := "[]NamedResourcesInstance{" - for _, f := range this.Instances { - repeatedStringForInstances += strings.Replace(strings.Replace(f.String(), "NamedResourcesInstance", "NamedResourcesInstance", 1), `&`, ``, 1) + "," - } - repeatedStringForInstances += "}" - s := strings.Join([]string{`&NamedResourcesResources{`, - `Instances:` + repeatedStringForInstances + `,`, + s := strings.Join([]string{`&DeviceSelector{`, + `CEL:` + strings.Replace(this.CEL.String(), "CELDeviceSelector", "CELDeviceSelector", 1) + `,`, `}`, }, "") return s } -func (this *NamedResourcesStringSlice) String() string { +func (this *OpaqueDeviceConfiguration) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&NamedResourcesStringSlice{`, - `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, + s := strings.Join([]string{`&OpaqueDeviceConfiguration{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -4443,69 +3924,24 @@ func (this *ResourceClaimList) String() string { }, "") return s } -func (this *ResourceClaimParameters) String() string { +func (this *ResourceClaimSchedulingStatus) String() string { if this == nil { return "nil" } - repeatedStringForDriverRequests := "[]DriverRequests{" - for _, f := range this.DriverRequests { - repeatedStringForDriverRequests += strings.Replace(strings.Replace(f.String(), "DriverRequests", "DriverRequests", 1), `&`, ``, 1) + "," - } - repeatedStringForDriverRequests += "}" - s := strings.Join([]string{`&ResourceClaimParameters{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, - `DriverRequests:` + repeatedStringForDriverRequests + `,`, + s := strings.Join([]string{`&ResourceClaimSchedulingStatus{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `UnsuitableNodes:` + fmt.Sprintf("%v", this.UnsuitableNodes) + `,`, `}`, }, "") return s } -func (this *ResourceClaimParametersList) String() string { +func (this *ResourceClaimSpec) String() string { if this == nil { return "nil" } - repeatedStringForItems := "[]ResourceClaimParameters{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClaimParameters", "ResourceClaimParameters", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClaimParametersList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimParametersReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimParametersReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimSchedulingStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimSchedulingStatus{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UnsuitableNodes:` + fmt.Sprintf("%v", this.UnsuitableNodes) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClaimSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClaimSpec{`, - `ResourceClassName:` + fmt.Sprintf("%v", this.ResourceClassName) + `,`, - `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClaimParametersReference", "ResourceClaimParametersReference", 1) + `,`, + s := strings.Join([]string{`&ResourceClaimSpec{`, + `Devices:` + strings.Replace(strings.Replace(this.Devices.String(), "DeviceClaim", "DeviceClaim", 1), `&`, ``, 1) + `,`, + `Controller:` + fmt.Sprintf("%v", this.Controller) + `,`, `}`, }, "") return s @@ -4520,7 +3956,6 @@ func (this *ResourceClaimStatus) String() string { } repeatedStringForReservedFor += "}" s := strings.Join([]string{`&ResourceClaimStatus{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, `Allocation:` + strings.Replace(this.Allocation.String(), "AllocationResult", "AllocationResult", 1) + `,`, `ReservedFor:` + repeatedStringForReservedFor + `,`, `DeallocationRequested:` + fmt.Sprintf("%v", this.DeallocationRequested) + `,`, @@ -4566,148 +4001,14 @@ func (this *ResourceClaimTemplateSpec) String() string { }, "") return s } -func (this *ResourceClass) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceClass{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `ParametersRef:` + strings.Replace(this.ParametersRef.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, - `SuitableNodes:` + strings.Replace(fmt.Sprintf("%v", this.SuitableNodes), "NodeSelector", "v1.NodeSelector", 1) + `,`, - `StructuredParameters:` + valueToStringGenerated(this.StructuredParameters) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClassList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClass{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClass", "ResourceClass", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClassList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClassParameters) String() string { - if this == nil { - return "nil" - } - repeatedStringForVendorParameters := "[]VendorParameters{" - for _, f := range this.VendorParameters { - repeatedStringForVendorParameters += strings.Replace(strings.Replace(f.String(), "VendorParameters", "VendorParameters", 1), `&`, ``, 1) + "," - } - repeatedStringForVendorParameters += "}" - repeatedStringForFilters := "[]ResourceFilter{" - for _, f := range this.Filters { - repeatedStringForFilters += strings.Replace(strings.Replace(f.String(), "ResourceFilter", "ResourceFilter", 1), `&`, ``, 1) + "," - } - repeatedStringForFilters += "}" - s := strings.Join([]string{`&ResourceClassParameters{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `GeneratedFrom:` + strings.Replace(this.GeneratedFrom.String(), "ResourceClassParametersReference", "ResourceClassParametersReference", 1) + `,`, - `VendorParameters:` + repeatedStringForVendorParameters + `,`, - `Filters:` + repeatedStringForFilters + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClassParametersList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ResourceClassParameters{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ResourceClassParameters", "ResourceClassParameters", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ResourceClassParametersList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ResourceClassParametersReference) String() string { +func (this *ResourcePool) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&ResourceClassParametersReference{`, - `APIGroup:` + fmt.Sprintf("%v", this.APIGroup) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + s := strings.Join([]string{`&ResourcePool{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceFilter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceFilter{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `ResourceFilterModel:` + strings.Replace(strings.Replace(this.ResourceFilterModel.String(), "ResourceFilterModel", "ResourceFilterModel", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceFilterModel) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceFilterModel{`, - `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesFilter", "NamedResourcesFilter", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceHandle) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceHandle{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `StructuredData:` + strings.Replace(this.StructuredData.String(), "StructuredResourceHandle", "StructuredResourceHandle", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceModel) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceModel{`, - `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesResources", "NamedResourcesResources", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceRequest{`, - `VendorParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `ResourceRequestModel:` + strings.Replace(strings.Replace(this.ResourceRequestModel.String(), "ResourceRequestModel", "ResourceRequestModel", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceRequestModel) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceRequestModel{`, - `NamedResources:` + strings.Replace(this.NamedResources.String(), "NamedResourcesRequest", "NamedResourcesRequest", 1) + `,`, + `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, + `ResourceSliceCount:` + fmt.Sprintf("%v", this.ResourceSliceCount) + `,`, `}`, }, "") return s @@ -4718,9 +4019,7 @@ func (this *ResourceSlice) String() string { } s := strings.Join([]string{`&ResourceSlice{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `ResourceModel:` + strings.Replace(strings.Replace(this.ResourceModel.String(), "ResourceModel", "ResourceModel", 1), `&`, ``, 1) + `,`, + `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ResourceSliceSpec", "ResourceSliceSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -4741,515 +4040,35 @@ func (this *ResourceSliceList) String() string { }, "") return s } -func (this *StructuredResourceHandle) String() string { - if this == nil { - return "nil" - } - repeatedStringForResults := "[]DriverAllocationResult{" - for _, f := range this.Results { - repeatedStringForResults += strings.Replace(strings.Replace(f.String(), "DriverAllocationResult", "DriverAllocationResult", 1), `&`, ``, 1) + "," - } - repeatedStringForResults += "}" - s := strings.Join([]string{`&StructuredResourceHandle{`, - `VendorClassParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClassParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `VendorClaimParameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.VendorClaimParameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, - `Results:` + repeatedStringForResults + `,`, - `}`, - }, "") - return s -} -func (this *VendorParameters) String() string { +func (this *ResourceSliceSpec) String() string { if this == nil { return "nil" } - s := strings.Join([]string{`&VendorParameters{`, - `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, - `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *AllocationResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceHandles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceHandles = append(m.ResourceHandles, ResourceHandle{}) - if err := m.ResourceHandles[len(m.ResourceHandles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AvailableOnNodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AvailableOnNodes == nil { - m.AvailableOnNodes = &v1.NodeSelector{} - } - if err := m.AvailableOnNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllocationResultModel) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllocationResultModel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllocationResultModel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NamedResources == nil { - m.NamedResources = &NamedResourcesAllocationResult{} - } - if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DriverAllocationResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DriverAllocationResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DriverAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VendorRequestParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.VendorRequestParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllocationResultModel", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AllocationResultModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DriverRequests) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DriverRequests: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DriverRequests: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DriverName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.VendorParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Requests = append(m.Requests, ResourceRequest{}) - if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF + repeatedStringForDevices := "[]Device{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(strings.Replace(f.String(), "Device", "Device", 1), `&`, ``, 1) + "," } - return nil + repeatedStringForDevices += "}" + s := strings.Join([]string{`&ResourceSliceSpec{`, + `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, + `Pool:` + strings.Replace(strings.Replace(this.Pool.String(), "ResourcePool", "ResourcePool", 1), `&`, ``, 1) + `,`, + `NodeName:` + fmt.Sprintf("%v", this.NodeName) + `,`, + `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "NodeSelector", "v1.NodeSelector", 1) + `,`, + `AllNodes:` + fmt.Sprintf("%v", this.AllNodes) + `,`, + `Devices:` + repeatedStringForDevices + `,`, + `}`, + }, "") + return s +} +func valueToStringGenerated(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) } -func (m *NamedResourcesAllocationResult) Unmarshal(dAtA []byte) error { +func (m *AllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5272,17 +4091,17 @@ func (m *NamedResourcesAllocationResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesAllocationResult: wiretype end group for non-group") + return fmt.Errorf("proto: AllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5292,79 +4111,30 @@ func (m *NamedResourcesAllocationResult) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedResourcesAttribute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5374,29 +4144,33 @@ func (m *NamedResourcesAttribute) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + if m.NodeSelector == nil { + m.NodeSelector = &v1.NodeSelector{} + } + if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedResourcesAttributeValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -5406,24 +4180,23 @@ func (m *NamedResourcesAttribute) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.NamedResourcesAttributeValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5446,7 +4219,7 @@ func (m *NamedResourcesAttribute) Unmarshal(dAtA []byte) error { } return nil } -func (m *NamedResourcesAttributeValue) Unmarshal(dAtA []byte) error { +func (m *BasicDevice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5469,69 +4242,15 @@ func (m *NamedResourcesAttributeValue) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesAttributeValue: wiretype end group for non-group") + return fmt.Errorf("proto: BasicDevice: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesAttributeValue: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BasicDevice: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.BoolValue = &b - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.StringValue = &s - iNdEx = postIndex - case 6: + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QuantityValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5558,72 +4277,109 @@ func (m *NamedResourcesAttributeValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.QuantityValue == nil { - m.QuantityValue = &resource.Quantity{} - } - if err := m.QuantityValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IntValue = &v - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IntSliceValue", wireType) + if m.Attributes == nil { + m.Attributes = make(map[QualifiedName]DeviceAttribute) } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break + var mapkey QualifiedName + mapvalue := &DeviceAttribute{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &DeviceAttribute{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IntSliceValue == nil { - m.IntSliceValue = &NamedResourcesIntSlice{} - } - if err := m.IntSliceValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Attributes[QualifiedName(mapkey)] = *mapvalue iNdEx = postIndex - case 9: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringSliceValue", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5650,45 +4406,105 @@ func (m *NamedResourcesAttributeValue) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StringSliceValue == nil { - m.StringSliceValue = &NamedResourcesStringSlice{} - } - if err := m.StringSliceValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) + if m.Capacity == nil { + m.Capacity = make(map[QualifiedName]resource.Quantity) } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + var mapkey QualifiedName + mapvalue := &resource.Quantity{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenerated + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenerated + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = QualifiedName(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenerated + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenerated + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &resource.Quantity{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.VersionValue = &s + m.Capacity[QualifiedName(mapkey)] = *mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -5711,7 +4527,7 @@ func (m *NamedResourcesAttributeValue) Unmarshal(dAtA []byte) error { } return nil } -func (m *NamedResourcesFilter) Unmarshal(dAtA []byte) error { +func (m *CELDeviceSelector) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5734,15 +4550,15 @@ func (m *NamedResourcesFilter) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesFilter: wiretype end group for non-group") + return fmt.Errorf("proto: CELDeviceSelector: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CELDeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Expression", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5770,7 +4586,7 @@ func (m *NamedResourcesFilter) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Selector = string(dAtA[iNdEx:postIndex]) + m.Expression = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5793,7 +4609,7 @@ func (m *NamedResourcesFilter) Unmarshal(dAtA []byte) error { } return nil } -func (m *NamedResourcesInstance) Unmarshal(dAtA []byte) error { +func (m *Device) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5816,10 +4632,10 @@ func (m *NamedResourcesInstance) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesInstance: wiretype end group for non-group") + return fmt.Errorf("proto: Device: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesInstance: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5856,7 +4672,7 @@ func (m *NamedResourcesInstance) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Basic", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5883,137 +4699,13 @@ func (m *NamedResourcesInstance) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes, NamedResourcesAttribute{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Basic == nil { + m.Basic = &BasicDevice{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.Basic.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedResourcesIntSlice) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesIntSlice: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesIntSlice: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ints = append(m.Ints, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Ints) == 0 { - m.Ints = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Ints = append(m.Ints, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Ints", wireType) - } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6035,7 +4727,7 @@ func (m *NamedResourcesIntSlice) Unmarshal(dAtA []byte) error { } return nil } -func (m *NamedResourcesRequest) Unmarshal(dAtA []byte) error { +func (m *DeviceAllocationConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6058,15 +4750,15 @@ func (m *NamedResourcesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceAllocationConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceAllocationConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6094,61 +4786,43 @@ func (m *NamedResourcesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Selector = string(dAtA[iNdEx:postIndex]) + m.Source = AllocationConfigSource(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedResourcesResources) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesResources: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesResources: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Instances", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6175,8 +4849,7 @@ func (m *NamedResourcesResources) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Instances = append(m.Instances, NamedResourcesInstance{}) - if err := m.Instances[len(m.Instances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6201,7 +4874,7 @@ func (m *NamedResourcesResources) Unmarshal(dAtA []byte) error { } return nil } -func (m *NamedResourcesStringSlice) Unmarshal(dAtA []byte) error { +func (m *DeviceAllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6224,17 +4897,17 @@ func (m *NamedResourcesStringSlice) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NamedResourcesStringSlice: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceAllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NamedResourcesStringSlice: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6244,23 +4917,59 @@ func (m *NamedResourcesStringSlice) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Results = append(m.Results, DeviceRequestAllocationResult{}) + if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Strings = append(m.Strings, string(dAtA[iNdEx:postIndex])) + m.Config = append(m.Config, DeviceAllocationConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -6283,7 +4992,7 @@ func (m *NamedResourcesStringSlice) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { +func (m *DeviceAttribute) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6306,17 +5015,17 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContext: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceAttribute: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContext: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceAttribute: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) } - var msglen int + var v int64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6326,30 +5035,38 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + v |= int64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + m.IntValue = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex - case 2: + b := bool(v != 0) + m.BoolValue = &b + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6359,30 +5076,30 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.StringValue = &s iNdEx = postIndex - case 3: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field VersionValue", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -6392,24 +5109,24 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := string(dAtA[iNdEx:postIndex]) + m.VersionValue = &s iNdEx = postIndex default: iNdEx = preIndex @@ -6432,7 +5149,7 @@ func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { +func (m *DeviceClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6455,15 +5172,15 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextList: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClaim: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6490,13 +5207,14 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Requests = append(m.Requests, DeviceRequest{}) + if err := m.Requests[len(m.Requests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Constraints", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6523,8 +5241,42 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, PodSchedulingContext{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Constraints = append(m.Constraints, DeviceConstraint{}) + if err := m.Constraints[len(m.Constraints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Config = append(m.Config, DeviceClaimConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6549,7 +5301,7 @@ func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { } return nil } -func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { +func (m *DeviceClaimConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6572,47 +5324,15 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextSpec: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClaimConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClaimConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectedNode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SelectedNode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PotentialNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6638,63 +5358,13 @@ func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { return ErrInvalidLengthGenerated } if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PotentialNodes = append(m.PotentialNodes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + return io.ErrUnexpectedEOF } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSchedulingContextStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSchedulingContextStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaims", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6721,8 +5391,7 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceClaims = append(m.ResourceClaims, ResourceClaimSchedulingStatus{}) - if err := m.ResourceClaims[len(m.ResourceClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6747,7 +5416,7 @@ func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaim) Unmarshal(dAtA []byte) error { +func (m *DeviceClass) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6770,10 +5439,10 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClass: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaim: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClass: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -6842,39 +5511,6 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -6896,7 +5532,7 @@ func (m *ResourceClaim) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { +func (m *DeviceClassConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -6919,81 +5555,17 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClassConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimConsumerReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClassConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIGroup = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceConfiguration", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7003,55 +5575,24 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF + if err := m.DeviceConfiguration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7074,7 +5615,7 @@ func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { +func (m *DeviceClassList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7097,10 +5638,10 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClassList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClassList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -7165,7 +5706,7 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClaim{}) + m.Items = append(m.Items, DeviceClass{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7191,7 +5732,7 @@ func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { +func (m *DeviceClassSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7214,15 +5755,15 @@ func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimParameters: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceClassSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimParameters: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceClassSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7249,13 +5790,14 @@ func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Selectors = append(m.Selectors, DeviceSelector{}) + if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GeneratedFrom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7282,16 +5824,14 @@ func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.GeneratedFrom == nil { - m.GeneratedFrom = &ResourceClaimParametersReference{} - } - if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Config = append(m.Config, DeviceClassConfiguration{}) + if err := m.Config[len(m.Config)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverRequests", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SuitableNodes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7318,8 +5858,10 @@ func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DriverRequests = append(m.DriverRequests, DriverRequests{}) - if err := m.DriverRequests[len(m.DriverRequests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.SuitableNodes == nil { + m.SuitableNodes = &v1.NodeSelector{} + } + if err := m.SuitableNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7344,7 +5886,7 @@ func (m *ResourceClaimParameters) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { +func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7367,15 +5909,15 @@ func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimParametersList: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimParametersList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Opaque", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7402,15 +5944,100 @@ func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.Opaque == nil { + m.Opaque = &OpaqueDeviceConfiguration{} + } + if err := m.Opaque.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { return err } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenerated + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceConstraint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceConstraint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceConstraint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Requests", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Requests = append(m.Requests, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field MatchAttribute", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7420,25 +6047,24 @@ func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClaimParameters{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + s := FullyQualifiedName(dAtA[iNdEx:postIndex]) + m.MatchAttribute = &s iNdEx = postIndex default: iNdEx = preIndex @@ -7461,7 +6087,7 @@ func (m *ResourceClaimParametersList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { +func (m *DeviceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7484,15 +6110,15 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimParametersReference: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7520,11 +6146,11 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.APIGroup = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DeviceClassName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7552,11 +6178,45 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) + m.DeviceClassName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Selectors = append(m.Selectors, DeviceSelector{}) + if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CountMode", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7584,8 +6244,47 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.CountMode = DeviceCountMode(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) + } + m.Count = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Count |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AdminAccess", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AdminAccess = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -7607,7 +6306,7 @@ func (m *ResourceClaimParametersReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { +func (m *DeviceRequestAllocationResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7630,15 +6329,15 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceRequestAllocationResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimSchedulingStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceRequestAllocationResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7666,11 +6365,11 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.Request = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnsuitableNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7698,61 +6397,11 @@ func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UnsuitableNodes = append(m.UnsuitableNodes, string(dAtA[iNdEx:postIndex])) + m.Driver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceClassName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7780,13 +6429,13 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ResourceClassName = string(dAtA[iNdEx:postIndex]) + m.Pool = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -7796,27 +6445,23 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.ParametersRef == nil { - m.ParametersRef = &ResourceClaimParametersReference{} - } - if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Device = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -7839,7 +6484,7 @@ func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { +func (m *DeviceSelector) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7862,83 +6507,15 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group") + return fmt.Errorf("proto: DeviceSelector: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: DeviceSelector: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DriverName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Allocation == nil { - m.Allocation = &AllocationResult{} - } - if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CEL", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7962,34 +6539,16 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { if postIndex < 0 { return ErrInvalidLengthGenerated } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{}) - if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeallocationRequested", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DeallocationRequested = bool(v != 0) + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CEL == nil { + m.CEL = &CELDeviceSelector{} + } + if err := m.CEL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8011,7 +6570,7 @@ func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { +func (m *OpaqueDeviceConfiguration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8034,17 +6593,17 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group") + return fmt.Errorf("proto: OpaqueDeviceConfiguration: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OpaqueDeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8054,28 +6613,27 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Driver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8102,7 +6660,7 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8127,7 +6685,7 @@ func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { +func (m *PodSchedulingContext) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8150,15 +6708,15 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group") + return fmt.Errorf("proto: PodSchedulingContext: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodSchedulingContext: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8185,13 +6743,13 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8218,8 +6776,40 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClaimTemplate{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8244,7 +6834,7 @@ func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { +func (m *PodSchedulingContextList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8267,15 +6857,15 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group") + return fmt.Errorf("proto: PodSchedulingContextList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodSchedulingContextList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8302,13 +6892,13 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8335,7 +6925,8 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, PodSchedulingContext{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8360,7 +6951,7 @@ func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClass) Unmarshal(dAtA []byte) error { +func (m *PodSchedulingContextSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8383,17 +6974,17 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClass: wiretype end group for non-group") + return fmt.Errorf("proto: PodSchedulingContextSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClass: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PodSchedulingContextSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SelectedNode", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8403,28 +6994,27 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.SelectedNode = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PotentialNodes", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -8452,47 +7042,61 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DriverName = string(dAtA[iNdEx:postIndex]) + m.PotentialNodes = append(m.PotentialNodes, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParametersRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated + default: + iNdEx = preIndex + skippy, err := skipGenerated(dAtA[iNdEx:]) + if err != nil { + return err } - postIndex := iNdEx + msglen - if postIndex < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } - if postIndex > l { + if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } - if m.ParametersRef == nil { - m.ParametersRef = &ResourceClassParametersReference{} + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PodSchedulingContextStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated } - if err := m.ParametersRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if iNdEx >= l { + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 4: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PodSchedulingContextStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PodSchedulingContextStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuitableNodes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResourceClaims", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8519,34 +7123,11 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SuitableNodes == nil { - m.SuitableNodes = &v1.NodeSelector{} - } - if err := m.SuitableNodes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ResourceClaims = append(m.ResourceClaims, ResourceClaimSchedulingStatus{}) + if err := m.ResourceClaims[len(m.ResourceClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StructuredParameters", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.StructuredParameters = &b default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -8568,7 +7149,7 @@ func (m *ResourceClass) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassList) Unmarshal(dAtA []byte) error { +func (m *ResourceClaim) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8591,15 +7172,15 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaim: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaim: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8626,13 +7207,13 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -8659,8 +7240,40 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClass{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -8685,7 +7298,7 @@ func (m *ResourceClassList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimConsumerReference) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8708,17 +7321,17 @@ func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassParameters: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimConsumerReference: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassParameters: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimConsumerReference: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8728,30 +7341,29 @@ func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.APIGroup = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GeneratedFrom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8761,33 +7373,29 @@ func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.GeneratedFrom == nil { - m.GeneratedFrom = &ResourceClassParametersReference{} - } - if err := m.GeneratedFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8797,31 +7405,29 @@ func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.VendorParameters = append(m.VendorParameters, VendorParameters{}) - if err := m.VendorParameters[len(m.VendorParameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -8831,25 +7437,23 @@ func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Filters = append(m.Filters, ResourceFilter{}) - if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -8872,7 +7476,7 @@ func (m *ResourceClassParameters) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassParametersList) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8895,10 +7499,10 @@ func (m *ResourceClassParametersList) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassParametersList: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassParametersList: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -8963,7 +7567,7 @@ func (m *ResourceClassParametersList) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Items = append(m.Items, ResourceClassParameters{}) + m.Items = append(m.Items, ResourceClaim{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8989,7 +7593,7 @@ func (m *ResourceClassParametersList) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimSchedulingStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9012,77 +7616,13 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceClassParametersReference: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimSchedulingStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceClassParametersReference: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimSchedulingStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIGroup", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIGroup = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } @@ -9114,9 +7654,9 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UnsuitableNodes", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -9144,7 +7684,7 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Namespace = string(dAtA[iNdEx:postIndex]) + m.UnsuitableNodes = append(m.UnsuitableNodes, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -9167,7 +7707,7 @@ func (m *ResourceClassParametersReference) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceFilter) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9190,17 +7730,17 @@ func (m *ResourceFilter) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceFilter: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceFilter: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9210,29 +7750,30 @@ func (m *ResourceFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.DriverName = string(dAtA[iNdEx:postIndex]) + if err := m.Devices.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceFilterModel", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9242,24 +7783,23 @@ func (m *ResourceFilter) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ResourceFilterModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -9282,7 +7822,7 @@ func (m *ResourceFilter) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceFilterModel) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimStatus) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9305,15 +7845,15 @@ func (m *ResourceFilterModel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceFilterModel: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimStatus: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceFilterModel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimStatus: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Allocation", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9340,13 +7880,67 @@ func (m *ResourceFilterModel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.NamedResources == nil { - m.NamedResources = &NamedResourcesFilter{} + if m.Allocation == nil { + m.Allocation = &AllocationResult{} + } + if err := m.Allocation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReservedFor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF } - if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ReservedFor = append(m.ReservedFor, ResourceClaimConsumerReference{}) + if err := m.ReservedFor[len(m.ReservedFor)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DeallocationRequested", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DeallocationRequested = bool(v != 0) default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -9368,7 +7962,7 @@ func (m *ResourceFilterModel) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceHandle) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9391,49 +7985,17 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceHandle: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceHandle: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DriverName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9443,27 +8005,28 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = string(dAtA[iNdEx:postIndex]) + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 5: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StructuredData", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9490,10 +8053,7 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.StructuredData == nil { - m.StructuredData = &StructuredResourceHandle{} - } - if err := m.StructuredData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9518,7 +8078,7 @@ func (m *ResourceHandle) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceModel) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplateList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9541,15 +8101,15 @@ func (m *ResourceModel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceModel: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplateList: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceModel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplateList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9576,10 +8136,41 @@ func (m *ResourceModel) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.NamedResources == nil { - m.NamedResources = &NamedResourcesResources{} + if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF } - if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, ResourceClaimTemplate{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9604,7 +8195,7 @@ func (m *ResourceModel) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceRequest) Unmarshal(dAtA []byte) error { +func (m *ResourceClaimTemplateSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9627,15 +8218,15 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceRequest: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceClaimTemplateSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceClaimTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VendorParameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9662,13 +8253,13 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.VendorParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceRequestModel", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9695,7 +8286,7 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ResourceRequestModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -9720,7 +8311,7 @@ func (m *ResourceRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *ResourceRequestModel) Unmarshal(dAtA []byte) error { +func (m *ResourcePool) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -9743,17 +8334,17 @@ func (m *ResourceRequestModel) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ResourceRequestModel: wiretype end group for non-group") + return fmt.Errorf("proto: ResourcePool: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceRequestModel: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourcePool: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamedResources", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -9763,28 +8354,62 @@ func (m *ResourceRequestModel) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if m.NamedResources == nil { - m.NamedResources = &NamedResourcesRequest{} + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) } - if err := m.NamedResources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Generation = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Generation |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceSliceCount", wireType) + } + m.ResourceSliceCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ResourceSliceCount |= int64(b&0x7F) << shift + if b < 0x80 { + break + } } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -9870,71 +8495,7 @@ func (m *ResourceSlice) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DriverName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceModel", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -9961,7 +8522,7 @@ func (m *ResourceSlice) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ResourceModel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -10103,7 +8664,7 @@ func (m *ResourceSliceList) Unmarshal(dAtA []byte) error { } return nil } -func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { +func (m *ResourceSliceSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -10126,17 +8687,17 @@ func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StructuredResourceHandle: wiretype end group for non-group") + return fmt.Errorf("proto: ResourceSliceSpec: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StructuredResourceHandle: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ResourceSliceSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VendorClassParameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -10146,28 +8707,27 @@ func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthGenerated } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.VendorClassParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Driver = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VendorClaimParameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10194,11 +8754,11 @@ func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.VendorClaimParameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } @@ -10230,9 +8790,9 @@ func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { } m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10259,66 +8819,18 @@ func (m *StructuredResourceHandle) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Results = append(m.Results, DriverAllocationResult{}) - if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.NodeSelector == nil { + m.NodeSelector = &v1.NodeSelector{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { + if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VendorParameters) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VendorParameters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VendorParameters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllNodes", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated @@ -10328,27 +8840,15 @@ func (m *VendorParameters) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DriverName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: + m.AllNodes = bool(v != 0) + case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -10375,7 +8875,8 @@ func (m *VendorParameters) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Parameters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Devices = append(m.Devices, Device{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/staging/src/k8s.io/api/resource/v1alpha3/generated.proto b/staging/src/k8s.io/api/resource/v1alpha3/generated.proto index 1f864a0edf4fe..ee632358bfd5d 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/generated.proto +++ b/staging/src/k8s.io/api/resource/v1alpha3/generated.proto @@ -32,182 +32,487 @@ option go_package = "k8s.io/api/resource/v1alpha3"; // AllocationResult contains attributes of an allocated resource. message AllocationResult { - // ResourceHandles contain the state associated with an allocation that - // should be maintained throughout the lifetime of a claim. Each - // ResourceHandle contains data that should be passed to a specific kubelet - // plugin once it lands on a node. This data is returned by the driver - // after a successful allocation and is opaque to Kubernetes. Driver - // documentation may explain to users how to interpret this data if needed. - // - // Setting this field is optional. It has a maximum size of 32 entries. - // If null (or empty), it is assumed this allocation will be processed by a - // single kubelet plugin with no ResourceHandle data attached. The name of - // the kubelet plugin invoked will match the DriverName set in the - // ResourceClaimStatus this AllocationResult is embedded in. + // Devices is the result of allocating devices. // - // +listType=atomic // +optional - repeated ResourceHandle resourceHandles = 1; + optional DeviceAllocationResult devices = 1; - // This field will get set by the resource driver after it has allocated - // the resource to inform the scheduler where it can schedule Pods using - // the ResourceClaim. + // NodeSelector defines where the allocated resources are available. If + // unset, they are available everywhere. // - // Setting this field is optional. If null, the resource is available - // everywhere. // +optional - optional .k8s.io.api.core.v1.NodeSelector availableOnNodes = 2; -} + optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 3; -// AllocationResultModel must have one and only one field set. -message AllocationResultModel { - // NamedResources describes the allocation result when using the named resources model. + // Controller is the name of the DRA driver which handled the + // allocation. That driver is also responsible for deallocating the + // claim. It is empty when the claim can be deallocated without + // involving a driver. + // + // A driver may allocate devices provided by other drivers, so this + // driver name here can be different from the driver names listed for + // the results. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. // // +optional - optional NamedResourcesAllocationResult namedResources = 1; + optional string controller = 4; } -// DriverAllocationResult contains vendor parameters and the allocation result for -// one request. -message DriverAllocationResult { - // VendorRequestParameters are the per-request configuration parameters - // from the time that the claim was allocated. +// BasicDevice defines one device instance using fields that are supported +// by all clients which support DRA. +message BasicDevice { + // Attributes defines the set of attributes for this device. + // The name of each attribute must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. // // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension vendorRequestParameters = 1; + map attributes = 1; - optional AllocationResultModel allocationResultModel = 2; + // Capacity defines the set of capacities for this device. + // The name of each capacity must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + map capacity = 2; } -// DriverRequests describes all resources that are needed from one particular driver. -message DriverRequests { - // DriverName is the name used by the DRA driver kubelet plugin. - optional string driverName = 1; +// CELDeviceSelector contains a CEL expression for selecting a device. +message CELDeviceSelector { + // Expression is a CEL expression which evaluates a single device. It + // must evaluate to true when the device under consideration satisfies + // the desired criteria, and false when it does not. Any other result + // is an error and causes allocation of devices to abort. + // + // The expression's input is an object named "device", which carries + // the following properties: + // - driver (string): the name of the driver which defines this device. + // - attributes (map[string]object): the device's attributes, grouped by prefix + // (e.g. device.attributes["dra.example.com"] evaluates to an object with all + // of the attributes which were prefixed by "dra.example.com". + // - capacity (map[string]object): the device's capacities, grouped by prefix. + // + // Example: Consider a device with driver="dra.example.com", which exposes + // two attributes named "model" and "ext.example.com/family" and which + // exposes one capacity named "modules". This input to this expression + // would have the following fields: + // + // device.driver + // device.attributes["dra.example.com"].model + // device.attributes["ext.example.com"].family + // device.capacity["dra.example.com"].modules + // + // The device.driver field can be used to check for a specific driver, + // either as a high-level precondition (i.e. you only want to consider + // devices from this driver) or as part of a multi-clause expression + // that is meant to consider devices from different drivers. + // + // The value type of each attribute is defined by the device + // definition, and users who write these expressions must consult the + // documentation for their specific drivers. The value type of each + // capacity is Quantity. + // + // If an unknown prefix is used as a lookup in either device.attributes + // or device.capacity, an empty map will be returned. Any reference to + // an unknown field will cause an evaluation error and allocation to + // abort. + // + // A robust expression should check for the existence of attributes + // before referencing them. + // + // For ease of use, the cel.bind() function is enabled, and can be used + // to simplify expressions that access multiple attributes with the + // same domain. For example: + // + // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) + // + // +required + optional string expression = 1; +} - // VendorParameters are arbitrary setup parameters for all requests of the - // claim. They are ignored while allocating the claim. +// Device represents one individual hardware instance that can be selected based +// on its attributes. Besides the name, exactly one field must be set. +message Device { + // Name is unique identifier among all devices managed by + // the driver in the pool. It must be a DNS label. + // + // +required + optional string name = 1; + + // Basic defines one device instance using fields that are supported + // by all clients which support DRA. // // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 2; + // +oneOf=deviceType + optional BasicDevice basic = 2; +} + +// DeviceAllocationConfiguration gets embedded in an AllocationResult. +message DeviceAllocationConfiguration { + // Source records whether the configuration comes from a class and thus + // is not something that a normal user would have been able to set + // or from a claim. + // + // +required + optional string source = 1; - // Requests describes all resources that are needed from the driver. + // Requests lists the names of requests where the configuration applies. + // If empty, its applies to all requests. + // + // +optional // +listType=atomic - repeated ResourceRequest requests = 3; -} + repeated string requests = 2; -// NamedResourcesAllocationResult is used in AllocationResultModel. -message NamedResourcesAllocationResult { - // Name is the name of the selected resource instance. - optional string name = 1; + optional DeviceConfiguration deviceConfiguration = 3; } -// NamedResourcesAttribute is a combination of an attribute name and its value. -message NamedResourcesAttribute { - // Name is unique identifier among all resource instances managed by - // the driver on the node. It must be a DNS subdomain. - optional string name = 1; +// DeviceAllocationResult is the result of allocating devices. +message DeviceAllocationResult { + // Results lists all allocated devices. + // + // +optional + // +listType=atomic + repeated DeviceRequestAllocationResult results = 1; - optional NamedResourcesAttributeValue attributeValue = 2; + // This field is a combination of all the claim and class configuration parameters. + // Drivers can distinguish between those based on a flag. + // + // This includes configuration parameters for drivers which have no allocated + // devices in the result because it is up to the drivers which configuration + // parameters they support. They can silently ignore unknown configuration + // parameters. + // + // +optional + // +listType=atomic + repeated DeviceAllocationConfiguration config = 2; } -// NamedResourcesAttributeValue must have one and only one field set. -message NamedResourcesAttributeValue { - // QuantityValue is a quantity. - optional .k8s.io.apimachinery.pkg.api.resource.Quantity quantity = 6; +// DeviceAttribute must have exactly one field set. +message DeviceAttribute { + // IntValue is a number. + // + // +optional + optional int64 int = 2; // BoolValue is a true/false value. - optional bool bool = 2; + // + // +optional + optional bool bool = 3; - // IntValue is a 64-bit integer. - optional int64 int = 7; + // StringValue is a string. Must not be longer than 64 characters. + // + // +optional + optional string string = 4; - // IntSliceValue is an array of 64-bit integers. - optional NamedResourcesIntSlice intSlice = 8; + // VersionValue is a semantic version according to semver.org spec 2.0.0. + // Must not be longer than 64 characters. + // + // +optional + optional string version = 5; +} - // StringValue is a string. - optional string string = 5; +// DeviceClaim defines how to request devices with a ResourceClaim. +message DeviceClaim { + // Requests represent individual requests for distinct devices which + // must all be satisfied. If empty, nothing needs to be allocated. + // + // +optional + // +listType=atomic + repeated DeviceRequest requests = 1; - // StringSliceValue is an array of strings. - optional NamedResourcesStringSlice stringSlice = 9; + // These constraints must be satisfied by the set of devices that get + // allocated for the claim. + // + // +optional + // +listType=atomic + repeated DeviceConstraint constraints = 2; - // VersionValue is a semantic version according to semver.org spec 2.0.0. - optional string version = 10; + // This field holds configuration for multiple potential drivers which + // could satisfy requests in this claim. It is ignored while allocating + // the claim. + // + // +optional + // +listType=atomic + repeated DeviceClaimConfiguration config = 3; +} + +// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. +message DeviceClaimConfiguration { + // Requests lists the names of requests where the configuration applies. + // If empty, it applies to all requests. + // + // +optional + // +listType=atomic + repeated string requests = 1; + + optional DeviceConfiguration deviceConfiguration = 2; } -// NamedResourcesFilter is used in ResourceFilterModel. -message NamedResourcesFilter { - // Selector is a CEL expression which must evaluate to true if a - // resource instance is suitable. The language is as defined in - // https://kubernetes.io/docs/reference/using-api/cel/ +// DeviceClass is a vendor or admin-provided resource that contains +// device configuration and selectors. It can be referenced in +// the device requests of a claim to apply these presets. +// Cluster scoped. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +message DeviceClass { + // Standard object metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + + // Spec defines what can be allocated and how to configure it. // - // In addition, for each type in NamedResourcesAttributeValue there is a map that - // resolves to the corresponding value of the instance under evaluation. - // For example: + // This is mutable. Consumers have to be prepared for classes changing + // at any time, either because they get updated or replaced. Claim + // allocations are done once based on whatever was set in classes at + // the time of allocation. // - // attributes.quantity["a"].isGreaterThan(quantity("0")) && - // attributes.stringslice["b"].isSorted() - optional string selector = 1; + // Changing the spec automatically increments the metadata.generation number. + optional DeviceClassSpec spec = 2; } -// NamedResourcesInstance represents one individual hardware instance that can be selected based -// on its attributes. -message NamedResourcesInstance { - // Name is unique identifier among all resource instances managed by - // the driver on the node. It must be a DNS subdomain. - optional string name = 1; +// DeviceClassConfiguration is used in DeviceClass. +message DeviceClassConfiguration { + optional DeviceConfiguration deviceConfiguration = 1; +} - // Attributes defines the attributes of this resource instance. - // The name of each attribute must be unique. +// DeviceClassList is a collection of classes. +message DeviceClassList { + // Standard list metadata + // +optional + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + + // Items is the list of resource classes. + repeated DeviceClass items = 2; +} + +// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated +// and how to configure it. +message DeviceClassSpec { + // Each selector must be satisfied by a device which is claimed via this class. // + // +optional // +listType=atomic + repeated DeviceSelector selectors = 1; + + // Config defines configuration parameters that apply to each device that is claimed via this class. + // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor + // configuration applies to exactly one driver. + // + // They are passed to the driver, but are not considered while allocating the claim. + // // +optional - repeated NamedResourcesAttribute attributes = 2; + // +listType=atomic + repeated DeviceClassConfiguration config = 2; + + // Only nodes matching the selector will be considered by the scheduler + // when trying to find a Node that fits a Pod when that Pod uses + // a claim that has not been allocated yet *and* that claim + // gets allocated through a control plane controller. It is ignored + // when the claim does not use a control plane controller + // for allocation. + // + // Setting this field is optional. If unset, all Nodes are candidates. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. + // + // +optional + optional .k8s.io.api.core.v1.NodeSelector suitableNodes = 3; } -// NamedResourcesIntSlice contains a slice of 64-bit integers. -message NamedResourcesIntSlice { - // Ints is the slice of 64-bit integers. +// DeviceConfiguration must have exactly one field set. It gets embedded +// inline in some other structs which have other fields, so field names must +// not conflict with those. +message DeviceConfiguration { + // Opaque provides driver-specific configuration parameters. // - // +listType=atomic - repeated int64 ints = 1; + // +optional + optional OpaqueDeviceConfiguration opaque = 1; } -// NamedResourcesRequest is used in ResourceRequestModel. -message NamedResourcesRequest { - // Selector is a CEL expression which must evaluate to true if a - // resource instance is suitable. The language is as defined in - // https://kubernetes.io/docs/reference/using-api/cel/ +// DeviceConstraint must have exactly one field set besides Requests. +message DeviceConstraint { + // Requests is a list of the one or more requests in this claim which + // must co-satisfy this constraint. If a request is fulfilled by + // multiple devices, then all of the devices must satisfy the + // constraint. If this is not specified, this constraint applies to all + // requests in this claim. + // + // +optional + // +listType=atomic + repeated string requests = 1; + + // MatchAttribute requires that all devices in question have this + // attribute and that its type and value are the same across those + // devices. + // + // For example, if you specified "dra.example.com/numa" (a hypothetical example!), + // then only devices in the same NUMA node will be chosen. A device which + // does not have that attribute will not be chosen. All devices should + // use a value of the same type for this attribute because that is part of + // its specification, but if one device doesn't, then it also will not be + // chosen. // - // In addition, for each type NamedResourcesin AttributeValue there is a map that - // resolves to the corresponding value of the instance under evaluation. - // For example: + // Must include the domain qualifier. // - // attributes.quantity["a"].isGreaterThan(quantity("0")) && - // attributes.stringslice["b"].isSorted() - optional string selector = 1; + // +optional + optional string matchAttribute = 2; } -// NamedResourcesResources is used in ResourceModel. -message NamedResourcesResources { - // The list of all individual resources instances currently available. +// DeviceRequest is a request for devices required for a claim. +// This is typically a request for a single resource like a device, but can +// also ask for several identical devices. +// +// A DeviceClassName is currently required. Clients must check that it is +// indeed set. It's absence indicates that something changed in a way that +// is not supported by the client yet, in which case it must refuse to +// handle the request. +message DeviceRequest { + // Name can be used to reference this request in a pod.spec.containers[].resources.claims + // entry and in a constraint of the claim. + // + // Must be a DNS label. + // + // +required + optional string name = 1; + + // DeviceClassName references a specific DeviceClass, which can define + // additional configuration and selectors to be inherited by this + // request. + // + // A class is required. Which classes are available depends on the cluster. + // + // Administrators may use this to restrict which devices may get + // requested by only installing classes with selectors for permitted + // devices. If users are free to request anything without restrictions, + // then administrators can create an empty DeviceClass for users + // to reference. // + // +required + optional string deviceClassName = 2; + + // Selectors define criteria which must be satisfied by a specific + // device in order for that device to be considered for this + // request. All selectors must be satisfied for a device to be + // considered. + // + // +optional // +listType=atomic - repeated NamedResourcesInstance instances = 1; + repeated DeviceSelector selectors = 3; + + // CountMode and its related fields define how many devices are needed + // to satisfy this request. Supported values are: + // + // - Exact: This request is for a specific number of devices. + // This is the default. The exact number is provided in the + // count field. + // + // - All: This request is for all of the matching devices in a pool. + // Allocation will fail if some devices are already allocated, + // unless adminAccess is requested. + // + // If countMode is not specified, the default countMode is Exact. If + // countMode is Exact and count is not specified, the default count is + // one. Any other requests must specify this field. + // + // More modes may get added in the future. Clients must refuse to handle + // requests with unknown modes. + // + // +optional + optional string countMode = 4; + + // Count is used only when the count mode is "Exact". Must be greater than zero. + // If CountMode is Exact and this field is not specified, the default is one. + // + // +optional + optional int64 count = 5; + + // AdminAccess indicates that this is a claim for administrative access + // to the device(s). Claims with AdminAccess are expected to be used for + // monitoring or other management services for a device. They ignore + // all ordinary claims to the device with respect to access modes and + // any resource allocations. + // + // +optional + // +default=false + optional bool adminAccess = 6; } -// NamedResourcesStringSlice contains a slice of strings. -message NamedResourcesStringSlice { - // Strings is the slice of strings. +// DeviceRequestAllocationResult contains the allocation result for one request. +message DeviceRequestAllocationResult { + // Request is the name of the request in the claim which caused this + // device to be allocated. Multiple devices may have been allocated + // per request. // - // +listType=atomic - repeated string strings = 1; + // +required + optional string request = 1; + + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + optional string driver = 2; + + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). + // + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + optional string pool = 3; + + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. + // + // +required + optional string device = 4; +} + +// DeviceSelector must have exactly one field set. +message DeviceSelector { + // CEL contains a CEL expression for selecting a device. + // + // +required + optional CELDeviceSelector cel = 1; +} + +// OpaqueDeviceConfiguration contains configuration parameters for a driver +// in a format defined by the driver vendor. +message OpaqueDeviceConfiguration { + // Driver is used to determine which kubelet plugin needs + // to be passed these configuration parameters. + // + // An admission policy provided by the driver developer could use this + // to decide whether it needs to validate them. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + optional string driver = 1; + + // Parameters can contain arbitrary data. It is the responsibility of + // the driver developer to handle validation and versioning. Typically this + // includes self-identification and a version ("kind" + "apiVersion" for + // Kubernetes types), with conversion between different versions. + // + // +required + optional .k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2; } // PodSchedulingContext objects hold information that is needed to schedule // a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation // mode. // -// This is an alpha type and requires enabling the DynamicResourceAllocation +// This is an alpha type and requires enabling the DRAControlPlaneController // feature gate. message PodSchedulingContext { // Standard object metadata @@ -218,6 +523,7 @@ message PodSchedulingContext { optional PodSchedulingContextSpec spec = 2; // Status describes where resources for the Pod can be allocated. + // // +optional optional PodSchedulingContextStatus status = 3; } @@ -237,6 +543,7 @@ message PodSchedulingContextSpec { // SelectedNode is the node for which allocation of ResourceClaims that // are referenced by the Pod and that use "WaitForFirstConsumer" // allocation is to be attempted. + // // +optional optional string selectedNode = 1; @@ -247,8 +554,8 @@ message PodSchedulingContextSpec { // that suits all pending resources. This may get increased in the // future, but not reduced. // - // +listType=atomic // +optional + // +listType=atomic repeated string potentialNodes = 2; } @@ -264,9 +571,11 @@ message PodSchedulingContextStatus { repeated ResourceClaimSchedulingStatus resourceClaims = 1; } -// ResourceClaim describes which resources are needed by a resource consumer. -// Its status tracks whether the resource has been allocated and what the -// resulting attributes are. +// ResourceClaim describes a request for access to resources in the cluster, +// for use by workloads. For example, if a workload needs an accelerator device +// with specific properties, this is how that request is expressed. The status +// stanza tracks whether this claim has been satisfied and what specific +// resources have been allocated. // // This is an alpha type and requires enabling the DynamicResourceAllocation // feature gate. @@ -275,13 +584,11 @@ message ResourceClaim { // +optional optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Spec describes the desired attributes of a resource that then needs - // to be allocated. It can only be set once when creating the - // ResourceClaim. + // Spec describes what is being requested and how to configure it. + // The spec is immutable. optional ResourceClaimSpec spec = 2; - // Status describes whether the resource is available and with which - // attributes. + // Status describes whether the claim is ready to use and what has been allocated. // +optional optional ResourceClaimStatus status = 3; } @@ -297,12 +604,15 @@ message ResourceClaimConsumerReference { optional string apiGroup = 1; // Resource is the type of resource being referenced, for example "pods". + // +required optional string resource = 3; // Name is the name of resource being referenced. + // +required optional string name = 4; // UID identifies exactly one incarnation of the resource. + // +required optional string uid = 5; } @@ -316,63 +626,12 @@ message ResourceClaimList { repeated ResourceClaim items = 2; } -// ResourceClaimParameters defines resource requests for a ResourceClaim in an -// in-tree format understood by Kubernetes. -message ResourceClaimParameters { - // Standard object metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // 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. - // +optional - optional ResourceClaimParametersReference generatedFrom = 2; - - // DriverRequests describes all resources that are needed for the - // allocated claim. A single claim may use resources coming from - // different drivers. For each driver, this array has at most one - // entry which then may have one or more per-driver requests. - // - // May be empty, in which case the claim can always be allocated. - // - // +listType=atomic - repeated DriverRequests driverRequests = 4; -} - -// ResourceClaimParametersList is a collection of ResourceClaimParameters. -message ResourceClaimParametersList { - // Standard list metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of node resource capacity objects. - repeated ResourceClaimParameters items = 2; -} - -// ResourceClaimParametersReference contains enough information to let you -// locate the parameters for a ResourceClaim. The object must be in the same -// namespace as the ResourceClaim. -message ResourceClaimParametersReference { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - optional string apiGroup = 1; - - // Kind is the type of resource being referenced. This is the same - // value as in the parameter object's metadata, for example "ConfigMap". - optional string kind = 2; - - // Name is the name of resource being referenced. - optional string name = 3; -} - // ResourceClaimSchedulingStatus contains information about one particular // ResourceClaim with "WaitForFirstConsumer" allocation mode. message ResourceClaimSchedulingStatus { // Name matches the pod.spec.resourceClaims[*].Name field. - // +optional + // + // +required optional string name = 1; // UnsuitableNodes lists nodes that the ResourceClaim cannot be @@ -382,68 +641,85 @@ message ResourceClaimSchedulingStatus { // PodSchedulingSpec.PotentialNodes. This may get increased in the // future, but not reduced. // - // +listType=atomic // +optional + // +listType=atomic repeated string unsuitableNodes = 2; } -// ResourceClaimSpec defines how a resource is to be allocated. +// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. message ResourceClaimSpec { - // ResourceClassName references the driver and additional parameters - // via the name of a ResourceClass that was created as part of the - // driver deployment. - optional string resourceClassName = 1; + // Devices defines how to request devices. + // + // +optional + optional DeviceClaim devices = 1; - // ParametersRef references a separate object with arbitrary parameters - // that will be used by the driver when allocating a resource for the - // claim. + // Controller is the name of the DRA driver that is meant + // to handle allocation of this claim. If empty, allocation is handled + // by the scheduler while scheduling a pod. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. // - // The object must be in the same namespace as the ResourceClaim. // +optional - optional ResourceClaimParametersReference parametersRef = 2; + optional string controller = 2; } // ResourceClaimStatus tracks whether the resource has been allocated and what -// the resulting attributes are. +// the result of that was. message ResourceClaimStatus { - // DriverName is a copy of the driver name from the ResourceClass at - // the time when allocation started. - // +optional - optional string driverName = 1; - - // 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. + // Allocation is set once the claim has been allocated successfully. + // // +optional - optional AllocationResult allocation = 2; + optional AllocationResult allocation = 1; // ReservedFor indicates which entities are currently allowed to use // the claim. A Pod which references a ResourceClaim which is not - // reserved for that Pod will not be started. + // reserved for that Pod will not be started. A claim that is in + // use or might be in use because it has been reserved must not get + // deallocated. + // + // In a cluster with multiple scheduler instances, two pods might get + // scheduled concurrently by different schedulers. When they reference + // the same ResourceClaim which already has reached its maximum number + // of consumers, only one pod can be scheduled. + // + // Both schedulers try to add their pod to the claim.status.reservedFor + // field, but only the update that reaches the API server first gets + // stored. The other one fails with an error and the scheduler + // which issued it knows that it must put the pod back into the queue, + // waiting for the ResourceClaim to become usable again. // // There can be at most 32 such reservations. This may get increased in // the future, but not reduced. // + // +optional // +listType=map // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid - // +optional - repeated ResourceClaimConsumerReference reservedFor = 3; + repeated ResourceClaimConsumerReference reservedFor = 2; - // DeallocationRequested indicates that a ResourceClaim is to be - // deallocated. + // Indicates that a claim is to be deallocated. While this is set, + // no new consumers may be added to ReservedFor. // - // The driver then must deallocate this claim and reset the field + // This is only used if the claim needs to be deallocated by a DRA driver. + // That driver then must deallocate this claim and reset the field // together with clearing the Allocation field. // - // While DeallocationRequested is set, no new consumers may be added to - // ReservedFor. + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. + // // +optional - optional bool deallocationRequested = 4; + optional bool deallocationRequested = 3; } // ResourceClaimTemplate is used to produce ResourceClaim objects. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. message ResourceClaimTemplate { // Standard object metadata // +optional @@ -481,254 +757,144 @@ message ResourceClaimTemplateSpec { optional ResourceClaimSpec spec = 2; } -// ResourceClass is used by administrators to influence how resources -// are allocated. -// -// This is an alpha type and requires enabling the DynamicResourceAllocation -// feature gate. -message ResourceClass { - // Standard object metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // DriverName defines the name of the dynamic resource driver that is - // used for allocation of a ResourceClaim that uses this class. - // - // Resource drivers have a unique name in forward domain order - // (acme.example.com). - optional string driverName = 2; - - // 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. - // +optional - optional ResourceClassParametersReference parametersRef = 3; - - // Only nodes matching the selector will be considered by the scheduler - // when trying to find a Node that fits a Pod when that Pod uses - // a ResourceClaim that has not been allocated yet. - // - // Setting this field is optional. If null, all nodes are candidates. - // +optional - optional .k8s.io.api.core.v1.NodeSelector suitableNodes = 4; - - // If and only if allocation of claims using this class is handled - // via structured parameters, then StructuredParameters must be set to true. - // +optional - optional bool structuredParameters = 5; -} - -// ResourceClassList is a collection of classes. -message ResourceClassList { - // Standard list metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of resource classes. - repeated ResourceClass items = 2; -} - -// ResourceClassParameters defines resource requests for a ResourceClass in an -// in-tree format understood by Kubernetes. -message ResourceClassParameters { - // Standard object metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // 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. - // +optional - optional ResourceClassParametersReference generatedFrom = 2; - - // VendorParameters are arbitrary setup parameters for all claims using - // this class. They are ignored while allocating the claim. There must - // not be more than one entry per driver. - // - // +listType=atomic - // +optional - repeated VendorParameters vendorParameters = 3; - - // Filters describes additional contraints that must be met when using the class. - // - // +listType=atomic - repeated ResourceFilter filters = 4; -} - -// ResourceClassParametersList is a collection of ResourceClassParameters. -message ResourceClassParametersList { - // Standard list metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of node resource capacity objects. - repeated ResourceClassParameters items = 2; -} - -// ResourceClassParametersReference contains enough information to let you -// locate the parameters for a ResourceClass. -message ResourceClassParametersReference { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - optional string apiGroup = 1; - - // Kind is the type of resource being referenced. This is the same - // value as in the parameter object's metadata. - optional string kind = 2; - - // Name is the name of resource being referenced. - optional string name = 3; - - // Namespace that contains the referenced resource. Must be empty - // for cluster-scoped resources and non-empty for namespaced - // resources. - // +optional - optional string namespace = 4; -} - -// ResourceFilter is a filter for resources from one particular driver. -message ResourceFilter { - // DriverName is the name used by the DRA driver kubelet plugin. - optional string driverName = 1; - - optional ResourceFilterModel resourceFilterModel = 2; -} - -// ResourceFilterModel must have one and only one field set. -message ResourceFilterModel { - // NamedResources describes a resource filter using the named resources model. +// ResourcePool describes the pool that ResourceSlices belong to. +message ResourcePool { + // Name is used to identify the pool. For node-local devices, this + // is often the node name, but this is not required. // - // +optional - optional NamedResourcesFilter namedResources = 1; -} - -// ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. -message ResourceHandle { - // DriverName specifies the name of the resource driver whose kubelet - // plugin should be invoked to process this ResourceHandle's data once it - // lands on a node. This may differ from the DriverName set in - // ResourceClaimStatus this ResourceHandle is embedded in. - optional string driverName = 1; - - // Data contains the opaque data associated with this ResourceHandle. It is - // set by the controller component of the resource driver whose name - // matches the DriverName set in the ResourceClaimStatus this - // ResourceHandle is embedded in. It is set at allocation time and is - // intended for processing by the kubelet plugin whose name matches - // the DriverName set in this ResourceHandle. + // It must not be longer than 253 characters and must consist of one or more DNS sub-domains + // separated by slashes. // - // The maximum size of this field is 16KiB. This may get increased in the - // future, but not reduced. - // +optional - optional string data = 2; + // +required + optional string name = 1; - // If StructuredData is set, then it needs to be used instead of Data. + // Generation tracks the change in a pool over time. Whenever a driver + // changes something about one or more of the resources in a pool, it + // must change the generation in all ResourceSlices which are part of + // that pool. Consumers of ResourceSlices should only consider + // resources from the pool with the highest generation number. The + // generation may be reset by drivers, which should be fine for + // consumers, assuming that all ResourceSlices in a pool are updated to + // match or deleted. // - // +optional - optional StructuredResourceHandle structuredData = 5; -} - -// ResourceModel must have one and only one field set. -message ResourceModel { - // NamedResources describes available resources using the named resources model. + // Combined with ResourceSliceCount, this mechanism enables consumers to + // detect pools which are comprised of multiple ResourceSlices and are + // in an incomplete state. // - // +optional - optional NamedResourcesResources namedResources = 1; -} + // +required + optional int64 generation = 2; -// ResourceRequest is a request for resources from one particular driver. -message ResourceRequest { - // VendorParameters are arbitrary setup parameters for the requested - // resource. They are ignored while allocating a claim. + // ResourceSliceCount is the total number of ResourceSlices in the pool at this + // generation number. Must be higher than zero. // - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension vendorParameters = 1; - - optional ResourceRequestModel resourceRequestModel = 2; -} - -// ResourceRequestModel must have one and only one field set. -message ResourceRequestModel { - // NamedResources describes a request for resources with the named resources model. + // Consumers can use this to check whether they have seen all ResourceSlices + // belonging to the same pool. // - // +optional - optional NamedResourcesRequest namedResources = 1; + // +required + optional int64 resourceSliceCount = 3; } -// ResourceSlice provides information about available -// resources on individual nodes. +// ResourceSlice represents one or more resources in a pool of similar resources, +// managed by a given driver. A pool may span more than one ResourceSlice, and exactly how many +// ResourceSlices comprise a pool is determined by the driver. +// +// At the moment, the only supported resources are devices with attributes and capacities. +// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. +// The ResourceSlice in which a device gets published may change over time. The unique identifier +// for a device is the tuple , , . +// +// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number +// and updates all ResourceSlices with that new number and new resource definitions. A consumer +// must only use ResourceSlices with the highest generation number and ignore all others. +// +// When allocating all resources in a pool matching certain criteria or when +// looking for the best solution among several different alternatives, a +// consumer should check the number of ResourceSlices in a pool (included in +// each ResourceSlice) to determine whether its view of a pool is complete and +// if not, should wait until the driver has completed updating the pool. +// +// For resources that are not local to a node, the node name is not set. Instead, +// the driver may use a node selector to specify where the devices are available. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. message ResourceSlice { // Standard object metadata // +optional optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // NodeName identifies the node which provides the resources - // if they are local to a node. + // Contains the information published by the driver. // - // A field selector can be used to list only ResourceSlice - // objects with a certain node name. - // - // +optional - optional string nodeName = 2; - - // DriverName identifies the DRA driver providing the capacity information. - // A field selector can be used to list only ResourceSlice - // objects with a certain driver name. - optional string driverName = 3; - - optional ResourceModel resourceModel = 4; + // Changing the spec automatically increments the metadata.generation number. + optional ResourceSliceSpec spec = 2; } // ResourceSliceList is a collection of ResourceSlices. message ResourceSliceList { // Standard list metadata // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta listMeta = 1; - // Items is the list of node resource capacity objects. + // Items is the list of resource ResourceSlices. repeated ResourceSlice items = 2; } -// StructuredResourceHandle is the in-tree representation of the allocation result. -message StructuredResourceHandle { - // VendorClassParameters are the per-claim configuration parameters - // from the resource class at the time that the claim was allocated. +// ResourceSliceSpec contains the information published by the driver in one ResourceSlice. +message ResourceSliceSpec { + // Driver identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. // - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension vendorClassParameters = 1; + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. This field is immutable. + // + // +required + optional string driver = 1; - // VendorClaimParameters are the per-claim configuration parameters - // from the resource claim parameters at the time that the claim was - // allocated. + // Pool describes the pool that this ResourceSlice belongs to. + // This field is immutable. // - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension vendorClaimParameters = 2; + // +required + optional ResourcePool pool = 2; - // NodeName is the name of the node providing the necessary resources - // if the resources are local to a node. + // NodeName identifies the node which provides the resources in this pool. + // A field selector can be used to list only ResourceSlice + // objects belonging to a certain node. + // + // This field can be used to limit access from nodes to ResourceSlices with + // the same node name. It also indicates to autoscalers that adding + // new nodes of the same type as some old node might also make new + // resources available. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // This field is immutable. // // +optional - optional string nodeName = 4; + // +oneOf=NodeSelection + optional string nodeName = 3; - // Results lists all allocated driver resources. + // NodeSelector defines which nodes have access to the resources in the pool. // - // +listType=atomic - repeated DriverAllocationResult results = 5; -} + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + optional .k8s.io.api.core.v1.NodeSelector nodeSelector = 4; -// VendorParameters are opaque parameters for one particular driver. -message VendorParameters { - // DriverName is the name used by the DRA driver kubelet plugin. - optional string driverName = 1; + // AllNodes indicates that all nodes have access to the resources in the pool. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + optional bool allNodes = 5; - // Parameters can be arbitrary setup parameters. They are ignored while - // allocating a claim. + // Devices lists some or all of the devices in this pool. + // + // Must not have more than 128 entries. // // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension parameters = 2; + // +listType=atomic + repeated Device devices = 6; } diff --git a/staging/src/k8s.io/api/resource/v1alpha3/namedresources.go b/staging/src/k8s.io/api/resource/v1alpha3/namedresources.go deleted file mode 100644 index 2ce0d3c9e9771..0000000000000 --- a/staging/src/k8s.io/api/resource/v1alpha3/namedresources.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2023 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha3 - -import ( - "k8s.io/apimachinery/pkg/api/resource" -) - -// NamedResourcesResources is used in ResourceModel. -type NamedResourcesResources struct { - // The list of all individual resources instances currently available. - // - // +listType=atomic - Instances []NamedResourcesInstance `json:"instances" protobuf:"bytes,1,name=instances"` -} - -// NamedResourcesInstance represents one individual hardware instance that can be selected based -// on its attributes. -type NamedResourcesInstance struct { - // Name is unique identifier among all resource instances managed by - // the driver on the node. It must be a DNS subdomain. - Name string `json:"name" protobuf:"bytes,1,name=name"` - - // Attributes defines the attributes of this resource instance. - // The name of each attribute must be unique. - // - // +listType=atomic - // +optional - Attributes []NamedResourcesAttribute `json:"attributes,omitempty" protobuf:"bytes,2,opt,name=attributes"` -} - -// NamedResourcesAttribute is a combination of an attribute name and its value. -type NamedResourcesAttribute struct { - // Name is unique identifier among all resource instances managed by - // the driver on the node. It must be a DNS subdomain. - Name string `json:"name" protobuf:"bytes,1,name=name"` - - NamedResourcesAttributeValue `json:",inline" protobuf:"bytes,2,opt,name=attributeValue"` -} - -// The Go field names below have a Value suffix to avoid a conflict between the -// field "String" and the corresponding method. That method is required. -// The Kubernetes API is defined without that suffix to keep it more natural. - -// NamedResourcesAttributeValue must have one and only one field set. -type NamedResourcesAttributeValue struct { - // QuantityValue is a quantity. - QuantityValue *resource.Quantity `json:"quantity,omitempty" protobuf:"bytes,6,opt,name=quantity"` - // BoolValue is a true/false value. - BoolValue *bool `json:"bool,omitempty" protobuf:"bytes,2,opt,name=bool"` - // IntValue is a 64-bit integer. - IntValue *int64 `json:"int,omitempty" protobuf:"varint,7,opt,name=int"` - // IntSliceValue is an array of 64-bit integers. - IntSliceValue *NamedResourcesIntSlice `json:"intSlice,omitempty" protobuf:"varint,8,rep,name=intSlice"` - // StringValue is a string. - StringValue *string `json:"string,omitempty" protobuf:"bytes,5,opt,name=string"` - // StringSliceValue is an array of strings. - StringSliceValue *NamedResourcesStringSlice `json:"stringSlice,omitempty" protobuf:"bytes,9,rep,name=stringSlice"` - // VersionValue is a semantic version according to semver.org spec 2.0.0. - VersionValue *string `json:"version,omitempty" protobuf:"bytes,10,opt,name=version"` -} - -// NamedResourcesIntSlice contains a slice of 64-bit integers. -type NamedResourcesIntSlice struct { - // Ints is the slice of 64-bit integers. - // - // +listType=atomic - Ints []int64 `json:"ints" protobuf:"bytes,1,opt,name=ints"` -} - -// NamedResourcesStringSlice contains a slice of strings. -type NamedResourcesStringSlice struct { - // Strings is the slice of strings. - // - // +listType=atomic - Strings []string `json:"strings" protobuf:"bytes,1,opt,name=strings"` -} - -// NamedResourcesRequest is used in ResourceRequestModel. -type NamedResourcesRequest struct { - // Selector is a CEL expression which must evaluate to true if a - // resource instance is suitable. The language is as defined in - // https://kubernetes.io/docs/reference/using-api/cel/ - // - // In addition, for each type NamedResourcesin AttributeValue there is a map that - // resolves to the corresponding value of the instance under evaluation. - // For example: - // - // attributes.quantity["a"].isGreaterThan(quantity("0")) && - // attributes.stringslice["b"].isSorted() - Selector string `json:"selector" protobuf:"bytes,1,name=selector"` -} - -// NamedResourcesFilter is used in ResourceFilterModel. -type NamedResourcesFilter struct { - // Selector is a CEL expression which must evaluate to true if a - // resource instance is suitable. The language is as defined in - // https://kubernetes.io/docs/reference/using-api/cel/ - // - // In addition, for each type in NamedResourcesAttributeValue there is a map that - // resolves to the corresponding value of the instance under evaluation. - // For example: - // - // attributes.quantity["a"].isGreaterThan(quantity("0")) && - // attributes.stringslice["b"].isSorted() - Selector string `json:"selector" protobuf:"bytes,1,name=selector"` -} - -// NamedResourcesAllocationResult is used in AllocationResultModel. -type NamedResourcesAllocationResult struct { - // Name is the name of the selected resource instance. - Name string `json:"name" protobuf:"bytes,1,name=name"` -} diff --git a/staging/src/k8s.io/api/resource/v1alpha3/register.go b/staging/src/k8s.io/api/resource/v1alpha3/register.go index 36357daa389e9..daca14cec1572 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/register.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/register.go @@ -44,8 +44,8 @@ var ( // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, - &ResourceClass{}, - &ResourceClassList{}, + &DeviceClass{}, + &DeviceClassList{}, &ResourceClaim{}, &ResourceClaimList{}, &ResourceClaimTemplate{}, @@ -54,10 +54,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &PodSchedulingContextList{}, &ResourceSlice{}, &ResourceSliceList{}, - &ResourceClaimParameters{}, - &ResourceClaimParametersList{}, - &ResourceClassParameters{}, - &ResourceClassParametersList{}, ) // Add common types diff --git a/staging/src/k8s.io/api/resource/v1alpha3/types.go b/staging/src/k8s.io/api/resource/v1alpha3/types.go index bd161eb4ac106..29b17af8921d8 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/types.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/types.go @@ -18,9 +18,11 @@ package v1alpha3 import ( v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/validation" ) const ( @@ -28,16 +30,277 @@ const ( // which were allocated through a builtin controller. // Reserved for use by Kubernetes, DRA driver controllers must // use their own finalizer. - Finalizer = "dra.k8s.io/delete-protection" + Finalizer = "resource.kubernetes.io/delete-protection" ) +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.31 + +// ResourceSlice represents one or more resources in a pool of similar resources, +// managed by a given driver. A pool may span more than one ResourceSlice, and exactly how many +// ResourceSlices comprise a pool is determined by the driver. +// +// At the moment, the only supported resources are devices with attributes and capacities. +// Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. +// The ResourceSlice in which a device gets published may change over time. The unique identifier +// for a device is the tuple , , . +// +// Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number +// and updates all ResourceSlices with that new number and new resource definitions. A consumer +// must only use ResourceSlices with the highest generation number and ignore all others. +// +// When allocating all resources in a pool matching certain criteria or when +// looking for the best solution among several different alternatives, a +// consumer should check the number of ResourceSlices in a pool (included in +// each ResourceSlice) to determine whether its view of a pool is complete and +// if not, should wait until the driver has completed updating the pool. +// +// For resources that are not local to a node, the node name is not set. Instead, +// the driver may use a node selector to specify where the devices are available. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. +type ResourceSlice struct { + metav1.TypeMeta `json:",inline"` + // Standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Contains the information published by the driver. + // + // Changing the spec automatically increments the metadata.generation number. + Spec ResourceSliceSpec `json:"spec" protobuf:"bytes,2,name=spec"` +} + +const ( + // ResourceSliceSelectorNodeName can be used in a [metav1.ListOptions] + // field selector to filter based on [ResourceSliceSpec.NodeName]. + ResourceSliceSelectorNodeName = "spec.nodeName" + // ResourceSliceSelectorDriver can be used in a [metav1.ListOptions] + // field selector to filter based on [ResourceSliceSpec.Driver]. + ResourceSliceSelectorDriver = "spec.driver" +) + +// ResourceSliceSpec contains the information published by the driver in one ResourceSlice. +type ResourceSliceSpec struct { + // Driver identifies the DRA driver providing the capacity information. + // A field selector can be used to list only ResourceSlice + // objects with a certain driver name. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. This field is immutable. + // + // +required + Driver string `json:"driver" protobuf:"bytes,1,name=driver"` + + // Pool describes the pool that this ResourceSlice belongs to. + // This field is immutable. + // + // +required + Pool ResourcePool `json:"pool" protobuf:"bytes,2,name=pool"` + + // NodeName identifies the node which provides the resources in this pool. + // A field selector can be used to list only ResourceSlice + // objects belonging to a certain node. + // + // This field can be used to limit access from nodes to ResourceSlices with + // the same node name. It also indicates to autoscalers that adding + // new nodes of the same type as some old node might also make new + // resources available. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // This field is immutable. + // + // +optional + // +oneOf=NodeSelection + NodeName string `json:"nodeName,omitempty" protobuf:"bytes,3,opt,name=nodeName"` + + // NodeSelector defines which nodes have access to the resources in the pool. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,4,opt,name=nodeSelector"` + + // AllNodes indicates that all nodes have access to the resources in the pool. + // + // Exactly one of NodeName, NodeSelector and AllNodes must be set. + // + // +optional + // +oneOf=NodeSelection + AllNodes bool `json:"allNodes,omitempty" protobuf:"bytes,5,opt,name=allNodes"` + + // Devices lists some or all of the devices in this pool. + // + // Must not have more than 128 entries. + // + // +optional + // +listType=atomic + Devices []Device `json:"devices" protobuf:"bytes,6,name=devices"` +} + +// ResourcePool describes the pool that ResourceSlices belong to. +type ResourcePool struct { + // Name is used to identify the pool. For node-local devices, this + // is often the node name, but this is not required. + // + // It must not be longer than 253 characters and must consist of one or more DNS sub-domains + // separated by slashes. + // + // +required + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // Generation tracks the change in a pool over time. Whenever a driver + // changes something about one or more of the resources in a pool, it + // must change the generation in all ResourceSlices which are part of + // that pool. Consumers of ResourceSlices should only consider + // resources from the pool with the highest generation number. The + // generation may be reset by drivers, which should be fine for + // consumers, assuming that all ResourceSlices in a pool are updated to + // match or deleted. + // + // Combined with ResourceSliceCount, this mechanism enables consumers to + // detect pools which are comprised of multiple ResourceSlices and are + // in an incomplete state. + // + // +required + Generation int64 `json:"generation" protobuf:"bytes,2,name=generation"` + + // ResourceSliceCount is the total number of ResourceSlices in the pool at this + // generation number. Must be higher than zero. + // + // Consumers can use this to check whether they have seen all ResourceSlices + // belonging to the same pool. + // + // +required + ResourceSliceCount int64 `json:"resourceSliceCount" protobuf:"bytes,3,name=resourceSliceCount"` +} + +const ResourceSliceMaxSharedCapacity = 128 +const ResourceSliceMaxDevices = 128 +const PoolNameMaxLength = validation.DNS1123SubdomainMaxLength // Same as for a single node name. + +// Device represents one individual hardware instance that can be selected based +// on its attributes. Besides the name, exactly one field must be set. +type Device struct { + // Name is unique identifier among all devices managed by + // the driver in the pool. It must be a DNS label. + // + // +required + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // Basic defines one device instance using fields that are supported + // by all clients which support DRA. + // + // +optional + // +oneOf=deviceType + Basic *BasicDevice `json:"basic,omitempty" protobuf:"bytes,2,opt,name=basic"` +} + +// BasicDevice defines one device instance using fields that are supported +// by all clients which support DRA. +type BasicDevice struct { + // Attributes defines the set of attributes for this device. + // The name of each attribute must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + Attributes map[QualifiedName]DeviceAttribute `json:"attributes,omitempty" protobuf:"bytes,1,rep,name=attributes"` + + // Capacity defines the set of capacities for this device. + // The name of each capacity must be unique in that set. + // + // The maximum number of attributes and capacities combined is 32. + // + // +optional + Capacity map[QualifiedName]resource.Quantity `json:"capacity,omitempty" protobuf:"bytes,2,rep,name=capacity"` +} + +// Limit for the sum of the number of entries in both ResourceSlices. +const ResourceSliceMaxAttributesAndCapacitiesPerDevice = 32 + +// QualifiedName is the name of a device attribute or capacity. +// +// Attributes and capacities are defined either by the owner of the specific +// driver (usually the vendor) or by some 3rd party (e.g. the Kubernetes +// project). Because they are sometimes compared across devices, a given name +// is expected to mean the same thing and have the same type on all devices. +// +// Names must be either a C identifier (e.g. "theName") or a DNS subdomain +// followed by a slash ("/") followed by a C identifier +// (e.g. "dra.example.com/theName"). Names which do not include the +// domain prefix are assumed to be part of the driver's domain. Attributes +// or capacities defined by 3rd parties must include the domain prefix. +// +// The maximum length for the DNS subdomain is 63 characters (same as +// for driver names) and the maximum length of the C identifier +// is 32. +type QualifiedName string + +// FullyQualifiedName is a QualifiedName where the domain is set. +type FullyQualifiedName string + +// DeviceMaxIDLength is the maximum length of the identifier in a device attribute or capacity name (`/`). +const DeviceMaxIDLength = 32 + +// DeviceAttribute must have exactly one field set. +type DeviceAttribute struct { + // The Go field names below have a Value suffix to avoid a conflict between the + // field "String" and the corresponding method. That method is required. + // The Kubernetes API is defined without that suffix to keep it more natural. + + // IntValue is a number. + // + // +optional + IntValue *int64 `json:"int,omitempty" protobuf:"varint,2,opt,name=int"` + + // BoolValue is a true/false value. + // + // +optional + BoolValue *bool `json:"bool,omitempty" protobuf:"varint,3,opt,name=bool"` + + // StringValue is a string. Must not be longer than 64 characters. + // + // +optional + StringValue *string `json:"string,omitempty" protobuf:"bytes,4,opt,name=string"` + + // VersionValue is a semantic version according to semver.org spec 2.0.0. + // Must not be longer than 64 characters. + // + // +optional + VersionValue *string `json:"version,omitempty" protobuf:"bytes,5,opt,name=version"` +} + +// DeviceAttributeMaxValueLength is the maximum length of a string or version attribute value. +const DeviceAttributeMaxValueLength = 64 + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +k8s:prerelease-lifecycle-gen:introduced=1.31 + +// ResourceSliceList is a collection of ResourceSlices. +type ResourceSliceList struct { + metav1.TypeMeta `json:",inline"` + // Standard list metadata + // +optional + metav1.ListMeta `json:"listMeta" protobuf:"bytes,1,opt,name=listMeta"` + + // Items is the list of resource ResourceSlices. + Items []ResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"` +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 -// ResourceClaim describes which resources are needed by a resource consumer. -// Its status tracks whether the resource has been allocated and what the -// resulting attributes are. +// ResourceClaim describes a request for access to resources in the cluster, +// for use by workloads. For example, if a workload needs an accelerator device +// with specific properties, this is how that request is expressed. The status +// stanza tracks whether this claim has been satisfied and what specific +// resources have been allocated. // // This is an alpha type and requires enabling the DynamicResourceAllocation // feature gate. @@ -47,186 +310,483 @@ type ResourceClaim struct { // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Spec describes the desired attributes of a resource that then needs - // to be allocated. It can only be set once when creating the - // ResourceClaim. + // Spec describes what is being requested and how to configure it. + // The spec is immutable. Spec ResourceClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"` - // Status describes whether the resource is available and with which - // attributes. + // Status describes whether the claim is ready to use and what has been allocated. // +optional Status ResourceClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } -// ResourceClaimSpec defines how a resource is to be allocated. +// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. type ResourceClaimSpec struct { - // ResourceClassName references the driver and additional parameters - // via the name of a ResourceClass that was created as part of the - // driver deployment. - ResourceClassName string `json:"resourceClassName" protobuf:"bytes,1,name=resourceClassName"` + // Devices defines how to request devices. + // + // +optional + Devices DeviceClaim `json:"devices" protobuf:"bytes,1,name=devices"` - // ParametersRef references a separate object with arbitrary parameters - // that will be used by the driver when allocating a resource for the - // claim. + // Controller is the name of the DRA driver that is meant + // to handle allocation of this claim. If empty, allocation is handled + // by the scheduler while scheduling a pod. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. // - // The object must be in the same namespace as the ResourceClaim. // +optional - ParametersRef *ResourceClaimParametersReference `json:"parametersRef,omitempty" protobuf:"bytes,2,opt,name=parametersRef"` + Controller string `json:"controller,omitempty" protobuf:"bytes,2,opt,name=controller"` } -// ResourceClaimStatus tracks whether the resource has been allocated and what -// the resulting attributes are. -type ResourceClaimStatus struct { - // DriverName is a copy of the driver name from the ResourceClass at - // the time when allocation started. +// DeviceClaim defines how to request devices with a ResourceClaim. +type DeviceClaim struct { + // Requests represent individual requests for distinct devices which + // must all be satisfied. If empty, nothing needs to be allocated. + // + // +optional + // +listType=atomic + Requests []DeviceRequest `json:"requests" protobuf:"bytes,1,name=requests"` + + // These constraints must be satisfied by the set of devices that get + // allocated for the claim. + // + // +optional + // +listType=atomic + Constraints []DeviceConstraint `json:"constraints,omitempty" protobuf:"bytes,2,opt,name=constraints"` + + // This field holds configuration for multiple potential drivers which + // could satisfy requests in this claim. It is ignored while allocating + // the claim. + // + // +optional + // +listType=atomic + Config []DeviceClaimConfiguration `json:"config,omitempty" protobuf:"bytes,3,opt,name=config"` +} + +const ( + DeviceRequestsMaxSize = AllocationResultsMaxSize + DeviceConstraintsMaxSize = 32 + DeviceConfigMaxSize = 32 +) + +// DeviceRequest is a request for devices required for a claim. +// This is typically a request for a single resource like a device, but can +// also ask for several identical devices. +// +// A DeviceClassName is currently required. Clients must check that it is +// indeed set. It's absence indicates that something changed in a way that +// is not supported by the client yet, in which case it must refuse to +// handle the request. +type DeviceRequest struct { + // Name can be used to reference this request in a pod.spec.containers[].resources.claims + // entry and in a constraint of the claim. + // + // Must be a DNS label. + // + // +required + Name string `json:"name" protobuf:"bytes,1,name=name"` + + // DeviceClassName references a specific DeviceClass, which can define + // additional configuration and selectors to be inherited by this + // request. + // + // A class is required. Which classes are available depends on the cluster. + // + // Administrators may use this to restrict which devices may get + // requested by only installing classes with selectors for permitted + // devices. If users are free to request anything without restrictions, + // then administrators can create an empty DeviceClass for users + // to reference. + // + // +required + DeviceClassName string `json:"deviceClassName" protobuf:"bytes,2,name=deviceClassName"` + + // Selectors define criteria which must be satisfied by a specific + // device in order for that device to be considered for this + // request. All selectors must be satisfied for a device to be + // considered. + // + // +optional + // +listType=atomic + Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,3,name=selectors"` + + // CountMode and its related fields define how many devices are needed + // to satisfy this request. Supported values are: + // + // - Exact: This request is for a specific number of devices. + // This is the default. The exact number is provided in the + // count field. + // + // - All: This request is for all of the matching devices in a pool. + // Allocation will fail if some devices are already allocated, + // unless adminAccess is requested. + // + // If countMode is not specified, the default countMode is Exact. If + // countMode is Exact and count is not specified, the default count is + // one. Any other requests must specify this field. + // + // More modes may get added in the future. Clients must refuse to handle + // requests with unknown modes. + // + // +optional + CountMode DeviceCountMode `json:"countMode,omitempty" protobuf:"bytes,4,opt,name=countMode"` + + // Count is used only when the count mode is "Exact". Must be greater than zero. + // If CountMode is Exact and this field is not specified, the default is one. + // + // +optional + Count int64 `json:"count,omitempty" protobuf:"bytes,5,opt,name=count"` + + // AdminAccess indicates that this is a claim for administrative access + // to the device(s). Claims with AdminAccess are expected to be used for + // monitoring or other management services for a device. They ignore + // all ordinary claims to the device with respect to access modes and + // any resource allocations. + // + // +optional + // +default=false + AdminAccess bool `json:"adminAccess,omitempty" protobuf:"bytes,6,opt,name=adminAccess"` +} + +const ( + DeviceSelectorsMaxSize = 32 +) + +type DeviceCountMode string + +// Valid [DeviceRequest.CountMode] values. +const ( + DeviceCountModeExact = DeviceCountMode("Exact") + DeviceCountModeAll = DeviceCountMode("All") +) + +// DeviceSelector must have exactly one field set. +type DeviceSelector struct { + // CEL contains a CEL expression for selecting a device. + // + // +required + CEL *CELDeviceSelector `json:"cel,omitempty" protobuf:"bytes,1,opt,name=cel"` +} + +// CELDeviceSelector contains a CEL expression for selecting a device. +type CELDeviceSelector struct { + // Expression is a CEL expression which evaluates a single device. It + // must evaluate to true when the device under consideration satisfies + // the desired criteria, and false when it does not. Any other result + // is an error and causes allocation of devices to abort. + // + // The expression's input is an object named "device", which carries + // the following properties: + // - driver (string): the name of the driver which defines this device. + // - attributes (map[string]object): the device's attributes, grouped by prefix + // (e.g. device.attributes["dra.example.com"] evaluates to an object with all + // of the attributes which were prefixed by "dra.example.com". + // - capacity (map[string]object): the device's capacities, grouped by prefix. + // + // Example: Consider a device with driver="dra.example.com", which exposes + // two attributes named "model" and "ext.example.com/family" and which + // exposes one capacity named "modules". This input to this expression + // would have the following fields: + // + // device.driver + // device.attributes["dra.example.com"].model + // device.attributes["ext.example.com"].family + // device.capacity["dra.example.com"].modules + // + // The device.driver field can be used to check for a specific driver, + // either as a high-level precondition (i.e. you only want to consider + // devices from this driver) or as part of a multi-clause expression + // that is meant to consider devices from different drivers. + // + // The value type of each attribute is defined by the device + // definition, and users who write these expressions must consult the + // documentation for their specific drivers. The value type of each + // capacity is Quantity. + // + // If an unknown prefix is used as a lookup in either device.attributes + // or device.capacity, an empty map will be returned. Any reference to + // an unknown field will cause an evaluation error and allocation to + // abort. + // + // A robust expression should check for the existence of attributes + // before referencing them. + // + // For ease of use, the cel.bind() function is enabled, and can be used + // to simplify expressions that access multiple attributes with the + // same domain. For example: + // + // cel.bind(dra, device.attributes["dra.example.com"], dra.someBool && dra.anotherBool) + // + // +required + Expression string `json:"expression" protobuf:"bytes,1,name=expression"` +} + +// DeviceConstraint must have exactly one field set besides Requests. +type DeviceConstraint struct { + // Requests is a list of the one or more requests in this claim which + // must co-satisfy this constraint. If a request is fulfilled by + // multiple devices, then all of the devices must satisfy the + // constraint. If this is not specified, this constraint applies to all + // requests in this claim. + // + // +optional + // +listType=atomic + Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` + + // MatchAttribute requires that all devices in question have this + // attribute and that its type and value are the same across those + // devices. + // + // For example, if you specified "dra.example.com/numa" (a hypothetical example!), + // then only devices in the same NUMA node will be chosen. A device which + // does not have that attribute will not be chosen. All devices should + // use a value of the same type for this attribute because that is part of + // its specification, but if one device doesn't, then it also will not be + // chosen. + // + // Must include the domain qualifier. + // + // +optional + MatchAttribute *FullyQualifiedName `json:"matchAttribute,omitempty" protobuf:"bytes,2,opt,name=matchAttribute"` +} + +// DeviceClaimConfiguration is used for configuration parameters in DeviceClaim. +type DeviceClaimConfiguration struct { + // Requests lists the names of requests where the configuration applies. + // If empty, it applies to all requests. + // // +optional - DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` + // +listType=atomic + Requests []string `json:"requests,omitempty" protobuf:"bytes,1,opt,name=requests"` + + DeviceConfiguration `json:",inline" protobuf:"bytes,2,name=deviceConfiguration"` +} - // 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. +// DeviceConfiguration must have exactly one field set. It gets embedded +// inline in some other structs which have other fields, so field names must +// not conflict with those. +type DeviceConfiguration struct { + // Opaque provides driver-specific configuration parameters. + // // +optional - Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,2,opt,name=allocation"` + Opaque *OpaqueDeviceConfiguration `json:"opaque,omitempty" protobuf:"bytes,1,opt,name=opaque"` +} + +// OpaqueDeviceConfiguration contains configuration parameters for a driver +// in a format defined by the driver vendor. +type OpaqueDeviceConfiguration struct { + // Driver is used to determine which kubelet plugin needs + // to be passed these configuration parameters. + // + // An admission policy provided by the driver developer could use this + // to decide whether it needs to validate them. + // + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string `json:"driver" protobuf:"bytes,1,name=driver"` + + // Parameters can contain arbitrary data. It is the responsibility of + // the driver developer to handle validation and versioning. Typically this + // includes self-identification and a version ("kind" + "apiVersion" for + // Kubernetes types), with conversion between different versions. + // + // +required + Parameters runtime.RawExtension `json:"parameters" protobuf:"bytes,2,name=parameters"` +} + +// ResourceClaimStatus tracks whether the resource has been allocated and what +// the result of that was. +type ResourceClaimStatus struct { + // Allocation is set once the claim has been allocated successfully. + // + // +optional + Allocation *AllocationResult `json:"allocation,omitempty" protobuf:"bytes,1,opt,name=allocation"` // ReservedFor indicates which entities are currently allowed to use // the claim. A Pod which references a ResourceClaim which is not - // reserved for that Pod will not be started. + // reserved for that Pod will not be started. A claim that is in + // use or might be in use because it has been reserved must not get + // deallocated. + // + // In a cluster with multiple scheduler instances, two pods might get + // scheduled concurrently by different schedulers. When they reference + // the same ResourceClaim which already has reached its maximum number + // of consumers, only one pod can be scheduled. + // + // Both schedulers try to add their pod to the claim.status.reservedFor + // field, but only the update that reaches the API server first gets + // stored. The other one fails with an error and the scheduler + // which issued it knows that it must put the pod back into the queue, + // waiting for the ResourceClaim to become usable again. // // There can be at most 32 such reservations. This may get increased in // the future, but not reduced. // + // +optional // +listType=map // +listMapKey=uid // +patchStrategy=merge // +patchMergeKey=uid - // +optional - ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,3,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` + ReservedFor []ResourceClaimConsumerReference `json:"reservedFor,omitempty" protobuf:"bytes,2,opt,name=reservedFor" patchStrategy:"merge" patchMergeKey:"uid"` - // DeallocationRequested indicates that a ResourceClaim is to be - // deallocated. + // Indicates that a claim is to be deallocated. While this is set, + // no new consumers may be added to ReservedFor. // - // The driver then must deallocate this claim and reset the field + // This is only used if the claim needs to be deallocated by a DRA driver. + // That driver then must deallocate this claim and reset the field // together with clearing the Allocation field. // - // While DeallocationRequested is set, no new consumers may be added to - // ReservedFor. + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. + // // +optional - DeallocationRequested bool `json:"deallocationRequested,omitempty" protobuf:"varint,4,opt,name=deallocationRequested"` + DeallocationRequested bool `json:"deallocationRequested,omitempty" protobuf:"bytes,3,opt,name=deallocationRequested"` } // ReservedForMaxSize is the maximum number of entries in // claim.status.reservedFor. const ResourceClaimReservedForMaxSize = 32 +// ResourceClaimConsumerReference contains enough information to let you +// locate the consumer of a ResourceClaim. The user must be a resource in the same +// namespace as the ResourceClaim. +type ResourceClaimConsumerReference struct { + // APIGroup is the group for the resource being referenced. It is + // empty for the core API. This matches the group in the APIVersion + // that is used when creating the resources. + // +optional + APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"` + // Resource is the type of resource being referenced, for example "pods". + // +required + Resource string `json:"resource" protobuf:"bytes,3,name=resource"` + // Name is the name of resource being referenced. + // +required + Name string `json:"name" protobuf:"bytes,4,name=name"` + // UID identifies exactly one incarnation of the resource. + // +required + UID types.UID `json:"uid" protobuf:"bytes,5,name=uid"` +} + // AllocationResult contains attributes of an allocated resource. type AllocationResult struct { - // ResourceHandles contain the state associated with an allocation that - // should be maintained throughout the lifetime of a claim. Each - // ResourceHandle contains data that should be passed to a specific kubelet - // plugin once it lands on a node. This data is returned by the driver - // after a successful allocation and is opaque to Kubernetes. Driver - // documentation may explain to users how to interpret this data if needed. - // - // Setting this field is optional. It has a maximum size of 32 entries. - // If null (or empty), it is assumed this allocation will be processed by a - // single kubelet plugin with no ResourceHandle data attached. The name of - // the kubelet plugin invoked will match the DriverName set in the - // ResourceClaimStatus this AllocationResult is embedded in. + // Devices is the result of allocating devices. // - // +listType=atomic // +optional - ResourceHandles []ResourceHandle `json:"resourceHandles,omitempty" protobuf:"bytes,1,opt,name=resourceHandles"` + Devices DeviceAllocationResult `json:"devices,omitempty" protobuf:"bytes,1,opt,name=devices"` - // This field will get set by the resource driver after it has allocated - // the resource to inform the scheduler where it can schedule Pods using - // the ResourceClaim. + // NodeSelector defines where the allocated resources are available. If + // unset, they are available everywhere. // - // Setting this field is optional. If null, the resource is available - // everywhere. // +optional - AvailableOnNodes *v1.NodeSelector `json:"availableOnNodes,omitempty" protobuf:"bytes,2,opt,name=availableOnNodes"` -} + NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,3,opt,name=nodeSelector"` -// AllocationResultResourceHandlesMaxSize represents the maximum number of -// entries in allocation.resourceHandles. -const AllocationResultResourceHandlesMaxSize = 32 - -// ResourceHandle holds opaque resource data for processing by a specific kubelet plugin. -type ResourceHandle struct { - // DriverName specifies the name of the resource driver whose kubelet - // plugin should be invoked to process this ResourceHandle's data once it - // lands on a node. This may differ from the DriverName set in - // ResourceClaimStatus this ResourceHandle is embedded in. - DriverName string `json:"driverName" protobuf:"bytes,1,name=driverName"` + // Controller is the name of the DRA driver which handled the + // allocation. That driver is also responsible for deallocating the + // claim. It is empty when the claim can be deallocated without + // involving a driver. + // + // A driver may allocate devices provided by other drivers, so this + // driver name here can be different from the driver names listed for + // the results. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. + // + // +optional + Controller string `json:"controller,omitempty" protobuf:"bytes,4,opt,name=controller"` +} - // Data contains the opaque data associated with this ResourceHandle. It is - // set by the controller component of the resource driver whose name - // matches the DriverName set in the ResourceClaimStatus this - // ResourceHandle is embedded in. It is set at allocation time and is - // intended for processing by the kubelet plugin whose name matches - // the DriverName set in this ResourceHandle. +// DeviceAllocationResult is the result of allocating devices. +type DeviceAllocationResult struct { + // Results lists all allocated devices. // - // The maximum size of this field is 16KiB. This may get increased in the - // future, but not reduced. // +optional - Data string `json:"data,omitempty" protobuf:"bytes,2,opt,name=data"` + // +listType=atomic + Results []DeviceRequestAllocationResult `json:"results,omitempty" protobuf:"bytes,1,opt,name=results"` - // If StructuredData is set, then it needs to be used instead of Data. + // This field is a combination of all the claim and class configuration parameters. + // Drivers can distinguish between those based on a flag. + // + // This includes configuration parameters for drivers which have no allocated + // devices in the result because it is up to the drivers which configuration + // parameters they support. They can silently ignore unknown configuration + // parameters. // // +optional - StructuredData *StructuredResourceHandle `json:"structuredData,omitempty" protobuf:"bytes,5,opt,name=structuredData"` + // +listType=atomic + Config []DeviceAllocationConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` } -// ResourceHandleDataMaxSize represents the maximum size of resourceHandle.data. -const ResourceHandleDataMaxSize = 16 * 1024 +// AllocationResultsMaxSize represents the maximum number of +// entries in allocation.devices.results. +const AllocationResultsMaxSize = 32 -// StructuredResourceHandle is the in-tree representation of the allocation result. -type StructuredResourceHandle struct { - // VendorClassParameters are the per-claim configuration parameters - // from the resource class at the time that the claim was allocated. +// DeviceRequestAllocationResult contains the allocation result for one request. +type DeviceRequestAllocationResult struct { + // Request is the name of the request in the claim which caused this + // device to be allocated. Multiple devices may have been allocated + // per request. // - // +optional - VendorClassParameters runtime.RawExtension `json:"vendorClassParameters,omitempty" protobuf:"bytes,1,opt,name=vendorClassParameters"` + // +required + Request string `json:"request" protobuf:"bytes,1,name=request"` - // VendorClaimParameters are the per-claim configuration parameters - // from the resource claim parameters at the time that the claim was - // allocated. + // Driver specifies the name of the DRA driver whose kubelet + // plugin should be invoked to process the allocation once the claim is + // needed on a node. // - // +optional - VendorClaimParameters runtime.RawExtension `json:"vendorClaimParameters,omitempty" protobuf:"bytes,2,opt,name=vendorClaimParameters"` + // Must be a DNS subdomain and should end with a DNS domain owned by the + // vendor of the driver. + // + // +required + Driver string `json:"driver" protobuf:"bytes,2,name=driver"` - // NodeName is the name of the node providing the necessary resources - // if the resources are local to a node. + // This name together with the driver name and the device name field + // identify which device was allocated (`//`). // - // +optional - NodeName string `json:"nodeName,omitempty" protobuf:"bytes,4,name=nodeName"` + // Must not be longer than 253 characters and may contain one or more + // DNS sub-domains separated by slashes. + // + // +required + Pool string `json:"pool" protobuf:"bytes,3,name=pool"` - // Results lists all allocated driver resources. + // Device references one device instance via its name in the driver's + // resource pool. It must be a DNS label. // - // +listType=atomic - Results []DriverAllocationResult `json:"results" protobuf:"bytes,5,name=results"` + // +required + Device string `json:"device" protobuf:"bytes,4,name=device"` } -// DriverAllocationResult contains vendor parameters and the allocation result for -// one request. -type DriverAllocationResult struct { - // VendorRequestParameters are the per-request configuration parameters - // from the time that the claim was allocated. +// DeviceAllocationConfiguration gets embedded in an AllocationResult. +type DeviceAllocationConfiguration struct { + // Source records whether the configuration comes from a class and thus + // is not something that a normal user would have been able to set + // or from a claim. // - // +optional - VendorRequestParameters runtime.RawExtension `json:"vendorRequestParameters,omitempty" protobuf:"bytes,1,opt,name=vendorRequestParameters"` - - AllocationResultModel `json:",inline" protobuf:"bytes,2,name=allocationResultModel"` -} + // +required + Source AllocationConfigSource `json:"source" protobuf:"bytes,1,name=source"` -// AllocationResultModel must have one and only one field set. -type AllocationResultModel struct { - // NamedResources describes the allocation result when using the named resources model. + // Requests lists the names of requests where the configuration applies. + // If empty, its applies to all requests. // // +optional - NamedResources *NamedResourcesAllocationResult `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` + // +listType=atomic + Requests []string `json:"requests,omitempty" protobuf:"bytes,2,opt,name=requests"` + + DeviceConfiguration `json:",inline" protobuf:"bytes,3,name=deviceConfiguration"` } +type AllocationConfigSource string + +// Valid [DeviceAllocationConfiguration.Source] values. +const ( + AllocationConfigSourceClass = "FromClass" + AllocationConfigSourceClaim = "FromClaim" +) + // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 @@ -249,7 +809,7 @@ type ResourceClaimList struct { // a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation // mode. // -// This is an alpha type and requires enabling the DynamicResourceAllocation +// This is an alpha type and requires enabling the DRAControlPlaneController // feature gate. type PodSchedulingContext struct { metav1.TypeMeta `json:",inline"` @@ -261,6 +821,7 @@ type PodSchedulingContext struct { Spec PodSchedulingContextSpec `json:"spec" protobuf:"bytes,2,name=spec"` // Status describes where resources for the Pod can be allocated. + // // +optional Status PodSchedulingContextStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -270,6 +831,7 @@ type PodSchedulingContextSpec struct { // SelectedNode is the node for which allocation of ResourceClaims that // are referenced by the Pod and that use "WaitForFirstConsumer" // allocation is to be attempted. + // // +optional SelectedNode string `json:"selectedNode,omitempty" protobuf:"bytes,1,opt,name=selectedNode"` @@ -280,8 +842,8 @@ type PodSchedulingContextSpec struct { // that suits all pending resources. This may get increased in the // future, but not reduced. // - // +listType=atomic // +optional + // +listType=atomic PotentialNodes []string `json:"potentialNodes,omitempty" protobuf:"bytes,2,opt,name=potentialNodes"` } @@ -305,8 +867,9 @@ type PodSchedulingContextStatus struct { // ResourceClaim with "WaitForFirstConsumer" allocation mode. type ResourceClaimSchedulingStatus struct { // Name matches the pod.spec.resourceClaims[*].Name field. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` + // + // +required + Name string `json:"name" protobuf:"bytes,1,name=name"` // UnsuitableNodes lists nodes that the ResourceClaim cannot be // allocated for. @@ -315,8 +878,8 @@ type ResourceClaimSchedulingStatus struct { // PodSchedulingSpec.PotentialNodes. This may get increased in the // future, but not reduced. // - // +listType=atomic // +optional + // +listType=atomic UnsuitableNodes []string `json:"unsuitableNodes,omitempty" protobuf:"bytes,2,opt,name=unsuitableNodes"` } @@ -342,113 +905,84 @@ type PodSchedulingContextList struct { // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.26 +// +k8s:prerelease-lifecycle-gen:introduced=1.31 -// ResourceClass is used by administrators to influence how resources -// are allocated. +// DeviceClass is a vendor or admin-provided resource that contains +// device configuration and selectors. It can be referenced in +// the device requests of a claim to apply these presets. +// Cluster scoped. // // This is an alpha type and requires enabling the DynamicResourceAllocation // feature gate. -type ResourceClass struct { +type DeviceClass struct { metav1.TypeMeta `json:",inline"` // Standard object metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // DriverName defines the name of the dynamic resource driver that is - // used for allocation of a ResourceClaim that uses this class. + // Spec defines what can be allocated and how to configure it. + // + // This is mutable. Consumers have to be prepared for classes changing + // at any time, either because they get updated or replaced. Claim + // allocations are done once based on whatever was set in classes at + // the time of allocation. + // + // Changing the spec automatically increments the metadata.generation number. + Spec DeviceClassSpec `json:"spec" protobuf:"bytes,2,name=spec"` +} + +// DeviceClassSpec is used in a [DeviceClass] to define what can be allocated +// and how to configure it. +type DeviceClassSpec struct { + // Each selector must be satisfied by a device which is claimed via this class. // - // Resource drivers have a unique name in forward domain order - // (acme.example.com). - DriverName string `json:"driverName" protobuf:"bytes,2,name=driverName"` + // +optional + // +listType=atomic + Selectors []DeviceSelector `json:"selectors,omitempty" protobuf:"bytes,1,opt,name=selectors"` - // 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. + // Config defines configuration parameters that apply to each device that is claimed via this class. + // Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor + // configuration applies to exactly one driver. + // + // They are passed to the driver, but are not considered while allocating the claim. + // // +optional - ParametersRef *ResourceClassParametersReference `json:"parametersRef,omitempty" protobuf:"bytes,3,opt,name=parametersRef"` + // +listType=atomic + Config []DeviceClassConfiguration `json:"config,omitempty" protobuf:"bytes,2,opt,name=config"` // Only nodes matching the selector will be considered by the scheduler // when trying to find a Node that fits a Pod when that Pod uses - // a ResourceClaim that has not been allocated yet. + // a claim that has not been allocated yet *and* that claim + // gets allocated through a control plane controller. It is ignored + // when the claim does not use a control plane controller + // for allocation. + // + // Setting this field is optional. If unset, all Nodes are candidates. + // + // This is an alpha field and requires enabling the DRAControlPlaneController + // feature gate. // - // Setting this field is optional. If null, all nodes are candidates. // +optional - SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,4,opt,name=suitableNodes"` + SuitableNodes *v1.NodeSelector `json:"suitableNodes,omitempty" protobuf:"bytes,3,opt,name=suitableNodes"` +} - // If and only if allocation of claims using this class is handled - // via structured parameters, then StructuredParameters must be set to true. - // +optional - StructuredParameters *bool `json:"structuredParameters,omitempty" protobuf:"bytes,5,opt,name=structuredParameters"` +// DeviceClassConfiguration is used in DeviceClass. +type DeviceClassConfiguration struct { + DeviceConfiguration `json:",inline" protobuf:"bytes,1,opt,name=deviceConfiguration"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 -// ResourceClassList is a collection of classes. -type ResourceClassList struct { +// DeviceClassList is a collection of classes. +type DeviceClassList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of resource classes. - Items []ResourceClass `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// ResourceClassParametersReference contains enough information to let you -// locate the parameters for a ResourceClass. -type ResourceClassParametersReference struct { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"` - // Kind is the type of resource being referenced. This is the same - // value as in the parameter object's metadata. - Kind string `json:"kind" protobuf:"bytes,2,name=kind"` - // Name is the name of resource being referenced. - Name string `json:"name" protobuf:"bytes,3,name=name"` - // Namespace that contains the referenced resource. Must be empty - // for cluster-scoped resources and non-empty for namespaced - // resources. - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,4,opt,name=namespace"` -} - -// ResourceClaimParametersReference contains enough information to let you -// locate the parameters for a ResourceClaim. The object must be in the same -// namespace as the ResourceClaim. -type ResourceClaimParametersReference struct { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"` - // Kind is the type of resource being referenced. This is the same - // value as in the parameter object's metadata, for example "ConfigMap". - Kind string `json:"kind" protobuf:"bytes,2,name=kind"` - // Name is the name of resource being referenced. - Name string `json:"name" protobuf:"bytes,3,name=name"` -} - -// ResourceClaimConsumerReference contains enough information to let you -// locate the consumer of a ResourceClaim. The user must be a resource in the same -// namespace as the ResourceClaim. -type ResourceClaimConsumerReference struct { - // APIGroup is the group for the resource being referenced. It is - // empty for the core API. This matches the group in the APIVersion - // that is used when creating the resources. - // +optional - APIGroup string `json:"apiGroup,omitempty" protobuf:"bytes,1,opt,name=apiGroup"` - // Resource is the type of resource being referenced, for example "pods". - Resource string `json:"resource" protobuf:"bytes,3,name=resource"` - // Name is the name of resource being referenced. - Name string `json:"name" protobuf:"bytes,4,name=name"` - // UID identifies exactly one incarnation of the resource. - UID types.UID `json:"uid" protobuf:"bytes,5,name=uid"` + Items []DeviceClass `json:"items" protobuf:"bytes,2,rep,name=items"` } // +genclient @@ -456,6 +990,9 @@ type ResourceClaimConsumerReference struct { // +k8s:prerelease-lifecycle-gen:introduced=1.26 // ResourceClaimTemplate is used to produce ResourceClaim objects. +// +// This is an alpha type and requires enabling the DynamicResourceAllocation +// feature gate. type ResourceClaimTemplate struct { metav1.TypeMeta `json:",inline"` // Standard object metadata @@ -497,207 +1034,3 @@ type ResourceClaimTemplateList struct { // Items is the list of resource claim templates. Items []ResourceClaimTemplate `json:"items" protobuf:"bytes,2,rep,name=items"` } - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.30 - -// ResourceSlice provides information about available -// resources on individual nodes. -type ResourceSlice struct { - metav1.TypeMeta `json:",inline"` - // Standard object metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // NodeName identifies the node which provides the resources - // if they are local to a node. - // - // A field selector can be used to list only ResourceSlice - // objects with a certain node name. - // - // +optional - NodeName string `json:"nodeName,omitempty" protobuf:"bytes,2,opt,name=nodeName"` - - // DriverName identifies the DRA driver providing the capacity information. - // A field selector can be used to list only ResourceSlice - // objects with a certain driver name. - DriverName string `json:"driverName" protobuf:"bytes,3,name=driverName"` - - ResourceModel `json:",inline" protobuf:"bytes,4,name=resourceModel"` -} - -// ResourceModel must have one and only one field set. -type ResourceModel struct { - // NamedResources describes available resources using the named resources model. - // - // +optional - NamedResources *NamedResourcesResources `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.30 - -// ResourceSliceList is a collection of ResourceSlices. -type ResourceSliceList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of node resource capacity objects. - Items []ResourceSlice `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.30 - -// ResourceClaimParameters defines resource requests for a ResourceClaim in an -// in-tree format understood by Kubernetes. -type ResourceClaimParameters struct { - metav1.TypeMeta `json:",inline"` - // Standard object metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // 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. - // +optional - GeneratedFrom *ResourceClaimParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` - - // DriverRequests describes all resources that are needed for the - // allocated claim. A single claim may use resources coming from - // different drivers. For each driver, this array has at most one - // entry which then may have one or more per-driver requests. - // - // May be empty, in which case the claim can always be allocated. - // - // +listType=atomic - DriverRequests []DriverRequests `json:"driverRequests,omitempty" protobuf:"bytes,4,opt,name=driverRequests"` -} - -// DriverRequests describes all resources that are needed from one particular driver. -type DriverRequests struct { - // DriverName is the name used by the DRA driver kubelet plugin. - DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` - - // VendorParameters are arbitrary setup parameters for all requests of the - // claim. They are ignored while allocating the claim. - // - // +optional - VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,2,opt,name=vendorParameters"` - - // Requests describes all resources that are needed from the driver. - // +listType=atomic - Requests []ResourceRequest `json:"requests,omitempty" protobuf:"bytes,3,opt,name=requests"` -} - -// ResourceRequest is a request for resources from one particular driver. -type ResourceRequest struct { - // VendorParameters are arbitrary setup parameters for the requested - // resource. They are ignored while allocating a claim. - // - // +optional - VendorParameters runtime.RawExtension `json:"vendorParameters,omitempty" protobuf:"bytes,1,opt,name=vendorParameters"` - - ResourceRequestModel `json:",inline" protobuf:"bytes,2,name=resourceRequestModel"` -} - -// ResourceRequestModel must have one and only one field set. -type ResourceRequestModel struct { - // NamedResources describes a request for resources with the named resources model. - // - // +optional - NamedResources *NamedResourcesRequest `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.30 - -// ResourceClaimParametersList is a collection of ResourceClaimParameters. -type ResourceClaimParametersList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of node resource capacity objects. - Items []ResourceClaimParameters `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.30 - -// ResourceClassParameters defines resource requests for a ResourceClass in an -// in-tree format understood by Kubernetes. -type ResourceClassParameters struct { - metav1.TypeMeta `json:",inline"` - // Standard object metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // 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. - // +optional - GeneratedFrom *ResourceClassParametersReference `json:"generatedFrom,omitempty" protobuf:"bytes,2,opt,name=generatedFrom"` - - // VendorParameters are arbitrary setup parameters for all claims using - // this class. They are ignored while allocating the claim. There must - // not be more than one entry per driver. - // - // +listType=atomic - // +optional - VendorParameters []VendorParameters `json:"vendorParameters,omitempty" protobuf:"bytes,3,opt,name=vendorParameters"` - - // Filters describes additional contraints that must be met when using the class. - // - // +listType=atomic - Filters []ResourceFilter `json:"filters,omitempty" protobuf:"bytes,4,opt,name=filters"` -} - -// ResourceFilter is a filter for resources from one particular driver. -type ResourceFilter struct { - // DriverName is the name used by the DRA driver kubelet plugin. - DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` - - ResourceFilterModel `json:",inline" protobuf:"bytes,2,name=resourceFilterModel"` -} - -// ResourceFilterModel must have one and only one field set. -type ResourceFilterModel struct { - // NamedResources describes a resource filter using the named resources model. - // - // +optional - NamedResources *NamedResourcesFilter `json:"namedResources,omitempty" protobuf:"bytes,1,opt,name=namedResources"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.30 - -// ResourceClassParametersList is a collection of ResourceClassParameters. -type ResourceClassParametersList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of node resource capacity objects. - Items []ResourceClassParameters `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// VendorParameters are opaque parameters for one particular driver. -type VendorParameters struct { - // DriverName is the name used by the DRA driver kubelet plugin. - DriverName string `json:"driverName,omitempty" protobuf:"bytes,1,opt,name=driverName"` - - // Parameters can be arbitrary setup parameters. They are ignored while - // allocating a claim. - // - // +optional - Parameters runtime.RawExtension `json:"parameters,omitempty" protobuf:"bytes,2,opt,name=parameters"` -} diff --git a/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go b/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go index 9fe49cf748924..059caa3f86e7e 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/types_swagger_doc_generated.go @@ -28,46 +28,202 @@ package v1alpha3 // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AllocationResult = map[string]string{ - "": "AllocationResult contains attributes of an allocated resource.", - "resourceHandles": "ResourceHandles contain the state associated with an allocation that should be maintained throughout the lifetime of a claim. Each ResourceHandle contains data that should be passed to a specific kubelet plugin once it lands on a node. This data is returned by the driver after a successful allocation and is opaque to Kubernetes. Driver documentation may explain to users how to interpret this data if needed.\n\nSetting this field is optional. It has a maximum size of 32 entries. If null (or empty), it is assumed this allocation will be processed by a single kubelet plugin with no ResourceHandle data attached. The name of the kubelet plugin invoked will match the DriverName set in the ResourceClaimStatus this AllocationResult is embedded in.", - "availableOnNodes": "This field will get set by the resource driver after it has allocated the resource to inform the scheduler where it can schedule Pods using the ResourceClaim.\n\nSetting this field is optional. If null, the resource is available everywhere.", + "": "AllocationResult contains attributes of an allocated resource.", + "devices": "Devices is the result of allocating devices.", + "nodeSelector": "NodeSelector defines where the allocated resources are available. If unset, they are available everywhere.", + "controller": "Controller is the name of the DRA driver which handled the allocation. That driver is also responsible for deallocating the claim. It is empty when the claim can be deallocated without involving a driver.\n\nA driver may allocate devices provided by other drivers, so this driver name here can be different from the driver names listed for the results.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", } func (AllocationResult) SwaggerDoc() map[string]string { return map_AllocationResult } -var map_AllocationResultModel = map[string]string{ - "": "AllocationResultModel must have one and only one field set.", - "namedResources": "NamedResources describes the allocation result when using the named resources model.", +var map_BasicDevice = map[string]string{ + "": "BasicDevice defines one device instance using fields that are supported by all clients which support DRA.", + "attributes": "Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", + "capacity": "Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.\n\nThe maximum number of attributes and capacities combined is 32.", } -func (AllocationResultModel) SwaggerDoc() map[string]string { - return map_AllocationResultModel +func (BasicDevice) SwaggerDoc() map[string]string { + return map_BasicDevice } -var map_DriverAllocationResult = map[string]string{ - "": "DriverAllocationResult contains vendor parameters and the allocation result for one request.", - "vendorRequestParameters": "VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.", +var map_CELDeviceSelector = map[string]string{ + "": "CELDeviceSelector contains a CEL expression for selecting a device.", + "expression": "Expression is a CEL expression which evaluates a single device. It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.\n\nThe expression's input is an object named \"device\", which carries the following properties:\n - driver (string): the name of the driver which defines this device.\n - attributes (map[string]object): the device's attributes, grouped by prefix\n (e.g. device.attributes[\"dra.example.com\"] evaluates to an object with all\n of the attributes which were prefixed by \"dra.example.com\".\n - capacity (map[string]object): the device's capacities, grouped by prefix.\n\nExample: Consider a device with driver=\"dra.example.com\", which exposes two attributes named \"model\" and \"ext.example.com/family\" and which exposes one capacity named \"modules\". This input to this expression would have the following fields:\n\n device.driver\n device.attributes[\"dra.example.com\"].model\n device.attributes[\"ext.example.com\"].family\n device.capacity[\"dra.example.com\"].modules\n\nThe device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.\n\nThe value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.\n\nIf an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.\n\nA robust expression should check for the existence of attributes before referencing them.\n\nFor ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:\n\n cel.bind(dra, device.attributes[\"dra.example.com\"], dra.someBool && dra.anotherBool)", } -func (DriverAllocationResult) SwaggerDoc() map[string]string { - return map_DriverAllocationResult +func (CELDeviceSelector) SwaggerDoc() map[string]string { + return map_CELDeviceSelector } -var map_DriverRequests = map[string]string{ - "": "DriverRequests describes all resources that are needed from one particular driver.", - "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", - "vendorParameters": "VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.", - "requests": "Requests describes all resources that are needed from the driver.", +var map_Device = map[string]string{ + "": "Device represents one individual hardware instance that can be selected based on its attributes. Besides the name, exactly one field must be set.", + "name": "Name is unique identifier among all devices managed by the driver in the pool. It must be a DNS label.", + "basic": "Basic defines one device instance using fields that are supported by all clients which support DRA.", } -func (DriverRequests) SwaggerDoc() map[string]string { - return map_DriverRequests +func (Device) SwaggerDoc() map[string]string { + return map_Device +} + +var map_DeviceAllocationConfiguration = map[string]string{ + "": "DeviceAllocationConfiguration gets embedded in an AllocationResult.", + "source": "Source records whether the configuration comes from a class and thus is not something that a normal user would have been able to set or from a claim.", + "requests": "Requests lists the names of requests where the configuration applies. If empty, its applies to all requests.", +} + +func (DeviceAllocationConfiguration) SwaggerDoc() map[string]string { + return map_DeviceAllocationConfiguration +} + +var map_DeviceAllocationResult = map[string]string{ + "": "DeviceAllocationResult is the result of allocating devices.", + "results": "Results lists all allocated devices.", + "config": "This field is a combination of all the claim and class configuration parameters. Drivers can distinguish between those based on a flag.\n\nThis includes configuration parameters for drivers which have no allocated devices in the result because it is up to the drivers which configuration parameters they support. They can silently ignore unknown configuration parameters.", +} + +func (DeviceAllocationResult) SwaggerDoc() map[string]string { + return map_DeviceAllocationResult +} + +var map_DeviceAttribute = map[string]string{ + "": "DeviceAttribute must have exactly one field set.", + "int": "IntValue is a number.", + "bool": "BoolValue is a true/false value.", + "string": "StringValue is a string. Must not be longer than 64 characters.", + "version": "VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.", +} + +func (DeviceAttribute) SwaggerDoc() map[string]string { + return map_DeviceAttribute +} + +var map_DeviceClaim = map[string]string{ + "": "DeviceClaim defines how to request devices with a ResourceClaim.", + "requests": "Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.", + "constraints": "These constraints must be satisfied by the set of devices that get allocated for the claim.", + "config": "This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.", +} + +func (DeviceClaim) SwaggerDoc() map[string]string { + return map_DeviceClaim +} + +var map_DeviceClaimConfiguration = map[string]string{ + "": "DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.", + "requests": "Requests lists the names of requests where the configuration applies. If empty, it applies to all requests.", +} + +func (DeviceClaimConfiguration) SwaggerDoc() map[string]string { + return map_DeviceClaimConfiguration +} + +var map_DeviceClass = map[string]string{ + "": "DeviceClass is a vendor or admin-provided resource that contains device configuration and selectors. It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "spec": "Spec defines what can be allocated and how to configure it.\n\nThis is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.\n\nChanging the spec automatically increments the metadata.generation number.", +} + +func (DeviceClass) SwaggerDoc() map[string]string { + return map_DeviceClass +} + +var map_DeviceClassConfiguration = map[string]string{ + "": "DeviceClassConfiguration is used in DeviceClass.", +} + +func (DeviceClassConfiguration) SwaggerDoc() map[string]string { + return map_DeviceClassConfiguration +} + +var map_DeviceClassList = map[string]string{ + "": "DeviceClassList is a collection of classes.", + "metadata": "Standard list metadata", + "items": "Items is the list of resource classes.", +} + +func (DeviceClassList) SwaggerDoc() map[string]string { + return map_DeviceClassList +} + +var map_DeviceClassSpec = map[string]string{ + "": "DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.", + "selectors": "Each selector must be satisfied by a device which is claimed via this class.", + "config": "Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.\n\nThey are passed to the driver, but are not considered while allocating the claim.", + "suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.\n\nSetting this field is optional. If unset, all Nodes are candidates.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", +} + +func (DeviceClassSpec) SwaggerDoc() map[string]string { + return map_DeviceClassSpec +} + +var map_DeviceConfiguration = map[string]string{ + "": "DeviceConfiguration must have exactly one field set. It gets embedded inline in some other structs which have other fields, so field names must not conflict with those.", + "opaque": "Opaque provides driver-specific configuration parameters.", +} + +func (DeviceConfiguration) SwaggerDoc() map[string]string { + return map_DeviceConfiguration +} + +var map_DeviceConstraint = map[string]string{ + "": "DeviceConstraint must have exactly one field set besides Requests.", + "requests": "Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.", + "matchAttribute": "MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.\n\nFor example, if you specified \"dra.example.com/numa\" (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn't, then it also will not be chosen.\n\nMust include the domain qualifier.", +} + +func (DeviceConstraint) SwaggerDoc() map[string]string { + return map_DeviceConstraint +} + +var map_DeviceRequest = map[string]string{ + "": "DeviceRequest is a request for devices required for a claim. This is typically a request for a single resource like a device, but can also ask for several identical devices.\n\nA DeviceClassName is currently required. Clients must check that it is indeed set. It's absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.", + "name": "Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.\n\nMust be a DNS label.", + "deviceClassName": "DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.\n\nA class is required. Which classes are available depends on the cluster.\n\nAdministrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.", + "selectors": "Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. All selectors must be satisfied for a device to be considered.", + "countMode": "CountMode and its related fields define how many devices are needed to satisfy this request. Supported values are:\n\n- Exact: This request is for a specific number of devices.\n This is the default. The exact number is provided in the\n count field.\n\n- All: This request is for all of the matching devices in a pool.\n Allocation will fail if some devices are already allocated,\n unless adminAccess is requested.\n\nIf countMode is not specified, the default countMode is Exact. If countMode is Exact and count is not specified, the default count is one. Any other requests must specify this field.\n\nMore modes may get added in the future. Clients must refuse to handle requests with unknown modes.", + "count": "Count is used only when the count mode is \"Exact\". Must be greater than zero. If CountMode is Exact and this field is not specified, the default is one.", + "adminAccess": "AdminAccess indicates that this is a claim for administrative access to the device(s). Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.", +} + +func (DeviceRequest) SwaggerDoc() map[string]string { + return map_DeviceRequest +} + +var map_DeviceRequestAllocationResult = map[string]string{ + "": "DeviceRequestAllocationResult contains the allocation result for one request.", + "request": "Request is the name of the request in the claim which caused this device to be allocated. Multiple devices may have been allocated per request.", + "driver": "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "pool": "This name together with the driver name and the device name field identify which device was allocated (`//`).\n\nMust not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.", + "device": "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.", +} + +func (DeviceRequestAllocationResult) SwaggerDoc() map[string]string { + return map_DeviceRequestAllocationResult +} + +var map_DeviceSelector = map[string]string{ + "": "DeviceSelector must have exactly one field set.", + "cel": "CEL contains a CEL expression for selecting a device.", +} + +func (DeviceSelector) SwaggerDoc() map[string]string { + return map_DeviceSelector +} + +var map_OpaqueDeviceConfiguration = map[string]string{ + "": "OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.", + "driver": "Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.\n\nAn admission policy provided by the driver developer could use this to decide whether it needs to validate them.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.", + "parameters": "Parameters can contain arbitrary data. It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (\"kind\" + \"apiVersion\" for Kubernetes types), with conversion between different versions.", +} + +func (OpaqueDeviceConfiguration) SwaggerDoc() map[string]string { + return map_OpaqueDeviceConfiguration } var map_PodSchedulingContext = map[string]string{ - "": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "": "PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use \"WaitForFirstConsumer\" allocation mode.\n\nThis is an alpha type and requires enabling the DRAControlPlaneController feature gate.", "metadata": "Standard object metadata", "spec": "Spec describes where resources for the Pod are needed.", "status": "Status describes where resources for the Pod can be allocated.", @@ -107,10 +263,10 @@ func (PodSchedulingContextStatus) SwaggerDoc() map[string]string { } var map_ResourceClaim = map[string]string{ - "": "ResourceClaim describes which resources are needed by a resource consumer. Its status tracks whether the resource has been allocated and what the resulting attributes are.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "": "ResourceClaim describes a request for access to resources in the cluster, for use by workloads. For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "metadata": "Standard object metadata", - "spec": "Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim.", - "status": "Status describes whether the resource is available and with which attributes.", + "spec": "Spec describes what is being requested and how to configure it. The spec is immutable.", + "status": "Status describes whether the claim is ready to use and what has been allocated.", } func (ResourceClaim) SwaggerDoc() map[string]string { @@ -139,38 +295,6 @@ func (ResourceClaimList) SwaggerDoc() map[string]string { return map_ResourceClaimList } -var map_ResourceClaimParameters = map[string]string{ - "": "ResourceClaimParameters defines resource requests for a ResourceClaim in an in-tree format understood by Kubernetes.", - "metadata": "Standard object metadata", - "generatedFrom": "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.", - "driverRequests": "DriverRequests describes all resources that are needed for the allocated claim. A single claim may use resources coming from different drivers. For each driver, this array has at most one entry which then may have one or more per-driver requests.\n\nMay be empty, in which case the claim can always be allocated.", -} - -func (ResourceClaimParameters) SwaggerDoc() map[string]string { - return map_ResourceClaimParameters -} - -var map_ResourceClaimParametersList = map[string]string{ - "": "ResourceClaimParametersList is a collection of ResourceClaimParameters.", - "metadata": "Standard list metadata", - "items": "Items is the list of node resource capacity objects.", -} - -func (ResourceClaimParametersList) SwaggerDoc() map[string]string { - return map_ResourceClaimParametersList -} - -var map_ResourceClaimParametersReference = map[string]string{ - "": "ResourceClaimParametersReference contains enough information to let you locate the parameters for a ResourceClaim. The object must be in the same namespace as the ResourceClaim.", - "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - "kind": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata, for example \"ConfigMap\".", - "name": "Name is the name of resource being referenced.", -} - -func (ResourceClaimParametersReference) SwaggerDoc() map[string]string { - return map_ResourceClaimParametersReference -} - var map_ResourceClaimSchedulingStatus = map[string]string{ "": "ResourceClaimSchedulingStatus contains information about one particular ResourceClaim with \"WaitForFirstConsumer\" allocation mode.", "name": "Name matches the pod.spec.resourceClaims[*].Name field.", @@ -182,9 +306,9 @@ func (ResourceClaimSchedulingStatus) SwaggerDoc() map[string]string { } var map_ResourceClaimSpec = map[string]string{ - "": "ResourceClaimSpec defines how a resource is to be allocated.", - "resourceClassName": "ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.", - "parametersRef": "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.", + "": "ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.", + "devices": "Devices defines how to request devices.", + "controller": "Controller is the name of the DRA driver that is meant to handle allocation of this claim. If empty, allocation is handled by the scheduler while scheduling a pod.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", } func (ResourceClaimSpec) SwaggerDoc() map[string]string { @@ -192,11 +316,10 @@ func (ResourceClaimSpec) SwaggerDoc() map[string]string { } var map_ResourceClaimStatus = map[string]string{ - "": "ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.", - "driverName": "DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.", - "allocation": "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.", - "reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", - "deallocationRequested": "DeallocationRequested indicates that a ResourceClaim is to be deallocated.\n\nThe driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nWhile DeallocationRequested is set, no new consumers may be added to ReservedFor.", + "": "ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.", + "allocation": "Allocation is set once the claim has been allocated successfully.", + "reservedFor": "ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.\n\nIn a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.\n\nBoth schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.\n\nThere can be at most 32 such reservations. This may get increased in the future, but not reduced.", + "deallocationRequested": "Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.\n\nThis is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.\n\nThis is an alpha field and requires enabling the DRAControlPlaneController feature gate.", } func (ResourceClaimStatus) SwaggerDoc() map[string]string { @@ -204,7 +327,7 @@ func (ResourceClaimStatus) SwaggerDoc() map[string]string { } var map_ResourceClaimTemplate = map[string]string{ - "": "ResourceClaimTemplate is used to produce ResourceClaim objects.", + "": "ResourceClaimTemplate is used to produce ResourceClaim objects.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", "metadata": "Standard object metadata", "spec": "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.", } @@ -233,124 +356,21 @@ func (ResourceClaimTemplateSpec) SwaggerDoc() map[string]string { return map_ResourceClaimTemplateSpec } -var map_ResourceClass = map[string]string{ - "": "ResourceClass is used by administrators to influence how resources are allocated.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", - "metadata": "Standard object metadata", - "driverName": "DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.\n\nResource drivers have a unique name in forward domain order (acme.example.com).", - "parametersRef": "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.", - "suitableNodes": "Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.\n\nSetting this field is optional. If null, all nodes are candidates.", - "structuredParameters": "If and only if allocation of claims using this class is handled via structured parameters, then StructuredParameters must be set to true.", -} - -func (ResourceClass) SwaggerDoc() map[string]string { - return map_ResourceClass +var map_ResourcePool = map[string]string{ + "": "ResourcePool describes the pool that ResourceSlices belong to.", + "name": "Name is used to identify the pool. For node-local devices, this is often the node name, but this is not required.\n\nIt must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes.", + "generation": "Generation tracks the change in a pool over time. Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.\n\nCombined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.", + "resourceSliceCount": "ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be higher than zero.\n\nConsumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.", } -var map_ResourceClassList = map[string]string{ - "": "ResourceClassList is a collection of classes.", - "metadata": "Standard list metadata", - "items": "Items is the list of resource classes.", -} - -func (ResourceClassList) SwaggerDoc() map[string]string { - return map_ResourceClassList -} - -var map_ResourceClassParameters = map[string]string{ - "": "ResourceClassParameters defines resource requests for a ResourceClass in an in-tree format understood by Kubernetes.", - "metadata": "Standard object metadata", - "generatedFrom": "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.", - "vendorParameters": "VendorParameters are arbitrary setup parameters for all claims using this class. They are ignored while allocating the claim. There must not be more than one entry per driver.", - "filters": "Filters describes additional contraints that must be met when using the class.", -} - -func (ResourceClassParameters) SwaggerDoc() map[string]string { - return map_ResourceClassParameters -} - -var map_ResourceClassParametersList = map[string]string{ - "": "ResourceClassParametersList is a collection of ResourceClassParameters.", - "metadata": "Standard list metadata", - "items": "Items is the list of node resource capacity objects.", -} - -func (ResourceClassParametersList) SwaggerDoc() map[string]string { - return map_ResourceClassParametersList -} - -var map_ResourceClassParametersReference = map[string]string{ - "": "ResourceClassParametersReference contains enough information to let you locate the parameters for a ResourceClass.", - "apiGroup": "APIGroup is the group for the resource being referenced. It is empty for the core API. This matches the group in the APIVersion that is used when creating the resources.", - "kind": "Kind is the type of resource being referenced. This is the same value as in the parameter object's metadata.", - "name": "Name is the name of resource being referenced.", - "namespace": "Namespace that contains the referenced resource. Must be empty for cluster-scoped resources and non-empty for namespaced resources.", -} - -func (ResourceClassParametersReference) SwaggerDoc() map[string]string { - return map_ResourceClassParametersReference -} - -var map_ResourceFilter = map[string]string{ - "": "ResourceFilter is a filter for resources from one particular driver.", - "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", -} - -func (ResourceFilter) SwaggerDoc() map[string]string { - return map_ResourceFilter -} - -var map_ResourceFilterModel = map[string]string{ - "": "ResourceFilterModel must have one and only one field set.", - "namedResources": "NamedResources describes a resource filter using the named resources model.", -} - -func (ResourceFilterModel) SwaggerDoc() map[string]string { - return map_ResourceFilterModel -} - -var map_ResourceHandle = map[string]string{ - "": "ResourceHandle holds opaque resource data for processing by a specific kubelet plugin.", - "driverName": "DriverName specifies the name of the resource driver whose kubelet plugin should be invoked to process this ResourceHandle's data once it lands on a node. This may differ from the DriverName set in ResourceClaimStatus this ResourceHandle is embedded in.", - "data": "Data contains the opaque data associated with this ResourceHandle. It is set by the controller component of the resource driver whose name matches the DriverName set in the ResourceClaimStatus this ResourceHandle is embedded in. It is set at allocation time and is intended for processing by the kubelet plugin whose name matches the DriverName set in this ResourceHandle.\n\nThe maximum size of this field is 16KiB. This may get increased in the future, but not reduced.", - "structuredData": "If StructuredData is set, then it needs to be used instead of Data.", -} - -func (ResourceHandle) SwaggerDoc() map[string]string { - return map_ResourceHandle -} - -var map_ResourceModel = map[string]string{ - "": "ResourceModel must have one and only one field set.", - "namedResources": "NamedResources describes available resources using the named resources model.", -} - -func (ResourceModel) SwaggerDoc() map[string]string { - return map_ResourceModel -} - -var map_ResourceRequest = map[string]string{ - "": "ResourceRequest is a request for resources from one particular driver.", - "vendorParameters": "VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.", -} - -func (ResourceRequest) SwaggerDoc() map[string]string { - return map_ResourceRequest -} - -var map_ResourceRequestModel = map[string]string{ - "": "ResourceRequestModel must have one and only one field set.", - "namedResources": "NamedResources describes a request for resources with the named resources model.", -} - -func (ResourceRequestModel) SwaggerDoc() map[string]string { - return map_ResourceRequestModel +func (ResourcePool) SwaggerDoc() map[string]string { + return map_ResourcePool } var map_ResourceSlice = map[string]string{ - "": "ResourceSlice provides information about available resources on individual nodes.", - "metadata": "Standard object metadata", - "nodeName": "NodeName identifies the node which provides the resources if they are local to a node.\n\nA field selector can be used to list only ResourceSlice objects with a certain node name.", - "driverName": "DriverName identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.", + "": "ResourceSlice represents one or more resources in a pool of similar resources, managed by a given driver. A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.\n\nAt the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple , , .\n\nWhenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.\n\nWhen allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.\n\nFor resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.\n\nThis is an alpha type and requires enabling the DynamicResourceAllocation feature gate.", + "metadata": "Standard object metadata", + "spec": "Contains the information published by the driver.\n\nChanging the spec automatically increments the metadata.generation number.", } func (ResourceSlice) SwaggerDoc() map[string]string { @@ -359,34 +379,26 @@ func (ResourceSlice) SwaggerDoc() map[string]string { var map_ResourceSliceList = map[string]string{ "": "ResourceSliceList is a collection of ResourceSlices.", - "metadata": "Standard list metadata", - "items": "Items is the list of node resource capacity objects.", + "listMeta": "Standard list metadata", + "items": "Items is the list of resource ResourceSlices.", } func (ResourceSliceList) SwaggerDoc() map[string]string { return map_ResourceSliceList } -var map_StructuredResourceHandle = map[string]string{ - "": "StructuredResourceHandle is the in-tree representation of the allocation result.", - "vendorClassParameters": "VendorClassParameters are the per-claim configuration parameters from the resource class at the time that the claim was allocated.", - "vendorClaimParameters": "VendorClaimParameters are the per-claim configuration parameters from the resource claim parameters at the time that the claim was allocated.", - "nodeName": "NodeName is the name of the node providing the necessary resources if the resources are local to a node.", - "results": "Results lists all allocated driver resources.", -} - -func (StructuredResourceHandle) SwaggerDoc() map[string]string { - return map_StructuredResourceHandle -} - -var map_VendorParameters = map[string]string{ - "": "VendorParameters are opaque parameters for one particular driver.", - "driverName": "DriverName is the name used by the DRA driver kubelet plugin.", - "parameters": "Parameters can be arbitrary setup parameters. They are ignored while allocating a claim.", +var map_ResourceSliceSpec = map[string]string{ + "": "ResourceSliceSpec contains the information published by the driver in one ResourceSlice.", + "driver": "Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.\n\nMust be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.", + "pool": "Pool describes the pool that this ResourceSlice belongs to. This field is immutable.", + "nodeName": "NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.\n\nThis field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.", + "nodeSelector": "NodeSelector defines which nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "allNodes": "AllNodes indicates that all nodes have access to the resources in the pool.\n\nExactly one of NodeName, NodeSelector and AllNodes must be set.", + "devices": "Devices lists some or all of the devices in this pool.\n\nMust not have more than 128 entries.", } -func (VendorParameters) SwaggerDoc() map[string]string { - return map_VendorParameters +func (ResourceSliceSpec) SwaggerDoc() map[string]string { + return map_ResourceSliceSpec } // AUTO-GENERATED FUNCTIONS END HERE diff --git a/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go index a9a6de637520f..58171df1f2db6 100644 --- a/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go +++ b/staging/src/k8s.io/api/resource/v1alpha3/zz_generated.deepcopy.go @@ -23,21 +23,16 @@ package v1alpha3 import ( v1 "k8s.io/api/core/v1" + resource "k8s.io/apimachinery/pkg/api/resource" runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AllocationResult) DeepCopyInto(out *AllocationResult) { *out = *in - if in.ResourceHandles != nil { - in, out := &in.ResourceHandles, &out.ResourceHandles - *out = make([]ResourceHandle, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AvailableOnNodes != nil { - in, out := &in.AvailableOnNodes, &out.AvailableOnNodes + in.Devices.DeepCopyInto(&out.Devices) + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector *out = new(v1.NodeSelector) (*in).DeepCopyInto(*out) } @@ -55,134 +50,140 @@ func (in *AllocationResult) DeepCopy() *AllocationResult { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AllocationResultModel) DeepCopyInto(out *AllocationResultModel) { +func (in *BasicDevice) DeepCopyInto(out *BasicDevice) { *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesAllocationResult) - **out = **in + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(map[QualifiedName]DeviceAttribute, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } + if in.Capacity != nil { + in, out := &in.Capacity, &out.Capacity + *out = make(map[QualifiedName]resource.Quantity, len(*in)) + for key, val := range *in { + (*out)[key] = val.DeepCopy() + } } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocationResultModel. -func (in *AllocationResultModel) DeepCopy() *AllocationResultModel { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicDevice. +func (in *BasicDevice) DeepCopy() *BasicDevice { if in == nil { return nil } - out := new(AllocationResultModel) + out := new(BasicDevice) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DriverAllocationResult) DeepCopyInto(out *DriverAllocationResult) { +func (in *CELDeviceSelector) DeepCopyInto(out *CELDeviceSelector) { *out = *in - in.VendorRequestParameters.DeepCopyInto(&out.VendorRequestParameters) - in.AllocationResultModel.DeepCopyInto(&out.AllocationResultModel) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverAllocationResult. -func (in *DriverAllocationResult) DeepCopy() *DriverAllocationResult { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CELDeviceSelector. +func (in *CELDeviceSelector) DeepCopy() *CELDeviceSelector { if in == nil { return nil } - out := new(DriverAllocationResult) + out := new(CELDeviceSelector) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DriverRequests) DeepCopyInto(out *DriverRequests) { +func (in *Device) DeepCopyInto(out *Device) { *out = *in - in.VendorParameters.DeepCopyInto(&out.VendorParameters) - if in.Requests != nil { - in, out := &in.Requests, &out.Requests - *out = make([]ResourceRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } + if in.Basic != nil { + in, out := &in.Basic, &out.Basic + *out = new(BasicDevice) + (*in).DeepCopyInto(*out) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverRequests. -func (in *DriverRequests) DeepCopy() *DriverRequests { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device. +func (in *Device) DeepCopy() *Device { if in == nil { return nil } - out := new(DriverRequests) + out := new(Device) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesAllocationResult) DeepCopyInto(out *NamedResourcesAllocationResult) { +func (in *DeviceAllocationConfiguration) DeepCopyInto(out *DeviceAllocationConfiguration) { *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAllocationResult. -func (in *NamedResourcesAllocationResult) DeepCopy() *NamedResourcesAllocationResult { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationConfiguration. +func (in *DeviceAllocationConfiguration) DeepCopy() *DeviceAllocationConfiguration { if in == nil { return nil } - out := new(NamedResourcesAllocationResult) + out := new(DeviceAllocationConfiguration) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesAttribute) DeepCopyInto(out *NamedResourcesAttribute) { +func (in *DeviceAllocationResult) DeepCopyInto(out *DeviceAllocationResult) { *out = *in - in.NamedResourcesAttributeValue.DeepCopyInto(&out.NamedResourcesAttributeValue) + if in.Results != nil { + in, out := &in.Results, &out.Results + *out = make([]DeviceRequestAllocationResult, len(*in)) + copy(*out, *in) + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceAllocationConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttribute. -func (in *NamedResourcesAttribute) DeepCopy() *NamedResourcesAttribute { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAllocationResult. +func (in *DeviceAllocationResult) DeepCopy() *DeviceAllocationResult { if in == nil { return nil } - out := new(NamedResourcesAttribute) + out := new(DeviceAllocationResult) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesAttributeValue) DeepCopyInto(out *NamedResourcesAttributeValue) { +func (in *DeviceAttribute) DeepCopyInto(out *DeviceAttribute) { *out = *in - if in.QuantityValue != nil { - in, out := &in.QuantityValue, &out.QuantityValue - x := (*in).DeepCopy() - *out = &x - } - if in.BoolValue != nil { - in, out := &in.BoolValue, &out.BoolValue - *out = new(bool) - **out = **in - } if in.IntValue != nil { in, out := &in.IntValue, &out.IntValue *out = new(int64) **out = **in } - if in.IntSliceValue != nil { - in, out := &in.IntSliceValue, &out.IntSliceValue - *out = new(NamedResourcesIntSlice) - (*in).DeepCopyInto(*out) + if in.BoolValue != nil { + in, out := &in.BoolValue, &out.BoolValue + *out = new(bool) + **out = **in } if in.StringValue != nil { in, out := &in.StringValue, &out.StringValue *out = new(string) **out = **in } - if in.StringSliceValue != nil { - in, out := &in.StringSliceValue, &out.StringSliceValue - *out = new(NamedResourcesStringSlice) - (*in).DeepCopyInto(*out) - } if in.VersionValue != nil { in, out := &in.VersionValue, &out.VersionValue *out = new(string) @@ -191,38 +192,127 @@ func (in *NamedResourcesAttributeValue) DeepCopyInto(out *NamedResourcesAttribut return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesAttributeValue. -func (in *NamedResourcesAttributeValue) DeepCopy() *NamedResourcesAttributeValue { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceAttribute. +func (in *DeviceAttribute) DeepCopy() *DeviceAttribute { if in == nil { return nil } - out := new(NamedResourcesAttributeValue) + out := new(DeviceAttribute) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesFilter) DeepCopyInto(out *NamedResourcesFilter) { +func (in *DeviceClaim) DeepCopyInto(out *DeviceClaim) { *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]DeviceRequest, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Constraints != nil { + in, out := &in.Constraints, &out.Constraints + *out = make([]DeviceConstraint, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceClaimConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesFilter. -func (in *NamedResourcesFilter) DeepCopy() *NamedResourcesFilter { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaim. +func (in *DeviceClaim) DeepCopy() *DeviceClaim { if in == nil { return nil } - out := new(NamedResourcesFilter) + out := new(DeviceClaim) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesInstance) DeepCopyInto(out *NamedResourcesInstance) { +func (in *DeviceClaimConfiguration) DeepCopyInto(out *DeviceClaimConfiguration) { *out = *in - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make([]NamedResourcesAttribute, len(*in)) + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClaimConfiguration. +func (in *DeviceClaimConfiguration) DeepCopy() *DeviceClaimConfiguration { + if in == nil { + return nil + } + out := new(DeviceClaimConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClass) DeepCopyInto(out *DeviceClass) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClass. +func (in *DeviceClass) DeepCopy() *DeviceClass { + if in == nil { + return nil + } + out := new(DeviceClass) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviceClass) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassConfiguration) DeepCopyInto(out *DeviceClassConfiguration) { + *out = *in + in.DeviceConfiguration.DeepCopyInto(&out.DeviceConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassConfiguration. +func (in *DeviceClassConfiguration) DeepCopy() *DeviceClassConfiguration { + if in == nil { + return nil + } + out := new(DeviceClassConfiguration) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceClassList) DeepCopyInto(out *DeviceClassList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]DeviceClass, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -230,59 +320,112 @@ func (in *NamedResourcesInstance) DeepCopyInto(out *NamedResourcesInstance) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesInstance. -func (in *NamedResourcesInstance) DeepCopy() *NamedResourcesInstance { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassList. +func (in *DeviceClassList) DeepCopy() *DeviceClassList { if in == nil { return nil } - out := new(NamedResourcesInstance) + out := new(DeviceClassList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *DeviceClassList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesIntSlice) DeepCopyInto(out *NamedResourcesIntSlice) { +func (in *DeviceClassSpec) DeepCopyInto(out *DeviceClassSpec) { *out = *in - if in.Ints != nil { - in, out := &in.Ints, &out.Ints - *out = make([]int64, len(*in)) - copy(*out, *in) + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = make([]DeviceSelector, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make([]DeviceClassConfiguration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SuitableNodes != nil { + in, out := &in.SuitableNodes, &out.SuitableNodes + *out = new(v1.NodeSelector) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceClassSpec. +func (in *DeviceClassSpec) DeepCopy() *DeviceClassSpec { + if in == nil { + return nil + } + out := new(DeviceClassSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceConfiguration) DeepCopyInto(out *DeviceConfiguration) { + *out = *in + if in.Opaque != nil { + in, out := &in.Opaque, &out.Opaque + *out = new(OpaqueDeviceConfiguration) + (*in).DeepCopyInto(*out) } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesIntSlice. -func (in *NamedResourcesIntSlice) DeepCopy() *NamedResourcesIntSlice { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConfiguration. +func (in *DeviceConfiguration) DeepCopy() *DeviceConfiguration { if in == nil { return nil } - out := new(NamedResourcesIntSlice) + out := new(DeviceConfiguration) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesRequest) DeepCopyInto(out *NamedResourcesRequest) { +func (in *DeviceConstraint) DeepCopyInto(out *DeviceConstraint) { *out = *in + if in.Requests != nil { + in, out := &in.Requests, &out.Requests + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MatchAttribute != nil { + in, out := &in.MatchAttribute, &out.MatchAttribute + *out = new(FullyQualifiedName) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesRequest. -func (in *NamedResourcesRequest) DeepCopy() *NamedResourcesRequest { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceConstraint. +func (in *DeviceConstraint) DeepCopy() *DeviceConstraint { if in == nil { return nil } - out := new(NamedResourcesRequest) + out := new(DeviceConstraint) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesResources) DeepCopyInto(out *NamedResourcesResources) { +func (in *DeviceRequest) DeepCopyInto(out *DeviceRequest) { *out = *in - if in.Instances != nil { - in, out := &in.Instances, &out.Instances - *out = make([]NamedResourcesInstance, len(*in)) + if in.Selectors != nil { + in, out := &in.Selectors, &out.Selectors + *out = make([]DeviceSelector, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -290,33 +433,66 @@ func (in *NamedResourcesResources) DeepCopyInto(out *NamedResourcesResources) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesResources. -func (in *NamedResourcesResources) DeepCopy() *NamedResourcesResources { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequest. +func (in *DeviceRequest) DeepCopy() *DeviceRequest { if in == nil { return nil } - out := new(NamedResourcesResources) + out := new(DeviceRequest) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedResourcesStringSlice) DeepCopyInto(out *NamedResourcesStringSlice) { +func (in *DeviceRequestAllocationResult) DeepCopyInto(out *DeviceRequestAllocationResult) { *out = *in - if in.Strings != nil { - in, out := &in.Strings, &out.Strings - *out = make([]string, len(*in)) - copy(*out, *in) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceRequestAllocationResult. +func (in *DeviceRequestAllocationResult) DeepCopy() *DeviceRequestAllocationResult { + if in == nil { + return nil + } + out := new(DeviceRequestAllocationResult) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeviceSelector) DeepCopyInto(out *DeviceSelector) { + *out = *in + if in.CEL != nil { + in, out := &in.CEL, &out.CEL + *out = new(CELDeviceSelector) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSelector. +func (in *DeviceSelector) DeepCopy() *DeviceSelector { + if in == nil { + return nil } + out := new(DeviceSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpaqueDeviceConfiguration) DeepCopyInto(out *OpaqueDeviceConfiguration) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedResourcesStringSlice. -func (in *NamedResourcesStringSlice) DeepCopy() *NamedResourcesStringSlice { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpaqueDeviceConfiguration. +func (in *OpaqueDeviceConfiguration) DeepCopy() *OpaqueDeviceConfiguration { if in == nil { return nil } - out := new(NamedResourcesStringSlice) + out := new(OpaqueDeviceConfiguration) in.DeepCopyInto(out) return out } @@ -503,93 +679,6 @@ func (in *ResourceClaimList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClaimParameters) DeepCopyInto(out *ResourceClaimParameters) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.GeneratedFrom != nil { - in, out := &in.GeneratedFrom, &out.GeneratedFrom - *out = new(ResourceClaimParametersReference) - **out = **in - } - if in.DriverRequests != nil { - in, out := &in.DriverRequests, &out.DriverRequests - *out = make([]DriverRequests, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParameters. -func (in *ResourceClaimParameters) DeepCopy() *ResourceClaimParameters { - if in == nil { - return nil - } - out := new(ResourceClaimParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClaimParameters) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClaimParametersList) DeepCopyInto(out *ResourceClaimParametersList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceClaimParameters, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersList. -func (in *ResourceClaimParametersList) DeepCopy() *ResourceClaimParametersList { - if in == nil { - return nil - } - out := new(ResourceClaimParametersList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClaimParametersList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClaimParametersReference) DeepCopyInto(out *ResourceClaimParametersReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClaimParametersReference. -func (in *ResourceClaimParametersReference) DeepCopy() *ResourceClaimParametersReference { - if in == nil { - return nil - } - out := new(ResourceClaimParametersReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClaimSchedulingStatus) DeepCopyInto(out *ResourceClaimSchedulingStatus) { *out = *in @@ -614,11 +703,7 @@ func (in *ResourceClaimSchedulingStatus) DeepCopy() *ResourceClaimSchedulingStat // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ResourceClaimSpec) DeepCopyInto(out *ResourceClaimSpec) { *out = *in - if in.ParametersRef != nil { - in, out := &in.ParametersRef, &out.ParametersRef - *out = new(ResourceClaimParametersReference) - **out = **in - } + in.Devices.DeepCopyInto(&out.Devices) return } @@ -737,288 +822,17 @@ func (in *ResourceClaimTemplateSpec) DeepCopy() *ResourceClaimTemplateSpec { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClass) DeepCopyInto(out *ResourceClass) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.ParametersRef != nil { - in, out := &in.ParametersRef, &out.ParametersRef - *out = new(ResourceClassParametersReference) - **out = **in - } - if in.SuitableNodes != nil { - in, out := &in.SuitableNodes, &out.SuitableNodes - *out = new(v1.NodeSelector) - (*in).DeepCopyInto(*out) - } - if in.StructuredParameters != nil { - in, out := &in.StructuredParameters, &out.StructuredParameters - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClass. -func (in *ResourceClass) DeepCopy() *ResourceClass { - if in == nil { - return nil - } - out := new(ResourceClass) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClass) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassList) DeepCopyInto(out *ResourceClassList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceClass, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassList. -func (in *ResourceClassList) DeepCopy() *ResourceClassList { - if in == nil { - return nil - } - out := new(ResourceClassList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClassList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassParameters) DeepCopyInto(out *ResourceClassParameters) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.GeneratedFrom != nil { - in, out := &in.GeneratedFrom, &out.GeneratedFrom - *out = new(ResourceClassParametersReference) - **out = **in - } - if in.VendorParameters != nil { - in, out := &in.VendorParameters, &out.VendorParameters - *out = make([]VendorParameters, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Filters != nil { - in, out := &in.Filters, &out.Filters - *out = make([]ResourceFilter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParameters. -func (in *ResourceClassParameters) DeepCopy() *ResourceClassParameters { - if in == nil { - return nil - } - out := new(ResourceClassParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClassParameters) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassParametersList) DeepCopyInto(out *ResourceClassParametersList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceClassParameters, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersList. -func (in *ResourceClassParametersList) DeepCopy() *ResourceClassParametersList { - if in == nil { - return nil - } - out := new(ResourceClassParametersList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceClassParametersList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceClassParametersReference) DeepCopyInto(out *ResourceClassParametersReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceClassParametersReference. -func (in *ResourceClassParametersReference) DeepCopy() *ResourceClassParametersReference { - if in == nil { - return nil - } - out := new(ResourceClassParametersReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter) { - *out = *in - in.ResourceFilterModel.DeepCopyInto(&out.ResourceFilterModel) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilter. -func (in *ResourceFilter) DeepCopy() *ResourceFilter { - if in == nil { - return nil - } - out := new(ResourceFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceFilterModel) DeepCopyInto(out *ResourceFilterModel) { - *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesFilter) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFilterModel. -func (in *ResourceFilterModel) DeepCopy() *ResourceFilterModel { - if in == nil { - return nil - } - out := new(ResourceFilterModel) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceHandle) DeepCopyInto(out *ResourceHandle) { - *out = *in - if in.StructuredData != nil { - in, out := &in.StructuredData, &out.StructuredData - *out = new(StructuredResourceHandle) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceHandle. -func (in *ResourceHandle) DeepCopy() *ResourceHandle { - if in == nil { - return nil - } - out := new(ResourceHandle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceModel) DeepCopyInto(out *ResourceModel) { - *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesResources) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceModel. -func (in *ResourceModel) DeepCopy() *ResourceModel { - if in == nil { - return nil - } - out := new(ResourceModel) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceRequest) DeepCopyInto(out *ResourceRequest) { - *out = *in - in.VendorParameters.DeepCopyInto(&out.VendorParameters) - in.ResourceRequestModel.DeepCopyInto(&out.ResourceRequestModel) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequest. -func (in *ResourceRequest) DeepCopy() *ResourceRequest { - if in == nil { - return nil - } - out := new(ResourceRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceRequestModel) DeepCopyInto(out *ResourceRequestModel) { +func (in *ResourcePool) DeepCopyInto(out *ResourcePool) { *out = *in - if in.NamedResources != nil { - in, out := &in.NamedResources, &out.NamedResources - *out = new(NamedResourcesRequest) - **out = **in - } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequestModel. -func (in *ResourceRequestModel) DeepCopy() *ResourceRequestModel { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePool. +func (in *ResourcePool) DeepCopy() *ResourcePool { if in == nil { return nil } - out := new(ResourceRequestModel) + out := new(ResourcePool) in.DeepCopyInto(out) return out } @@ -1028,7 +842,7 @@ func (in *ResourceSlice) DeepCopyInto(out *ResourceSlice) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.ResourceModel.DeepCopyInto(&out.ResourceModel) + in.Spec.DeepCopyInto(&out.Spec) return } @@ -1084,13 +898,17 @@ func (in *ResourceSliceList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) { +func (in *ResourceSliceSpec) DeepCopyInto(out *ResourceSliceSpec) { *out = *in - in.VendorClassParameters.DeepCopyInto(&out.VendorClassParameters) - in.VendorClaimParameters.DeepCopyInto(&out.VendorClaimParameters) - if in.Results != nil { - in, out := &in.Results, &out.Results - *out = make([]DriverAllocationResult, len(*in)) + out.Pool = in.Pool + if in.NodeSelector != nil { + in, out := &in.NodeSelector, &out.NodeSelector + *out = new(v1.NodeSelector) + (*in).DeepCopyInto(*out) + } + if in.Devices != nil { + in, out := &in.Devices, &out.Devices + *out = make([]Device, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } @@ -1098,29 +916,12 @@ func (in *StructuredResourceHandle) DeepCopyInto(out *StructuredResourceHandle) return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StructuredResourceHandle. -func (in *StructuredResourceHandle) DeepCopy() *StructuredResourceHandle { - if in == nil { - return nil - } - out := new(StructuredResourceHandle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VendorParameters) DeepCopyInto(out *VendorParameters) { - *out = *in - in.Parameters.DeepCopyInto(&out.Parameters) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VendorParameters. -func (in *VendorParameters) DeepCopy() *VendorParameters { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSliceSpec. +func (in *ResourceSliceSpec) DeepCopy() *ResourceSliceSpec { if in == nil { return nil } - out := new(VendorParameters) + out := new(ResourceSliceSpec) in.DeepCopyInto(out) return out } diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.json b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.json index aee557eae1909..318e92ca85c2c 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.json +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.json @@ -563,7 +563,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -858,7 +859,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1153,7 +1155,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.pb b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.pb index 80799a45c7a9b1d1cc7b0697d65e07fd1dbdfc29..2750bd13b0d6a23ec73a2807c0790ca1fa8f78b6 100644 GIT binary patch delta 167 zcmcZ<@+V}1G~?}!GO3JAivlMni2F131#FZ}VPsn2yV;7FpNnzo=5pNGO3JAKLREvNcb~7@!u$$!pQW`XR{SEKNn;BW-nd=Mn>bwvOMbS l++3V_iMgqpr}G`)#wFv)y7`^L4MvtFyj)oIimRlu0RYh^B4Pjl diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.yaml b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.yaml index a070feccdbaaf..976483e34c029 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.DaemonSet.yaml @@ -338,6 +338,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -553,6 +554,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -770,6 +772,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.json b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.json index 76e705a99e6aa..485e8b5c87528 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.json +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.json @@ -564,7 +564,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -859,7 +860,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1154,7 +1156,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.pb b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.pb index b1f069b9d149a6fcdfbd4c81b6662423abef1d1d..28c436a20eb6ec160678c11bd7900ec6ca1ef0a5 100644 GIT binary patch delta 171 zcmcZ~(iu8IhVl7E*;Gc>6@eU#LX#hg`7%rO1#FZ{VPsn2yV;hRpNnzo=8Z}MjEs(x z6?oJ|CAm2B5_40-5_3vZg?Nfm3rkarOE!N{_GI0BRk)muc*P1g7+E&)auH>CJ{tfc CGB(u! delta 124 zcmeASy&p0`hH>vk*;Gc>e*qkfLX+Q%`7%pA@!u$y!pQW`XR|FcKNn;BW?xbw p3OwrU++3V_iMgqpXYn22#wFv)y7{BR4MvtFyj)oIN~z?t0RS4{BLM&a diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.yaml b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.yaml index f69364f1d943c..8101548018c56 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.Deployment.yaml @@ -346,6 +346,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -561,6 +562,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -778,6 +780,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.ReplicaSet.json b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.ReplicaSet.json index c4f229e5a90aa..a855f5e2e5fda 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.ReplicaSet.json +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.ReplicaSet.json @@ -565,7 +565,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -860,7 +861,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1155,7 +1157,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1.ReplicaSet.pb b/staging/src/k8s.io/api/testdata/HEAD/apps.v1.ReplicaSet.pb index 9dab3de969107d02cd99adf6cab5a07d9d994d27..fec13bd9e6c767798598f069ae310f6d51824279 100644 GIT binary patch delta 172 zcmeAP*%mTEhG|O3M!6J5*2e)Hj6#ziiup22^#y=Lm{$01wq@q$Vw}2pqmlq4qvK=+ z9(7SkF3!Bf+|;ndoYGVwo}$#k($wOT%^#FKSvOx5E@vZNvBC{TmQB1|L>Vr_1^_Q? BHkSYZ delta 125 zcmdlM(i1X4hUr!CM!6J5)|~+yj6##&i}^B3J@E&LF#Yq{Y|G5g#n`^tmsfz1(Ri`~ nk2*Uy7iV5#ZtCV)dZJ3n@UEYqKujq)jstaBnc7=jEs(x zk1MN-N^)`LCFZ7vCFYc-3h@-B7M7+Kmu#NMcYvEHb<&FLESq?_h%(ZXb+etO79#+9 CM>dE6 delta 127 zcmbOf`XXe4BGbW;&37167+ISFIT(c|pOf@umU`k37GnD6v)PH6pNp}5bAprrBct); oLTPn&ZZ6Ke#N5=)^Z5>NXyCimk64RfU&F?f*7+L2;axe-_UZCyEEcL`6EX4HBXR|XiKNn;B=0qt0Mn>bw p8QSXX++3V_iMgqp7w{e6#wFv)y7{}p4MvtFyj)oIDyXdE0sw6wCmH|% diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta1.StatefulSet.yaml b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta1.StatefulSet.yaml index 60c30d6c28712..53497dbfbc4aa 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta1.StatefulSet.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta1.StatefulSet.yaml @@ -346,6 +346,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -561,6 +562,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -778,6 +780,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.json b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.json index 4c826fd14277d..f5f555dba4141 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.json +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.json @@ -563,7 +563,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -858,7 +859,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1153,7 +1155,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.pb b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.pb index d082a253d2b8bfabe48131274f2e09c175e2e156..53daae456174df01cd01420754d9ed767a177e74 100644 GIT binary patch delta 163 zcmcZ}(il2Hf${c6#Z*S7MS+tG#r&E20yf`dOkreN;k((MnV*Ys>Sljl0Y*m0$q9Vw zqLN&kd5O8HVTn1VsX{zOsfDGf#U-2j_zrLrrA}Iron;d*7g0ufvTnB4lwkw_N-!~~ delta 123 zcmZn+y&f__fpOzT#Z*S-9|2sGKZ^M>3qA4Qe3LPSk?Eh$W_xCSF2?rF{=5Q=jK-4_ o_|)0Cxj6F@b5l3Z;XA;MOU9FR^Jj${j4Vrdxv=V$QAuS30CLbISO5S3 diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.yaml b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.yaml index aea3024b240d8..fee3c2ac0c997 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.DaemonSet.yaml @@ -338,6 +338,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -553,6 +554,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -770,6 +772,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.Deployment.json b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.Deployment.json index 9823ab93ce1ca..705d53efed9d9 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.Deployment.json +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.Deployment.json @@ -564,7 +564,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -859,7 +860,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1154,7 +1156,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.Deployment.pb b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.Deployment.pb index 546df1c84b7f2d9ca800e9cbbf5ea40bc88e805e..585db84023799a5bcf78c96c21802b6d22eccaa5 100644 GIT binary patch delta 169 zcmaD7(ib{Gk?DEJ<~xijjI1jHIT(c|ACUBAmg)-t3o)(m-R#87&&4=(^EM>`Mn=cU z$CcGZCAm2B5_40-5_3vZg?Nfm3rkarOEypBJHSnpI%!3AmQB1|L>cMHy4g-sjS&EF C4>oiF delta 127 zcmeAReG)Q3k!f$p<~xijjI93xI2eT{pOf@umU`k37GnD6v)PH6pNp}5bAprrBct); oLTPn&ZZ6Ke#N5=)^Z5>NjEs(x zk1MN-N^)`LCFZ7vCFYc-3h@-B7M7+Kmu#NMcYvEHb<&FLESq?_h%(ZXb+Vo2WdIIQ BHoyP? delta 127 zcmdlTGBIR=BGaqj&37167+H4)a4-r@J}2qREcL`6EX4HBXR{MCKNn;B<^(ALMn>bw ph0^Nm++3V_iMgqp=kp!l#wFv)y7`;J4MvtFyj)oI%B#q*0RSR2CC>l= diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.ReplicaSet.yaml b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.ReplicaSet.yaml index 65ce5a8bdf9be..d6f024ac5126e 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.ReplicaSet.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.ReplicaSet.yaml @@ -338,6 +338,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -553,6 +554,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -770,6 +772,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.json b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.json index cbe80deee72b3..74e29ea755cda 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.json +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.json @@ -564,7 +564,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -859,7 +860,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1154,7 +1156,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.pb b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.pb index 55b056f066416e7c12c976f3bb9b82a2c45e27bb..e7e25e71c5b3265df126f444cfd8656e43fedcb4 100644 GIT binary patch delta 174 zcmZ1ydoFf@64SES&37477+H@+axe-_J}BwSEY%kP7GhfAyV;qUpNnzo=Iu%XjEs(x z?X=ZJCAm2B5_40-5_3vZg?Nfm3rkarOE!N~_GI0BTezH!c*P1g7+E&)auH?tIxYZ{ Cu{qEH delta 127 zcmX>XyCimk64RfU&F?f*7+L2;axe-_UZCyEEcL`6EX4HBXR|XiKNn;B=0qt0Mn>bw p8QSXX++3V_iMgqp7w{e6#wFv)y7{}p4MvtFyj)oIDyXdE0sw6wCmH|% diff --git a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.yaml b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.yaml index 90db583cd165f..31863322667db 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/apps.v1beta2.StatefulSet.yaml @@ -346,6 +346,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -561,6 +562,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -778,6 +780,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.json b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.json index a0a2c04ea1bf5..c0123682af037 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.json +++ b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.json @@ -647,7 +647,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -942,7 +943,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1237,7 +1239,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.pb b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.pb index 1975ddc3a15f9fefc0ead4b2c720b7fda8091a2b..14b83284485aae80af442c9ef6f6d3c9ed0e768d 100644 GIT binary patch delta 193 zcmZ1+c{Xx_6w}(s%^Mg~7#UAYZe-MDY7YhTI2HzRFbXh9Fi(EZ>&L3WXw(+~7H3-F zyZI^$KNsWF&7LX(jEs(xqg2&JCAm2B5_40-5_3vZg?Nfm3rkarOE!0?da`cL6)k5Y SUa`^*MwU&yTtpcz%?<#flsixW delta 151 zcmX>bxj1ry6jO8L<_(M~jEwUpH!|un-37H9hB zv-v6uKNn;B=BIoDjEu&UckrsSb8~U#CFZ7Xc98XC-CQkN&W1}`k)34;FBfjTzqKwg F0s#EAEyVx; diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.yaml b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.yaml index 26a9b9546e966..8ada070a5fe5e 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.CronJob.yaml @@ -398,6 +398,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -613,6 +614,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -830,6 +832,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.json b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.json index 648fe3547a58d..239a5f26905d5 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.json +++ b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.json @@ -598,7 +598,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -893,7 +894,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1188,7 +1190,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.pb b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.pb index 4906f9e2b593dd81608177b29ccf320371ed6a13..0cfa7c3f26c0938fe53ca5327c31cff60717a0f1 100644 GIT binary patch delta 167 zcmZ1*c0Fu@7~}4Z;;D>G3xg)tF@`hs1#FZ^VPsn2yV;hRpNnzo=8Z}MjEs(x6?oJ| yCAm2B5_40-5_3vZg?Nfm3rkarOE!N{_GI0BRk)muc*P1g7+E&)auH>?Ejs{@gf-Xz delta 120 zcmcZ}wl-{n7~{l^;;D>G-vcMtF@`fe@!u$s!pQW`XR|FcKNn;BW?xbw3OwrU l++3V_iMgqpXYn22#wFv)y7{BR4MvtFyj)oIN~zeg0|2NxA@%?O diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.yaml b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.yaml index 48952fe244fb6..a39424977ca16 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.yaml @@ -362,6 +362,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -577,6 +578,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -794,6 +796,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.json b/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.json index 558e57699d57f..27fbdbb45ca1e 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.json +++ b/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.json @@ -647,7 +647,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -942,7 +943,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1237,7 +1239,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.pb b/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.pb index c4b7c2a2e84c27b054b6ed05c4f5e00dd7dd0780..725df79d201b5dc0972a8592a41ba465f8ec7930 100644 GIT binary patch delta 180 zcmZ1xc`0&&JmcDp3aN~YCnmQs>N2&5Zd6QRWLg+BS(-VVsV@M`Tj9I;77ITYhb+ic$+pQ;SPB_o{lbZY~lnXCq#*(hWwIO}t!0 I87|EZ01yy3ApigX delta 133 zcmcZ4`s>_s?hZEf#(*#`evx v_yiakjVJHrRcGhs;>=6TP2FrRaDW?^j3?{nKBXIsEK7K~u diff --git a/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.yaml b/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.yaml index 9556d439bbaa7..2edbdbe1854f8 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/batch.v1beta1.CronJob.yaml @@ -398,6 +398,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -613,6 +614,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -830,6 +832,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.json b/staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.json index 7a9d63ad1ad2a..cdd6dce0b1c72 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.json +++ b/staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.json @@ -505,7 +505,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -800,7 +801,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1095,7 +1097,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1787,7 +1790,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1867,7 +1871,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1948,7 +1953,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.pb b/staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.pb index 33ed308527de9d3614acbf1318271263cb5284aa..df9831efac1e754d8faee14f20da973896790ea2 100644 GIT binary patch delta 298 zcmZ1x^Cw0y+oG6(i<66~%ut9qAU{Ru*+#)sMy3_Mn=2UkxfrKzexo43$mlrvf~LBt zBo}91Vs2_!VoqtQ5KmERVQFe{$!2XOPu9%>Lgj44E0({($g+u-izvg-urgkq{6l>z e!=W?v;zRhOJBzT delta 209 zcmewpvm!`5m((Bct(T16Fl*ZZ6Ke#N5=$IjnAz?=lPE OlFY&-;Wl|TyAuF8vK|Bg diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodStatusResult.yaml b/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodStatusResult.yaml index 8974386246688..5ad52b13ef7b4 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodStatusResult.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodStatusResult.yaml @@ -65,6 +65,7 @@ status: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -121,6 +122,7 @@ status: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -180,6 +182,7 @@ status: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.json b/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.json index 8766ab78fcc6f..66cadba1b09e8 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.json +++ b/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.json @@ -548,7 +548,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -843,7 +844,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1138,7 +1140,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.pb b/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.pb index e69176c67dbc1683cef6f29c63b789b7da0fc342..aa9ac40fddf24043cef09e768ea228df4f093dd1 100644 GIT binary patch delta 163 zcmaD6G%0w31k;zG%?*qxj7)t25PF60=4VX&T#QpUM=1#~GCEGqR#q34?})oxp3;8%%j-`08ZZ|%K!iX diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.yaml b/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.yaml index d8bb06d2dac47..f9007a03d7b30 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/core.v1.PodTemplate.yaml @@ -327,6 +327,7 @@ template: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -542,6 +543,7 @@ template: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -759,6 +761,7 @@ template: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.ReplicationController.json b/staging/src/k8s.io/api/testdata/HEAD/core.v1.ReplicationController.json index edd96c7a2b968..556d28fbae92c 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/core.v1.ReplicationController.json +++ b/staging/src/k8s.io/api/testdata/HEAD/core.v1.ReplicationController.json @@ -554,7 +554,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -849,7 +850,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1144,7 +1146,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/core.v1.ReplicationController.pb b/staging/src/k8s.io/api/testdata/HEAD/core.v1.ReplicationController.pb index d4b523e6e95a254c42a354512c1a5826b816958f..c72187f5bec8072d6984b2d37911687dbf1e6203 100644 GIT binary patch delta 169 zcmaD9+!HcEiRnr3=CzC|jEtKncQPt5^#y==Oe=gh3p4X`F;3mwt|Y+7=s0ZpW1^|XfI&A;| delta 130 zcmeASy&p0`jcIep=KG8(jLg3RxF%ne^ko)$;tv*J`scIRm6@N5v3+wWuK**X@nj7i mb#`tp&b-9j)Xf{DJy|!u7A|MQC9TNLvV@llx87_`IYt1JOeNd^ diff --git a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.DaemonSet.yaml b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.DaemonSet.yaml index 3390bd099aa4d..82871a9436754 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.DaemonSet.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.DaemonSet.yaml @@ -338,6 +338,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -553,6 +554,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -770,6 +772,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.json b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.json index 5ac5750397026..0071be9c53c01 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.json +++ b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.json @@ -564,7 +564,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -859,7 +860,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1154,7 +1156,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.pb b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.pb index 6644acfdbbcf6d331dde42936a4711dd2d483f41..999cc7a821fe2e0e2393a75283896c06288af163 100644 GIT binary patch delta 169 zcmaDCG9z??I@9Zr%^SH=7#Y`0?qdvM>I(q#m{$01_F(4cVw}2pkCFf*qvPbW%Icz$ xT%37{xv61^Ii;yWJVmL6rK!awn|~{NvTlALT+T+kVuc%wESq?_h%&sG4FG2GI$i(( delta 122 zcmbOc`YvRGI@7_B%^SH=7#W);_b~=BJ@E(gnEv@}_F(4cVr<_W!7ISXXgpb)N1dIU ji!(1VH+Az;z60F2WIS0n|53QX$g+f&3#(pLm0~skMc*UG diff --git a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.yaml b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.yaml index d5fa1d8a4c31d..a32d193f21ddb 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.Deployment.yaml @@ -348,6 +348,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -563,6 +564,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: @@ -780,6 +782,7 @@ spec: resources: claims: - name: nameValue + request: requestValue limits: limitsKey: "0" requests: diff --git a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.ReplicaSet.json b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.ReplicaSet.json index 644584d3da7be..f3cfa5acdda3f 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.ReplicaSet.json +++ b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.ReplicaSet.json @@ -565,7 +565,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -860,7 +861,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, @@ -1155,7 +1157,8 @@ }, "claims": [ { - "name": "nameValue" + "name": "nameValue", + "request": "requestValue" } ] }, diff --git a/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.ReplicaSet.pb b/staging/src/k8s.io/api/testdata/HEAD/extensions.v1beta1.ReplicaSet.pb index 98a5989a0d2fbe077577e926159c678bbf08ea21..7f4c8aa1b7d5d46853a176d3fe8ce5eee2ac0b32 100644 GIT binary patch delta 169 zcmbOpaxi3qI@6Sp%^SH=7#SZ=?qdvM>I(q#m{$01_F(4cVw}2pkCFf*qvPbW%Icz$ xT%37{xv61^Ii;yWJVmL6rK!awn|~{NvTlALT+T+kVuc%wESq?_h%#J;4FE9pIk*4- delta 122 zcmX>YGCgF1I@7D*%^SH=7#Vj??qdvMdg2e}G5zz|?7_^>#n`?%f>(f%(Ri{pk2*Uy j7iV5#ZtCWxdNnMlNA4K`#E(iUOdv;>`TKu*96wRH1UNQm$ey?v$d;vecrhbIQc}w@lT)2@5{rxdV4_mO zT!LKusTBo9sl~;a`FUWaN_@%rrFkX3`6&>s8mtD4LMmLmMX80Qsl_G55c7m{6HAga z97{@yGLuS6AS$KW7{SV9kkplO6?1W?6lIpB7C|&l7GO%N=TFYhD=Es)$$^SWy=CIs z%*1t?k;|Bi2Wk;SIkH|U&Vu~>9Ec;iA^w4y$;icBoL^d$4D~FkTcxnMA(d4sh%10= dav!t$OH6Y7s)~31+U3Oqjx)DTyVCU<0%+F>$4EB~>d; zHe*VhY{--WuM_guibY}=yKxlOP=?zy(myOTYT<_C1c zt?w_D0|_EM1q&%=XkGYJWp^vAuIPLYGRJUZgbFQWc(S0PMp1PJlCp)bJCwt3LXG{6 zomwsi9(6Vs^Uq0IXyw`7+J3Eed;Rx!wG|u@x_S6R=#*V-v$}*Br8~xH_@RXUM$B0Q zl+qbwB;w1hH)r4T^DC>5g(?R}um1Vc%}x`Hcx&WKrB|`dp->>jB^mTOSCyE3OhLg2 zttY~UHpTu6`_X$DPCMM+KCQNb4vC>0xU;D#lj&F4%51*ha(TQ=!iV~at&^EUt8-Hh z`M3AS3TqCmn4n#T9}ZYN8j0;hr}V)5GcR%={vdamP75={IfDuB&$vY+ rMFNiZ_vXY>q&Zts8*PVg$ZKAQ{}Og1r-EGNfuovpUl`3}B> z@8EM-*%)^ftY-M;`_1otYdw6q%s#f?UWp{x=SDYI&l&w9^qTI}+`ydc2>GFeMhTc| zjyU_H#h4z@5iFbsL}lwvW&6U$I^0;kM{S#rgsp?OTL1PI12*^uSY&0! delta 91 zcmbQqae{4v1ydK><^_x?j7&?I!L*A#msnA1aeir0a;kGqVsWuwVs2_!VoqtQkSZ5% eVnL>RQGRIwM1V6pGcN_ql;X^TDU)JQVgLYWq8+gS diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml index 52b050c8fd452..025800650acad 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClaimTemplate.yaml @@ -66,8 +66,30 @@ spec: selfLink: selfLinkValue uid: uidValue spec: - parametersRef: - apiGroup: apiGroupValue - kind: kindValue - name: nameValue - resourceClassName: resourceClassNameValue + controller: controllerValue + devices: + config: + - opaque: + driver: driverValue + parameters: + apiVersion: example.com/v1 + kind: CustomType + spec: + replicas: 1 + status: + available: 1 + requests: + - requestsValue + constraints: + - matchAttribute: matchAttributeValue + requests: + - requestsValue + requests: + - adminAccess: true + count: 5 + countMode: countModeValue + deviceClassName: deviceClassNameValue + name: nameValue + selectors: + - cel: + expression: expressionValue diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.json deleted file mode 100644 index bd89915d42950..0000000000000 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "kind": "ResourceClass", - "apiVersion": "resource.k8s.io/v1alpha3", - "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" - } - ] - }, - "driverName": "driverNameValue", - "parametersRef": { - "apiGroup": "apiGroupValue", - "kind": "kindValue", - "name": "nameValue", - "namespace": "namespaceValue" - }, - "suitableNodes": { - "nodeSelectorTerms": [ - { - "matchExpressions": [ - { - "key": "keyValue", - "operator": "operatorValue", - "values": [ - "valuesValue" - ] - } - ], - "matchFields": [ - { - "key": "keyValue", - "operator": "operatorValue", - "values": [ - "valuesValue" - ] - } - ] - } - ] - }, - "structuredParameters": true -} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.pb deleted file mode 100644 index 3827942c850817472426bbeff56c8489a0ff6ff2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 567 zcma)2J5B;Y7~Vw^m%)W~V?nmu!YBp4Lb9>M!bFWB#8BAH!Viu+%xq>@5;PXJ-on}= zcmoseU@WY?fethB2(hsH{^$2dB59#rR1qL~COS|{B3UDRZ*+iZdV`OAxAi+Yp;$`) zF^}GJsKD?5+L&hGZ}x$Kz(cs4wSv-gDpTAsE1@fa_AUrZ^hMRlNLQo7tr=?@ge08l zZnWNToXPX&Yu>ZY6ngo3Q>clqE2uzm3{;-O*e@EWFX9lDFk^g(hw6zQdrP(6xvir@ zLYN^A7W%`vnra!RWLe0*9oeGXBMeh=rv&OhPj-wp2AJVK2;J~YJe~TV$q!cFgv!Im z?^Z&WGV+U4f{Q%*0!^i*t diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.yaml deleted file mode 100644 index f43facc6f79f9..0000000000000 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClass.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: resource.k8s.io/v1alpha3 -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 diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.json deleted file mode 100644 index b39aeb9a01b07..0000000000000 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "kind": "ResourceClassParameters", - "apiVersion": "resource.k8s.io/v1alpha3", - "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" - } - } - ] -} \ No newline at end of file diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.yaml deleted file mode 100644 index 25b8a9ee1841e..0000000000000 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceClassParameters.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: resource.k8s.io/v1alpha3 -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 diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.json b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.json index 43e6eeb2219be..a3a916ae36352 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.json +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.json @@ -43,32 +43,55 @@ } ] }, - "nodeName": "nodeNameValue", - "driverName": "driverNameValue", - "namedResources": { - "instances": [ - { - "name": "nameValue", - "attributes": [ - { - "name": "nameValue", - "quantity": "0", - "bool": true, - "int": 7, - "intSlice": { - "ints": [ - 1 + "spec": { + "driver": "driverValue", + "pool": { + "name": "nameValue", + "generation": 2, + "resourceSliceCount": 3 + }, + "nodeName": "nodeNameValue", + "nodeSelector": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" ] - }, - "string": "stringValue", - "stringSlice": { - "strings": [ - "stringsValue" + } + ], + "matchFields": [ + { + "key": "keyValue", + "operator": "operatorValue", + "values": [ + "valuesValue" ] - }, - "version": "versionValue" + } + ] + } + ] + }, + "allNodes": true, + "devices": [ + { + "name": "nameValue", + "basic": { + "attributes": { + "attributesKey": { + "int": 2, + "bool": true, + "string": "stringValue", + "version": "versionValue" + } + }, + "capacity": { + "capacityKey": "0" } - ] + } } ] } diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.pb b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.pb index 907c56bb8bccf3430a616caaecd290cba7824458..9a36629f9a87a81673798852682fa37419c8525e 100644 GIT binary patch delta 237 zcmbQp@`YuB0n;z7za7>$CFtQB(OGT`D( zEGa3UFD4`LC65(5D3 C&?<5O diff --git a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.yaml b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.yaml index 86289d94d0a86..93d7f2e117023 100644 --- a/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.yaml +++ b/staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha3.ResourceSlice.yaml @@ -1,5 +1,4 @@ apiVersion: resource.k8s.io/v1alpha3 -driverName: driverNameValue kind: ResourceSlice metadata: annotations: @@ -33,20 +32,34 @@ metadata: 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 +spec: + allNodes: true + devices: + - basic: + attributes: + attributesKey: + bool: true + int: 2 + string: stringValue + version: versionValue + capacity: + capacityKey: "0" name: nameValue -nodeName: nodeNameValue + driver: driverValue + nodeName: nodeNameValue + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: keyValue + operator: operatorValue + values: + - valuesValue + matchFields: + - key: keyValue + operator: operatorValue + values: + - valuesValue + pool: + generation: 2 + name: nameValue + resourceSliceCount: 3 diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1.DaemonSet.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1.DaemonSet.after_roundtrip.pb index 5fe83c6f42b331d584e686a7f9a076e437caee6e..dd1054b941f5a6c8ebb0e39ce2e5c0b0a77281bf 100644 GIT binary patch delta 144 zcmZ1+v@&RdG-Jm`nN&um^L~>biup6`_T4C(!pL}avn8_t7vtH@rzHg#8BHh4@~HFi ra&hJ*=B9=v=9H!iF>L0S=3w1CP1uBufT{;R|qM= delta 138 zcmZ1(v^Z#jG-K07nN&vRlYU&26UBU)g|_-`luc#aY{@LZ#dv!2SxEs#M&rr%q||x1 rxj6F@b5p|-b4pV;PvEoR#w*Rix>;J`1|!Q09xi;QaIj8x)p!B`z?v(K diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1.Deployment.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1.Deployment.after_roundtrip.pb index 9e66f34abd60b0ed6e02f570f2da3c106656bef1..731a22c1e74a7eb3c7829a44e0ea179723f2f7a1 100644 GIT binary patch delta 148 zcmdlGv@K|Y4C9oIvZ;)$SN%8`g(iO#^<|dY?YmJfg^}^Jgs%uNkT%qdM3V%R*9&xV_T0uI*AQVKU1SzhsQ;Wvqcb+VJjI{@7aD@XtU delta 143 zcmdlMv>|AM3}fF$*;Gc>^L`wRLX#5|eVL`U`fijJgs%uNkT%qdM3V%R*9&xV_T0uI*AQVKU1SzhsQ;Wvqcb+VJjYybndD>VQB delta 143 zcmaDHcsFo@4CC&NvZ;)$U49&lLX#5|eVL`U`fijXeBGaUx&37167+Ej-aWD!^_LuNwlG?iYHe)IyvAp2n!f(oCUyV-ywKyyJ diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1beta1.StatefulSet.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1beta1.StatefulSet.after_roundtrip.pb index 0e996204770a4e99c5e216b12b481788e94dcbf5..73f11626f64e953bbae020aa41a4375b199b72f0 100644 GIT binary patch delta 151 zcmeww^*d^U64T|V&37477+F7uaWD!^z9`|#B(;0<9mZ5f#;cp1m<6~P&u;#sD8R^Q xI+*o2wCTxUNDJa}vWO>EIh2J<+E&zsVEsg*H delta 142 zcmewz^)+gO64TkJ&37477+K$jaWD!^4v_F=lG?iY4r3}KCOJU0*s8tlN0#V rdAPYa^AdAY!xD2!Q#VUUbFglnD{R7sSIq-9mKQu+_)VGYrSSv+YJVuj diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1beta2.Deployment.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/apps.v1beta2.Deployment.after_roundtrip.pb index ea64a0d378a8052574793cb55b81ee2e7c4c3898..1695071cdda82c72029117dbb4ae0965de5240f4 100644 GIT binary patch delta 151 zcmdlQv^!{mBGZ(h&37167+J6SaWD!^c9isGlG?rbHe)Iy*o2wCTxUNDJa}vWO>EIh2J<+E&zsVEsg*H delta 142 zcmewz^)+gO64TkJ&37477+K$jaWD!^4v_F=lG?iY4r3}KWb|!3s6w{ip%^Mg~7#WXGZe-MDY}>q^F_n>HfjTb}Vdy6w|V>%^Mg~7#R;vZe-MDY}mY>F_n>HmOlrh0Fwms`3ntexMlkL6-6)a5$arzoq|wI+0D9aiB>(^b delta 138 zcmcZ>d?9#(7~__W;;D>`vnJOvMlfyl-6)a5$asFU4YL3j=6TO$|%TDNWt%pv=L#dA6_#8zD7v3O5*8Uhr_?Gin+e03<9c!~g&Q diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/batch.v1beta1.CronJob.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/batch.v1beta1.CronJob.after_roundtrip.pb index 6123c6cf03f1e98cc0c85c40857520111d5acef3..87a87757dfa380181a7624dea2acea5b2d320181 100644 GIT binary patch delta 157 zcmX>db}?*%JmZ>;3aN~Y$0xTj>N2$jZB$HQWLz*=iaCO5w=bA;b@NRY0WQX~o3o__ z7#U3`@8wnJM}J1ZB$HQWSliwiaCO5t1p;ye)CNh0WQYVn{%ZF z7#WQx*U6~!aC33yCFZ7vCFYc-ZZ;6G;l?Y?!Mb_3;tfWY7d%|}OaUr;s+q$G02~=E AO8@`> diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/core.v1.Pod.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/core.v1.Pod.after_roundtrip.pb index f8ba6632b88bdb618a1822813c5c901516bbf343..5bb77db5fbb60acfa1f28be99035ef07464f1f66 100644 GIT binary patch delta 257 zcmdlMaVSDC+oG6(i<66~%ut9qAU{QD%|^jgM#ig~%NYf@7|(7tR1jcfG@ZOqL!FP8 zi!(1VH#ICVr!-ZFVY9C!2kYi5f+lPPR6Ss0dBwv;$fU`&YTk_RCZANB%J^+_yt*UQ mQh8KMy?6`ri=A^4i;Kao2trnh=Dx{MS}G_;q04{Kb^-vE8%(VL delta 244 zcmX>Uu`NO{+oG6(i<66~%ut9qAU{QD!A8MUM#l4-%NYf@7*B8JmJncMG@h)lrOw06 z#hI6wn;MpwQ<}OtP?Cdn^EE*eHoR&cu(7=0;lgjqD@1YEv(OX1kq4Z z@DC`cfjy6 zpe*l9LZ!$O#L+}D!IihY)U8$zpMHC_Xlfg1Jv(}fRu2Ye!3c>@LwS?#TeaL&5xxUW z!nr`6m_%KhrL)59u7NRPJTGh){GAyaw?$%BCbFux^`y1MI0@MS5>$B}=|0pW!pSyG zl*4L@c>MiS`u5*x9Q=l_hrbt0&BJ6g4CI~tIPXkn5i0i|bWNH0vred{{s4e@hsa5f zuY-|JW2~A~dZ^+y=Kl5O2y+)z+*(43oHWy`qY@Iy=J2_bQwF-V9U;^8p2B$$i(q1R zu*AzR&ryQz&pF{^I0xkn)?9K600UpVeuv!bYgOH>*k!OY2X+zq{o`Y-;i2{Z(-X8h z=1}mIFdVM+t2z7sUh#r{>68a7n)a_#SN4QY_aBBg^!|BRCSfRsxDWxZjGAsWkqe-& z4%WcLA!ZRvXFkgscX2PHvhdlB@`h;}jXfc+ghb{e*gw(Xcyt)7a1r5ifYNS?pm^|n t1D05je1k=KR%?*qxjEuWC*E6OvGG5*Mlu3Y#@$BaLiUN#`rjs`)sq^u2apooF mriLZvl%@(XY~C%!!MfQ=*o2LMst0T=uXwl!nKb#ex*q^Iz*%?*qxjEq}1*E6OvGM?Z3lu3Y#@$}|ONdZPiO9i^28_NqGF8roU{;2K;05N+iZ~y=R diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/core.v1.ReplicationController.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/core.v1.ReplicationController.after_roundtrip.pb index e74a5e077e2241e70050980ff9ab02f14cdb47d5..617e150e2edc7744d80a992065adf9cc2338b1b7 100644 GIT binary patch delta 146 zcmdlSxHE8q64S)M&1)G`7#SZ-?qpPA+`V}XV=5!#)y+c80$hw|H=j`yU}Q9%d{;@G skC%%xFEKYYEHS4vRfu7;fHDW`=6qojHo~et$lqXOdBwwp-?+uB0A`mhDgXcg delta 139 zcmdlPxH)iw5>t2J=CzC|jEuJ?cQPt5Zr!|wF_n?={AM9$0WQYVn=dE|FftlXeyF6* q!_CE+mzbLxmY7qTy7`S12kYiSVG}mIY96q$yx`%&Z^~pjjoARo{4Q(& diff --git a/staging/src/k8s.io/api/testdata/v1.29.0/extensions.v1beta1.DaemonSet.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.29.0/extensions.v1beta1.DaemonSet.after_roundtrip.pb index 36fc4ffe11c6199c17000e59cbaf39956c12b0d7..aafbbe9b71588e25b1b8299fa38504d4f9fdfa3e 100644 GIT binary patch delta 148 zcmdlGv@K|Y8dF!$=KG8(jLaAPxF#p?_%aFY-h7WSm67r4W*24wF2=K)|0xPEGMY~2 vS61ia<>Jgs%uNkT%qdM3V%RJt&B3~Pp|A-X0aXv!SYGjP5i)7Am&P*yU_&e# delta 140 zcmdlMv>|AM8dFQq=KG8(j7+EfCO;7OXWY8^9%Cva*5*;? sav_EKqI@6?}%^SH=7#S~5?qdvM+`9Q8V=5!#`OWUk0$hxzH{X^NU}Q9&{6*5*;? s-@0gLU&VVG}mIY96q$yx`%&Z_4CgjoAS96D@@R diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1.DaemonSet.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1.DaemonSet.after_roundtrip.pb index d8b5c3cb5d9c5c597f8a37b9a646fb07da0979ac..9d473166f9f66b8e8021b05bde063fa780ce48ea 100644 GIT binary patch delta 144 zcmewz+!!)Jn(@I#nN&umHk`)`y@VPssp*^*g+i?MTazmfnWqv_-Y%IbW) rT%37{xv61^Ii;yW44d<%U063?5{_Uaph||FWf?CQA(JMHYd!%0Vks(Z delta 138 zcmZn+`5in#n(@{~nN&vRg#lcX4~qFR3-$VMluc#aY{@LZ#n`@CS4x19(Ri|*v^ozr r7iV5#ZfaO!PHF1q34C+7@k+a}Zr-kNgOOzkFBd*jTv#W|YCZt~AUY_p diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1.Deployment.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1.Deployment.after_roundtrip.pb index 6cb8c88f2e0c8cd7e8d252018b7fe2db2ed809b8..0f33ae4adf0562db4dd2852c73c6eef2c4b103b8 100644 GIT binary patch delta 148 zcmeAO=?j@4!}w;SY$_w`+5iqlp~-<_zRXgS{Wr>`Ffy*)Y{M+T#n`!7PfCE1(R8u` xk2)VO7iV5#ZfaO!PHCzT!{&*6bGQj8aADoNP2mP3%Q9Xr{3f}uPL|Sq2LRD{D53xW delta 143 zcmeAR=?Ix1!}x5YY$_w`@&FD-p~>?keVL_t{Wr>`FfuORY{M+T#n`^tKuUm-(Ri|> tv^ozr7iV5#ZfaO!PHF1qJIXGso39H;un|(TOW_71%MxBLd`20u0RYB0DhvPs diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1.ReplicaSet.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1.ReplicaSet.after_roundtrip.pb index 3e245809a346331d8875b8d63745f6e0d6bdd7f0..8a303c2208b93bbeed81a27ffd9b8d59d56e7c9d 100644 GIT binary patch delta 148 zcmdlQygPV;4CBm=vZ;)$FZ?+eg(e4z`7%pQ_TMO%!pOLGvkkKV7h~sUJt+Z3M$^d( xJnDSBT%37{xv61^Ii;yW44WtN&EY1Xz=d`5Hia9EEX#Pg@SEhqI$26{HURXGD2@OC delta 143 zcmdlTyft`&4CCaDvZ;)$kNi0pg(lCF^ktUn_1`F$!pOLMvkkKV7i0To11SMUM&rqj t(&{|iT%37{xv61^Ii;za?Rb1r6rEaU2pa;c20rz1ERg(lCH^ktTs?7vYyg^_XXW?NHy`ceXnjHZ(n vdDQuMxj6F@b5p|-b4pW%7&c#5c46IoO*n#$u&V6}HyBx#@p9oeu8<1=t+y(S delta 143 zcmX>Xb0TJfEaTFRa;c20MdOH{TGBU?Zevx55oZmL3y#0syu+Dc1l1 diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1beta1.Deployment.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/apps.v1beta1.Deployment.after_roundtrip.pb index b39600e3ea69f87a3f26eb9eedb511e726c16b2a..02269284983a01992217fa9d69459f12707ceba4 100644 GIT binary patch delta 151 zcmbOjGCgF1BGZT9&37167+E(4a4-r@UMT6yBsF>SZN^ka#osXA`GcPeWH7qfwG*yUU^KE4p*3GwsBiIP5+O2Sdk!2Y#7k=Z+*Z?W4F2Dc) delta 145 zcmbOpGBIR=BGaqj&37167+F^ba4-r@W>oTJlIq=jn=zGbb2(;$64UCK&37477+Ft8a4-r@Hk9;blA65v4r3}K*m|S5p0B2?NPYF$g+%=3%_xNTmUt^FAM+x delta 145 zcmcZ{b2esz64TO{&37477+H@-a4-r@-XP)2B-Ok54r3}K9UlA65vHe)Iy*ia+5p0B2?N+$K$g+%=3%_wjYycpXF023m delta 145 zcmbOn(i<{Ck?C3R<~xijjI7H8I2eT{Gb;HqN%d~N&6vu_xO}rCvj7)k`{vn70*s8t vlh-J#^Kf%<<|XE)h9%~drfzSZN^ka#osXA`GcPeWH7qfwG*yUU^KE4p*3GwsBiIP5+O2Sdk!2Y#7k=aJvjPA`pf8sI delta 145 zcmX>QyeoKuBGcsH&37167+D|rb1(``W>oTJlIq=jn=zGbb2(;$64UCK&37477+Ft8a4-r@Hk9;blA65v4r3}K*m|S5p0B2?NPYF$g+%=3%_xNTmUt^FAM+x delta 145 zcmcZ{b2esz64TO{&37477+H@-a4-r@-XP)2B-Ok54r3}KTaVcVg6w{`N%^Mg~7#Yt_Ze-MD?Ag4YF_n>HSs(|a0Fwmsq^F_n>HK_CaC0FwmsWJf7KRt-j@UVn(9 z<(sdt2yijBZ`M;0U}Q9&Y_F=$!_CE+mzbLxmY7qTx|vVbg>`ejXapNxH8SihOL(~m Kn6g7_79#*j=`Gm+ diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/batch.v1.Job.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/batch.v1.Job.after_roundtrip.pb index 5fc96f6c032d7658c2d7a561a13342fdff24960b..561e54c46b449179ed19cf58c696461a4d770583 100644 GIT binary patch delta 144 zcmcZ>dM9*(7~_GB;;D>`%O=+{MlenG-zbs7$hda14YL3jW9Mc)DFH@C)5!`v>U_Lh soOy}4sbPsZrKv&;n~~bg&T}4%Xqo)n*>xSrMZU@0Nh9@f&c&j delta 137 zcmcZ;dM$K<7~`&u;;D>`3ntexMlkjIZy($vj&lwDXiUl)#GBcx`R!VN~2CA?fXjaqz1nH>OE>M3jh diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/batch.v1beta1.CronJob.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/batch.v1beta1.CronJob.after_roundtrip.pb index f313b08e2f54c2dbb6ef53e9782713024d1b3be1..9f0643d069a1557d5198a182e1df55634ebd06ec 100644 GIT binary patch delta 157 zcmcZ@aXn&!JmaQ~3aN~YXD7EY>N53&Y*b8PWL!2`iaCO5vOk!!cJoaZ0WQYQ&H5?= zjEts}9aPo%c)2+95_40-5_3vZg%~#T%et^`E)tDkBcMu#on;v>7eSM@Yt3Q=06d5* AmjD0& delta 151 zcmcZ}aWP_oJmZ>;3aN~Y$0xTj>N2&3Y*b8PWLz*=iaCO**B{JTzWFAL02gEX=CjfQ zjEu&U@5!k1aC33yCFZ7vCFYc-ZZ;5@!;M$kg>`ed(hWwICA?htOaUs}t2K)e0C}%3 A)Bpeg diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.Pod.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.Pod.after_roundtrip.pb index e8478fc8b0661655ae96265c56ad825f1b1d2c3a..3aadd916dd89eacdd6078594e7fc0c8115670e6f 100644 GIT binary patch delta 255 zcmdlSy+2wo+oG6(i<66~%ut9qAU{QDM#klv%NYf@7~3~rR1jcfG@dM|tIosC z#hI6wn;MpwQ<}PYqofP#W+9;nHoR(N*jbkFa^W{+aQfn4Z$7W>h|Rjm UZo1}^Uuy~wP_ar|1+R)q02H-HkpKVy diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.PodStatusResult.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.PodStatusResult.after_roundtrip.pb new file mode 100644 index 0000000000000000000000000000000000000000..59180f35911261e27496a06d46e7f03b0b4de1d9 GIT binary patch literal 1947 zcmeHIzi-n(6t*Srjjr(S z#UxH-kIKZ4&7XDnQh+ii0ewLHgqr7fD5nvL>DJU`)yKOsB!e`>u1V@|-(h^HPBcpi z^OWUWh^Q1vgmE;IOmO9GEp|$!;}_rGEEw7*S}#xDqt%7}3Y2}~QeWPtBeRm4>V#`U zop3G?CnizbMsBTQ_ST_1WIQcwW%%tGnr4H9EDvN=Z|PBEn{nc^Lj7d1x8vVMLvt`0^*woi6sF9y7ohO)QOA&pJ7YqT`m72N?h-lS z_$HL&=^3*kl^&|Ng}HydJHgypm1ZTPL{7+bs;GoSuxa?*%FYKiE4xC*8(kIWKq$P4 z-Nq8HzrI2VI!DF4@F84;d0>=p+tO_94|5=bod5s; literal 0 HcmV?d00001 diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.PodTemplate.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.PodTemplate.after_roundtrip.pb index e2049b6d29a449a7859efe57fd044ebabb984f9a..e1b7af204a842af77c96e050095389d83d32ee5f 100644 GIT binary patch delta 140 zcmbOjG(Bj71k=yJ%?*qxjEs{v*E6OvGOpeHlu3Y#v2(Mvk^m#4>0}>ebv|A$&b-9j l)Ud>y(o`Xa&GpJItefkEBiIP5idVS7$g+%=3%_xbSOIraC^i59 delta 133 zcmbOpG%;v`1k>lh%?*qxjEudT>lsrS8JBN<$|S(W*uL3bNq~{jcyfTUIuAD&XI^4% jYFJ`UY3gQqX&2Vb4Z;y@c-6?Tvn=7|!f(ptlNx>iNb)8L diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.ReplicationController.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/core.v1.ReplicationController.after_roundtrip.pb index dfb5ef6b416d4fcba0b3ca76a5348e75bfd1d6bf..2376a417ef301f5152240ed870e72f59db2b72a0 100644 GIT binary patch delta 146 zcmeAUo)|nqiRop~=CzC|jEp-bcQPt5PTstRF_n>V?Pein0WQYQ%^6ApjEts}E0xvx sc)2+95_40-5_3vZg%~!kQFdY7yjnPdjj*a7g&T}4%Xqo)8+V@-0MGO*;{X5v delta 139 zcmbOj+#NhYiRp3B=CzC|jEtKmcQPt5_HJIon99hwe6tX<02gEX<{TvfMn>bwwaV%| q++3V_iMgp^i8-aIn|-8RSU0Z~j$p&9Muweb2`?9ZQzn1Ym<<4ki7BuE diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/extensions.v1beta1.DaemonSet.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/extensions.v1beta1.DaemonSet.after_roundtrip.pb index 5fa61966d38168d068d055697929c06137aa43ad..9f37cc6f65902b2c3b01d3ace34107e34dbd58c8 100644 GIT binary patch delta 149 zcmeAO=?j^l#`Gw7^L@q?M&^|PT$2-ce3^tMZ@$Nv%E-8OvkS8T7h~tJo4?83VFu5bh!VO9GSZZNVeX%^SH=7#TNC?qdvMoV@uVV=5!#+Rg6F0$hxpo98MCFfy7>UZ<_E$NY=l)ERJg&&vW%Atzj0=40J-@tP5=M^ delta 139 zcmbOmGCgF1I@7D*%^SH=7#UYj?qdvM?A`p3F_n>V`DS-!0WQY&%?p(T7#WQx`$((v qaC33yCFZ7vCFYc-Zf=xzVcq;lID!qY8X0z$CA?htO_{8%`3V3KC@Rqa diff --git a/staging/src/k8s.io/api/testdata/v1.30.0/extensions.v1beta1.ReplicaSet.after_roundtrip.pb b/staging/src/k8s.io/api/testdata/v1.30.0/extensions.v1beta1.ReplicaSet.after_roundtrip.pb index e23f767d626c425e904b841694cc2c31001a6345..0522fa20b31c08eb6ecb4020320ae0d924696d1e 100644 GIT binary patch delta 146 zcmX>Qd@Oi^I@8SH%^SH=7#Uwo?qdvMoV@uVV=5!#+Rg6F0$hxpo98MCFfy7>UZ<_E$NY=l)ERJg&&vW%Atzj60j0o8;rCIA2c delta 139 zcmX>Wd?0v&I@9Ff%^SH=7#SZ;?qdvM?A`p3F_n>V`DS-!0WQY&%?p(T7#WQx`$((v qaC33yCFZ7vCFYc-Zf=xzVcq;lID!qY8X0z$CA?htO_{8%IU4{eyDF*x diff --git a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go index a9d79ae3412e8..b00c692485785 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/core/v1/resourceclaim.go @@ -21,7 +21,8 @@ package v1 // ResourceClaimApplyConfiguration represents a declarative configuration of the ResourceClaim type for use // with apply. type ResourceClaimApplyConfiguration struct { - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + Request *string `json:"request,omitempty"` } // ResourceClaimApplyConfiguration constructs a declarative configuration of the ResourceClaim type for use with @@ -37,3 +38,11 @@ func (b *ResourceClaimApplyConfiguration) WithName(value string) *ResourceClaimA b.Name = &value return b } + +// WithRequest sets the Request field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Request field is set to the value of the last call. +func (b *ResourceClaimApplyConfiguration) WithRequest(value string) *ResourceClaimApplyConfiguration { + b.Request = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go index c182fc1b2415d..c986af979b0b4 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go @@ -7409,6 +7409,9 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" + - name: request + type: + scalar: string - name: io.k8s.api.core.v1.ResourceFieldSelector map: fields: @@ -12130,47 +12133,78 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.resource.v1alpha3.AllocationResult map: fields: - - name: availableOnNodes + - name: controller + type: + scalar: string + - name: devices + type: + namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationResult + default: {} + - name: nodeSelector type: namedType: io.k8s.api.core.v1.NodeSelector - - name: resourceHandles +- name: io.k8s.api.resource.v1alpha3.BasicDevice + map: + fields: + - name: attributes type: - list: + map: elementType: - namedType: io.k8s.api.resource.v1alpha3.ResourceHandle - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.DriverAllocationResult + namedType: io.k8s.api.resource.v1alpha3.DeviceAttribute + - name: capacity + type: + map: + elementType: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector map: fields: - - name: namedResources - type: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult - - name: vendorRequestParameters + - name: expression type: - namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha3.DriverRequests + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha3.Device map: fields: - - name: driverName + - name: basic + type: + namedType: io.k8s.api.resource.v1alpha3.BasicDevice + - name: name type: scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration + map: + fields: + - name: opaque + type: + namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration - name: requests type: list: elementType: - namedType: io.k8s.api.resource.v1alpha3.ResourceRequest + scalar: string elementRelationship: atomic - - name: vendorParameters + - name: source type: - namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha3.NamedResourcesAllocationResult + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha3.DeviceAllocationResult map: fields: - - name: name + - name: config type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.NamedResourcesAttribute + list: + elementType: + namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration + elementRelationship: atomic + - name: results + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha3.DeviceAttribute map: fields: - name: bool @@ -12179,79 +12213,160 @@ var schemaYAML = typed.YAMLObject(`types: - name: int type: scalar: numeric - - name: intSlice - type: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice - - name: name - type: - scalar: string - default: "" - - name: quantity - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - name: string type: scalar: string - - name: stringSlice - type: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice - name: version type: scalar: string -- name: io.k8s.api.resource.v1alpha3.NamedResourcesFilter +- name: io.k8s.api.resource.v1alpha3.DeviceClaim map: fields: - - name: selector + - name: config type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.NamedResourcesInstance - map: - fields: - - name: attributes + list: + elementType: + namedType: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration + elementRelationship: atomic + - name: constraints type: list: elementType: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesAttribute + namedType: io.k8s.api.resource.v1alpha3.DeviceConstraint elementRelationship: atomic - - name: name + - name: requests type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.NamedResourcesIntSlice + list: + elementType: + namedType: io.k8s.api.resource.v1alpha3.DeviceRequest + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration map: fields: - - name: ints + - name: opaque + type: + namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration + - name: requests type: list: elementType: - scalar: numeric + scalar: string elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.NamedResourcesRequest +- name: io.k8s.api.resource.v1alpha3.DeviceClass map: fields: - - name: selector + - name: apiVersion type: scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.NamedResourcesResources + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1alpha3.DeviceClassSpec + default: {} +- name: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration map: fields: - - name: instances + - name: opaque + type: + namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration +- name: io.k8s.api.resource.v1alpha3.DeviceClassSpec + map: + fields: + - name: config type: list: elementType: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesInstance + namedType: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.NamedResourcesStringSlice + - name: selectors + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha3.DeviceSelector + elementRelationship: atomic + - name: suitableNodes + type: + namedType: io.k8s.api.core.v1.NodeSelector +- name: io.k8s.api.resource.v1alpha3.DeviceConstraint map: fields: - - name: strings + - name: matchAttribute + type: + scalar: string + - name: requests type: list: elementType: scalar: string elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha3.DeviceRequest + map: + fields: + - name: adminAccess + type: + scalar: boolean + default: false + - name: count + type: + scalar: numeric + - name: countMode + type: + scalar: string + - name: deviceClassName + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: selectors + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha3.DeviceSelector + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult + map: + fields: + - name: device + type: + scalar: string + default: "" + - name: driver + type: + scalar: string + default: "" + - name: pool + type: + scalar: string + default: "" + - name: request + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha3.DeviceSelector + map: + fields: + - name: cel + type: + namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector +- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration + map: + fields: + - name: driver + type: + scalar: string + default: "" + - name: parameters + type: + namedType: __untyped_atomic_ - name: io.k8s.api.resource.v1alpha3.PodSchedulingContext map: fields: @@ -12335,48 +12450,13 @@ var schemaYAML = typed.YAMLObject(`types: type: scalar: string default: "" -- name: io.k8s.api.resource.v1alpha3.ResourceClaimParameters - map: - fields: - - name: apiVersion - type: - scalar: string - - name: driverRequests - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DriverRequests - elementRelationship: atomic - - name: generatedFrom - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} -- name: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - name: io.k8s.api.resource.v1alpha3.ResourceClaimSchedulingStatus map: fields: - name: name type: scalar: string + default: "" - name: unsuitableNodes type: list: @@ -12386,13 +12466,13 @@ var schemaYAML = typed.YAMLObject(`types: - name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec map: fields: - - name: parametersRef - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimParametersReference - - name: resourceClassName + - name: controller type: scalar: string - default: "" + - name: devices + type: + namedType: io.k8s.api.resource.v1alpha3.DeviceClaim + default: {} - name: io.k8s.api.resource.v1alpha3.ResourceClaimStatus map: fields: @@ -12402,9 +12482,6 @@ var schemaYAML = typed.YAMLObject(`types: - name: deallocationRequested type: scalar: boolean - - name: driverName - type: - scalar: string - name: reservedFor type: list: @@ -12441,118 +12518,27 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec default: {} -- name: io.k8s.api.resource.v1alpha3.ResourceClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: driverName - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: parametersRef - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference - - name: structuredParameters - type: - scalar: boolean - - name: suitableNodes - type: - namedType: io.k8s.api.core.v1.NodeSelector -- name: io.k8s.api.resource.v1alpha3.ResourceClassParameters - map: - fields: - - name: apiVersion - type: - scalar: string - - name: filters - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.ResourceFilter - elementRelationship: atomic - - name: generatedFrom - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: vendorParameters - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.VendorParameters - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.ResourceClassParametersReference +- name: io.k8s.api.resource.v1alpha3.ResourcePool map: fields: - - name: apiGroup - type: - scalar: string - - name: kind + - name: generation type: - scalar: string - default: "" + scalar: numeric + default: 0 - name: name type: scalar: string default: "" - - name: namespace - type: - scalar: string -- name: io.k8s.api.resource.v1alpha3.ResourceFilter - map: - fields: - - name: driverName - type: - scalar: string - - name: namedResources - type: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesFilter -- name: io.k8s.api.resource.v1alpha3.ResourceHandle - map: - fields: - - name: data - type: - scalar: string - - name: driverName - type: - scalar: string - default: "" - - name: structuredData + - name: resourceSliceCount type: - namedType: io.k8s.api.resource.v1alpha3.StructuredResourceHandle -- name: io.k8s.api.resource.v1alpha3.ResourceRequest - map: - fields: - - name: namedResources - type: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesRequest - - name: vendorParameters - type: - namedType: __untyped_atomic_ + scalar: numeric + default: 0 - name: io.k8s.api.resource.v1alpha3.ResourceSlice map: fields: - name: apiVersion type: scalar: string - - name: driverName - type: - scalar: string - default: "" - name: kind type: scalar: string @@ -12560,39 +12546,36 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - - name: namedResources - type: - namedType: io.k8s.api.resource.v1alpha3.NamedResourcesResources - - name: nodeName + - name: spec type: - scalar: string -- name: io.k8s.api.resource.v1alpha3.StructuredResourceHandle + namedType: io.k8s.api.resource.v1alpha3.ResourceSliceSpec + default: {} +- name: io.k8s.api.resource.v1alpha3.ResourceSliceSpec map: fields: - - name: nodeName + - name: allNodes type: - scalar: string - - name: results + scalar: boolean + - name: devices type: list: elementType: - namedType: io.k8s.api.resource.v1alpha3.DriverAllocationResult + namedType: io.k8s.api.resource.v1alpha3.Device elementRelationship: atomic - - name: vendorClaimParameters - type: - namedType: __untyped_atomic_ - - name: vendorClassParameters + - name: driver type: - namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha3.VendorParameters - map: - fields: - - name: driverName + scalar: string + default: "" + - name: nodeName type: scalar: string - - name: parameters + - name: nodeSelector type: - namedType: __untyped_atomic_ + namedType: io.k8s.api.core.v1.NodeSelector + - name: pool + type: + namedType: io.k8s.api.resource.v1alpha3.ResourcePool + default: {} - name: io.k8s.api.scheduling.v1.PriorityClass map: fields: diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresult.go index e6d1df8635e11..3090b2f9d3538 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresult.go @@ -25,8 +25,9 @@ import ( // AllocationResultApplyConfiguration represents a declarative configuration of the AllocationResult type for use // with apply. type AllocationResultApplyConfiguration struct { - ResourceHandles []ResourceHandleApplyConfiguration `json:"resourceHandles,omitempty"` - AvailableOnNodes *v1.NodeSelectorApplyConfiguration `json:"availableOnNodes,omitempty"` + Devices *DeviceAllocationResultApplyConfiguration `json:"devices,omitempty"` + NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + Controller *string `json:"controller,omitempty"` } // AllocationResultApplyConfiguration constructs a declarative configuration of the AllocationResult type for use with @@ -35,23 +36,26 @@ func AllocationResult() *AllocationResultApplyConfiguration { return &AllocationResultApplyConfiguration{} } -// WithResourceHandles adds the given value to the ResourceHandles field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ResourceHandles field. -func (b *AllocationResultApplyConfiguration) WithResourceHandles(values ...*ResourceHandleApplyConfiguration) *AllocationResultApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResourceHandles") - } - b.ResourceHandles = append(b.ResourceHandles, *values[i]) - } +// WithDevices sets the Devices field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Devices field is set to the value of the last call. +func (b *AllocationResultApplyConfiguration) WithDevices(value *DeviceAllocationResultApplyConfiguration) *AllocationResultApplyConfiguration { + b.Devices = value + return b +} + +// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeSelector field is set to the value of the last call. +func (b *AllocationResultApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *AllocationResultApplyConfiguration { + b.NodeSelector = value return b } -// WithAvailableOnNodes sets the AvailableOnNodes field in the declarative configuration to the given value +// WithController sets the Controller field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AvailableOnNodes field is set to the value of the last call. -func (b *AllocationResultApplyConfiguration) WithAvailableOnNodes(value *v1.NodeSelectorApplyConfiguration) *AllocationResultApplyConfiguration { - b.AvailableOnNodes = value +// If called multiple times, the Controller field is set to the value of the last call. +func (b *AllocationResultApplyConfiguration) WithController(value string) *AllocationResultApplyConfiguration { + b.Controller = &value return b } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresultmodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresultmodel.go deleted file mode 100644 index 197f882883fc2..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/allocationresultmodel.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// AllocationResultModelApplyConfiguration represents a declarative configuration of the AllocationResultModel type for use -// with apply. -type AllocationResultModelApplyConfiguration struct { - NamedResources *NamedResourcesAllocationResultApplyConfiguration `json:"namedResources,omitempty"` -} - -// AllocationResultModelApplyConfiguration constructs a declarative configuration of the AllocationResultModel type for use with -// apply. -func AllocationResultModel() *AllocationResultModelApplyConfiguration { - return &AllocationResultModelApplyConfiguration{} -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *AllocationResultModelApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *AllocationResultModelApplyConfiguration { - b.NamedResources = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/basicdevice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/basicdevice.go new file mode 100644 index 0000000000000..e6b7745082855 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/basicdevice.go @@ -0,0 +1,65 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + v1alpha3 "k8s.io/api/resource/v1alpha3" + resource "k8s.io/apimachinery/pkg/api/resource" +) + +// BasicDeviceApplyConfiguration represents a declarative configuration of the BasicDevice type for use +// with apply. +type BasicDeviceApplyConfiguration struct { + Attributes map[v1alpha3.QualifiedName]DeviceAttributeApplyConfiguration `json:"attributes,omitempty"` + Capacity map[v1alpha3.QualifiedName]resource.Quantity `json:"capacity,omitempty"` +} + +// BasicDeviceApplyConfiguration constructs a declarative configuration of the BasicDevice type for use with +// apply. +func BasicDevice() *BasicDeviceApplyConfiguration { + return &BasicDeviceApplyConfiguration{} +} + +// WithAttributes puts the entries into the Attributes field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Attributes field, +// overwriting an existing map entries in Attributes field with the same key. +func (b *BasicDeviceApplyConfiguration) WithAttributes(entries map[v1alpha3.QualifiedName]DeviceAttributeApplyConfiguration) *BasicDeviceApplyConfiguration { + if b.Attributes == nil && len(entries) > 0 { + b.Attributes = make(map[v1alpha3.QualifiedName]DeviceAttributeApplyConfiguration, len(entries)) + } + for k, v := range entries { + b.Attributes[k] = v + } + return b +} + +// WithCapacity puts the entries into the Capacity field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Capacity field, +// overwriting an existing map entries in Capacity field with the same key. +func (b *BasicDeviceApplyConfiguration) WithCapacity(entries map[v1alpha3.QualifiedName]resource.Quantity) *BasicDeviceApplyConfiguration { + if b.Capacity == nil && len(entries) > 0 { + b.Capacity = make(map[v1alpha3.QualifiedName]resource.Quantity, len(entries)) + } + for k, v := range entries { + b.Capacity[k] = v + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesfilter.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/celdeviceselector.go similarity index 50% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesfilter.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/celdeviceselector.go index 3a47beada4738..c59b6a2e37039 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesfilter.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/celdeviceselector.go @@ -18,22 +18,22 @@ limitations under the License. package v1alpha3 -// NamedResourcesFilterApplyConfiguration represents a declarative configuration of the NamedResourcesFilter type for use +// CELDeviceSelectorApplyConfiguration represents a declarative configuration of the CELDeviceSelector type for use // with apply. -type NamedResourcesFilterApplyConfiguration struct { - Selector *string `json:"selector,omitempty"` +type CELDeviceSelectorApplyConfiguration struct { + Expression *string `json:"expression,omitempty"` } -// NamedResourcesFilterApplyConfiguration constructs a declarative configuration of the NamedResourcesFilter type for use with +// CELDeviceSelectorApplyConfiguration constructs a declarative configuration of the CELDeviceSelector type for use with // apply. -func NamedResourcesFilter() *NamedResourcesFilterApplyConfiguration { - return &NamedResourcesFilterApplyConfiguration{} +func CELDeviceSelector() *CELDeviceSelectorApplyConfiguration { + return &CELDeviceSelectorApplyConfiguration{} } -// WithSelector sets the Selector field in the declarative configuration to the given value +// WithExpression sets the Expression field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Selector field is set to the value of the last call. -func (b *NamedResourcesFilterApplyConfiguration) WithSelector(value string) *NamedResourcesFilterApplyConfiguration { - b.Selector = &value +// If called multiple times, the Expression field is set to the value of the last call. +func (b *CELDeviceSelectorApplyConfiguration) WithExpression(value string) *CELDeviceSelectorApplyConfiguration { + b.Expression = &value return b } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/device.go similarity index 51% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesallocationresult.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/device.go index 89509eecb0603..efdb5f37a9e1c 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesallocationresult.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/device.go @@ -18,22 +18,31 @@ limitations under the License. package v1alpha3 -// NamedResourcesAllocationResultApplyConfiguration represents a declarative configuration of the NamedResourcesAllocationResult type for use +// DeviceApplyConfiguration represents a declarative configuration of the Device type for use // with apply. -type NamedResourcesAllocationResultApplyConfiguration struct { - Name *string `json:"name,omitempty"` +type DeviceApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Basic *BasicDeviceApplyConfiguration `json:"basic,omitempty"` } -// NamedResourcesAllocationResultApplyConfiguration constructs a declarative configuration of the NamedResourcesAllocationResult type for use with +// DeviceApplyConfiguration constructs a declarative configuration of the Device type for use with // apply. -func NamedResourcesAllocationResult() *NamedResourcesAllocationResultApplyConfiguration { - return &NamedResourcesAllocationResultApplyConfiguration{} +func Device() *DeviceApplyConfiguration { + return &DeviceApplyConfiguration{} } // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *NamedResourcesAllocationResultApplyConfiguration) WithName(value string) *NamedResourcesAllocationResultApplyConfiguration { +func (b *DeviceApplyConfiguration) WithName(value string) *DeviceApplyConfiguration { b.Name = &value return b } + +// WithBasic sets the Basic field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Basic field is set to the value of the last call. +func (b *DeviceApplyConfiguration) WithBasic(value *BasicDeviceApplyConfiguration) *DeviceApplyConfiguration { + b.Basic = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationconfiguration.go new file mode 100644 index 0000000000000..342e724ef0226 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationconfiguration.go @@ -0,0 +1,63 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + v1alpha3 "k8s.io/api/resource/v1alpha3" +) + +// DeviceAllocationConfigurationApplyConfiguration represents a declarative configuration of the DeviceAllocationConfiguration type for use +// with apply. +type DeviceAllocationConfigurationApplyConfiguration struct { + Source *v1alpha3.AllocationConfigSource `json:"source,omitempty"` + Requests []string `json:"requests,omitempty"` + DeviceConfigurationApplyConfiguration `json:",inline"` +} + +// DeviceAllocationConfigurationApplyConfiguration constructs a declarative configuration of the DeviceAllocationConfiguration type for use with +// apply. +func DeviceAllocationConfiguration() *DeviceAllocationConfigurationApplyConfiguration { + return &DeviceAllocationConfigurationApplyConfiguration{} +} + +// WithSource sets the Source field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Source field is set to the value of the last call. +func (b *DeviceAllocationConfigurationApplyConfiguration) WithSource(value v1alpha3.AllocationConfigSource) *DeviceAllocationConfigurationApplyConfiguration { + b.Source = &value + return b +} + +// WithRequests adds the given value to the Requests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Requests field. +func (b *DeviceAllocationConfigurationApplyConfiguration) WithRequests(values ...string) *DeviceAllocationConfigurationApplyConfiguration { + for i := range values { + b.Requests = append(b.Requests, values[i]) + } + return b +} + +// WithOpaque sets the Opaque field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Opaque field is set to the value of the last call. +func (b *DeviceAllocationConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceAllocationConfigurationApplyConfiguration { + b.Opaque = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationresult.go new file mode 100644 index 0000000000000..0cfb264b4eae5 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceallocationresult.go @@ -0,0 +1,58 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceAllocationResultApplyConfiguration represents a declarative configuration of the DeviceAllocationResult type for use +// with apply. +type DeviceAllocationResultApplyConfiguration struct { + Results []DeviceRequestAllocationResultApplyConfiguration `json:"results,omitempty"` + Config []DeviceAllocationConfigurationApplyConfiguration `json:"config,omitempty"` +} + +// DeviceAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceAllocationResult type for use with +// apply. +func DeviceAllocationResult() *DeviceAllocationResultApplyConfiguration { + return &DeviceAllocationResultApplyConfiguration{} +} + +// WithResults adds the given value to the Results field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Results field. +func (b *DeviceAllocationResultApplyConfiguration) WithResults(values ...*DeviceRequestAllocationResultApplyConfiguration) *DeviceAllocationResultApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithResults") + } + b.Results = append(b.Results, *values[i]) + } + return b +} + +// WithConfig adds the given value to the Config field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Config field. +func (b *DeviceAllocationResultApplyConfiguration) WithConfig(values ...*DeviceAllocationConfigurationApplyConfiguration) *DeviceAllocationResultApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConfig") + } + b.Config = append(b.Config, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceattribute.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceattribute.go new file mode 100644 index 0000000000000..6b0b7a40ac738 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceattribute.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceAttributeApplyConfiguration represents a declarative configuration of the DeviceAttribute type for use +// with apply. +type DeviceAttributeApplyConfiguration struct { + IntValue *int64 `json:"int,omitempty"` + BoolValue *bool `json:"bool,omitempty"` + StringValue *string `json:"string,omitempty"` + VersionValue *string `json:"version,omitempty"` +} + +// DeviceAttributeApplyConfiguration constructs a declarative configuration of the DeviceAttribute type for use with +// apply. +func DeviceAttribute() *DeviceAttributeApplyConfiguration { + return &DeviceAttributeApplyConfiguration{} +} + +// WithIntValue sets the IntValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IntValue field is set to the value of the last call. +func (b *DeviceAttributeApplyConfiguration) WithIntValue(value int64) *DeviceAttributeApplyConfiguration { + b.IntValue = &value + return b +} + +// WithBoolValue sets the BoolValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BoolValue field is set to the value of the last call. +func (b *DeviceAttributeApplyConfiguration) WithBoolValue(value bool) *DeviceAttributeApplyConfiguration { + b.BoolValue = &value + return b +} + +// WithStringValue sets the StringValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the StringValue field is set to the value of the last call. +func (b *DeviceAttributeApplyConfiguration) WithStringValue(value string) *DeviceAttributeApplyConfiguration { + b.StringValue = &value + return b +} + +// WithVersionValue sets the VersionValue field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VersionValue field is set to the value of the last call. +func (b *DeviceAttributeApplyConfiguration) WithVersionValue(value string) *DeviceAttributeApplyConfiguration { + b.VersionValue = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaim.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaim.go new file mode 100644 index 0000000000000..ce3ab56d8b7e7 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaim.go @@ -0,0 +1,72 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceClaimApplyConfiguration represents a declarative configuration of the DeviceClaim type for use +// with apply. +type DeviceClaimApplyConfiguration struct { + Requests []DeviceRequestApplyConfiguration `json:"requests,omitempty"` + Constraints []DeviceConstraintApplyConfiguration `json:"constraints,omitempty"` + Config []DeviceClaimConfigurationApplyConfiguration `json:"config,omitempty"` +} + +// DeviceClaimApplyConfiguration constructs a declarative configuration of the DeviceClaim type for use with +// apply. +func DeviceClaim() *DeviceClaimApplyConfiguration { + return &DeviceClaimApplyConfiguration{} +} + +// WithRequests adds the given value to the Requests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Requests field. +func (b *DeviceClaimApplyConfiguration) WithRequests(values ...*DeviceRequestApplyConfiguration) *DeviceClaimApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithRequests") + } + b.Requests = append(b.Requests, *values[i]) + } + return b +} + +// WithConstraints adds the given value to the Constraints field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Constraints field. +func (b *DeviceClaimApplyConfiguration) WithConstraints(values ...*DeviceConstraintApplyConfiguration) *DeviceClaimApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConstraints") + } + b.Constraints = append(b.Constraints, *values[i]) + } + return b +} + +// WithConfig adds the given value to the Config field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Config field. +func (b *DeviceClaimApplyConfiguration) WithConfig(values ...*DeviceClaimConfigurationApplyConfiguration) *DeviceClaimApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConfig") + } + b.Config = append(b.Config, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaimconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaimconfiguration.go new file mode 100644 index 0000000000000..4cabe985997e9 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclaimconfiguration.go @@ -0,0 +1,50 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceClaimConfigurationApplyConfiguration represents a declarative configuration of the DeviceClaimConfiguration type for use +// with apply. +type DeviceClaimConfigurationApplyConfiguration struct { + Requests []string `json:"requests,omitempty"` + DeviceConfigurationApplyConfiguration `json:",inline"` +} + +// DeviceClaimConfigurationApplyConfiguration constructs a declarative configuration of the DeviceClaimConfiguration type for use with +// apply. +func DeviceClaimConfiguration() *DeviceClaimConfigurationApplyConfiguration { + return &DeviceClaimConfigurationApplyConfiguration{} +} + +// WithRequests adds the given value to the Requests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Requests field. +func (b *DeviceClaimConfigurationApplyConfiguration) WithRequests(values ...string) *DeviceClaimConfigurationApplyConfiguration { + for i := range values { + b.Requests = append(b.Requests, values[i]) + } + return b +} + +// WithOpaque sets the Opaque field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Opaque field is set to the value of the last call. +func (b *DeviceClaimConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceClaimConfigurationApplyConfiguration { + b.Opaque = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclass.go similarity index 59% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclass.go index fe00f1dad4f59..abaadbb366f63 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparameters.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclass.go @@ -27,58 +27,55 @@ import ( v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) -// ResourceClaimParametersApplyConfiguration represents a declarative configuration of the ResourceClaimParameters type for use +// DeviceClassApplyConfiguration represents a declarative configuration of the DeviceClass type for use // with apply. -type ResourceClaimParametersApplyConfiguration struct { +type DeviceClassApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - GeneratedFrom *ResourceClaimParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` - DriverRequests []DriverRequestsApplyConfiguration `json:"driverRequests,omitempty"` + Spec *DeviceClassSpecApplyConfiguration `json:"spec,omitempty"` } -// ResourceClaimParameters constructs a declarative configuration of the ResourceClaimParameters type for use with +// DeviceClass constructs a declarative configuration of the DeviceClass type for use with // apply. -func ResourceClaimParameters(name, namespace string) *ResourceClaimParametersApplyConfiguration { - b := &ResourceClaimParametersApplyConfiguration{} +func DeviceClass(name string) *DeviceClassApplyConfiguration { + b := &DeviceClassApplyConfiguration{} b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("ResourceClaimParameters") + b.WithKind("DeviceClass") b.WithAPIVersion("resource.k8s.io/v1alpha3") return b } -// ExtractResourceClaimParameters extracts the applied configuration owned by fieldManager from -// resourceClaimParameters. If no managedFields are found in resourceClaimParameters for fieldManager, a -// ResourceClaimParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), +// ExtractDeviceClass extracts the applied configuration owned by fieldManager from +// deviceClass. If no managedFields are found in deviceClass for fieldManager, a +// DeviceClassApplyConfiguration is returned with only the Name, Namespace (if applicable), // APIVersion and Kind populated. It is possible that no managed fields were found for because other // field managers have taken ownership of all the fields previously owned by fieldManager, or because // the fieldManager never owned fields any fields. -// resourceClaimParameters must be a unmodified ResourceClaimParameters API object that was retrieved from the Kubernetes API. -// ExtractResourceClaimParameters provides a way to perform a extract/modify-in-place/apply workflow. +// deviceClass must be a unmodified DeviceClass API object that was retrieved from the Kubernetes API. +// ExtractDeviceClass provides a way to perform a extract/modify-in-place/apply workflow. // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // applied if another fieldManager has updated or force applied any of the previously applied fields. // Experimental! -func ExtractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { - return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "") +func ExtractDeviceClass(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) { + return extractDeviceClass(deviceClass, fieldManager, "") } -// ExtractResourceClaimParametersStatus is the same as ExtractResourceClaimParameters except +// ExtractDeviceClassStatus is the same as ExtractDeviceClass except // that it extracts the status subresource applied configuration. // Experimental! -func ExtractResourceClaimParametersStatus(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string) (*ResourceClaimParametersApplyConfiguration, error) { - return extractResourceClaimParameters(resourceClaimParameters, fieldManager, "status") +func ExtractDeviceClassStatus(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string) (*DeviceClassApplyConfiguration, error) { + return extractDeviceClass(deviceClass, fieldManager, "status") } -func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.ResourceClaimParameters, fieldManager string, subresource string) (*ResourceClaimParametersApplyConfiguration, error) { - b := &ResourceClaimParametersApplyConfiguration{} - err := managedfields.ExtractInto(resourceClaimParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClaimParameters"), fieldManager, b, subresource) +func extractDeviceClass(deviceClass *resourcev1alpha3.DeviceClass, fieldManager string, subresource string) (*DeviceClassApplyConfiguration, error) { + b := &DeviceClassApplyConfiguration{} + err := managedfields.ExtractInto(deviceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha3.DeviceClass"), fieldManager, b, subresource) if err != nil { return nil, err } - b.WithName(resourceClaimParameters.Name) - b.WithNamespace(resourceClaimParameters.Namespace) + b.WithName(deviceClass.Name) - b.WithKind("ResourceClaimParameters") + b.WithKind("DeviceClass") b.WithAPIVersion("resource.k8s.io/v1alpha3") return b, nil } @@ -86,7 +83,7 @@ func extractResourceClaimParameters(resourceClaimParameters *resourcev1alpha3.Re // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithKind(value string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithKind(value string) *DeviceClassApplyConfiguration { b.Kind = &value return b } @@ -94,7 +91,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithKind(value string) *Reso // WithAPIVersion sets the APIVersion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithAPIVersion(value string) *DeviceClassApplyConfiguration { b.APIVersion = &value return b } @@ -102,7 +99,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithAPIVersion(value string) // WithName sets the Name field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithName(value string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithName(value string) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.Name = &value return b @@ -111,7 +108,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithName(value string) *Reso // WithGenerateName sets the GenerateName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithGenerateName(value string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithGenerateName(value string) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.GenerateName = &value return b @@ -120,7 +117,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithGenerateName(value strin // WithNamespace sets the Namespace field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Namespace field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithNamespace(value string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithNamespace(value string) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.Namespace = &value return b @@ -129,7 +126,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithNamespace(value string) // WithUID sets the UID field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the UID field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithUID(value types.UID) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.UID = &value return b @@ -138,7 +135,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithUID(value types.UID) *Re // WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithResourceVersion(value string) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.ResourceVersion = &value return b @@ -147,7 +144,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithResourceVersion(value st // WithGeneration sets the Generation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Generation field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithGeneration(value int64) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.Generation = &value return b @@ -156,7 +153,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithGeneration(value int64) // WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.CreationTimestamp = &value return b @@ -165,7 +162,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithCreationTimestamp(value // WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.DeletionTimestamp = &value return b @@ -174,7 +171,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithDeletionTimestamp(value // WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() b.DeletionGracePeriodSeconds = &value return b @@ -184,7 +181,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithDeletionGracePeriodSecon // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Labels field, // overwriting an existing map entries in Labels field with the same key. -func (b *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithLabels(entries map[string]string) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.Labels == nil && len(entries) > 0 { b.Labels = make(map[string]string, len(entries)) @@ -199,7 +196,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithLabels(entries map[strin // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, the entries provided by each call will be put on the Annotations field, // overwriting an existing map entries in Annotations field with the same key. -func (b *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithAnnotations(entries map[string]string) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() if b.Annotations == nil && len(entries) > 0 { b.Annotations = make(map[string]string, len(entries)) @@ -213,7 +210,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithAnnotations(entries map[ // WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { if values[i] == nil { @@ -227,7 +224,7 @@ func (b *ResourceClaimParametersApplyConfiguration) WithOwnerReferences(values . // WithFinalizers adds the given value to the Finalizers field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClaimParametersApplyConfiguration { +func (b *DeviceClassApplyConfiguration) WithFinalizers(values ...string) *DeviceClassApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { b.Finalizers = append(b.Finalizers, values[i]) @@ -235,35 +232,22 @@ func (b *ResourceClaimParametersApplyConfiguration) WithFinalizers(values ...str return b } -func (b *ResourceClaimParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { +func (b *DeviceClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { if b.ObjectMetaApplyConfiguration == nil { b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} } } -// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value +// WithSpec sets the Spec field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GeneratedFrom field is set to the value of the last call. -func (b *ResourceClaimParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimParametersApplyConfiguration { - b.GeneratedFrom = value - return b -} - -// WithDriverRequests adds the given value to the DriverRequests field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the DriverRequests field. -func (b *ResourceClaimParametersApplyConfiguration) WithDriverRequests(values ...*DriverRequestsApplyConfiguration) *ResourceClaimParametersApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithDriverRequests") - } - b.DriverRequests = append(b.DriverRequests, *values[i]) - } +// If called multiple times, the Spec field is set to the value of the last call. +func (b *DeviceClassApplyConfiguration) WithSpec(value *DeviceClassSpecApplyConfiguration) *DeviceClassApplyConfiguration { + b.Spec = value return b } // GetName retrieves the value of the Name field in the declarative configuration. -func (b *ResourceClaimParametersApplyConfiguration) GetName() *string { +func (b *DeviceClassApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.Name } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassconfiguration.go new file mode 100644 index 0000000000000..cb3758a3e3e64 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassconfiguration.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceClassConfigurationApplyConfiguration represents a declarative configuration of the DeviceClassConfiguration type for use +// with apply. +type DeviceClassConfigurationApplyConfiguration struct { + DeviceConfigurationApplyConfiguration `json:",inline"` +} + +// DeviceClassConfigurationApplyConfiguration constructs a declarative configuration of the DeviceClassConfiguration type for use with +// apply. +func DeviceClassConfiguration() *DeviceClassConfigurationApplyConfiguration { + return &DeviceClassConfigurationApplyConfiguration{} +} + +// WithOpaque sets the Opaque field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Opaque field is set to the value of the last call. +func (b *DeviceClassConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceClassConfigurationApplyConfiguration { + b.Opaque = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassspec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassspec.go new file mode 100644 index 0000000000000..d40a43de66f06 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceclassspec.go @@ -0,0 +1,71 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + v1 "k8s.io/client-go/applyconfigurations/core/v1" +) + +// DeviceClassSpecApplyConfiguration represents a declarative configuration of the DeviceClassSpec type for use +// with apply. +type DeviceClassSpecApplyConfiguration struct { + Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"` + Config []DeviceClassConfigurationApplyConfiguration `json:"config,omitempty"` + SuitableNodes *v1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"` +} + +// DeviceClassSpecApplyConfiguration constructs a declarative configuration of the DeviceClassSpec type for use with +// apply. +func DeviceClassSpec() *DeviceClassSpecApplyConfiguration { + return &DeviceClassSpecApplyConfiguration{} +} + +// WithSelectors adds the given value to the Selectors field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Selectors field. +func (b *DeviceClassSpecApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceClassSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectors") + } + b.Selectors = append(b.Selectors, *values[i]) + } + return b +} + +// WithConfig adds the given value to the Config field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Config field. +func (b *DeviceClassSpecApplyConfiguration) WithConfig(values ...*DeviceClassConfigurationApplyConfiguration) *DeviceClassSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConfig") + } + b.Config = append(b.Config, *values[i]) + } + return b +} + +// WithSuitableNodes sets the SuitableNodes field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SuitableNodes field is set to the value of the last call. +func (b *DeviceClassSpecApplyConfiguration) WithSuitableNodes(value *v1.NodeSelectorApplyConfiguration) *DeviceClassSpecApplyConfiguration { + b.SuitableNodes = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconfiguration.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconfiguration.go new file mode 100644 index 0000000000000..62c0d997de13f --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconfiguration.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceConfigurationApplyConfiguration represents a declarative configuration of the DeviceConfiguration type for use +// with apply. +type DeviceConfigurationApplyConfiguration struct { + Opaque *OpaqueDeviceConfigurationApplyConfiguration `json:"opaque,omitempty"` +} + +// DeviceConfigurationApplyConfiguration constructs a declarative configuration of the DeviceConfiguration type for use with +// apply. +func DeviceConfiguration() *DeviceConfigurationApplyConfiguration { + return &DeviceConfigurationApplyConfiguration{} +} + +// WithOpaque sets the Opaque field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Opaque field is set to the value of the last call. +func (b *DeviceConfigurationApplyConfiguration) WithOpaque(value *OpaqueDeviceConfigurationApplyConfiguration) *DeviceConfigurationApplyConfiguration { + b.Opaque = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconstraint.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconstraint.go new file mode 100644 index 0000000000000..479acd57c2b90 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceconstraint.go @@ -0,0 +1,54 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + v1alpha3 "k8s.io/api/resource/v1alpha3" +) + +// DeviceConstraintApplyConfiguration represents a declarative configuration of the DeviceConstraint type for use +// with apply. +type DeviceConstraintApplyConfiguration struct { + Requests []string `json:"requests,omitempty"` + MatchAttribute *v1alpha3.FullyQualifiedName `json:"matchAttribute,omitempty"` +} + +// DeviceConstraintApplyConfiguration constructs a declarative configuration of the DeviceConstraint type for use with +// apply. +func DeviceConstraint() *DeviceConstraintApplyConfiguration { + return &DeviceConstraintApplyConfiguration{} +} + +// WithRequests adds the given value to the Requests field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Requests field. +func (b *DeviceConstraintApplyConfiguration) WithRequests(values ...string) *DeviceConstraintApplyConfiguration { + for i := range values { + b.Requests = append(b.Requests, values[i]) + } + return b +} + +// WithMatchAttribute sets the MatchAttribute field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MatchAttribute field is set to the value of the last call. +func (b *DeviceConstraintApplyConfiguration) WithMatchAttribute(value v1alpha3.FullyQualifiedName) *DeviceConstraintApplyConfiguration { + b.MatchAttribute = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequest.go new file mode 100644 index 0000000000000..eed90f0f30097 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequest.go @@ -0,0 +1,93 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + resourcev1alpha3 "k8s.io/api/resource/v1alpha3" +) + +// DeviceRequestApplyConfiguration represents a declarative configuration of the DeviceRequest type for use +// with apply. +type DeviceRequestApplyConfiguration struct { + Name *string `json:"name,omitempty"` + DeviceClassName *string `json:"deviceClassName,omitempty"` + Selectors []DeviceSelectorApplyConfiguration `json:"selectors,omitempty"` + CountMode *resourcev1alpha3.DeviceCountMode `json:"countMode,omitempty"` + Count *int64 `json:"count,omitempty"` + AdminAccess *bool `json:"adminAccess,omitempty"` +} + +// DeviceRequestApplyConfiguration constructs a declarative configuration of the DeviceRequest type for use with +// apply. +func DeviceRequest() *DeviceRequestApplyConfiguration { + return &DeviceRequestApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *DeviceRequestApplyConfiguration) WithName(value string) *DeviceRequestApplyConfiguration { + b.Name = &value + return b +} + +// WithDeviceClassName sets the DeviceClassName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeviceClassName field is set to the value of the last call. +func (b *DeviceRequestApplyConfiguration) WithDeviceClassName(value string) *DeviceRequestApplyConfiguration { + b.DeviceClassName = &value + return b +} + +// WithSelectors adds the given value to the Selectors field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Selectors field. +func (b *DeviceRequestApplyConfiguration) WithSelectors(values ...*DeviceSelectorApplyConfiguration) *DeviceRequestApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSelectors") + } + b.Selectors = append(b.Selectors, *values[i]) + } + return b +} + +// WithCountMode sets the CountMode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CountMode field is set to the value of the last call. +func (b *DeviceRequestApplyConfiguration) WithCountMode(value resourcev1alpha3.DeviceCountMode) *DeviceRequestApplyConfiguration { + b.CountMode = &value + return b +} + +// WithCount sets the Count field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Count field is set to the value of the last call. +func (b *DeviceRequestApplyConfiguration) WithCount(value int64) *DeviceRequestApplyConfiguration { + b.Count = &value + return b +} + +// WithAdminAccess sets the AdminAccess field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AdminAccess field is set to the value of the last call. +func (b *DeviceRequestApplyConfiguration) WithAdminAccess(value bool) *DeviceRequestApplyConfiguration { + b.AdminAccess = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequestallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequestallocationresult.go new file mode 100644 index 0000000000000..712b9bf9b1832 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/devicerequestallocationresult.go @@ -0,0 +1,66 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceRequestAllocationResultApplyConfiguration represents a declarative configuration of the DeviceRequestAllocationResult type for use +// with apply. +type DeviceRequestAllocationResultApplyConfiguration struct { + Request *string `json:"request,omitempty"` + Driver *string `json:"driver,omitempty"` + Pool *string `json:"pool,omitempty"` + Device *string `json:"device,omitempty"` +} + +// DeviceRequestAllocationResultApplyConfiguration constructs a declarative configuration of the DeviceRequestAllocationResult type for use with +// apply. +func DeviceRequestAllocationResult() *DeviceRequestAllocationResultApplyConfiguration { + return &DeviceRequestAllocationResultApplyConfiguration{} +} + +// WithRequest sets the Request field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Request field is set to the value of the last call. +func (b *DeviceRequestAllocationResultApplyConfiguration) WithRequest(value string) *DeviceRequestAllocationResultApplyConfiguration { + b.Request = &value + return b +} + +// WithDriver sets the Driver field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Driver field is set to the value of the last call. +func (b *DeviceRequestAllocationResultApplyConfiguration) WithDriver(value string) *DeviceRequestAllocationResultApplyConfiguration { + b.Driver = &value + return b +} + +// WithPool sets the Pool field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Pool field is set to the value of the last call. +func (b *DeviceRequestAllocationResultApplyConfiguration) WithPool(value string) *DeviceRequestAllocationResultApplyConfiguration { + b.Pool = &value + return b +} + +// WithDevice sets the Device field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Device field is set to the value of the last call. +func (b *DeviceRequestAllocationResultApplyConfiguration) WithDevice(value string) *DeviceRequestAllocationResultApplyConfiguration { + b.Device = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceselector.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceselector.go new file mode 100644 index 0000000000000..574299d15e4e0 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/deviceselector.go @@ -0,0 +1,39 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// DeviceSelectorApplyConfiguration represents a declarative configuration of the DeviceSelector type for use +// with apply. +type DeviceSelectorApplyConfiguration struct { + CEL *CELDeviceSelectorApplyConfiguration `json:"cel,omitempty"` +} + +// DeviceSelectorApplyConfiguration constructs a declarative configuration of the DeviceSelector type for use with +// apply. +func DeviceSelector() *DeviceSelectorApplyConfiguration { + return &DeviceSelectorApplyConfiguration{} +} + +// WithCEL sets the CEL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CEL field is set to the value of the last call. +func (b *DeviceSelectorApplyConfiguration) WithCEL(value *CELDeviceSelectorApplyConfiguration) *DeviceSelectorApplyConfiguration { + b.CEL = value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverallocationresult.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverallocationresult.go deleted file mode 100644 index 787c02660cd0e..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverallocationresult.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DriverAllocationResultApplyConfiguration represents a declarative configuration of the DriverAllocationResult type for use -// with apply. -type DriverAllocationResultApplyConfiguration struct { - VendorRequestParameters *runtime.RawExtension `json:"vendorRequestParameters,omitempty"` - AllocationResultModelApplyConfiguration `json:",inline"` -} - -// DriverAllocationResultApplyConfiguration constructs a declarative configuration of the DriverAllocationResult type for use with -// apply. -func DriverAllocationResult() *DriverAllocationResultApplyConfiguration { - return &DriverAllocationResultApplyConfiguration{} -} - -// WithVendorRequestParameters sets the VendorRequestParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VendorRequestParameters field is set to the value of the last call. -func (b *DriverAllocationResultApplyConfiguration) WithVendorRequestParameters(value runtime.RawExtension) *DriverAllocationResultApplyConfiguration { - b.VendorRequestParameters = &value - return b -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *DriverAllocationResultApplyConfiguration) WithNamedResources(value *NamedResourcesAllocationResultApplyConfiguration) *DriverAllocationResultApplyConfiguration { - b.NamedResources = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverrequests.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverrequests.go deleted file mode 100644 index f322e7930ac6e..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/driverrequests.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DriverRequestsApplyConfiguration represents a declarative configuration of the DriverRequests type for use -// with apply. -type DriverRequestsApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` - VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` - Requests []ResourceRequestApplyConfiguration `json:"requests,omitempty"` -} - -// DriverRequestsApplyConfiguration constructs a declarative configuration of the DriverRequests type for use with -// apply. -func DriverRequests() *DriverRequestsApplyConfiguration { - return &DriverRequestsApplyConfiguration{} -} - -// WithDriverName sets the DriverName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverName field is set to the value of the last call. -func (b *DriverRequestsApplyConfiguration) WithDriverName(value string) *DriverRequestsApplyConfiguration { - b.DriverName = &value - return b -} - -// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VendorParameters field is set to the value of the last call. -func (b *DriverRequestsApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *DriverRequestsApplyConfiguration { - b.VendorParameters = &value - return b -} - -// WithRequests adds the given value to the Requests field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Requests field. -func (b *DriverRequestsApplyConfiguration) WithRequests(values ...*ResourceRequestApplyConfiguration) *DriverRequestsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRequests") - } - b.Requests = append(b.Requests, *values[i]) - } - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattribute.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattribute.go deleted file mode 100644 index 502859781221b..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattribute.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - resource "k8s.io/apimachinery/pkg/api/resource" -) - -// NamedResourcesAttributeApplyConfiguration represents a declarative configuration of the NamedResourcesAttribute type for use -// with apply. -type NamedResourcesAttributeApplyConfiguration struct { - Name *string `json:"name,omitempty"` - NamedResourcesAttributeValueApplyConfiguration `json:",inline"` -} - -// NamedResourcesAttributeApplyConfiguration constructs a declarative configuration of the NamedResourcesAttribute type for use with -// apply. -func NamedResourcesAttribute() *NamedResourcesAttributeApplyConfiguration { - return &NamedResourcesAttributeApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithName(value string) *NamedResourcesAttributeApplyConfiguration { - b.Name = &value - return b -} - -// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the QuantityValue field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeApplyConfiguration { - b.QuantityValue = &value - return b -} - -// WithBoolValue sets the BoolValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BoolValue field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeApplyConfiguration { - b.BoolValue = &value - return b -} - -// WithIntValue sets the IntValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IntValue field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeApplyConfiguration { - b.IntValue = &value - return b -} - -// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IntSliceValue field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration { - b.IntSliceValue = value - return b -} - -// WithStringValue sets the StringValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StringValue field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeApplyConfiguration { - b.StringValue = &value - return b -} - -// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StringSliceValue field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeApplyConfiguration { - b.StringSliceValue = value - return b -} - -// WithVersionValue sets the VersionValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VersionValue field is set to the value of the last call. -func (b *NamedResourcesAttributeApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeApplyConfiguration { - b.VersionValue = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattributevalue.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattributevalue.go deleted file mode 100644 index 8b6d90d50cd8e..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesattributevalue.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - resource "k8s.io/apimachinery/pkg/api/resource" -) - -// NamedResourcesAttributeValueApplyConfiguration represents a declarative configuration of the NamedResourcesAttributeValue type for use -// with apply. -type NamedResourcesAttributeValueApplyConfiguration struct { - QuantityValue *resource.Quantity `json:"quantity,omitempty"` - BoolValue *bool `json:"bool,omitempty"` - IntValue *int64 `json:"int,omitempty"` - IntSliceValue *NamedResourcesIntSliceApplyConfiguration `json:"intSlice,omitempty"` - StringValue *string `json:"string,omitempty"` - StringSliceValue *NamedResourcesStringSliceApplyConfiguration `json:"stringSlice,omitempty"` - VersionValue *string `json:"version,omitempty"` -} - -// NamedResourcesAttributeValueApplyConfiguration constructs a declarative configuration of the NamedResourcesAttributeValue type for use with -// apply. -func NamedResourcesAttributeValue() *NamedResourcesAttributeValueApplyConfiguration { - return &NamedResourcesAttributeValueApplyConfiguration{} -} - -// WithQuantityValue sets the QuantityValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the QuantityValue field is set to the value of the last call. -func (b *NamedResourcesAttributeValueApplyConfiguration) WithQuantityValue(value resource.Quantity) *NamedResourcesAttributeValueApplyConfiguration { - b.QuantityValue = &value - return b -} - -// WithBoolValue sets the BoolValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BoolValue field is set to the value of the last call. -func (b *NamedResourcesAttributeValueApplyConfiguration) WithBoolValue(value bool) *NamedResourcesAttributeValueApplyConfiguration { - b.BoolValue = &value - return b -} - -// WithIntValue sets the IntValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IntValue field is set to the value of the last call. -func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntValue(value int64) *NamedResourcesAttributeValueApplyConfiguration { - b.IntValue = &value - return b -} - -// WithIntSliceValue sets the IntSliceValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IntSliceValue field is set to the value of the last call. -func (b *NamedResourcesAttributeValueApplyConfiguration) WithIntSliceValue(value *NamedResourcesIntSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration { - b.IntSliceValue = value - return b -} - -// WithStringValue sets the StringValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StringValue field is set to the value of the last call. -func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringValue(value string) *NamedResourcesAttributeValueApplyConfiguration { - b.StringValue = &value - return b -} - -// WithStringSliceValue sets the StringSliceValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StringSliceValue field is set to the value of the last call. -func (b *NamedResourcesAttributeValueApplyConfiguration) WithStringSliceValue(value *NamedResourcesStringSliceApplyConfiguration) *NamedResourcesAttributeValueApplyConfiguration { - b.StringSliceValue = value - return b -} - -// WithVersionValue sets the VersionValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VersionValue field is set to the value of the last call. -func (b *NamedResourcesAttributeValueApplyConfiguration) WithVersionValue(value string) *NamedResourcesAttributeValueApplyConfiguration { - b.VersionValue = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesinstance.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesinstance.go deleted file mode 100644 index ff028814dbe8b..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesinstance.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// NamedResourcesInstanceApplyConfiguration represents a declarative configuration of the NamedResourcesInstance type for use -// with apply. -type NamedResourcesInstanceApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Attributes []NamedResourcesAttributeApplyConfiguration `json:"attributes,omitempty"` -} - -// NamedResourcesInstanceApplyConfiguration constructs a declarative configuration of the NamedResourcesInstance type for use with -// apply. -func NamedResourcesInstance() *NamedResourcesInstanceApplyConfiguration { - return &NamedResourcesInstanceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NamedResourcesInstanceApplyConfiguration) WithName(value string) *NamedResourcesInstanceApplyConfiguration { - b.Name = &value - return b -} - -// WithAttributes adds the given value to the Attributes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Attributes field. -func (b *NamedResourcesInstanceApplyConfiguration) WithAttributes(values ...*NamedResourcesAttributeApplyConfiguration) *NamedResourcesInstanceApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAttributes") - } - b.Attributes = append(b.Attributes, *values[i]) - } - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesintslice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesintslice.go deleted file mode 100644 index fa336b4ae9af8..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesintslice.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// NamedResourcesIntSliceApplyConfiguration represents a declarative configuration of the NamedResourcesIntSlice type for use -// with apply. -type NamedResourcesIntSliceApplyConfiguration struct { - Ints []int64 `json:"ints,omitempty"` -} - -// NamedResourcesIntSliceApplyConfiguration constructs a declarative configuration of the NamedResourcesIntSlice type for use with -// apply. -func NamedResourcesIntSlice() *NamedResourcesIntSliceApplyConfiguration { - return &NamedResourcesIntSliceApplyConfiguration{} -} - -// WithInts adds the given value to the Ints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Ints field. -func (b *NamedResourcesIntSliceApplyConfiguration) WithInts(values ...int64) *NamedResourcesIntSliceApplyConfiguration { - for i := range values { - b.Ints = append(b.Ints, values[i]) - } - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesrequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesrequest.go deleted file mode 100644 index da6ac3efcfe49..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesrequest.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// NamedResourcesRequestApplyConfiguration represents a declarative configuration of the NamedResourcesRequest type for use -// with apply. -type NamedResourcesRequestApplyConfiguration struct { - Selector *string `json:"selector,omitempty"` -} - -// NamedResourcesRequestApplyConfiguration constructs a declarative configuration of the NamedResourcesRequest type for use with -// apply. -func NamedResourcesRequest() *NamedResourcesRequestApplyConfiguration { - return &NamedResourcesRequestApplyConfiguration{} -} - -// WithSelector sets the Selector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Selector field is set to the value of the last call. -func (b *NamedResourcesRequestApplyConfiguration) WithSelector(value string) *NamedResourcesRequestApplyConfiguration { - b.Selector = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesresources.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesresources.go deleted file mode 100644 index 3e467922a4d35..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesresources.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// NamedResourcesResourcesApplyConfiguration represents a declarative configuration of the NamedResourcesResources type for use -// with apply. -type NamedResourcesResourcesApplyConfiguration struct { - Instances []NamedResourcesInstanceApplyConfiguration `json:"instances,omitempty"` -} - -// NamedResourcesResourcesApplyConfiguration constructs a declarative configuration of the NamedResourcesResources type for use with -// apply. -func NamedResourcesResources() *NamedResourcesResourcesApplyConfiguration { - return &NamedResourcesResourcesApplyConfiguration{} -} - -// WithInstances adds the given value to the Instances field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Instances field. -func (b *NamedResourcesResourcesApplyConfiguration) WithInstances(values ...*NamedResourcesInstanceApplyConfiguration) *NamedResourcesResourcesApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithInstances") - } - b.Instances = append(b.Instances, *values[i]) - } - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesstringslice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesstringslice.go deleted file mode 100644 index 8f21f81905d2b..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/namedresourcesstringslice.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// NamedResourcesStringSliceApplyConfiguration represents a declarative configuration of the NamedResourcesStringSlice type for use -// with apply. -type NamedResourcesStringSliceApplyConfiguration struct { - Strings []string `json:"strings,omitempty"` -} - -// NamedResourcesStringSliceApplyConfiguration constructs a declarative configuration of the NamedResourcesStringSlice type for use with -// apply. -func NamedResourcesStringSlice() *NamedResourcesStringSliceApplyConfiguration { - return &NamedResourcesStringSliceApplyConfiguration{} -} - -// WithStrings adds the given value to the Strings field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Strings field. -func (b *NamedResourcesStringSliceApplyConfiguration) WithStrings(values ...string) *NamedResourcesStringSliceApplyConfiguration { - for i := range values { - b.Strings = append(b.Strings, values[i]) - } - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/vendorparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/opaquedeviceconfiguration.go similarity index 55% rename from staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/vendorparameters.go rename to staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/opaquedeviceconfiguration.go index 71f86a159c25a..caf9d059c3f97 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/vendorparameters.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/opaquedeviceconfiguration.go @@ -22,31 +22,31 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// VendorParametersApplyConfiguration represents a declarative configuration of the VendorParameters type for use +// OpaqueDeviceConfigurationApplyConfiguration represents a declarative configuration of the OpaqueDeviceConfiguration type for use // with apply. -type VendorParametersApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` +type OpaqueDeviceConfigurationApplyConfiguration struct { + Driver *string `json:"driver,omitempty"` Parameters *runtime.RawExtension `json:"parameters,omitempty"` } -// VendorParametersApplyConfiguration constructs a declarative configuration of the VendorParameters type for use with +// OpaqueDeviceConfigurationApplyConfiguration constructs a declarative configuration of the OpaqueDeviceConfiguration type for use with // apply. -func VendorParameters() *VendorParametersApplyConfiguration { - return &VendorParametersApplyConfiguration{} +func OpaqueDeviceConfiguration() *OpaqueDeviceConfigurationApplyConfiguration { + return &OpaqueDeviceConfigurationApplyConfiguration{} } -// WithDriverName sets the DriverName field in the declarative configuration to the given value +// WithDriver sets the Driver field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverName field is set to the value of the last call. -func (b *VendorParametersApplyConfiguration) WithDriverName(value string) *VendorParametersApplyConfiguration { - b.DriverName = &value +// If called multiple times, the Driver field is set to the value of the last call. +func (b *OpaqueDeviceConfigurationApplyConfiguration) WithDriver(value string) *OpaqueDeviceConfigurationApplyConfiguration { + b.Driver = &value return b } // WithParameters sets the Parameters field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Parameters field is set to the value of the last call. -func (b *VendorParametersApplyConfiguration) WithParameters(value runtime.RawExtension) *VendorParametersApplyConfiguration { +func (b *OpaqueDeviceConfigurationApplyConfiguration) WithParameters(value runtime.RawExtension) *OpaqueDeviceConfigurationApplyConfiguration { b.Parameters = &value return b } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparametersreference.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparametersreference.go deleted file mode 100644 index 1d677011c15aa..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimparametersreference.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// ResourceClaimParametersReferenceApplyConfiguration represents a declarative configuration of the ResourceClaimParametersReference type for use -// with apply. -type ResourceClaimParametersReferenceApplyConfiguration struct { - APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` -} - -// ResourceClaimParametersReferenceApplyConfiguration constructs a declarative configuration of the ResourceClaimParametersReference type for use with -// apply. -func ResourceClaimParametersReference() *ResourceClaimParametersReferenceApplyConfiguration { - return &ResourceClaimParametersReferenceApplyConfiguration{} -} - -// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIGroup field is set to the value of the last call. -func (b *ResourceClaimParametersReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClaimParametersReferenceApplyConfiguration { - b.APIGroup = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ResourceClaimParametersReferenceApplyConfiguration) WithKind(value string) *ResourceClaimParametersReferenceApplyConfiguration { - b.Kind = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ResourceClaimParametersReferenceApplyConfiguration) WithName(value string) *ResourceClaimParametersReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimspec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimspec.go index 38bd0c5578ecb..7c5b65681dfc1 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimspec.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimspec.go @@ -21,8 +21,8 @@ package v1alpha3 // ResourceClaimSpecApplyConfiguration represents a declarative configuration of the ResourceClaimSpec type for use // with apply. type ResourceClaimSpecApplyConfiguration struct { - ResourceClassName *string `json:"resourceClassName,omitempty"` - ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` + Devices *DeviceClaimApplyConfiguration `json:"devices,omitempty"` + Controller *string `json:"controller,omitempty"` } // ResourceClaimSpecApplyConfiguration constructs a declarative configuration of the ResourceClaimSpec type for use with @@ -31,18 +31,18 @@ func ResourceClaimSpec() *ResourceClaimSpecApplyConfiguration { return &ResourceClaimSpecApplyConfiguration{} } -// WithResourceClassName sets the ResourceClassName field in the declarative configuration to the given value +// WithDevices sets the Devices field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceClassName field is set to the value of the last call. -func (b *ResourceClaimSpecApplyConfiguration) WithResourceClassName(value string) *ResourceClaimSpecApplyConfiguration { - b.ResourceClassName = &value +// If called multiple times, the Devices field is set to the value of the last call. +func (b *ResourceClaimSpecApplyConfiguration) WithDevices(value *DeviceClaimApplyConfiguration) *ResourceClaimSpecApplyConfiguration { + b.Devices = value return b } -// WithParametersRef sets the ParametersRef field in the declarative configuration to the given value +// WithController sets the Controller field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ParametersRef field is set to the value of the last call. -func (b *ResourceClaimSpecApplyConfiguration) WithParametersRef(value *ResourceClaimParametersReferenceApplyConfiguration) *ResourceClaimSpecApplyConfiguration { - b.ParametersRef = value +// If called multiple times, the Controller field is set to the value of the last call. +func (b *ResourceClaimSpecApplyConfiguration) WithController(value string) *ResourceClaimSpecApplyConfiguration { + b.Controller = &value return b } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimstatus.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimstatus.go index fa1545e52abde..a52af3ec366f5 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimstatus.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclaimstatus.go @@ -21,7 +21,6 @@ package v1alpha3 // ResourceClaimStatusApplyConfiguration represents a declarative configuration of the ResourceClaimStatus type for use // with apply. type ResourceClaimStatusApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` Allocation *AllocationResultApplyConfiguration `json:"allocation,omitempty"` ReservedFor []ResourceClaimConsumerReferenceApplyConfiguration `json:"reservedFor,omitempty"` DeallocationRequested *bool `json:"deallocationRequested,omitempty"` @@ -33,14 +32,6 @@ func ResourceClaimStatus() *ResourceClaimStatusApplyConfiguration { return &ResourceClaimStatusApplyConfiguration{} } -// WithDriverName sets the DriverName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverName field is set to the value of the last call. -func (b *ResourceClaimStatusApplyConfiguration) WithDriverName(value string) *ResourceClaimStatusApplyConfiguration { - b.DriverName = &value - return b -} - // WithAllocation sets the Allocation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Allocation field is set to the value of the last call. diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclass.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclass.go deleted file mode 100644 index a42ea74224bc6..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclass.go +++ /dev/null @@ -1,281 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - corev1 "k8s.io/client-go/applyconfigurations/core/v1" - internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ResourceClassApplyConfiguration represents a declarative configuration of the ResourceClass type for use -// with apply. -type ResourceClassApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - DriverName *string `json:"driverName,omitempty"` - ParametersRef *ResourceClassParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` - SuitableNodes *corev1.NodeSelectorApplyConfiguration `json:"suitableNodes,omitempty"` - StructuredParameters *bool `json:"structuredParameters,omitempty"` -} - -// ResourceClass constructs a declarative configuration of the ResourceClass type for use with -// apply. -func ResourceClass(name string) *ResourceClassApplyConfiguration { - b := &ResourceClassApplyConfiguration{} - b.WithName(name) - b.WithKind("ResourceClass") - b.WithAPIVersion("resource.k8s.io/v1alpha3") - return b -} - -// ExtractResourceClass extracts the applied configuration owned by fieldManager from -// resourceClass. If no managedFields are found in resourceClass for fieldManager, a -// ResourceClassApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// resourceClass must be a unmodified ResourceClass API object that was retrieved from the Kubernetes API. -// ExtractResourceClass provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! -func ExtractResourceClass(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { - return extractResourceClass(resourceClass, fieldManager, "") -} - -// ExtractResourceClassStatus is the same as ExtractResourceClass except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractResourceClassStatus(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { - return extractResourceClass(resourceClass, fieldManager, "status") -} - -func extractResourceClass(resourceClass *resourcev1alpha3.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) { - b := &ResourceClassApplyConfiguration{} - err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClass"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(resourceClass.Name) - - b.WithKind("ResourceClass") - b.WithAPIVersion("resource.k8s.io/v1alpha3") - return b, nil -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithKind(value string) *ResourceClassApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithAPIVersion(value string) *ResourceClassApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithName(value string) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithGenerateName(value string) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithNamespace(value string) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithUID(value types.UID) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithResourceVersion(value string) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithGeneration(value int64) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ResourceClassApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ResourceClassApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ResourceClassApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ResourceClassApplyConfiguration) WithFinalizers(values ...string) *ResourceClassApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) - } - return b -} - -func (b *ResourceClassApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithDriverName sets the DriverName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverName field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithDriverName(value string) *ResourceClassApplyConfiguration { - b.DriverName = &value - return b -} - -// WithParametersRef sets the ParametersRef field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ParametersRef field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithParametersRef(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassApplyConfiguration { - b.ParametersRef = value - return b -} - -// WithSuitableNodes sets the SuitableNodes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SuitableNodes field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithSuitableNodes(value *corev1.NodeSelectorApplyConfiguration) *ResourceClassApplyConfiguration { - b.SuitableNodes = value - return b -} - -// WithStructuredParameters sets the StructuredParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StructuredParameters field is set to the value of the last call. -func (b *ResourceClassApplyConfiguration) WithStructuredParameters(value bool) *ResourceClassApplyConfiguration { - b.StructuredParameters = &value - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ResourceClassApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.Name -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparameters.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparameters.go deleted file mode 100644 index 7413fbfe7c630..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparameters.go +++ /dev/null @@ -1,283 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - internal "k8s.io/client-go/applyconfigurations/internal" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ResourceClassParametersApplyConfiguration represents a declarative configuration of the ResourceClassParameters type for use -// with apply. -type ResourceClassParametersApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - GeneratedFrom *ResourceClassParametersReferenceApplyConfiguration `json:"generatedFrom,omitempty"` - VendorParameters []VendorParametersApplyConfiguration `json:"vendorParameters,omitempty"` - Filters []ResourceFilterApplyConfiguration `json:"filters,omitempty"` -} - -// ResourceClassParameters constructs a declarative configuration of the ResourceClassParameters type for use with -// apply. -func ResourceClassParameters(name, namespace string) *ResourceClassParametersApplyConfiguration { - b := &ResourceClassParametersApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("ResourceClassParameters") - b.WithAPIVersion("resource.k8s.io/v1alpha3") - return b -} - -// ExtractResourceClassParameters extracts the applied configuration owned by fieldManager from -// resourceClassParameters. If no managedFields are found in resourceClassParameters for fieldManager, a -// ResourceClassParametersApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// resourceClassParameters must be a unmodified ResourceClassParameters API object that was retrieved from the Kubernetes API. -// ExtractResourceClassParameters provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -// Experimental! -func ExtractResourceClassParameters(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { - return extractResourceClassParameters(resourceClassParameters, fieldManager, "") -} - -// ExtractResourceClassParametersStatus is the same as ExtractResourceClassParameters except -// that it extracts the status subresource applied configuration. -// Experimental! -func ExtractResourceClassParametersStatus(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string) (*ResourceClassParametersApplyConfiguration, error) { - return extractResourceClassParameters(resourceClassParameters, fieldManager, "status") -} - -func extractResourceClassParameters(resourceClassParameters *resourcev1alpha3.ResourceClassParameters, fieldManager string, subresource string) (*ResourceClassParametersApplyConfiguration, error) { - b := &ResourceClassParametersApplyConfiguration{} - err := managedfields.ExtractInto(resourceClassParameters, internal.Parser().Type("io.k8s.api.resource.v1alpha3.ResourceClassParameters"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(resourceClassParameters.Name) - b.WithNamespace(resourceClassParameters.Namespace) - - b.WithKind("ResourceClassParameters") - b.WithAPIVersion("resource.k8s.io/v1alpha3") - return b, nil -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithKind(value string) *ResourceClassParametersApplyConfiguration { - b.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithAPIVersion(value string) *ResourceClassParametersApplyConfiguration { - b.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithName(value string) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithGenerateName(value string) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithNamespace(value string) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithUID(value types.UID) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithResourceVersion(value string) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithGeneration(value int64) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ResourceClassParametersApplyConfiguration) WithLabels(entries map[string]string) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ResourceClassParametersApplyConfiguration) WithAnnotations(entries map[string]string) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ResourceClassParametersApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ResourceClassParametersApplyConfiguration) WithFinalizers(values ...string) *ResourceClassParametersApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) - } - return b -} - -func (b *ResourceClassParametersApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithGeneratedFrom sets the GeneratedFrom field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GeneratedFrom field is set to the value of the last call. -func (b *ResourceClassParametersApplyConfiguration) WithGeneratedFrom(value *ResourceClassParametersReferenceApplyConfiguration) *ResourceClassParametersApplyConfiguration { - b.GeneratedFrom = value - return b -} - -// WithVendorParameters adds the given value to the VendorParameters field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the VendorParameters field. -func (b *ResourceClassParametersApplyConfiguration) WithVendorParameters(values ...*VendorParametersApplyConfiguration) *ResourceClassParametersApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVendorParameters") - } - b.VendorParameters = append(b.VendorParameters, *values[i]) - } - return b -} - -// WithFilters adds the given value to the Filters field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Filters field. -func (b *ResourceClassParametersApplyConfiguration) WithFilters(values ...*ResourceFilterApplyConfiguration) *ResourceClassParametersApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithFilters") - } - b.Filters = append(b.Filters, *values[i]) - } - return b -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ResourceClassParametersApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.Name -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparametersreference.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparametersreference.go deleted file mode 100644 index db469e5eec041..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceclassparametersreference.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// ResourceClassParametersReferenceApplyConfiguration represents a declarative configuration of the ResourceClassParametersReference type for use -// with apply. -type ResourceClassParametersReferenceApplyConfiguration struct { - APIGroup *string `json:"apiGroup,omitempty"` - Kind *string `json:"kind,omitempty"` - Name *string `json:"name,omitempty"` - Namespace *string `json:"namespace,omitempty"` -} - -// ResourceClassParametersReferenceApplyConfiguration constructs a declarative configuration of the ResourceClassParametersReference type for use with -// apply. -func ResourceClassParametersReference() *ResourceClassParametersReferenceApplyConfiguration { - return &ResourceClassParametersReferenceApplyConfiguration{} -} - -// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIGroup field is set to the value of the last call. -func (b *ResourceClassParametersReferenceApplyConfiguration) WithAPIGroup(value string) *ResourceClassParametersReferenceApplyConfiguration { - b.APIGroup = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ResourceClassParametersReferenceApplyConfiguration) WithKind(value string) *ResourceClassParametersReferenceApplyConfiguration { - b.Kind = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ResourceClassParametersReferenceApplyConfiguration) WithName(value string) *ResourceClassParametersReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ResourceClassParametersReferenceApplyConfiguration) WithNamespace(value string) *ResourceClassParametersReferenceApplyConfiguration { - b.Namespace = &value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefilter.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefilter.go deleted file mode 100644 index 4c5542692cd4d..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefilter.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// ResourceFilterApplyConfiguration represents a declarative configuration of the ResourceFilter type for use -// with apply. -type ResourceFilterApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` - ResourceFilterModelApplyConfiguration `json:",inline"` -} - -// ResourceFilterApplyConfiguration constructs a declarative configuration of the ResourceFilter type for use with -// apply. -func ResourceFilter() *ResourceFilterApplyConfiguration { - return &ResourceFilterApplyConfiguration{} -} - -// WithDriverName sets the DriverName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverName field is set to the value of the last call. -func (b *ResourceFilterApplyConfiguration) WithDriverName(value string) *ResourceFilterApplyConfiguration { - b.DriverName = &value - return b -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *ResourceFilterApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterApplyConfiguration { - b.NamedResources = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefiltermodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefiltermodel.go deleted file mode 100644 index 0de3f12f67897..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcefiltermodel.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// ResourceFilterModelApplyConfiguration represents a declarative configuration of the ResourceFilterModel type for use -// with apply. -type ResourceFilterModelApplyConfiguration struct { - NamedResources *NamedResourcesFilterApplyConfiguration `json:"namedResources,omitempty"` -} - -// ResourceFilterModelApplyConfiguration constructs a declarative configuration of the ResourceFilterModel type for use with -// apply. -func ResourceFilterModel() *ResourceFilterModelApplyConfiguration { - return &ResourceFilterModelApplyConfiguration{} -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *ResourceFilterModelApplyConfiguration) WithNamedResources(value *NamedResourcesFilterApplyConfiguration) *ResourceFilterModelApplyConfiguration { - b.NamedResources = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcehandle.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcehandle.go deleted file mode 100644 index 6c8a697fa13f0..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcehandle.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// ResourceHandleApplyConfiguration represents a declarative configuration of the ResourceHandle type for use -// with apply. -type ResourceHandleApplyConfiguration struct { - DriverName *string `json:"driverName,omitempty"` - Data *string `json:"data,omitempty"` - StructuredData *StructuredResourceHandleApplyConfiguration `json:"structuredData,omitempty"` -} - -// ResourceHandleApplyConfiguration constructs a declarative configuration of the ResourceHandle type for use with -// apply. -func ResourceHandle() *ResourceHandleApplyConfiguration { - return &ResourceHandleApplyConfiguration{} -} - -// WithDriverName sets the DriverName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverName field is set to the value of the last call. -func (b *ResourceHandleApplyConfiguration) WithDriverName(value string) *ResourceHandleApplyConfiguration { - b.DriverName = &value - return b -} - -// WithData sets the Data field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Data field is set to the value of the last call. -func (b *ResourceHandleApplyConfiguration) WithData(value string) *ResourceHandleApplyConfiguration { - b.Data = &value - return b -} - -// WithStructuredData sets the StructuredData field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StructuredData field is set to the value of the last call. -func (b *ResourceHandleApplyConfiguration) WithStructuredData(value *StructuredResourceHandleApplyConfiguration) *ResourceHandleApplyConfiguration { - b.StructuredData = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcemodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcemodel.go deleted file mode 100644 index 2999d447df158..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcemodel.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// ResourceModelApplyConfiguration represents a declarative configuration of the ResourceModel type for use -// with apply. -type ResourceModelApplyConfiguration struct { - NamedResources *NamedResourcesResourcesApplyConfiguration `json:"namedResources,omitempty"` -} - -// ResourceModelApplyConfiguration constructs a declarative configuration of the ResourceModel type for use with -// apply. -func ResourceModel() *ResourceModelApplyConfiguration { - return &ResourceModelApplyConfiguration{} -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *ResourceModelApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceModelApplyConfiguration { - b.NamedResources = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcepool.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcepool.go new file mode 100644 index 0000000000000..23825d137f906 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcepool.go @@ -0,0 +1,57 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// ResourcePoolApplyConfiguration represents a declarative configuration of the ResourcePool type for use +// with apply. +type ResourcePoolApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Generation *int64 `json:"generation,omitempty"` + ResourceSliceCount *int64 `json:"resourceSliceCount,omitempty"` +} + +// ResourcePoolApplyConfiguration constructs a declarative configuration of the ResourcePool type for use with +// apply. +func ResourcePool() *ResourcePoolApplyConfiguration { + return &ResourcePoolApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ResourcePoolApplyConfiguration) WithName(value string) *ResourcePoolApplyConfiguration { + b.Name = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ResourcePoolApplyConfiguration) WithGeneration(value int64) *ResourcePoolApplyConfiguration { + b.Generation = &value + return b +} + +// WithResourceSliceCount sets the ResourceSliceCount field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceSliceCount field is set to the value of the last call. +func (b *ResourcePoolApplyConfiguration) WithResourceSliceCount(value int64) *ResourcePoolApplyConfiguration { + b.ResourceSliceCount = &value + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequest.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequest.go deleted file mode 100644 index d0d047e752cf4..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequest.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ResourceRequestApplyConfiguration represents a declarative configuration of the ResourceRequest type for use -// with apply. -type ResourceRequestApplyConfiguration struct { - VendorParameters *runtime.RawExtension `json:"vendorParameters,omitempty"` - ResourceRequestModelApplyConfiguration `json:",inline"` -} - -// ResourceRequestApplyConfiguration constructs a declarative configuration of the ResourceRequest type for use with -// apply. -func ResourceRequest() *ResourceRequestApplyConfiguration { - return &ResourceRequestApplyConfiguration{} -} - -// WithVendorParameters sets the VendorParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VendorParameters field is set to the value of the last call. -func (b *ResourceRequestApplyConfiguration) WithVendorParameters(value runtime.RawExtension) *ResourceRequestApplyConfiguration { - b.VendorParameters = &value - return b -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *ResourceRequestApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestApplyConfiguration { - b.NamedResources = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequestmodel.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequestmodel.go deleted file mode 100644 index 35d1825319954..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourcerequestmodel.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// ResourceRequestModelApplyConfiguration represents a declarative configuration of the ResourceRequestModel type for use -// with apply. -type ResourceRequestModelApplyConfiguration struct { - NamedResources *NamedResourcesRequestApplyConfiguration `json:"namedResources,omitempty"` -} - -// ResourceRequestModelApplyConfiguration constructs a declarative configuration of the ResourceRequestModel type for use with -// apply. -func ResourceRequestModel() *ResourceRequestModelApplyConfiguration { - return &ResourceRequestModelApplyConfiguration{} -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *ResourceRequestModelApplyConfiguration) WithNamedResources(value *NamedResourcesRequestApplyConfiguration) *ResourceRequestModelApplyConfiguration { - b.NamedResources = value - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslice.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslice.go index 7486e75c82a72..aaad68612ecc0 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslice.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslice.go @@ -32,9 +32,7 @@ import ( type ResourceSliceApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - NodeName *string `json:"nodeName,omitempty"` - DriverName *string `json:"driverName,omitempty"` - ResourceModelApplyConfiguration `json:",inline"` + Spec *ResourceSliceSpecApplyConfiguration `json:"spec,omitempty"` } // ResourceSlice constructs a declarative configuration of the ResourceSlice type for use with @@ -240,27 +238,11 @@ func (b *ResourceSliceApplyConfiguration) ensureObjectMetaApplyConfigurationExis } } -// WithNodeName sets the NodeName field in the declarative configuration to the given value +// WithSpec sets the Spec field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeName field is set to the value of the last call. -func (b *ResourceSliceApplyConfiguration) WithNodeName(value string) *ResourceSliceApplyConfiguration { - b.NodeName = &value - return b -} - -// WithDriverName sets the DriverName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverName field is set to the value of the last call. -func (b *ResourceSliceApplyConfiguration) WithDriverName(value string) *ResourceSliceApplyConfiguration { - b.DriverName = &value - return b -} - -// WithNamedResources sets the NamedResources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamedResources field is set to the value of the last call. -func (b *ResourceSliceApplyConfiguration) WithNamedResources(value *NamedResourcesResourcesApplyConfiguration) *ResourceSliceApplyConfiguration { - b.NamedResources = value +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ResourceSliceApplyConfiguration) WithSpec(value *ResourceSliceSpecApplyConfiguration) *ResourceSliceApplyConfiguration { + b.Spec = value return b } diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslicespec.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslicespec.go new file mode 100644 index 0000000000000..2ded7590739d5 --- /dev/null +++ b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/resourceslicespec.go @@ -0,0 +1,93 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + v1 "k8s.io/client-go/applyconfigurations/core/v1" +) + +// ResourceSliceSpecApplyConfiguration represents a declarative configuration of the ResourceSliceSpec type for use +// with apply. +type ResourceSliceSpecApplyConfiguration struct { + Driver *string `json:"driver,omitempty"` + Pool *ResourcePoolApplyConfiguration `json:"pool,omitempty"` + NodeName *string `json:"nodeName,omitempty"` + NodeSelector *v1.NodeSelectorApplyConfiguration `json:"nodeSelector,omitempty"` + AllNodes *bool `json:"allNodes,omitempty"` + Devices []DeviceApplyConfiguration `json:"devices,omitempty"` +} + +// ResourceSliceSpecApplyConfiguration constructs a declarative configuration of the ResourceSliceSpec type for use with +// apply. +func ResourceSliceSpec() *ResourceSliceSpecApplyConfiguration { + return &ResourceSliceSpecApplyConfiguration{} +} + +// WithDriver sets the Driver field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Driver field is set to the value of the last call. +func (b *ResourceSliceSpecApplyConfiguration) WithDriver(value string) *ResourceSliceSpecApplyConfiguration { + b.Driver = &value + return b +} + +// WithPool sets the Pool field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Pool field is set to the value of the last call. +func (b *ResourceSliceSpecApplyConfiguration) WithPool(value *ResourcePoolApplyConfiguration) *ResourceSliceSpecApplyConfiguration { + b.Pool = value + return b +} + +// WithNodeName sets the NodeName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeName field is set to the value of the last call. +func (b *ResourceSliceSpecApplyConfiguration) WithNodeName(value string) *ResourceSliceSpecApplyConfiguration { + b.NodeName = &value + return b +} + +// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NodeSelector field is set to the value of the last call. +func (b *ResourceSliceSpecApplyConfiguration) WithNodeSelector(value *v1.NodeSelectorApplyConfiguration) *ResourceSliceSpecApplyConfiguration { + b.NodeSelector = value + return b +} + +// WithAllNodes sets the AllNodes field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AllNodes field is set to the value of the last call. +func (b *ResourceSliceSpecApplyConfiguration) WithAllNodes(value bool) *ResourceSliceSpecApplyConfiguration { + b.AllNodes = &value + return b +} + +// WithDevices adds the given value to the Devices field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Devices field. +func (b *ResourceSliceSpecApplyConfiguration) WithDevices(values ...*DeviceApplyConfiguration) *ResourceSliceSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDevices") + } + b.Devices = append(b.Devices, *values[i]) + } + return b +} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/structuredresourcehandle.go b/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/structuredresourcehandle.go deleted file mode 100644 index 0d58994c942e8..0000000000000 --- a/staging/src/k8s.io/client-go/applyconfigurations/resource/v1alpha3/structuredresourcehandle.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// StructuredResourceHandleApplyConfiguration represents a declarative configuration of the StructuredResourceHandle type for use -// with apply. -type StructuredResourceHandleApplyConfiguration struct { - VendorClassParameters *runtime.RawExtension `json:"vendorClassParameters,omitempty"` - VendorClaimParameters *runtime.RawExtension `json:"vendorClaimParameters,omitempty"` - NodeName *string `json:"nodeName,omitempty"` - Results []DriverAllocationResultApplyConfiguration `json:"results,omitempty"` -} - -// StructuredResourceHandleApplyConfiguration constructs a declarative configuration of the StructuredResourceHandle type for use with -// apply. -func StructuredResourceHandle() *StructuredResourceHandleApplyConfiguration { - return &StructuredResourceHandleApplyConfiguration{} -} - -// WithVendorClassParameters sets the VendorClassParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VendorClassParameters field is set to the value of the last call. -func (b *StructuredResourceHandleApplyConfiguration) WithVendorClassParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { - b.VendorClassParameters = &value - return b -} - -// WithVendorClaimParameters sets the VendorClaimParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VendorClaimParameters field is set to the value of the last call. -func (b *StructuredResourceHandleApplyConfiguration) WithVendorClaimParameters(value runtime.RawExtension) *StructuredResourceHandleApplyConfiguration { - b.VendorClaimParameters = &value - return b -} - -// WithNodeName sets the NodeName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeName field is set to the value of the last call. -func (b *StructuredResourceHandleApplyConfiguration) WithNodeName(value string) *StructuredResourceHandleApplyConfiguration { - b.NodeName = &value - return b -} - -// WithResults adds the given value to the Results field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Results field. -func (b *StructuredResourceHandleApplyConfiguration) WithResults(values ...*DriverAllocationResultApplyConfiguration) *StructuredResourceHandleApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResults") - } - b.Results = append(b.Results, *values[i]) - } - return b -} diff --git a/staging/src/k8s.io/client-go/applyconfigurations/utils.go b/staging/src/k8s.io/client-go/applyconfigurations/utils.go index 68ba339e4a753..5a6d6a20aefdd 100644 --- a/staging/src/k8s.io/client-go/applyconfigurations/utils.go +++ b/staging/src/k8s.io/client-go/applyconfigurations/utils.go @@ -1552,30 +1552,40 @@ func ForKind(kind schema.GroupVersionKind) interface{} { // Group=resource.k8s.io, Version=v1alpha3 case v1alpha3.SchemeGroupVersion.WithKind("AllocationResult"): return &resourcev1alpha3.AllocationResultApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("AllocationResultModel"): - return &resourcev1alpha3.AllocationResultModelApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("DriverAllocationResult"): - return &resourcev1alpha3.DriverAllocationResultApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("DriverRequests"): - return &resourcev1alpha3.DriverRequestsApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAllocationResult"): - return &resourcev1alpha3.NamedResourcesAllocationResultApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAttribute"): - return &resourcev1alpha3.NamedResourcesAttributeApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesAttributeValue"): - return &resourcev1alpha3.NamedResourcesAttributeValueApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesFilter"): - return &resourcev1alpha3.NamedResourcesFilterApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesInstance"): - return &resourcev1alpha3.NamedResourcesInstanceApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesIntSlice"): - return &resourcev1alpha3.NamedResourcesIntSliceApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesRequest"): - return &resourcev1alpha3.NamedResourcesRequestApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesResources"): - return &resourcev1alpha3.NamedResourcesResourcesApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("NamedResourcesStringSlice"): - return &resourcev1alpha3.NamedResourcesStringSliceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("BasicDevice"): + return &resourcev1alpha3.BasicDeviceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("CELDeviceSelector"): + return &resourcev1alpha3.CELDeviceSelectorApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("Device"): + return &resourcev1alpha3.DeviceApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceAllocationConfiguration"): + return &resourcev1alpha3.DeviceAllocationConfigurationApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceAllocationResult"): + return &resourcev1alpha3.DeviceAllocationResultApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceAttribute"): + return &resourcev1alpha3.DeviceAttributeApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceClaim"): + return &resourcev1alpha3.DeviceClaimApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceClaimConfiguration"): + return &resourcev1alpha3.DeviceClaimConfigurationApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceClass"): + return &resourcev1alpha3.DeviceClassApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceClassConfiguration"): + return &resourcev1alpha3.DeviceClassConfigurationApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceClassSpec"): + return &resourcev1alpha3.DeviceClassSpecApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceConfiguration"): + return &resourcev1alpha3.DeviceConfigurationApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceConstraint"): + return &resourcev1alpha3.DeviceConstraintApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceRequest"): + return &resourcev1alpha3.DeviceRequestApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceRequestAllocationResult"): + return &resourcev1alpha3.DeviceRequestAllocationResultApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("DeviceSelector"): + return &resourcev1alpha3.DeviceSelectorApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("OpaqueDeviceConfiguration"): + return &resourcev1alpha3.OpaqueDeviceConfigurationApplyConfiguration{} case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContext"): return &resourcev1alpha3.PodSchedulingContextApplyConfiguration{} case v1alpha3.SchemeGroupVersion.WithKind("PodSchedulingContextSpec"): @@ -1586,10 +1596,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &resourcev1alpha3.ResourceClaimApplyConfiguration{} case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"): return &resourcev1alpha3.ResourceClaimConsumerReferenceApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParameters"): - return &resourcev1alpha3.ResourceClaimParametersApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"): - return &resourcev1alpha3.ResourceClaimParametersReferenceApplyConfiguration{} case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"): return &resourcev1alpha3.ResourceClaimSchedulingStatusApplyConfiguration{} case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimSpec"): @@ -1600,30 +1606,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &resourcev1alpha3.ResourceClaimTemplateApplyConfiguration{} case v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"): return &resourcev1alpha3.ResourceClaimTemplateSpecApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceClass"): - return &resourcev1alpha3.ResourceClassApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParameters"): - return &resourcev1alpha3.ResourceClassParametersApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParametersReference"): - return &resourcev1alpha3.ResourceClassParametersReferenceApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceFilter"): - return &resourcev1alpha3.ResourceFilterApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceFilterModel"): - return &resourcev1alpha3.ResourceFilterModelApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceHandle"): - return &resourcev1alpha3.ResourceHandleApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceModel"): - return &resourcev1alpha3.ResourceModelApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceRequest"): - return &resourcev1alpha3.ResourceRequestApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("ResourceRequestModel"): - return &resourcev1alpha3.ResourceRequestModelApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourcePool"): + return &resourcev1alpha3.ResourcePoolApplyConfiguration{} case v1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"): return &resourcev1alpha3.ResourceSliceApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("StructuredResourceHandle"): - return &resourcev1alpha3.StructuredResourceHandleApplyConfiguration{} - case v1alpha3.SchemeGroupVersion.WithKind("VendorParameters"): - return &resourcev1alpha3.VendorParametersApplyConfiguration{} + case v1alpha3.SchemeGroupVersion.WithKind("ResourceSliceSpec"): + return &resourcev1alpha3.ResourceSliceSpecApplyConfiguration{} // Group=scheduling.k8s.io, Version=v1 case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"): diff --git a/staging/src/k8s.io/client-go/informers/generic.go b/staging/src/k8s.io/client-go/informers/generic.go index 42c8f22aab5d5..c7df13f2525c8 100644 --- a/staging/src/k8s.io/client-go/informers/generic.go +++ b/staging/src/k8s.io/client-go/informers/generic.go @@ -367,18 +367,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil // Group=resource.k8s.io, Version=v1alpha3 + case v1alpha3.SchemeGroupVersion.WithResource("deviceclasses"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceClasses().Informer()}, nil case v1alpha3.SchemeGroupVersion.WithResource("podschedulingcontexts"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().PodSchedulingContexts().Informer()}, nil case v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaims().Informer()}, nil - case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimparameters"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimParameters().Informer()}, nil case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimTemplates().Informer()}, nil - case v1alpha3.SchemeGroupVersion.WithResource("resourceclasses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClasses().Informer()}, nil - case v1alpha3.SchemeGroupVersion.WithResource("resourceclassparameters"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClassParameters().Informer()}, nil case v1alpha3.SchemeGroupVersion.WithResource("resourceslices"): return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceSlices().Informer()}, nil diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclass.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/deviceclass.go similarity index 55% rename from staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclass.go rename to staging/src/k8s.io/client-go/informers/resource/v1alpha3/deviceclass.go index f63141a70e041..c0bcbd1905cae 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclass.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/deviceclass.go @@ -32,58 +32,58 @@ import ( cache "k8s.io/client-go/tools/cache" ) -// ResourceClassInformer provides access to a shared informer and lister for -// ResourceClasses. -type ResourceClassInformer interface { +// DeviceClassInformer provides access to a shared informer and lister for +// DeviceClasses. +type DeviceClassInformer interface { Informer() cache.SharedIndexInformer - Lister() v1alpha3.ResourceClassLister + Lister() v1alpha3.DeviceClassLister } -type resourceClassInformer struct { +type deviceClassInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewResourceClassInformer constructs a new informer for ResourceClass type. +// NewDeviceClassInformer constructs a new informer for DeviceClass type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewResourceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredResourceClassInformer(client, resyncPeriod, indexers, nil) +func NewDeviceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredDeviceClassInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredResourceClassInformer constructs a new informer for ResourceClass type. +// NewFilteredDeviceClassInformer constructs a new informer for DeviceClass type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredResourceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { +func NewFilteredDeviceClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceClasses().List(context.TODO(), options) + return client.ResourceV1alpha3().DeviceClasses().List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceClasses().Watch(context.TODO(), options) + return client.ResourceV1alpha3().DeviceClasses().Watch(context.TODO(), options) }, }, - &resourcev1alpha3.ResourceClass{}, + &resourcev1alpha3.DeviceClass{}, resyncPeriod, indexers, ) } -func (f *resourceClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredResourceClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +func (f *deviceClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredDeviceClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } -func (f *resourceClassInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha3.ResourceClass{}, f.defaultInformer) +func (f *deviceClassInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha3.DeviceClass{}, f.defaultInformer) } -func (f *resourceClassInformer) Lister() v1alpha3.ResourceClassLister { - return v1alpha3.NewResourceClassLister(f.Informer().GetIndexer()) +func (f *deviceClassInformer) Lister() v1alpha3.DeviceClassLister { + return v1alpha3.NewDeviceClassLister(f.Informer().GetIndexer()) } diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/interface.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/interface.go index 36b9f1c7824b9..481a7de451880 100644 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/interface.go +++ b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/interface.go @@ -24,18 +24,14 @@ import ( // Interface provides access to all the informers in this group version. type Interface interface { + // DeviceClasses returns a DeviceClassInformer. + DeviceClasses() DeviceClassInformer // PodSchedulingContexts returns a PodSchedulingContextInformer. PodSchedulingContexts() PodSchedulingContextInformer // ResourceClaims returns a ResourceClaimInformer. ResourceClaims() ResourceClaimInformer - // ResourceClaimParameters returns a ResourceClaimParametersInformer. - ResourceClaimParameters() ResourceClaimParametersInformer // ResourceClaimTemplates returns a ResourceClaimTemplateInformer. ResourceClaimTemplates() ResourceClaimTemplateInformer - // ResourceClasses returns a ResourceClassInformer. - ResourceClasses() ResourceClassInformer - // ResourceClassParameters returns a ResourceClassParametersInformer. - ResourceClassParameters() ResourceClassParametersInformer // ResourceSlices returns a ResourceSliceInformer. ResourceSlices() ResourceSliceInformer } @@ -51,6 +47,11 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } +// DeviceClasses returns a DeviceClassInformer. +func (v *version) DeviceClasses() DeviceClassInformer { + return &deviceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // PodSchedulingContexts returns a PodSchedulingContextInformer. func (v *version) PodSchedulingContexts() PodSchedulingContextInformer { return &podSchedulingContextInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} @@ -61,26 +62,11 @@ func (v *version) ResourceClaims() ResourceClaimInformer { return &resourceClaimInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// ResourceClaimParameters returns a ResourceClaimParametersInformer. -func (v *version) ResourceClaimParameters() ResourceClaimParametersInformer { - return &resourceClaimParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - // ResourceClaimTemplates returns a ResourceClaimTemplateInformer. func (v *version) ResourceClaimTemplates() ResourceClaimTemplateInformer { return &resourceClaimTemplateInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } -// ResourceClasses returns a ResourceClassInformer. -func (v *version) ResourceClasses() ResourceClassInformer { - return &resourceClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ResourceClassParameters returns a ResourceClassParametersInformer. -func (v *version) ResourceClassParameters() ResourceClassParametersInformer { - return &resourceClassParametersInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - // ResourceSlices returns a ResourceSliceInformer. func (v *version) ResourceSlices() ResourceSliceInformer { return &resourceSliceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimparameters.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimparameters.go deleted file mode 100644 index 86df716241acb..0000000000000 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclaimparameters.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - "context" - time "time" - - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" - cache "k8s.io/client-go/tools/cache" -) - -// ResourceClaimParametersInformer provides access to a shared informer and lister for -// ResourceClaimParameters. -type ResourceClaimParametersInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha3.ResourceClaimParametersLister -} - -type resourceClaimParametersInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredResourceClaimParametersInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredResourceClaimParametersInformer constructs a new informer for ResourceClaimParameters type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredResourceClaimParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ResourceV1alpha3().ResourceClaimParameters(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ResourceV1alpha3().ResourceClaimParameters(namespace).Watch(context.TODO(), options) - }, - }, - &resourcev1alpha3.ResourceClaimParameters{}, - resyncPeriod, - indexers, - ) -} - -func (f *resourceClaimParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredResourceClaimParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *resourceClaimParametersInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha3.ResourceClaimParameters{}, f.defaultInformer) -} - -func (f *resourceClaimParametersInformer) Lister() v1alpha3.ResourceClaimParametersLister { - return v1alpha3.NewResourceClaimParametersLister(f.Informer().GetIndexer()) -} diff --git a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclassparameters.go b/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclassparameters.go deleted file mode 100644 index cb2172f5c0dab..0000000000000 --- a/staging/src/k8s.io/client-go/informers/resource/v1alpha3/resourceclassparameters.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - "context" - time "time" - - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - internalinterfaces "k8s.io/client-go/informers/internalinterfaces" - kubernetes "k8s.io/client-go/kubernetes" - v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" - cache "k8s.io/client-go/tools/cache" -) - -// ResourceClassParametersInformer provides access to a shared informer and lister for -// ResourceClassParameters. -type ResourceClassParametersInformer interface { - Informer() cache.SharedIndexInformer - Lister() v1alpha3.ResourceClassParametersLister -} - -type resourceClassParametersInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewResourceClassParametersInformer constructs a new informer for ResourceClassParameters type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFilteredResourceClassParametersInformer(client, namespace, resyncPeriod, indexers, nil) -} - -// NewFilteredResourceClassParametersInformer constructs a new informer for ResourceClassParameters type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredResourceClassParametersInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return cache.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ResourceV1alpha3().ResourceClassParameters(namespace).List(context.TODO(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.ResourceV1alpha3().ResourceClassParameters(namespace).Watch(context.TODO(), options) - }, - }, - &resourcev1alpha3.ResourceClassParameters{}, - resyncPeriod, - indexers, - ) -} - -func (f *resourceClassParametersInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFilteredResourceClassParametersInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) -} - -func (f *resourceClassParametersInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha3.ResourceClassParameters{}, f.defaultInformer) -} - -func (f *resourceClassParametersInformer) Lister() v1alpha3.ResourceClassParametersLister { - return v1alpha3.NewResourceClassParametersLister(f.Informer().GetIndexer()) -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/deviceclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/deviceclass.go new file mode 100644 index 0000000000000..35455dfa35796 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/deviceclass.go @@ -0,0 +1,69 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha3 + +import ( + "context" + + v1alpha3 "k8s.io/api/resource/v1alpha3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" + gentype "k8s.io/client-go/gentype" + scheme "k8s.io/client-go/kubernetes/scheme" +) + +// DeviceClassesGetter has a method to return a DeviceClassInterface. +// A group's client should implement this interface. +type DeviceClassesGetter interface { + DeviceClasses() DeviceClassInterface +} + +// DeviceClassInterface has methods to work with DeviceClass resources. +type DeviceClassInterface interface { + Create(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.CreateOptions) (*v1alpha3.DeviceClass, error) + Update(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.UpdateOptions) (*v1alpha3.DeviceClass, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.DeviceClass, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.DeviceClassList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.DeviceClass, err error) + Apply(ctx context.Context, deviceClass *resourcev1alpha3.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.DeviceClass, err error) + DeviceClassExpansion +} + +// deviceClasses implements DeviceClassInterface +type deviceClasses struct { + *gentype.ClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration] +} + +// newDeviceClasses returns a DeviceClasses +func newDeviceClasses(c *ResourceV1alpha3Client) *deviceClasses { + return &deviceClasses{ + gentype.NewClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration]( + "deviceclasses", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *v1alpha3.DeviceClass { return &v1alpha3.DeviceClass{} }, + func() *v1alpha3.DeviceClassList { return &v1alpha3.DeviceClassList{} }), + } +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_deviceclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_deviceclass.go new file mode 100644 index 0000000000000..d96cbd2219891 --- /dev/null +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_deviceclass.go @@ -0,0 +1,151 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha3 "k8s.io/api/resource/v1alpha3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" + testing "k8s.io/client-go/testing" +) + +// FakeDeviceClasses implements DeviceClassInterface +type FakeDeviceClasses struct { + Fake *FakeResourceV1alpha3 +} + +var deviceclassesResource = v1alpha3.SchemeGroupVersion.WithResource("deviceclasses") + +var deviceclassesKind = v1alpha3.SchemeGroupVersion.WithKind("DeviceClass") + +// Get takes name of the deviceClass, and returns the corresponding deviceClass object, and an error if there is any. +func (c *FakeDeviceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.DeviceClass, err error) { + emptyResult := &v1alpha3.DeviceClass{} + obj, err := c.Fake. + Invokes(testing.NewRootGetActionWithOptions(deviceclassesResource, name, options), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha3.DeviceClass), err +} + +// List takes label and field selectors, and returns the list of DeviceClasses that match those selectors. +func (c *FakeDeviceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.DeviceClassList, err error) { + emptyResult := &v1alpha3.DeviceClassList{} + obj, err := c.Fake. + Invokes(testing.NewRootListActionWithOptions(deviceclassesResource, deviceclassesKind, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha3.DeviceClassList{ListMeta: obj.(*v1alpha3.DeviceClassList).ListMeta} + for _, item := range obj.(*v1alpha3.DeviceClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested deviceClasses. +func (c *FakeDeviceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewRootWatchActionWithOptions(deviceclassesResource, opts)) +} + +// Create takes the representation of a deviceClass and creates it. Returns the server's representation of the deviceClass, and an error, if there is any. +func (c *FakeDeviceClasses) Create(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.CreateOptions) (result *v1alpha3.DeviceClass, err error) { + emptyResult := &v1alpha3.DeviceClass{} + obj, err := c.Fake. + Invokes(testing.NewRootCreateActionWithOptions(deviceclassesResource, deviceClass, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha3.DeviceClass), err +} + +// Update takes the representation of a deviceClass and updates it. Returns the server's representation of the deviceClass, and an error, if there is any. +func (c *FakeDeviceClasses) Update(ctx context.Context, deviceClass *v1alpha3.DeviceClass, opts v1.UpdateOptions) (result *v1alpha3.DeviceClass, err error) { + emptyResult := &v1alpha3.DeviceClass{} + obj, err := c.Fake. + Invokes(testing.NewRootUpdateActionWithOptions(deviceclassesResource, deviceClass, opts), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha3.DeviceClass), err +} + +// Delete takes name of the deviceClass and deletes it. Returns an error if one occurs. +func (c *FakeDeviceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewRootDeleteActionWithOptions(deviceclassesResource, name, opts), &v1alpha3.DeviceClass{}) + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeDeviceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewRootDeleteCollectionActionWithOptions(deviceclassesResource, opts, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha3.DeviceClassList{}) + return err +} + +// Patch applies the patch and returns the patched deviceClass. +func (c *FakeDeviceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.DeviceClass, err error) { + emptyResult := &v1alpha3.DeviceClass{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(deviceclassesResource, name, pt, data, opts, subresources...), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha3.DeviceClass), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied deviceClass. +func (c *FakeDeviceClasses) Apply(ctx context.Context, deviceClass *resourcev1alpha3.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.DeviceClass, err error) { + if deviceClass == nil { + return nil, fmt.Errorf("deviceClass provided to Apply must not be nil") + } + data, err := json.Marshal(deviceClass) + if err != nil { + return nil, err + } + name := deviceClass.Name + if name == nil { + return nil, fmt.Errorf("deviceClass.Name must be provided to Apply") + } + emptyResult := &v1alpha3.DeviceClass{} + obj, err := c.Fake. + Invokes(testing.NewRootPatchSubresourceActionWithOptions(deviceclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) + if obj == nil { + return emptyResult, err + } + return obj.(*v1alpha3.DeviceClass), err +} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resource_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resource_client.go index d01b28c66a27e..4523d9f09cda8 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resource_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resource_client.go @@ -28,6 +28,10 @@ type FakeResourceV1alpha3 struct { *testing.Fake } +func (c *FakeResourceV1alpha3) DeviceClasses() v1alpha3.DeviceClassInterface { + return &FakeDeviceClasses{c} +} + func (c *FakeResourceV1alpha3) PodSchedulingContexts(namespace string) v1alpha3.PodSchedulingContextInterface { return &FakePodSchedulingContexts{c, namespace} } @@ -36,22 +40,10 @@ func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.Resourc return &FakeResourceClaims{c, namespace} } -func (c *FakeResourceV1alpha3) ResourceClaimParameters(namespace string) v1alpha3.ResourceClaimParametersInterface { - return &FakeResourceClaimParameters{c, namespace} -} - func (c *FakeResourceV1alpha3) ResourceClaimTemplates(namespace string) v1alpha3.ResourceClaimTemplateInterface { return &FakeResourceClaimTemplates{c, namespace} } -func (c *FakeResourceV1alpha3) ResourceClasses() v1alpha3.ResourceClassInterface { - return &FakeResourceClasses{c} -} - -func (c *FakeResourceV1alpha3) ResourceClassParameters(namespace string) v1alpha3.ResourceClassParametersInterface { - return &FakeResourceClassParameters{c, namespace} -} - func (c *FakeResourceV1alpha3) ResourceSlices() v1alpha3.ResourceSliceInterface { return &FakeResourceSlices{c} } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimparameters.go deleted file mode 100644 index 1f646101e5745..0000000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclaimparameters.go +++ /dev/null @@ -1,160 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - json "encoding/json" - "fmt" - - v1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - testing "k8s.io/client-go/testing" -) - -// FakeResourceClaimParameters implements ResourceClaimParametersInterface -type FakeResourceClaimParameters struct { - Fake *FakeResourceV1alpha3 - ns string -} - -var resourceclaimparametersResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclaimparameters") - -var resourceclaimparametersKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimParameters") - -// Get takes name of the resourceClaimParameters, and returns the corresponding resourceClaimParameters object, and an error if there is any. -func (c *FakeResourceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClaimParameters, err error) { - emptyResult := &v1alpha3.ResourceClaimParameters{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(resourceclaimparametersResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClaimParameters), err -} - -// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. -func (c *FakeResourceClaimParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClaimParametersList, err error) { - emptyResult := &v1alpha3.ResourceClaimParametersList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(resourceclaimparametersResource, resourceclaimparametersKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha3.ResourceClaimParametersList{ListMeta: obj.(*v1alpha3.ResourceClaimParametersList).ListMeta} - for _, item := range obj.(*v1alpha3.ResourceClaimParametersList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested resourceClaimParameters. -func (c *FakeResourceClaimParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(resourceclaimparametersResource, c.ns, opts)) - -} - -// Create takes the representation of a resourceClaimParameters and creates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. -func (c *FakeResourceClaimParameters) Create(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.CreateOptions) (result *v1alpha3.ResourceClaimParameters, err error) { - emptyResult := &v1alpha3.ResourceClaimParameters{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(resourceclaimparametersResource, c.ns, resourceClaimParameters, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClaimParameters), err -} - -// Update takes the representation of a resourceClaimParameters and updates it. Returns the server's representation of the resourceClaimParameters, and an error, if there is any. -func (c *FakeResourceClaimParameters) Update(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.UpdateOptions) (result *v1alpha3.ResourceClaimParameters, err error) { - emptyResult := &v1alpha3.ResourceClaimParameters{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(resourceclaimparametersResource, c.ns, resourceClaimParameters, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClaimParameters), err -} - -// Delete takes name of the resourceClaimParameters and deletes it. Returns an error if one occurs. -func (c *FakeResourceClaimParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(resourceclaimparametersResource, c.ns, name, opts), &v1alpha3.ResourceClaimParameters{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeResourceClaimParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(resourceclaimparametersResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClaimParametersList{}) - return err -} - -// Patch applies the patch and returns the patched resourceClaimParameters. -func (c *FakeResourceClaimParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimParameters, err error) { - emptyResult := &v1alpha3.ResourceClaimParameters{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimparametersResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClaimParameters), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimParameters. -func (c *FakeResourceClaimParameters) Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha3.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimParameters, err error) { - if resourceClaimParameters == nil { - return nil, fmt.Errorf("resourceClaimParameters provided to Apply must not be nil") - } - data, err := json.Marshal(resourceClaimParameters) - if err != nil { - return nil, err - } - name := resourceClaimParameters.Name - if name == nil { - return nil, fmt.Errorf("resourceClaimParameters.Name must be provided to Apply") - } - emptyResult := &v1alpha3.ResourceClaimParameters{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclaimparametersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClaimParameters), err -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclass.go deleted file mode 100644 index 7de19088651c3..0000000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclass.go +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - json "encoding/json" - "fmt" - - v1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - testing "k8s.io/client-go/testing" -) - -// FakeResourceClasses implements ResourceClassInterface -type FakeResourceClasses struct { - Fake *FakeResourceV1alpha3 -} - -var resourceclassesResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclasses") - -var resourceclassesKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClass") - -// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any. -func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClass, err error) { - emptyResult := &v1alpha3.ResourceClass{} - obj, err := c.Fake. - Invokes(testing.NewRootGetActionWithOptions(resourceclassesResource, name, options), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClass), err -} - -// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors. -func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClassList, err error) { - emptyResult := &v1alpha3.ResourceClassList{} - obj, err := c.Fake. - Invokes(testing.NewRootListActionWithOptions(resourceclassesResource, resourceclassesKind, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha3.ResourceClassList{ListMeta: obj.(*v1alpha3.ResourceClassList).ListMeta} - for _, item := range obj.(*v1alpha3.ResourceClassList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested resourceClasses. -func (c *FakeResourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewRootWatchActionWithOptions(resourceclassesResource, opts)) -} - -// Create takes the representation of a resourceClass and creates it. Returns the server's representation of the resourceClass, and an error, if there is any. -func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.CreateOptions) (result *v1alpha3.ResourceClass, err error) { - emptyResult := &v1alpha3.ResourceClass{} - obj, err := c.Fake. - Invokes(testing.NewRootCreateActionWithOptions(resourceclassesResource, resourceClass, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClass), err -} - -// Update takes the representation of a resourceClass and updates it. Returns the server's representation of the resourceClass, and an error, if there is any. -func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.UpdateOptions) (result *v1alpha3.ResourceClass, err error) { - emptyResult := &v1alpha3.ResourceClass{} - obj, err := c.Fake. - Invokes(testing.NewRootUpdateActionWithOptions(resourceclassesResource, resourceClass, opts), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClass), err -} - -// Delete takes name of the resourceClass and deletes it. Returns an error if one occurs. -func (c *FakeResourceClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha3.ResourceClass{}) - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeResourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewRootDeleteCollectionActionWithOptions(resourceclassesResource, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClassList{}) - return err -} - -// Patch applies the patch and returns the patched resourceClass. -func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClass, err error) { - emptyResult := &v1alpha3.ResourceClass{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceclassesResource, name, pt, data, opts, subresources...), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClass), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass. -func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha3.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClass, err error) { - if resourceClass == nil { - return nil, fmt.Errorf("resourceClass provided to Apply must not be nil") - } - data, err := json.Marshal(resourceClass) - if err != nil { - return nil, err - } - name := resourceClass.Name - if name == nil { - return nil, fmt.Errorf("resourceClass.Name must be provided to Apply") - } - emptyResult := &v1alpha3.ResourceClass{} - obj, err := c.Fake. - Invokes(testing.NewRootPatchSubresourceActionWithOptions(resourceclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClass), err -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclassparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclassparameters.go deleted file mode 100644 index c61412de5342c..0000000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/fake/fake_resourceclassparameters.go +++ /dev/null @@ -1,160 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package fake - -import ( - "context" - json "encoding/json" - "fmt" - - v1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - testing "k8s.io/client-go/testing" -) - -// FakeResourceClassParameters implements ResourceClassParametersInterface -type FakeResourceClassParameters struct { - Fake *FakeResourceV1alpha3 - ns string -} - -var resourceclassparametersResource = v1alpha3.SchemeGroupVersion.WithResource("resourceclassparameters") - -var resourceclassparametersKind = v1alpha3.SchemeGroupVersion.WithKind("ResourceClassParameters") - -// Get takes name of the resourceClassParameters, and returns the corresponding resourceClassParameters object, and an error if there is any. -func (c *FakeResourceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.ResourceClassParameters, err error) { - emptyResult := &v1alpha3.ResourceClassParameters{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(resourceclassparametersResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClassParameters), err -} - -// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. -func (c *FakeResourceClassParameters) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.ResourceClassParametersList, err error) { - emptyResult := &v1alpha3.ResourceClassParametersList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(resourceclassparametersResource, resourceclassparametersKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha3.ResourceClassParametersList{ListMeta: obj.(*v1alpha3.ResourceClassParametersList).ListMeta} - for _, item := range obj.(*v1alpha3.ResourceClassParametersList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested resourceClassParameters. -func (c *FakeResourceClassParameters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(resourceclassparametersResource, c.ns, opts)) - -} - -// Create takes the representation of a resourceClassParameters and creates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. -func (c *FakeResourceClassParameters) Create(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.CreateOptions) (result *v1alpha3.ResourceClassParameters, err error) { - emptyResult := &v1alpha3.ResourceClassParameters{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(resourceclassparametersResource, c.ns, resourceClassParameters, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClassParameters), err -} - -// Update takes the representation of a resourceClassParameters and updates it. Returns the server's representation of the resourceClassParameters, and an error, if there is any. -func (c *FakeResourceClassParameters) Update(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.UpdateOptions) (result *v1alpha3.ResourceClassParameters, err error) { - emptyResult := &v1alpha3.ResourceClassParameters{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(resourceclassparametersResource, c.ns, resourceClassParameters, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClassParameters), err -} - -// Delete takes name of the resourceClassParameters and deletes it. Returns an error if one occurs. -func (c *FakeResourceClassParameters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(resourceclassparametersResource, c.ns, name, opts), &v1alpha3.ResourceClassParameters{}) - - return err -} - -// DeleteCollection deletes a collection of objects. -func (c *FakeResourceClassParameters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(resourceclassparametersResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha3.ResourceClassParametersList{}) - return err -} - -// Patch applies the patch and returns the patched resourceClassParameters. -func (c *FakeResourceClassParameters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClassParameters, err error) { - emptyResult := &v1alpha3.ResourceClassParameters{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclassparametersResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClassParameters), err -} - -// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClassParameters. -func (c *FakeResourceClassParameters) Apply(ctx context.Context, resourceClassParameters *resourcev1alpha3.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClassParameters, err error) { - if resourceClassParameters == nil { - return nil, fmt.Errorf("resourceClassParameters provided to Apply must not be nil") - } - data, err := json.Marshal(resourceClassParameters) - if err != nil { - return nil, err - } - name := resourceClassParameters.Name - if name == nil { - return nil, fmt.Errorf("resourceClassParameters.Name must be provided to Apply") - } - emptyResult := &v1alpha3.ResourceClassParameters{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(resourceclassparametersResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha3.ResourceClassParameters), err -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go index 2f5289dabf6aa..747e564b769ed 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go @@ -18,16 +18,12 @@ limitations under the License. package v1alpha3 +type DeviceClassExpansion interface{} + type PodSchedulingContextExpansion interface{} type ResourceClaimExpansion interface{} -type ResourceClaimParametersExpansion interface{} - type ResourceClaimTemplateExpansion interface{} -type ResourceClassExpansion interface{} - -type ResourceClassParametersExpansion interface{} - type ResourceSliceExpansion interface{} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go index 4cc6238b16a00..879f0990d73d9 100644 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go +++ b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go @@ -28,12 +28,10 @@ import ( type ResourceV1alpha3Interface interface { RESTClient() rest.Interface + DeviceClassesGetter PodSchedulingContextsGetter ResourceClaimsGetter - ResourceClaimParametersGetter ResourceClaimTemplatesGetter - ResourceClassesGetter - ResourceClassParametersGetter ResourceSlicesGetter } @@ -42,6 +40,10 @@ type ResourceV1alpha3Client struct { restClient rest.Interface } +func (c *ResourceV1alpha3Client) DeviceClasses() DeviceClassInterface { + return newDeviceClasses(c) +} + func (c *ResourceV1alpha3Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface { return newPodSchedulingContexts(c, namespace) } @@ -50,22 +52,10 @@ func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimI return newResourceClaims(c, namespace) } -func (c *ResourceV1alpha3Client) ResourceClaimParameters(namespace string) ResourceClaimParametersInterface { - return newResourceClaimParameters(c, namespace) -} - func (c *ResourceV1alpha3Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface { return newResourceClaimTemplates(c, namespace) } -func (c *ResourceV1alpha3Client) ResourceClasses() ResourceClassInterface { - return newResourceClasses(c) -} - -func (c *ResourceV1alpha3Client) ResourceClassParameters(namespace string) ResourceClassParametersInterface { - return newResourceClassParameters(c, namespace) -} - func (c *ResourceV1alpha3Client) ResourceSlices() ResourceSliceInterface { return newResourceSlices(c) } diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimparameters.go deleted file mode 100644 index 8ae3476f612bf..0000000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimparameters.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - "context" - - v1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - gentype "k8s.io/client-go/gentype" - scheme "k8s.io/client-go/kubernetes/scheme" -) - -// ResourceClaimParametersGetter has a method to return a ResourceClaimParametersInterface. -// A group's client should implement this interface. -type ResourceClaimParametersGetter interface { - ResourceClaimParameters(namespace string) ResourceClaimParametersInterface -} - -// ResourceClaimParametersInterface has methods to work with ResourceClaimParameters resources. -type ResourceClaimParametersInterface interface { - Create(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.CreateOptions) (*v1alpha3.ResourceClaimParameters, error) - Update(ctx context.Context, resourceClaimParameters *v1alpha3.ResourceClaimParameters, opts v1.UpdateOptions) (*v1alpha3.ResourceClaimParameters, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClaimParameters, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClaimParametersList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClaimParameters, err error) - Apply(ctx context.Context, resourceClaimParameters *resourcev1alpha3.ResourceClaimParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClaimParameters, err error) - ResourceClaimParametersExpansion -} - -// resourceClaimParameters implements ResourceClaimParametersInterface -type resourceClaimParameters struct { - *gentype.ClientWithListAndApply[*v1alpha3.ResourceClaimParameters, *v1alpha3.ResourceClaimParametersList, *resourcev1alpha3.ResourceClaimParametersApplyConfiguration] -} - -// newResourceClaimParameters returns a ResourceClaimParameters -func newResourceClaimParameters(c *ResourceV1alpha3Client, namespace string) *resourceClaimParameters { - return &resourceClaimParameters{ - gentype.NewClientWithListAndApply[*v1alpha3.ResourceClaimParameters, *v1alpha3.ResourceClaimParametersList, *resourcev1alpha3.ResourceClaimParametersApplyConfiguration]( - "resourceclaimparameters", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *v1alpha3.ResourceClaimParameters { return &v1alpha3.ResourceClaimParameters{} }, - func() *v1alpha3.ResourceClaimParametersList { return &v1alpha3.ResourceClaimParametersList{} }), - } -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclass.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclass.go deleted file mode 100644 index 0d88e96edf365..0000000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclass.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - "context" - - v1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - gentype "k8s.io/client-go/gentype" - scheme "k8s.io/client-go/kubernetes/scheme" -) - -// ResourceClassesGetter has a method to return a ResourceClassInterface. -// A group's client should implement this interface. -type ResourceClassesGetter interface { - ResourceClasses() ResourceClassInterface -} - -// ResourceClassInterface has methods to work with ResourceClass resources. -type ResourceClassInterface interface { - Create(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.CreateOptions) (*v1alpha3.ResourceClass, error) - Update(ctx context.Context, resourceClass *v1alpha3.ResourceClass, opts v1.UpdateOptions) (*v1alpha3.ResourceClass, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClass, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClassList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClass, err error) - Apply(ctx context.Context, resourceClass *resourcev1alpha3.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClass, err error) - ResourceClassExpansion -} - -// resourceClasses implements ResourceClassInterface -type resourceClasses struct { - *gentype.ClientWithListAndApply[*v1alpha3.ResourceClass, *v1alpha3.ResourceClassList, *resourcev1alpha3.ResourceClassApplyConfiguration] -} - -// newResourceClasses returns a ResourceClasses -func newResourceClasses(c *ResourceV1alpha3Client) *resourceClasses { - return &resourceClasses{ - gentype.NewClientWithListAndApply[*v1alpha3.ResourceClass, *v1alpha3.ResourceClassList, *resourcev1alpha3.ResourceClassApplyConfiguration]( - "resourceclasses", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *v1alpha3.ResourceClass { return &v1alpha3.ResourceClass{} }, - func() *v1alpha3.ResourceClassList { return &v1alpha3.ResourceClassList{} }), - } -} diff --git a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclassparameters.go b/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclassparameters.go deleted file mode 100644 index 42db8f705928e..0000000000000 --- a/staging/src/k8s.io/client-go/kubernetes/typed/resource/v1alpha3/resourceclassparameters.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - "context" - - v1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - gentype "k8s.io/client-go/gentype" - scheme "k8s.io/client-go/kubernetes/scheme" -) - -// ResourceClassParametersGetter has a method to return a ResourceClassParametersInterface. -// A group's client should implement this interface. -type ResourceClassParametersGetter interface { - ResourceClassParameters(namespace string) ResourceClassParametersInterface -} - -// ResourceClassParametersInterface has methods to work with ResourceClassParameters resources. -type ResourceClassParametersInterface interface { - Create(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.CreateOptions) (*v1alpha3.ResourceClassParameters, error) - Update(ctx context.Context, resourceClassParameters *v1alpha3.ResourceClassParameters, opts v1.UpdateOptions) (*v1alpha3.ResourceClassParameters, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.ResourceClassParameters, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.ResourceClassParametersList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.ResourceClassParameters, err error) - Apply(ctx context.Context, resourceClassParameters *resourcev1alpha3.ResourceClassParametersApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.ResourceClassParameters, err error) - ResourceClassParametersExpansion -} - -// resourceClassParameters implements ResourceClassParametersInterface -type resourceClassParameters struct { - *gentype.ClientWithListAndApply[*v1alpha3.ResourceClassParameters, *v1alpha3.ResourceClassParametersList, *resourcev1alpha3.ResourceClassParametersApplyConfiguration] -} - -// newResourceClassParameters returns a ResourceClassParameters -func newResourceClassParameters(c *ResourceV1alpha3Client, namespace string) *resourceClassParameters { - return &resourceClassParameters{ - gentype.NewClientWithListAndApply[*v1alpha3.ResourceClassParameters, *v1alpha3.ResourceClassParametersList, *resourcev1alpha3.ResourceClassParametersApplyConfiguration]( - "resourceclassparameters", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *v1alpha3.ResourceClassParameters { return &v1alpha3.ResourceClassParameters{} }, - func() *v1alpha3.ResourceClassParametersList { return &v1alpha3.ResourceClassParametersList{} }), - } -} diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclass.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/deviceclass.go similarity index 55% rename from staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclass.go rename to staging/src/k8s.io/client-go/listers/resource/v1alpha3/deviceclass.go index 0c911003b0cdc..0950691e2b09d 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclass.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/deviceclass.go @@ -25,24 +25,24 @@ import ( "k8s.io/client-go/tools/cache" ) -// ResourceClassLister helps list ResourceClasses. +// DeviceClassLister helps list DeviceClasses. // All objects returned here must be treated as read-only. -type ResourceClassLister interface { - // List lists all ResourceClasses in the indexer. +type DeviceClassLister interface { + // List lists all DeviceClasses in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha3.ResourceClass, err error) - // Get retrieves the ResourceClass from the index for a given name. + List(selector labels.Selector) (ret []*v1alpha3.DeviceClass, err error) + // Get retrieves the DeviceClass from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha3.ResourceClass, error) - ResourceClassListerExpansion + Get(name string) (*v1alpha3.DeviceClass, error) + DeviceClassListerExpansion } -// resourceClassLister implements the ResourceClassLister interface. -type resourceClassLister struct { - listers.ResourceIndexer[*v1alpha3.ResourceClass] +// deviceClassLister implements the DeviceClassLister interface. +type deviceClassLister struct { + listers.ResourceIndexer[*v1alpha3.DeviceClass] } -// NewResourceClassLister returns a new ResourceClassLister. -func NewResourceClassLister(indexer cache.Indexer) ResourceClassLister { - return &resourceClassLister{listers.New[*v1alpha3.ResourceClass](indexer, v1alpha3.Resource("resourceclass"))} +// NewDeviceClassLister returns a new DeviceClassLister. +func NewDeviceClassLister(indexer cache.Indexer) DeviceClassLister { + return &deviceClassLister{listers.New[*v1alpha3.DeviceClass](indexer, v1alpha3.Resource("deviceclass"))} } diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/expansion_generated.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/expansion_generated.go index bc580e3d233b9..b6642f635f95d 100644 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/expansion_generated.go +++ b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/expansion_generated.go @@ -18,6 +18,10 @@ limitations under the License. package v1alpha3 +// DeviceClassListerExpansion allows custom methods to be added to +// DeviceClassLister. +type DeviceClassListerExpansion interface{} + // PodSchedulingContextListerExpansion allows custom methods to be added to // PodSchedulingContextLister. type PodSchedulingContextListerExpansion interface{} @@ -34,14 +38,6 @@ type ResourceClaimListerExpansion interface{} // ResourceClaimNamespaceLister. type ResourceClaimNamespaceListerExpansion interface{} -// ResourceClaimParametersListerExpansion allows custom methods to be added to -// ResourceClaimParametersLister. -type ResourceClaimParametersListerExpansion interface{} - -// ResourceClaimParametersNamespaceListerExpansion allows custom methods to be added to -// ResourceClaimParametersNamespaceLister. -type ResourceClaimParametersNamespaceListerExpansion interface{} - // ResourceClaimTemplateListerExpansion allows custom methods to be added to // ResourceClaimTemplateLister. type ResourceClaimTemplateListerExpansion interface{} @@ -50,18 +46,6 @@ type ResourceClaimTemplateListerExpansion interface{} // ResourceClaimTemplateNamespaceLister. type ResourceClaimTemplateNamespaceListerExpansion interface{} -// ResourceClassListerExpansion allows custom methods to be added to -// ResourceClassLister. -type ResourceClassListerExpansion interface{} - -// ResourceClassParametersListerExpansion allows custom methods to be added to -// ResourceClassParametersLister. -type ResourceClassParametersListerExpansion interface{} - -// ResourceClassParametersNamespaceListerExpansion allows custom methods to be added to -// ResourceClassParametersNamespaceLister. -type ResourceClassParametersNamespaceListerExpansion interface{} - // ResourceSliceListerExpansion allows custom methods to be added to // ResourceSliceLister. type ResourceSliceListerExpansion interface{} diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimparameters.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimparameters.go deleted file mode 100644 index aa5636b33d61a..0000000000000 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclaimparameters.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - v1alpha3 "k8s.io/api/resource/v1alpha3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" -) - -// ResourceClaimParametersLister helps list ResourceClaimParameters. -// All objects returned here must be treated as read-only. -type ResourceClaimParametersLister interface { - // List lists all ResourceClaimParameters in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimParameters, err error) - // ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. - ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister - ResourceClaimParametersListerExpansion -} - -// resourceClaimParametersLister implements the ResourceClaimParametersLister interface. -type resourceClaimParametersLister struct { - listers.ResourceIndexer[*v1alpha3.ResourceClaimParameters] -} - -// NewResourceClaimParametersLister returns a new ResourceClaimParametersLister. -func NewResourceClaimParametersLister(indexer cache.Indexer) ResourceClaimParametersLister { - return &resourceClaimParametersLister{listers.New[*v1alpha3.ResourceClaimParameters](indexer, v1alpha3.Resource("resourceclaimparameters"))} -} - -// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters. -func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string) ResourceClaimParametersNamespaceLister { - return resourceClaimParametersNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClaimParameters](s.ResourceIndexer, namespace)} -} - -// ResourceClaimParametersNamespaceLister helps list and get ResourceClaimParameters. -// All objects returned here must be treated as read-only. -type ResourceClaimParametersNamespaceLister interface { - // List lists all ResourceClaimParameters in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha3.ResourceClaimParameters, err error) - // Get retrieves the ResourceClaimParameters from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha3.ResourceClaimParameters, error) - ResourceClaimParametersNamespaceListerExpansion -} - -// resourceClaimParametersNamespaceLister implements the ResourceClaimParametersNamespaceLister -// interface. -type resourceClaimParametersNamespaceLister struct { - listers.ResourceIndexer[*v1alpha3.ResourceClaimParameters] -} diff --git a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclassparameters.go b/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclassparameters.go deleted file mode 100644 index beb0645a9ed48..0000000000000 --- a/staging/src/k8s.io/client-go/listers/resource/v1alpha3/resourceclassparameters.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha3 - -import ( - v1alpha3 "k8s.io/api/resource/v1alpha3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" -) - -// ResourceClassParametersLister helps list ResourceClassParameters. -// All objects returned here must be treated as read-only. -type ResourceClassParametersLister interface { - // List lists all ResourceClassParameters in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha3.ResourceClassParameters, err error) - // ResourceClassParameters returns an object that can list and get ResourceClassParameters. - ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister - ResourceClassParametersListerExpansion -} - -// resourceClassParametersLister implements the ResourceClassParametersLister interface. -type resourceClassParametersLister struct { - listers.ResourceIndexer[*v1alpha3.ResourceClassParameters] -} - -// NewResourceClassParametersLister returns a new ResourceClassParametersLister. -func NewResourceClassParametersLister(indexer cache.Indexer) ResourceClassParametersLister { - return &resourceClassParametersLister{listers.New[*v1alpha3.ResourceClassParameters](indexer, v1alpha3.Resource("resourceclassparameters"))} -} - -// ResourceClassParameters returns an object that can list and get ResourceClassParameters. -func (s *resourceClassParametersLister) ResourceClassParameters(namespace string) ResourceClassParametersNamespaceLister { - return resourceClassParametersNamespaceLister{listers.NewNamespaced[*v1alpha3.ResourceClassParameters](s.ResourceIndexer, namespace)} -} - -// ResourceClassParametersNamespaceLister helps list and get ResourceClassParameters. -// All objects returned here must be treated as read-only. -type ResourceClassParametersNamespaceLister interface { - // List lists all ResourceClassParameters in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1alpha3.ResourceClassParameters, err error) - // Get retrieves the ResourceClassParameters from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*v1alpha3.ResourceClassParameters, error) - ResourceClassParametersNamespaceListerExpansion -} - -// resourceClassParametersNamespaceLister implements the ResourceClassParametersNamespaceLister -// interface. -type resourceClassParametersNamespaceLister struct { - listers.ResourceIndexer[*v1alpha3.ResourceClassParameters] -} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/cel/compile.go b/staging/src/k8s.io/dynamic-resource-allocation/cel/compile.go new file mode 100644 index 0000000000000..45b08b0e2dd89 --- /dev/null +++ b/staging/src/k8s.io/dynamic-resource-allocation/cel/compile.go @@ -0,0 +1,286 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cel + +import ( + "context" + "errors" + "fmt" + "reflect" + "strings" + + "github.com/blang/semver/v4" + "github.com/google/cel-go/cel" + "github.com/google/cel-go/common/types" + "github.com/google/cel-go/common/types/ref" + "github.com/google/cel-go/common/types/traits" + "github.com/google/cel-go/ext" + + resourceapi "k8s.io/api/resource/v1alpha3" + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apimachinery/pkg/util/version" + celconfig "k8s.io/apiserver/pkg/apis/cel" + apiservercel "k8s.io/apiserver/pkg/cel" + "k8s.io/apiserver/pkg/cel/environment" +) + +const ( + deviceVar = "device" + driverVar = "driver" + attributesVar = "attributes" + capacityVar = "capacity" +) + +var ( + Compiler = newCompiler() +) + +// CompilationResult represents a compiled expression. +type CompilationResult struct { + Program cel.Program + Error *apiservercel.Error + Expression string + OutputType *cel.Type + Environment *cel.Env + + emptyMapVal ref.Val +} + +// Device defines the input values for a CEL selector expression. +type Device struct { + // Driver gets used as domain for any attribute which does not already + // have a domain prefix. If set, then it is also made available as a + // string attribute. + Driver string + Attributes map[resourceapi.QualifiedName]resourceapi.DeviceAttribute + Capacity map[resourceapi.QualifiedName]resource.Quantity +} + +type compiler struct { + envset *environment.EnvSet +} + +func newCompiler() *compiler { + return &compiler{envset: mustBuildEnv()} +} + +// CompileCELExpression returns a compiled CEL expression. It evaluates to bool. +// +// TODO: validate AST to detect invalid attribute names. +func (c compiler) CompileCELExpression(expression string, envType environment.Type) CompilationResult { + resultError := func(errorString string, errType apiservercel.ErrorType) CompilationResult { + return CompilationResult{ + Error: &apiservercel.Error{ + Type: errType, + Detail: errorString, + }, + Expression: expression, + } + } + + env, err := c.envset.Env(envType) + if err != nil { + return resultError(fmt.Sprintf("unexpected error loading CEL environment: %v", err), apiservercel.ErrorTypeInternal) + } + + ast, issues := env.Compile(expression) + if issues != nil { + return resultError("compilation failed: "+issues.String(), apiservercel.ErrorTypeInvalid) + } + expectedReturnType := cel.BoolType + if ast.OutputType() != expectedReturnType && + ast.OutputType() != cel.AnyType { + return resultError(fmt.Sprintf("must evaluate to %v or the unknown type, not %v", expectedReturnType.String(), ast.OutputType().String()), apiservercel.ErrorTypeInvalid) + } + _, err = cel.AstToCheckedExpr(ast) + if err != nil { + // should be impossible since env.Compile returned no issues + return resultError("unexpected compilation error: "+err.Error(), apiservercel.ErrorTypeInternal) + } + prog, err := env.Program(ast, + cel.InterruptCheckFrequency(celconfig.CheckFrequency), + ) + if err != nil { + return resultError("program instantiation failed: "+err.Error(), apiservercel.ErrorTypeInternal) + } + return CompilationResult{ + Program: prog, + Expression: expression, + OutputType: ast.OutputType(), + Environment: env, + emptyMapVal: env.CELTypeAdapter().NativeToValue(map[string]any{}), + } +} + +// getAttributeValue returns the native representation of the one value that +// should be stored in the attribute, otherwise an error. An error is +// also returned when there is no supported value. +func getAttributeValue(attr resourceapi.DeviceAttribute) (any, error) { + switch { + case attr.IntValue != nil: + return *attr.IntValue, nil + case attr.BoolValue != nil: + return *attr.BoolValue, nil + case attr.StringValue != nil: + return *attr.StringValue, nil + case attr.VersionValue != nil: + v, err := semver.Parse(*attr.VersionValue) + if err != nil { + return nil, fmt.Errorf("parse semantic version: %w", err) + } + return Semver{Version: v}, nil + default: + return nil, errors.New("unsupported attribute value") + } +} + +var boolType = reflect.TypeOf(true) + +func (c CompilationResult) DeviceMatches(ctx context.Context, input Device) (bool, error) { + // TODO (future): avoid building these maps and instead use a proxy + // which wraps the underlying maps and directly looks up values. + attributes := make(map[string]any) + for name, attr := range input.Attributes { + value, err := getAttributeValue(attr) + if err != nil { + return false, fmt.Errorf("attribute %s: %w", name, err) + } + domain, id := parseQualifiedName(name, input.Driver) + if attributes[domain] == nil { + attributes[domain] = make(map[string]any) + } + attributes[domain].(map[string]any)[id] = value + } + + capacity := make(map[string]any) + for name, quantity := range input.Capacity { + domain, id := parseQualifiedName(name, input.Driver) + if capacity[domain] == nil { + capacity[domain] = make(map[string]apiservercel.Quantity) + } + capacity[domain].(map[string]apiservercel.Quantity)[id] = apiservercel.Quantity{Quantity: &quantity} + } + + variables := map[string]any{ + deviceVar: map[string]any{ + driverVar: input.Driver, + attributesVar: newStringInterfaceMapWithDefault(c.Environment.CELTypeAdapter(), attributes, c.emptyMapVal), + capacityVar: newStringInterfaceMapWithDefault(c.Environment.CELTypeAdapter(), capacity, c.emptyMapVal), + }, + } + + result, _, err := c.Program.ContextEval(ctx, variables) + if err != nil { + return false, err + } + resultAny, err := result.ConvertToNative(boolType) + if err != nil { + return false, fmt.Errorf("CEL result of type %s could not be converted to bool: %w", result.Type().TypeName(), err) + } + resultBool, ok := resultAny.(bool) + if !ok { + return false, fmt.Errorf("CEL native result value should have been a bool, got instead: %T", resultAny) + } + return resultBool, nil +} + +func mustBuildEnv() *environment.EnvSet { + envset := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), false /* strictCost */) + field := func(name string, declType *apiservercel.DeclType, required bool) *apiservercel.DeclField { + return apiservercel.NewDeclField(name, declType, required, nil, nil) + } + fields := func(fields ...*apiservercel.DeclField) map[string]*apiservercel.DeclField { + result := make(map[string]*apiservercel.DeclField, len(fields)) + for _, f := range fields { + result[f.Name] = f + } + return result + } + deviceType := apiservercel.NewObjectType("kubernetes.DRADevice", fields( + field(driverVar, apiservercel.StringType, true), + field(attributesVar, apiservercel.NewMapType(apiservercel.StringType, apiservercel.NewMapType(apiservercel.StringType, apiservercel.AnyType, resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice), resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice), true), + field(capacityVar, apiservercel.NewMapType(apiservercel.StringType, apiservercel.NewMapType(apiservercel.StringType, apiservercel.AnyType /* TODO (future): is there a QuantityType that can be used here? */, resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice), resourceapi.ResourceSliceMaxAttributesAndCapacitiesPerDevice), true), + )) + + versioned := []environment.VersionedOptions{ + { + // Feature epoch was actually 1.31, but we artificially set it to 1.0 because these + // options should always be present. + // + // TODO (https://github.com/kubernetes/kubernetes/issues/123687): set this + // version properly before going to beta. + IntroducedVersion: version.MajorMinor(1, 0), + EnvOptions: []cel.EnvOption{ + cel.Variable(deviceVar, deviceType.CelType()), + + SemverLib(), + + // https://pkg.go.dev/github.com/google/cel-go/ext#Bindings + // + // This is useful to simplify attribute lookups because the + // domain only needs to be given once: + // + // cel.bind(dra, device.attributes["dra.example.com"], dra.oneBool && dra.anotherBool) + ext.Bindings(), + }, + DeclTypes: []*apiservercel.DeclType{ + deviceType, + }, + }, + } + envset, err := envset.Extend(versioned...) + if err != nil { + panic(fmt.Errorf("internal error building CEL environment: %w", err)) + } + return envset +} + +// parseQualifiedName splits into domain and identified, using the default domain +// if the name does not contain one. +func parseQualifiedName(name resourceapi.QualifiedName, defaultDomain string) (string, string) { + sep := strings.Index(string(name), "/") + if sep == -1 { + return defaultDomain, string(name) + } + return string(name[0:sep]), string(name[sep+1:]) +} + +// newStringInterfaceMapWithDefault is like +// https://pkg.go.dev/github.com/google/cel-go@v0.20.1/common/types#NewStringInterfaceMap, +// except that looking up an unknown key returns a default value. +func newStringInterfaceMapWithDefault(adapter types.Adapter, value map[string]any, defaultValue ref.Val) traits.Mapper { + return mapper{ + Mapper: types.NewStringInterfaceMap(adapter, value), + defaultValue: defaultValue, + } +} + +type mapper struct { + traits.Mapper + defaultValue ref.Val +} + +// Find wraps the mapper's Find so that a default empty map is returned when +// the lookup did not find the entry. +func (m mapper) Find(key ref.Val) (ref.Val, bool) { + value, found := m.Mapper.Find(key) + if found { + return value, true + } + + return m.defaultValue, true +} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go b/staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go new file mode 100644 index 0000000000000..99c5241448e10 --- /dev/null +++ b/staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go @@ -0,0 +1,212 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cel + +import ( + "strings" + "testing" + + resourceapi "k8s.io/api/resource/v1alpha3" + "k8s.io/apimachinery/pkg/api/resource" + "k8s.io/apiserver/pkg/cel/environment" + "k8s.io/klog/v2/ktesting" + "k8s.io/utils/ptr" +) + +func TestCompile(t *testing.T) { + for name, scenario := range map[string]struct { + expression string + driver string + attributes map[resourceapi.QualifiedName]resourceapi.DeviceAttribute + capacity map[resourceapi.QualifiedName]resource.Quantity + expectCompileError string + expectMatchError string + expectMatch bool + }{ + "true": { + expression: "true", + expectMatch: true, + }, + "false": { + expression: "false", + expectMatch: false, + }, + "syntax-error": { + expression: "?!", + expectCompileError: "Syntax error", + }, + "type-error": { + expression: `1`, + expectCompileError: "must evaluate to bool or the unknown type, not int", + }, + "runtime-error-lookup-identifier": { + expression: `device.attributes["no-such-domain"].noSuchAttr.isGreaterThan(quantity("0"))`, + expectMatchError: "no such key: noSuchAttr", + }, + "runtime-error-lookup-map": { + expression: `device.attributes["no-such-domain"]["noSuchAttr"].isGreaterThan(quantity("0"))`, + expectMatchError: "no such key: noSuchAttr", + }, + "domain-check-negative": { + expression: `"no-such-domain" in device.attributes`, + expectMatch: false, + }, + "domain-check-positive": { + expression: `"dra.example.com" in device.attributes`, + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"dra.example.com/something": {BoolValue: ptr.To(true)}}, + expectMatch: true, + }, + "empty-driver-name": { + expression: `device.driver == ""`, + expectMatch: true, + }, + "real-driver-name": { + expression: `device.driver == "dra.example.com"`, + driver: "dra.example.com", + expectMatch: true, + }, + "driver-name-qualifier": { + expression: `device.attributes["dra.example.com"].name`, + driver: "dra.example.com", + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"name": {BoolValue: ptr.To(true)}}, + expectMatch: true, + }, + "driver-name-qualifier-map-lookup": { + expression: `device.attributes["dra.example.com"]["name"]`, + driver: "dra.example.com", + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"name": {BoolValue: ptr.To(true)}}, + expectMatch: true, + }, + "bind": { + expression: `cel.bind(dra, device.attributes["dra.example.com"], dra.name)`, + driver: "dra.example.com", + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"name": {BoolValue: ptr.To(true)}}, + expectMatch: true, + }, + "qualified-attribute-name": { + expression: `device.attributes["other.example.com"].name`, + driver: "dra.example.com", + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"other.example.com/name": {BoolValue: ptr.To(true)}}, + expectMatch: true, + }, + "bool": { + expression: `device.attributes["dra.example.com"].name`, + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"name": {BoolValue: ptr.To(true)}}, + driver: "dra.example.com", + expectMatch: true, + }, + "int": { + expression: `device.attributes["dra.example.com"].name > 0`, + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"name": {IntValue: ptr.To(int64(1))}}, + driver: "dra.example.com", + expectMatch: true, + }, + "string": { + expression: `device.attributes["dra.example.com"].name == "fish"`, + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"name": {StringValue: ptr.To("fish")}}, + driver: "dra.example.com", + expectMatch: true, + }, + "version": { + expression: `device.attributes["dra.example.com"].name.isGreaterThan(semver("0.0.1"))`, + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{"name": {VersionValue: ptr.To("1.0.0")}}, + driver: "dra.example.com", + expectMatch: true, + }, + "quantity": { + expression: `device.capacity["dra.example.com"].name.isGreaterThan(quantity("1Ki"))`, + capacity: map[resourceapi.QualifiedName]resource.Quantity{"name": resource.MustParse("1Mi")}, + driver: "dra.example.com", + expectMatch: true, + }, + "check-positive": { + expression: `"name" in device.capacity["dra.example.com"] && device.capacity["dra.example.com"].name.isGreaterThan(quantity("1Ki"))`, + capacity: map[resourceapi.QualifiedName]resource.Quantity{"name": resource.MustParse("1Mi")}, + driver: "dra.example.com", + expectMatch: true, + }, + "check-negative": { + expression: `!("name" in device.capacity["dra.example.com"]) || device.capacity["dra.example.com"].name.isGreaterThan(quantity("1Ki"))`, + expectMatch: true, + }, + "all": { + expression: ` +device.capacity["dra.example.com"].quantity.isGreaterThan(quantity("1Ki")) && +device.attributes["dra.example.com"].bool && +device.attributes["dra.example.com"].int > 0 && +device.attributes["dra.example.com"].string == "fish" && +device.attributes["dra.example.com"].version.isGreaterThan(semver("0.0.1")) && +device.capacity["dra.example.com"]["quantity"].isGreaterThan(quantity("1Ki")) && +device.attributes["dra.example.com"]["bool"] && +device.attributes["dra.example.com"]["int"] > 0 && +device.attributes["dra.example.com"]["string"] == "fish" && +device.attributes["dra.example.com"]["version"].isGreaterThan(semver("0.0.1")) +`, + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "bool": {BoolValue: ptr.To(true)}, + "int": {IntValue: ptr.To(int64(1))}, + "string": {StringValue: ptr.To("fish")}, + "version": {VersionValue: ptr.To("1.0.0")}, + }, + capacity: map[resourceapi.QualifiedName]resource.Quantity{ + "quantity": resource.MustParse("1Mi"), + }, + driver: "dra.example.com", + expectMatch: true, + }, + "many": { + expression: `device.attributes["dra.example.com"].a && device.attributes["dra.example.com"].b && device.attributes["dra.example.com"].c`, + attributes: map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "a": {BoolValue: ptr.To(true)}, + "b": {BoolValue: ptr.To(true)}, + "c": {BoolValue: ptr.To(true)}, + }, + driver: "dra.example.com", + expectMatch: true, + }, + } { + t.Run(name, func(t *testing.T) { + _, ctx := ktesting.NewTestContext(t) + result := Compiler.CompileCELExpression(scenario.expression, environment.StoredExpressions) + if scenario.expectCompileError != "" && result.Error == nil { + t.Fatalf("expected compile error %q, got none", scenario.expectCompileError) + } + if result.Error != nil { + if scenario.expectCompileError == "" { + t.Fatalf("unexpected compile error: %v", result.Error) + } + if !strings.Contains(result.Error.Error(), scenario.expectCompileError) { + t.Fatalf("expected compile error to contain %q, but got instead: %v", scenario.expectCompileError, result.Error) + } + return + } + match, err := result.DeviceMatches(ctx, Device{Attributes: scenario.attributes, Capacity: scenario.capacity, Driver: scenario.driver}) + if err != nil { + if scenario.expectMatchError == "" { + t.Fatalf("unexpected evaluation error: %v", err) + } + if !strings.Contains(err.Error(), scenario.expectMatchError) { + t.Fatalf("expected evaluation error to contain %q, but got instead: %v", scenario.expectMatchError, err) + } + return + } + if match != scenario.expectMatch { + t.Fatalf("expected result %v, got %v", scenario.expectMatch, match) + } + }) + } +} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/semver.go b/staging/src/k8s.io/dynamic-resource-allocation/cel/semver.go similarity index 100% rename from staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/semver.go rename to staging/src/k8s.io/dynamic-resource-allocation/cel/semver.go diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/semver_test.go b/staging/src/k8s.io/dynamic-resource-allocation/cel/semver_test.go similarity index 98% rename from staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/semver_test.go rename to staging/src/k8s.io/dynamic-resource-allocation/cel/semver_test.go index 38f43d15fb1df..d71cfdf91ff5d 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/semver_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/cel/semver_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/util/sets" - library "k8s.io/dynamic-resource-allocation/structured/namedresources/cel" + library "k8s.io/dynamic-resource-allocation/cel" ) func testSemver(t *testing.T, expr string, expectResult ref.Val, expectRuntimeErrPattern string, expectCompileErrs []string) { diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/semverlib.go b/staging/src/k8s.io/dynamic-resource-allocation/cel/semverlib.go similarity index 100% rename from staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/semverlib.go rename to staging/src/k8s.io/dynamic-resource-allocation/cel/semverlib.go diff --git a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go index a9a0e3d739fff..11f820fcded72 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go @@ -187,13 +187,5 @@ func CanBeReserved(claim *resourceapi.ResourceClaim) bool { // IsAllocatedWithStructuredParameters checks whether the claim is allocated // and the allocation was done with structured parameters. func IsAllocatedWithStructuredParameters(claim *resourceapi.ResourceClaim) bool { - if claim.Status.Allocation == nil { - return false - } - for _, handle := range claim.Status.Allocation.ResourceHandles { - if handle.StructuredData != nil { - return true - } - } - return false + return claim.Status.Allocation != nil && claim.Status.Allocation.Controller == "" } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go deleted file mode 100644 index 504983d8c8438..0000000000000 --- a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile.go +++ /dev/null @@ -1,234 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cel - -import ( - "context" - "fmt" - "reflect" - - "github.com/blang/semver/v4" - "github.com/google/cel-go/cel" - "github.com/google/cel-go/common/types" - "github.com/google/cel-go/common/types/traits" - - resourceapi "k8s.io/api/resource/v1alpha3" - "k8s.io/apimachinery/pkg/util/version" - celconfig "k8s.io/apiserver/pkg/apis/cel" - apiservercel "k8s.io/apiserver/pkg/cel" - "k8s.io/apiserver/pkg/cel/environment" -) - -const ( - attributesVarPrefix = "attributes." -) - -var ( - Compiler = newCompiler() -) - -// CompilationResult represents a compiled expression. -type CompilationResult struct { - Program cel.Program - Error *apiservercel.Error - Expression string - OutputType *cel.Type - Environment *cel.Env -} - -type compiler struct { - envset *environment.EnvSet -} - -func newCompiler() *compiler { - return &compiler{envset: mustBuildEnv()} -} - -// CompileCELExpression returns a compiled CEL expression. It evaluates to bool. -func (c compiler) CompileCELExpression(expression string, envType environment.Type) CompilationResult { - resultError := func(errorString string, errType apiservercel.ErrorType) CompilationResult { - return CompilationResult{ - Error: &apiservercel.Error{ - Type: errType, - Detail: errorString, - }, - Expression: expression, - } - } - - env, err := c.envset.Env(envType) - if err != nil { - return resultError(fmt.Sprintf("unexpected error loading CEL environment: %v", err), apiservercel.ErrorTypeInternal) - } - - ast, issues := env.Compile(expression) - if issues != nil { - return resultError("compilation failed: "+issues.String(), apiservercel.ErrorTypeInvalid) - } - expectedReturnType := cel.BoolType - if ast.OutputType() != expectedReturnType { - return resultError(fmt.Sprintf("must evaluate to %v", expectedReturnType.String()), apiservercel.ErrorTypeInvalid) - } - _, err = cel.AstToCheckedExpr(ast) - if err != nil { - // should be impossible since env.Compile returned no issues - return resultError("unexpected compilation error: "+err.Error(), apiservercel.ErrorTypeInternal) - } - prog, err := env.Program(ast, - cel.InterruptCheckFrequency(celconfig.CheckFrequency), - ) - if err != nil { - return resultError("program instantiation failed: "+err.Error(), apiservercel.ErrorTypeInternal) - } - return CompilationResult{ - Program: prog, - Expression: expression, - OutputType: ast.OutputType(), - Environment: env, - } -} - -var valueTypes = map[string]struct { - celType *cel.Type - // get returns nil if the attribute doesn't have the type, otherwise - // the value of that type. - get func(attr resourceapi.NamedResourcesAttribute) (any, error) -}{ - "quantity": {apiservercel.QuantityType, func(attr resourceapi.NamedResourcesAttribute) (any, error) { - if attr.QuantityValue == nil { - return nil, nil - } - return apiservercel.Quantity{Quantity: attr.QuantityValue}, nil - }}, - "bool": {cel.BoolType, func(attr resourceapi.NamedResourcesAttribute) (any, error) { - if attr.BoolValue == nil { - return nil, nil - } - return *attr.BoolValue, nil - }}, - "int": {cel.IntType, func(attr resourceapi.NamedResourcesAttribute) (any, error) { - if attr.IntValue == nil { - return nil, nil - } - return *attr.IntValue, nil - }}, - "intslice": {types.NewListType(cel.IntType), func(attr resourceapi.NamedResourcesAttribute) (any, error) { - if attr.IntSliceValue == nil { - return nil, nil - } - return attr.IntSliceValue.Ints, nil - }}, - "string": {cel.StringType, func(attr resourceapi.NamedResourcesAttribute) (any, error) { - if attr.StringValue == nil { - return nil, nil - } - return *attr.StringValue, nil - }}, - "stringslice": {types.NewListType(cel.StringType), func(attr resourceapi.NamedResourcesAttribute) (any, error) { - if attr.StringSliceValue == nil { - return nil, nil - } - return attr.StringSliceValue.Strings, nil - }}, - "version": {SemverType, func(attr resourceapi.NamedResourcesAttribute) (any, error) { - if attr.VersionValue == nil { - return nil, nil - } - v, err := semver.Parse(*attr.VersionValue) - if err != nil { - return nil, fmt.Errorf("parse semantic version: %v", err) - } - - return Semver{Version: v}, nil - }}, -} - -var boolType = reflect.TypeOf(true) - -func (c CompilationResult) Evaluate(ctx context.Context, attributes []resourceapi.NamedResourcesAttribute) (bool, error) { - variables := make(map[string]any, len(valueTypes)) - for name, valueType := range valueTypes { - m, err := buildValueMapper(c.Environment.CELTypeAdapter(), attributes, valueType.get) - if err != nil { - return false, fmt.Errorf("extract attributes with type %s: %v", name, err) - } - variables[attributesVarPrefix+name] = m - } - result, _, err := c.Program.ContextEval(ctx, variables) - if err != nil { - return false, err - } - resultAny, err := result.ConvertToNative(boolType) - if err != nil { - return false, fmt.Errorf("CEL result of type %s could not be converted to bool: %w", result.Type().TypeName(), err) - } - resultBool, ok := resultAny.(bool) - if !ok { - return false, fmt.Errorf("CEL native result value should have been a bool, got instead: %T", resultAny) - } - return resultBool, nil -} - -func mustBuildEnv() *environment.EnvSet { - // strictCost is always true to enforce cost limits. - envset := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true) - versioned := []environment.VersionedOptions{ - { - // Feature epoch was actually 1.30, but we artificially set it to 1.0 because these - // options should always be present. - // - // TODO (https://github.com/kubernetes/kubernetes/issues/123687): set this - // version properly before going to beta. - IntroducedVersion: version.MajorMinor(1, 0), - EnvOptions: append(buildVersionedAttributes(), - SemverLib(), - ), - }, - } - envset, err := envset.Extend(versioned...) - if err != nil { - panic(fmt.Errorf("internal error building CEL environment: %w", err)) - } - return envset -} - -func buildVersionedAttributes() []cel.EnvOption { - options := make([]cel.EnvOption, 0, len(valueTypes)) - for name, valueType := range valueTypes { - options = append(options, cel.Variable(attributesVarPrefix+name, types.NewMapType(cel.StringType, valueType.celType))) - } - return options -} - -func buildValueMapper(adapter types.Adapter, attributes []resourceapi.NamedResourcesAttribute, get func(resourceapi.NamedResourcesAttribute) (any, error)) (traits.Mapper, error) { - // This implementation constructs a map and then let's cel handle the - // lookup and iteration. This is done for the sake of simplicity. - // Whether it's faster than writing a custom mapper depends on - // real-world attribute sets and CEL expressions and would have to be - // benchmarked. - valueMap := make(map[string]any) - for name, attribute := range attributes { - value, err := get(attribute) - if err != nil { - return nil, fmt.Errorf("attribute %q: %v", name, err) - } - if value != nil { - valueMap[attribute.Name] = value - } - } - return types.NewStringInterfaceMap(adapter, valueMap), nil -} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go deleted file mode 100644 index 240fdacd4fcf3..0000000000000 --- a/staging/src/k8s.io/dynamic-resource-allocation/structured/namedresources/cel/compile_test.go +++ /dev/null @@ -1,155 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cel - -import ( - "strings" - "testing" - - resourceapi "k8s.io/api/resource/v1alpha3" - "k8s.io/apimachinery/pkg/api/resource" - "k8s.io/apiserver/pkg/cel/environment" - "k8s.io/klog/v2/ktesting" - "k8s.io/utils/ptr" -) - -func TestCompile(t *testing.T) { - for name, scenario := range map[string]struct { - expression string - attributes []resourceapi.NamedResourcesAttribute - expectCompileError string - expectMatchError string - expectMatch bool - }{ - "true": { - expression: "true", - expectMatch: true, - }, - "false": { - expression: "false", - expectMatch: false, - }, - "syntax-error": { - expression: "?!", - expectCompileError: "Syntax error", - }, - "type-error": { - expression: `attributes.quantity["no-such-attr"]`, - expectCompileError: "must evaluate to bool", - }, - "runtime-error": { - expression: `attributes.quantity["no-such-attr"].isGreaterThan(quantity("0"))`, - expectMatchError: "no such key: no-such-attr", - }, - "quantity": { - expression: `attributes.quantity["name"].isGreaterThan(quantity("0"))`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{QuantityValue: ptr.To(resource.MustParse("1"))}}}, - expectMatch: true, - }, - "bool": { - expression: `attributes.bool["name"]`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{BoolValue: ptr.To(true)}}}, - expectMatch: true, - }, - "int": { - expression: `attributes.int["name"] > 0`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{IntValue: ptr.To(int64(1))}}}, - expectMatch: true, - }, - "intslice": { - expression: `attributes.intslice["name"].isSorted() && attributes.intslice["name"].indexOf(3) == 2`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{IntSliceValue: &resourceapi.NamedResourcesIntSlice{Ints: []int64{1, 2, 3}}}}}, - expectMatch: true, - }, - "empty-intslice": { - expression: `size(attributes.intslice["name"]) == 0`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{IntSliceValue: &resourceapi.NamedResourcesIntSlice{}}}}, - expectMatch: true, - }, - "string": { - expression: `attributes.string["name"] == "fish"`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{StringValue: ptr.To("fish")}}}, - expectMatch: true, - }, - "stringslice": { - expression: `attributes.stringslice["name"].isSorted() && attributes.stringslice["name"].indexOf("a") == 0`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{StringSliceValue: &resourceapi.NamedResourcesStringSlice{Strings: []string{"a", "b", "c"}}}}}, - expectMatch: true, - }, - "empty-stringslice": { - expression: `size(attributes.stringslice["name"]) == 0`, - attributes: []resourceapi.NamedResourcesAttribute{{Name: "name", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{StringSliceValue: &resourceapi.NamedResourcesStringSlice{}}}}, - expectMatch: true, - }, - "all": { - expression: `attributes.quantity["quantity"].isGreaterThan(quantity("0")) && -attributes.bool["bool"] && -attributes.int["int"] > 0 && -attributes.intslice["intslice"].isSorted() && -attributes.string["string"] == "fish" && -attributes.stringslice["stringslice"].isSorted()`, - attributes: []resourceapi.NamedResourcesAttribute{ - {Name: "quantity", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{QuantityValue: ptr.To(resource.MustParse("1"))}}, - {Name: "bool", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{BoolValue: ptr.To(true)}}, - {Name: "int", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{IntValue: ptr.To(int64(1))}}, - {Name: "intslice", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{IntSliceValue: &resourceapi.NamedResourcesIntSlice{Ints: []int64{1, 2, 3}}}}, - {Name: "string", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{StringValue: ptr.To("fish")}}, - {Name: "stringslice", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{StringSliceValue: &resourceapi.NamedResourcesStringSlice{Strings: []string{"a", "b", "c"}}}}, - }, - expectMatch: true, - }, - "many": { - expression: `attributes.bool["a"] && attributes.bool["b"] && attributes.bool["c"]`, - attributes: []resourceapi.NamedResourcesAttribute{ - {Name: "a", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{BoolValue: ptr.To(true)}}, - {Name: "b", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{BoolValue: ptr.To(true)}}, - {Name: "c", NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{BoolValue: ptr.To(true)}}, - }, - expectMatch: true, - }, - } { - t.Run(name, func(t *testing.T) { - _, ctx := ktesting.NewTestContext(t) - result := Compiler.CompileCELExpression(scenario.expression, environment.StoredExpressions) - if scenario.expectCompileError != "" && result.Error == nil { - t.Fatalf("expected compile error %q, got none", scenario.expectCompileError) - } - if result.Error != nil { - if scenario.expectCompileError == "" { - t.Fatalf("unexpected compile error: %v", result.Error) - } - if !strings.Contains(result.Error.Error(), scenario.expectCompileError) { - t.Fatalf("expected compile error to contain %q, but got instead: %v", scenario.expectCompileError, result.Error) - } - return - } - match, err := result.Evaluate(ctx, scenario.attributes) - if err != nil { - if scenario.expectMatchError == "" { - t.Fatalf("unexpected evaluation error: %v", err) - } - if !strings.Contains(err.Error(), scenario.expectMatchError) { - t.Fatalf("expected evaluation error to contain %q, but got instead: %v", scenario.expectMatchError, err) - } - return - } - if match != scenario.expectMatch { - t.Fatalf("expected result %v, got %v", scenario.expectMatch, match) - } - }) - } -} diff --git a/test/integration/apiserver/apply/reset_fields_test.go b/test/integration/apiserver/apply/reset_fields_test.go index 84b978d671e27..b1f7de70f8cde 100644 --- a/test/integration/apiserver/apply/reset_fields_test.go +++ b/test/integration/apiserver/apply/reset_fields_test.go @@ -60,7 +60,7 @@ var resetFieldsStatusData = map[schema.GroupVersionResource]string{ gvr("policy", "v1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 25}}`, gvr("policy", "v1beta1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 25}}`, gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): `{"status": {"resourceClaims": [{"name": "my-claim", "unsuitableNodes": ["node2"]}]}}`, // Not really a conflict with status_test.go: Apply just stores both nodes. Conflict testing therefore gets disabled for podschedulingcontexts. - gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"status": {"driverName": "other.example.com"}}`, + gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"status": {"allocation": {"controller": "other.example.com"}}}`, gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{"status": {"commonEncodingVersion":"v1","storageVersions":[{"apiServerID":"1","decodableVersions":["v1","v2"],"encodingVersion":"v1"}],"conditions":[{"type":"AllEncodingVersionsEqual","status":"False","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"allEncodingVersionsEqual","message":"all encoding versions are set to v1"}]}}`, // standard for []metav1.Condition gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicies"): `{"status": {"conditions":[{"type":"Accepted","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, @@ -153,8 +153,8 @@ var resetFieldsSpecData = map[schema.GroupVersionResource]string{ gvr("apiregistration.k8s.io", "v1beta1", "apiservices"): `{"metadata": {"labels": {"a":"c"}}, "spec": {"group": "foo2.com"}}`, gvr("apiregistration.k8s.io", "v1", "apiservices"): `{"metadata": {"labels": {"a":"c"}}, "spec": {"group": "foo2.com"}}`, gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): `{"spec": {"selectedNode": "node2name"}}`, - gvr("resource.k8s.io", "v1alpha3", "resourceclasses"): `{"driverName": "other.example.com"}`, - gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"spec": {"resourceClassName": "class2name"}}`, // ResourceClassName is immutable, but that doesn't matter for the test. + gvr("resource.k8s.io", "v1alpha3", "deviceclasses"): `{"metadata": {"labels":{"a":"c"}}}`, + gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"spec": {"devices": {"requests": [{"name": "req-0", "deviceClassName": "other-class"}]}}}`, // spec is immutable, but that doesn't matter for the test. gvr("resource.k8s.io", "v1alpha3", "resourceclaimtemplates"): `{"spec": {"spec": {"resourceClassName": "class2name"}}}`, gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{}`, gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicies"): `{"metadata": {"labels": {"a":"c"}}, "spec": {"paramKind": {"apiVersion": "apps/v1", "kind": "Deployment"}}}`, diff --git a/test/integration/apiserver/apply/status_test.go b/test/integration/apiserver/apply/status_test.go index 8accd1ebf6eb1..c715a96836d42 100644 --- a/test/integration/apiserver/apply/status_test.go +++ b/test/integration/apiserver/apply/status_test.go @@ -53,7 +53,7 @@ var statusData = map[schema.GroupVersionResource]string{ gvr("policy", "v1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 5}}`, gvr("policy", "v1beta1", "poddisruptionbudgets"): `{"status": {"currentHealthy": 5}}`, gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): `{"status": {"resourceClaims": [{"name": "my-claim", "unsuitableNodes": ["node1"]}]}}`, - gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"status": {"driverName": "example.com"}}`, + gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): `{"status": {"allocation": {"controller": "example.com"}}}`, gvr("internal.apiserver.k8s.io", "v1alpha1", "storageversions"): `{"status": {"commonEncodingVersion":"v1","storageVersions":[{"apiServerID":"1","decodableVersions":["v1","v2"],"encodingVersion":"v1"}],"conditions":[{"type":"AllEncodingVersionsEqual","status":"True","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"allEncodingVersionsEqual","message":"all encoding versions are set to v1"}]}}`, // standard for []metav1.Condition gvr("admissionregistration.k8s.io", "v1alpha1", "validatingadmissionpolicies"): `{"status": {"conditions":[{"type":"Accepted","status":"False","lastTransitionTime":"2020-01-01T00:00:00Z","reason":"RuleApplied","message":"Rule was applied"}]}}`, diff --git a/test/integration/auth/node_test.go b/test/integration/auth/node_test.go index e2bab8d440d50..94d17a4967df3 100644 --- a/test/integration/auth/node_test.go +++ b/test/integration/auth/node_test.go @@ -108,17 +108,16 @@ func TestNodeAuthorizer(t *testing.T) { if _, err := superuserClient.CoreV1().ConfigMaps("ns").Create(context.TODO(), &corev1.ConfigMap{ObjectMeta: metav1.ObjectMeta{Name: "myconfigmap"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - if _, err := superuserClient.ResourceV1alpha3().ResourceClaims("ns").Create(context.TODO(), &resourceapi.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mynamedresourceclaim"}, Spec: resourceapi.ResourceClaimSpec{ResourceClassName: "example.com"}}, metav1.CreateOptions{}); err != nil { + if _, err := superuserClient.ResourceV1alpha3().ResourceClaims("ns").Create(context.TODO(), &resourceapi.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mynamedresourceclaim"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - if _, err := superuserClient.ResourceV1alpha3().ResourceClaims("ns").Create(context.TODO(), &resourceapi.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mytemplatizedresourceclaim"}, Spec: resourceapi.ResourceClaimSpec{ResourceClassName: "example.com"}}, metav1.CreateOptions{}); err != nil { + if _, err := superuserClient.ResourceV1alpha3().ResourceClaims("ns").Create(context.TODO(), &resourceapi.ResourceClaim{ObjectMeta: metav1.ObjectMeta{Name: "mytemplatizedresourceclaim"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - model := resourceapi.ResourceModel{NamedResources: &resourceapi.NamedResourcesResources{}} - if _, err := superuserClient.ResourceV1alpha3().ResourceSlices().Create(context.TODO(), &resourceapi.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice1"}, NodeName: "node1", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { + if _, err := superuserClient.ResourceV1alpha3().ResourceSlices().Create(context.TODO(), &resourceapi.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice1"}, Spec: resourceapi.ResourceSliceSpec{NodeName: "node1", Driver: "dra.example.com"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } - if _, err := superuserClient.ResourceV1alpha3().ResourceSlices().Create(context.TODO(), &resourceapi.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice2"}, NodeName: "node2", DriverName: "dra.example.com", ResourceModel: model}, metav1.CreateOptions{}); err != nil { + if _, err := superuserClient.ResourceV1alpha3().ResourceSlices().Create(context.TODO(), &resourceapi.ResourceSlice{ObjectMeta: metav1.ObjectMeta{Name: "myslice2"}, Spec: resourceapi.ResourceSliceSpec{NodeName: "node2", Driver: "dra.example.com"}}, metav1.CreateOptions{}); err != nil { t.Fatal(err) } @@ -670,7 +669,7 @@ func TestNodeAuthorizer(t *testing.T) { if len(slices.Items) != 1 { t.Fatalf("unexpected slices: %v", slices.Items) } - if slices.Items[0].NodeName != "node2" { + if slices.Items[0].Spec.NodeName != "node2" { t.Fatal("wrong slice deleted") } diff --git a/test/integration/etcd/data.go b/test/integration/etcd/data.go index 360a022ec2716..0aa313b3fc69e 100644 --- a/test/integration/etcd/data.go +++ b/test/integration/etcd/data.go @@ -404,32 +404,24 @@ func GetEtcdStorageDataForNamespace(namespace string) map[schema.GroupVersionRes // -- // k8s.io/kubernetes/pkg/apis/resource/v1alpha3 - gvr("resource.k8s.io", "v1alpha3", "resourceclasses"): { - Stub: `{"metadata": {"name": "class1name"}, "driverName": "example.com"}`, - ExpectedEtcdPath: "/registry/resourceclasses/class1name", + gvr("resource.k8s.io", "v1alpha3", "deviceclasses"): { + Stub: `{"metadata": {"name": "class1name"}}`, + ExpectedEtcdPath: "/registry/deviceclasses/class1name", }, gvr("resource.k8s.io", "v1alpha3", "resourceclaims"): { - Stub: `{"metadata": {"name": "claim1name"}, "spec": {"resourceClassName": "class1name", "allocationMode": "WaitForFirstConsumer"}}`, + Stub: `{"metadata": {"name": "claim1name"}, "spec": {"devices": {"requests": [{"name": "req-0", "deviceClassName": "example-class", "countMode": "Exact", "count": 1}]}}}`, ExpectedEtcdPath: "/registry/resourceclaims/" + namespace + "/claim1name", }, gvr("resource.k8s.io", "v1alpha3", "resourceclaimtemplates"): { - Stub: `{"metadata": {"name": "claimtemplate1name"}, "spec": {"spec": {"resourceClassName": "class1name", "allocationMode": "WaitForFirstConsumer"}}}`, + Stub: `{"metadata": {"name": "claimtemplate1name"}, "spec": {"spec": {"devices": {"requests": [{"name": "req-0", "deviceClassName": "example-class", "countMode": "Exact", "count": 1}]}}}}`, ExpectedEtcdPath: "/registry/resourceclaimtemplates/" + namespace + "/claimtemplate1name", }, gvr("resource.k8s.io", "v1alpha3", "podschedulingcontexts"): { Stub: `{"metadata": {"name": "pod1name"}, "spec": {"selectedNode": "node1name", "potentialNodes": ["node1name", "node2name"]}}`, ExpectedEtcdPath: "/registry/podschedulingcontexts/" + namespace + "/pod1name", }, - gvr("resource.k8s.io", "v1alpha3", "resourceclassparameters"): { - Stub: `{"metadata": {"name": "class1parameters"}}`, - ExpectedEtcdPath: "/registry/resourceclassparameters/" + namespace + "/class1parameters", - }, - gvr("resource.k8s.io", "v1alpha3", "resourceclaimparameters"): { - Stub: `{"metadata": {"name": "claim1parameters"}}`, - ExpectedEtcdPath: "/registry/resourceclaimparameters/" + namespace + "/claim1parameters", - }, gvr("resource.k8s.io", "v1alpha3", "resourceslices"): { - Stub: `{"metadata": {"name": "node1slice"}, "nodeName": "worker1", "driverName": "dra.example.com", "namedResources": {}}`, + Stub: `{"metadata": {"name": "node1slice"}, "spec": {"nodeName": "worker1", "driver": "dra.example.com", "pool": {"name": "worker1", "resourceSliceCount": 1}}}`, ExpectedEtcdPath: "/registry/resourceslices/node1slice", }, // -- From 4bdd496d17af9b952b81b9122ebfaeab0e305925 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Jul 2024 16:15:46 +0200 Subject: [PATCH 13/20] DRA: update helper packages Publishing ResourceSlices now supports network-attached devices and the new v1alpha3 API. The logic for splitting up across different slices is missing. --- .../controller/controller.go | 128 +++----- .../controller/controller_test.go | 84 +---- .../kubeletplugin/draplugin.go | 24 +- .../resourceclaim/resourceclaim.go | 83 ----- ...esources.go => resourceslicecontroller.go} | 293 ++++++++++-------- 5 files changed, 235 insertions(+), 377 deletions(-) rename staging/src/k8s.io/dynamic-resource-allocation/resourceslice/{noderesources.go => resourceslicecontroller.go} (53%) diff --git a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go index f26fc083731ef..2a0ae0b2a79da 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller.go @@ -62,20 +62,6 @@ type Controller interface { // Driver provides the actual allocation and deallocation operations. type Driver interface { - // GetClassParameters is called to retrieve the parameter object - // referenced by a class. The content should be validated now if - // possible. class.Parameters may be nil. - // - // The caller wraps the error to include the parameter reference. - GetClassParameters(ctx context.Context, class *resourceapi.ResourceClass) (interface{}, error) - - // GetClaimParameters is called to retrieve the parameter object - // referenced by a claim. The content should be validated now if - // possible. claim.Spec.Parameters may be nil. - // - // The caller wraps the error to include the parameter reference. - GetClaimParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, classParameters interface{}) (interface{}, error) - // Allocate is called when all same-driver ResourceClaims for Pod are ready // to be allocated. The selectedNode is empty for ResourceClaims with immediate // allocation, in which case the resource driver decides itself where @@ -136,11 +122,9 @@ type Driver interface { // ClaimAllocation represents information about one particular // pod.Spec.ResourceClaim entry. type ClaimAllocation struct { - PodClaimName string - Claim *resourceapi.ResourceClaim - Class *resourceapi.ResourceClass - ClaimParameters interface{} - ClassParameters interface{} + PodClaimName string + Claim *resourceapi.ResourceClaim + DeviceClasses map[string]*resourceapi.DeviceClass // UnsuitableNodes needs to be filled in by the driver when // Driver.UnsuitableNodes gets called. @@ -162,15 +146,12 @@ type controller struct { driver Driver setReservedFor bool kubeClient kubernetes.Interface - claimNameLookup *resourceclaim.Lookup queue workqueue.TypedRateLimitingInterface[string] eventRecorder record.EventRecorder - rcLister resourcelisters.ResourceClassLister - rcSynced cache.InformerSynced + dcLister resourcelisters.DeviceClassLister claimCache cache.MutationCache schedulingCtxLister resourcelisters.PodSchedulingContextLister - claimSynced cache.InformerSynced - schedulingCtxSynced cache.InformerSynced + synced []cache.InformerSynced } // TODO: make it configurable @@ -184,10 +165,9 @@ func New( kubeClient kubernetes.Interface, informerFactory informers.SharedInformerFactory) Controller { logger := klog.LoggerWithName(klog.FromContext(ctx), "resource controller") - rcInformer := informerFactory.Resource().V1alpha3().ResourceClasses() + dcInformer := informerFactory.Resource().V1alpha3().DeviceClasses() claimInformer := informerFactory.Resource().V1alpha3().ResourceClaims() schedulingCtxInformer := informerFactory.Resource().V1alpha3().PodSchedulingContexts() - claimNameLookup := resourceclaim.NewNameLookup(kubeClient) eventBroadcaster := record.NewBroadcaster(record.WithContext(ctx)) go func() { @@ -228,15 +208,16 @@ func New( driver: driver, setReservedFor: true, kubeClient: kubeClient, - claimNameLookup: claimNameLookup, - rcLister: rcInformer.Lister(), - rcSynced: rcInformer.Informer().HasSynced, + dcLister: dcInformer.Lister(), claimCache: claimCache, - claimSynced: claimInformer.Informer().HasSynced, schedulingCtxLister: schedulingCtxInformer.Lister(), - schedulingCtxSynced: schedulingCtxInformer.Informer().HasSynced, queue: queue, eventRecorder: eventRecorder, + synced: []cache.InformerSynced{ + dcInformer.Informer().HasSynced, + claimInformer.Informer().HasSynced, + schedulingCtxInformer.Informer().HasSynced, + }, } loggerV6 := logger.V(6) @@ -341,7 +322,7 @@ func (ctrl *controller) Run(workers int) { stopCh := ctrl.ctx.Done() - if !cache.WaitForCacheSync(stopCh, ctrl.rcSynced, ctrl.claimSynced, ctrl.schedulingCtxSynced) { + if !cache.WaitForCacheSync(stopCh, ctrl.synced...) { ctrl.logger.Error(nil, "Cannot sync caches") return } @@ -471,20 +452,19 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourceapi.Resour if claim.Status.Allocation != nil { // Allocation was completed. Deallocate before proceeding. if err := ctrl.driver.Deallocate(ctx, claim); err != nil { - return fmt.Errorf("deallocate: %v", err) + return fmt.Errorf("deallocate: %w", err) } claim.Status.Allocation = nil - claim.Status.DriverName = "" claim.Status.DeallocationRequested = false claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) if err != nil { - return fmt.Errorf("remove allocation: %v", err) + return fmt.Errorf("remove allocation: %w", err) } ctrl.claimCache.Mutation(claim) } else { // Ensure that there is no on-going allocation. if err := ctrl.driver.Deallocate(ctx, claim); err != nil { - return fmt.Errorf("stop allocation: %v", err) + return fmt.Errorf("stop allocation: %w", err) } } @@ -493,7 +473,7 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourceapi.Resour claim.Status.DeallocationRequested = false claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) if err != nil { - return fmt.Errorf("remove deallocation: %v", err) + return fmt.Errorf("remove deallocation: %w", err) } ctrl.claimCache.Mutation(claim) } @@ -501,7 +481,7 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourceapi.Resour claim.Finalizers = ctrl.removeFinalizer(claim.Finalizers) claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) if err != nil { - return fmt.Errorf("remove finalizer: %v", err) + return fmt.Errorf("remove finalizer: %w", err) } ctrl.claimCache.Mutation(claim) } @@ -519,24 +499,6 @@ func (ctrl *controller) syncClaim(ctx context.Context, claim *resourceapi.Resour return nil } -func (ctrl *controller) getParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, notifyClaim bool) (claimParameters, classParameters interface{}, err error) { - classParameters, err = ctrl.driver.GetClassParameters(ctx, class) - if err != nil { - ctrl.eventRecorder.Event(class, v1.EventTypeWarning, "Failed", err.Error()) - err = fmt.Errorf("class parameters %s: %v", class.ParametersRef, err) - return - } - claimParameters, err = ctrl.driver.GetClaimParameters(ctx, claim, class, classParameters) - if err != nil { - if notifyClaim { - ctrl.eventRecorder.Event(claim, v1.EventTypeWarning, "Failed", err.Error()) - } - err = fmt.Errorf("claim parameters %s: %v", claim.Spec.ParametersRef, err) - return - } - return -} - // allocateClaims filters list of claims, keeps those needing allocation and asks driver to do the allocations. // Driver is supposed to write the AllocationResult and Error field into argument claims slice. func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAllocation, selectedNode string, selectedUser *resourceapi.ResourceClaimConsumerReference) { @@ -572,7 +534,7 @@ func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAlloc claim, err = ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).Update(ctx, claim, metav1.UpdateOptions{}) if err != nil { logger.Error(err, "add finalizer", "claim", claim.Name) - claimAllocation.Error = fmt.Errorf("add finalizer: %v", err) + claimAllocation.Error = fmt.Errorf("add finalizer: %w", err) // Do not save claim to ask for Allocate from Driver. continue } @@ -602,14 +564,14 @@ func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAlloc logger.V(5).Info("successfully allocated", "claim", klog.KObj(claimAllocation.Claim)) claim := claimAllocation.Claim.DeepCopy() claim.Status.Allocation = claimAllocation.Allocation - claim.Status.DriverName = ctrl.name + claim.Status.Allocation.Controller = ctrl.name if selectedUser != nil && ctrl.setReservedFor { claim.Status.ReservedFor = append(claim.Status.ReservedFor, *selectedUser) } logger.V(6).Info("Updating claim after allocation", "claim", claim) claim, err := ctrl.kubeClient.ResourceV1alpha3().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) if err != nil { - claimAllocation.Error = fmt.Errorf("add allocation: %v", err) + claimAllocation.Error = fmt.Errorf("add allocation: %w", err) continue } @@ -619,7 +581,7 @@ func (ctrl *controller) allocateClaims(ctx context.Context, claims []*ClaimAlloc } func (ctrl *controller) checkPodClaim(ctx context.Context, pod *v1.Pod, podClaim v1.PodResourceClaim) (*ClaimAllocation, error) { - claimName, mustCheckOwner, err := ctrl.claimNameLookup.Name(pod, &podClaim) + claimName, mustCheckOwner, err := resourceclaim.Name(pod, &podClaim) if err != nil { return nil, err } @@ -642,26 +604,30 @@ func (ctrl *controller) checkPodClaim(ctx context.Context, pod *v1.Pod, podClaim // need to be done for the claim either. return nil, nil } - class, err := ctrl.rcLister.Get(claim.Spec.ResourceClassName) - if err != nil { - return nil, err - } - if class.DriverName != ctrl.name { + if claim.Spec.Controller != ctrl.name { return nil, nil } - // Check parameters. Record event to claim and pod if parameters are invalid. - claimParameters, classParameters, err := ctrl.getParameters(ctx, claim, class, true) - if err != nil { - ctrl.eventRecorder.Event(pod, v1.EventTypeWarning, "Failed", fmt.Sprintf("claim %v: %v", claim.Name, err.Error())) - return nil, err + + // Sanity checks and preparations... + ca := &ClaimAllocation{ + PodClaimName: podClaim.Name, + Claim: claim, + DeviceClasses: make(map[string]*resourceapi.DeviceClass), + } + for _, request := range claim.Spec.Devices.Requests { + if request.DeviceClassName == "" { + // Some unknown request. Abort! + return nil, fmt.Errorf("claim %s: unknown request type in request %s", klog.KObj(claim), request.Name) + } + deviceClassName := request.DeviceClassName + class, err := ctrl.dcLister.Get(deviceClassName) + if err != nil { + return nil, fmt.Errorf("claim %s: request %s: class %s: %w", klog.KObj(claim), request.Name, deviceClassName, err) + } + ca.DeviceClasses[deviceClassName] = class } - return &ClaimAllocation{ - PodClaimName: podClaim.Name, - Claim: claim, - Class: class, - ClaimParameters: claimParameters, - ClassParameters: classParameters, - }, nil + + return ca, nil } // syncPodSchedulingContext determines which next action may be needed for a PodSchedulingContext object @@ -709,7 +675,7 @@ func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulin for _, podClaim := range pod.Spec.ResourceClaims { delayed, err := ctrl.checkPodClaim(ctx, pod, podClaim) if err != nil { - return fmt.Errorf("pod claim %s: %v", podClaim.Name, err) + return fmt.Errorf("pod claim %s: %w", podClaim.Name, err) } if delayed == nil { // Nothing to do for it. This can change, so keep checking. @@ -739,7 +705,7 @@ func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulin } if len(schedulingCtx.Spec.PotentialNodes) > 0 { if err := ctrl.driver.UnsuitableNodes(ctx, pod, claims, potentialNodes); err != nil { - return fmt.Errorf("checking potential nodes: %v", err) + return fmt.Errorf("checking potential nodes: %w", err) } } logger.V(5).Info("pending pod claims", "claims", claims, "selectedNode", selectedNode) @@ -772,7 +738,7 @@ func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulin allErrors = append(allErrors, delayed.Error) } else { // Include claim name, it's not in the underlying error. - allErrors = append(allErrors, fmt.Errorf("claim %s: %v", delayed.Claim.Name, delayed.Error)) + allErrors = append(allErrors, fmt.Errorf("claim %s: %w", delayed.Claim.Name, delayed.Error)) } } } @@ -807,7 +773,7 @@ func (ctrl *controller) syncPodSchedulingContexts(ctx context.Context, schedulin if modified { logger.V(6).Info("Updating pod scheduling with modified unsuitable nodes", "podSchedulingCtx", schedulingCtx) if _, err := ctrl.kubeClient.ResourceV1alpha3().PodSchedulingContexts(schedulingCtx.Namespace).UpdateStatus(ctx, schedulingCtx, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("update unsuitable node status: %v", err) + return fmt.Errorf("update unsuitable node status: %w", err) } } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go index 94f6a22384da8..a8d2f24748dd0 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/controller/controller_test.go @@ -44,15 +44,10 @@ func TestController(t *testing.T) { driverName := "mock-driver" className := "mock-class" otherDriverName := "other-driver" - otherClassName := "other-class" ourFinalizer := driverName + "/deletion-protection" otherFinalizer := otherDriverName + "/deletion-protection" - classes := []*resourceapi.ResourceClass{ - createClass(className, driverName), - createClass(otherClassName, otherDriverName), - } - claim := createClaim(claimName, claimNamespace, className) - otherClaim := createClaim(claimName, claimNamespace, otherClassName) + claim := createClaim(claimName, claimNamespace, driverName) + otherClaim := createClaim(claimName, claimNamespace, otherDriverName) podName := "pod" podKey := "schedulingCtx:default/pod" pod := createPod(podName, claimNamespace, nil) @@ -87,12 +82,11 @@ func TestController(t *testing.T) { claim.Finalizers = append(claim.Finalizers, finalizer) return claim } - allocation := resourceapi.AllocationResult{} + allocation := resourceapi.AllocationResult{Controller: driverName} withAllocate := func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { // Any allocated claim must have our finalizer. claim = withFinalizer(claim, ourFinalizer) claim.Status.Allocation = &allocation - claim.Status.DriverName = driverName return claim } withDeallocate := func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { @@ -128,7 +122,6 @@ func TestController(t *testing.T) { for name, test := range map[string]struct { key string driver mockDriver - classes []*resourceapi.ResourceClass pod *corev1.Pod schedulingCtx, expectedSchedulingCtx *resourceapi.PodSchedulingContext claim, expectedClaim *resourceapi.ResourceClaim @@ -143,7 +136,6 @@ func TestController(t *testing.T) { }, "wrong-driver": { key: claimKey, - classes: classes, claim: otherClaim, expectedClaim: otherClaim, }, @@ -151,7 +143,6 @@ func TestController(t *testing.T) { // not deleted, reallocate -> deallocate "immediate-allocated-reallocate": { key: claimKey, - classes: classes, claim: withDeallocate(withAllocate(claim)), driver: m.expectDeallocate(map[string]error{claimName: nil}), expectedClaim: claim, @@ -160,7 +151,6 @@ func TestController(t *testing.T) { // not deleted, reallocate, deallocate failure -> requeue "immediate-allocated-fail-deallocation-during-reallocate": { key: claimKey, - classes: classes, claim: withDeallocate(withAllocate(claim)), driver: m.expectDeallocate(map[string]error{claimName: errors.New("fake error")}), expectedClaim: withDeallocate(withAllocate(claim)), @@ -170,7 +160,6 @@ func TestController(t *testing.T) { // deletion time stamp set, our finalizer set, not allocated -> remove finalizer "deleted-finalizer-removal": { key: claimKey, - classes: classes, claim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), driver: m.expectDeallocate(map[string]error{claimName: nil}), expectedClaim: withDeletionTimestamp(claim), @@ -178,7 +167,6 @@ func TestController(t *testing.T) { // deletion time stamp set, our finalizer set, not allocated, stopping fails -> requeue "deleted-finalizer-stop-failure": { key: claimKey, - classes: classes, claim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), driver: m.expectDeallocate(map[string]error{claimName: errors.New("fake error")}), expectedClaim: withFinalizer(withDeletionTimestamp(claim), ourFinalizer), @@ -187,14 +175,12 @@ func TestController(t *testing.T) { // deletion time stamp set, other finalizer set, not allocated -> do nothing "deleted-finalizer-no-removal": { key: claimKey, - classes: classes, claim: withFinalizer(withDeletionTimestamp(claim), otherFinalizer), expectedClaim: withFinalizer(withDeletionTimestamp(claim), otherFinalizer), }, // deletion time stamp set, finalizer set, allocated -> deallocate "deleted-allocated": { key: claimKey, - classes: classes, claim: withAllocate(withDeletionTimestamp(claim)), driver: m.expectDeallocate(map[string]error{claimName: nil}), expectedClaim: withDeletionTimestamp(claim), @@ -202,7 +188,6 @@ func TestController(t *testing.T) { // deletion time stamp set, finalizer set, allocated, deallocation fails -> requeue "deleted-deallocate-failure": { key: claimKey, - classes: classes, claim: withAllocate(withDeletionTimestamp(claim)), driver: m.expectDeallocate(map[string]error{claimName: errors.New("fake error")}), expectedClaim: withAllocate(withDeletionTimestamp(claim)), @@ -211,14 +196,12 @@ func TestController(t *testing.T) { // deletion time stamp set, finalizer not set -> do nothing "deleted-no-finalizer": { key: claimKey, - classes: classes, claim: withDeletionTimestamp(claim), expectedClaim: withDeletionTimestamp(claim), }, // waiting for first consumer -> do nothing "pending": { key: claimKey, - classes: classes, claim: claim, expectedClaim: claim, }, @@ -235,7 +218,6 @@ func TestController(t *testing.T) { // no potential nodes -> shouldn't occur "no-nodes": { key: podKey, - classes: classes, claim: claim, expectedClaim: claim, pod: podWithClaim, @@ -246,7 +228,6 @@ func TestController(t *testing.T) { // potential nodes -> provide unsuitable nodes "info": { key: podKey, - classes: classes, claim: claim, expectedClaim: claim, pod: podWithClaim, @@ -258,21 +239,9 @@ func TestController(t *testing.T) { expectedError: errPeriodic.Error(), }, - // potential nodes, selected node, missing class -> failure - "missing-class": { - key: podKey, - claim: claim, - expectedClaim: claim, - pod: podWithClaim, - schedulingCtx: withSelectedNode(withPotentialNodes(podSchedulingCtx)), - expectedSchedulingCtx: withSelectedNode(withPotentialNodes(podSchedulingCtx)), - expectedError: `pod claim my-pod-claim: resourceclass.resource.k8s.io "mock-class" not found`, - }, - // potential nodes, selected node -> allocate "allocate": { key: podKey, - classes: classes, claim: claim, expectedClaim: withReservedFor(withAllocate(claim), pod), pod: podWithClaim, @@ -287,7 +256,6 @@ func TestController(t *testing.T) { // potential nodes, selected node, all unsuitable -> update unsuitable nodes "is-potential-node": { key: podKey, - classes: classes, claim: claim, expectedClaim: claim, pod: podWithClaim, @@ -301,7 +269,6 @@ func TestController(t *testing.T) { // max potential nodes, other selected node, all unsuitable -> update unsuitable nodes with truncation at start "is-potential-node-truncate-first": { key: podKey, - classes: classes, claim: claim, expectedClaim: claim, pod: podWithClaim, @@ -315,7 +282,6 @@ func TestController(t *testing.T) { // max potential nodes, other selected node, all unsuitable (but in reverse order) -> update unsuitable nodes with truncation at end "pod-selected-is-potential-node-truncate-last": { key: podKey, - classes: classes, claim: claim, expectedClaim: claim, pod: podWithClaim, @@ -332,9 +298,6 @@ func TestController(t *testing.T) { ctx, cancel := context.WithCancel(ctx) initialObjects := []runtime.Object{} - for _, class := range test.classes { - initialObjects = append(initialObjects, class) - } if test.pod != nil { initialObjects = append(initialObjects, test.pod) } @@ -345,7 +308,6 @@ func TestController(t *testing.T) { initialObjects = append(initialObjects, test.claim) } kubeClient, informerFactory := fakeK8s(initialObjects) - rcInformer := informerFactory.Resource().V1alpha3().ResourceClasses() claimInformer := informerFactory.Resource().V1alpha3().ResourceClaims() podInformer := informerFactory.Core().V1().Pods() podSchedulingInformer := informerFactory.Resource().V1alpha3().PodSchedulingContexts() @@ -356,8 +318,6 @@ func TestController(t *testing.T) { for _, obj := range initialObjects { switch obj.(type) { - case *resourceapi.ResourceClass: - require.NoError(t, rcInformer.Informer().GetStore().Add(obj), "add resource class") case *resourceapi.ResourceClaim: require.NoError(t, claimInformer.Informer().GetStore().Add(obj), "add resource claim") case *corev1.Pod: @@ -375,7 +335,6 @@ func TestController(t *testing.T) { ctrl := New(ctx, driverName, driver, kubeClient, informerFactory) informerFactory.Start(ctx.Done()) if !cache.WaitForCacheSync(ctx.Done(), - informerFactory.Resource().V1alpha3().ResourceClasses().Informer().HasSynced, informerFactory.Resource().V1alpha3().ResourceClaims().Informer().HasSynced, informerFactory.Resource().V1alpha3().PodSchedulingContexts().Informer().HasSynced, ) { @@ -459,30 +418,6 @@ func (m mockDriver) expectUnsuitableNodes(expected map[string][]string, err erro return m } -func (m mockDriver) GetClassParameters(ctx context.Context, class *resourceapi.ResourceClass) (interface{}, error) { - m.t.Logf("GetClassParameters(%s)", class) - result, ok := m.classParameters[class.Name] - if !ok { - m.t.Fatal("unexpected GetClassParameters call") - } - if err, ok := result.(error); ok { - return nil, err - } - return result, nil -} - -func (m mockDriver) GetClaimParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, classParameters interface{}) (interface{}, error) { - m.t.Logf("GetClaimParameters(%s)", claim) - result, ok := m.claimParameters[claim.Name] - if !ok { - m.t.Fatal("unexpected GetClaimParameters call") - } - if err, ok := result.(error); ok { - return nil, err - } - return result, nil -} - func (m mockDriver) Allocate(ctx context.Context, claims []*ClaimAllocation, selectedNode string) { m.t.Logf("Allocate(number of claims %d)", len(claims)) for _, claimAllocation := range claims { @@ -532,23 +467,14 @@ func (m mockDriver) UnsuitableNodes(ctx context.Context, pod *corev1.Pod, claims return nil } -func createClass(className, driverName string) *resourceapi.ResourceClass { - return &resourceapi.ResourceClass{ - ObjectMeta: metav1.ObjectMeta{ - Name: className, - }, - DriverName: driverName, - } -} - -func createClaim(claimName, claimNamespace, className string) *resourceapi.ResourceClaim { +func createClaim(claimName, claimNamespace, driverName string) *resourceapi.ResourceClaim { return &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: claimName, Namespace: claimNamespace, }, Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: className, + Controller: driverName, }, } } diff --git a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go index a7b04fac2bccd..f34d1ac61d3f7 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/kubeletplugin/draplugin.go @@ -54,8 +54,8 @@ type DRAPlugin interface { // after it returns before all information is actually written // to the API server. // - // The caller must not modify the content of the slice. - PublishResources(ctx context.Context, nodeResources []*resourceapi.ResourceModel) + // The caller must not modify the content after the call. + PublishResources(ctx context.Context, resources Resources) // This unexported method ensures that we can modify the interface // without causing an API break of the package @@ -63,6 +63,12 @@ type DRAPlugin interface { internal() } +// Resources currently only supports named devices. Might get extended in the +// future. +type Resources struct { + Devices []resourceapi.Device +} + // Option implements the functional options pattern for Start. type Option func(o *options) error @@ -360,7 +366,7 @@ func (d *draPlugin) Stop() { } // PublishResources implements [DRAPlugin.PublishResources]. -func (d *draPlugin) PublishResources(ctx context.Context, nodeResources []*resourceapi.ResourceModel) { +func (d *draPlugin) PublishResources(ctx context.Context, resources Resources) { d.mutex.Lock() defer d.mutex.Unlock() @@ -370,7 +376,13 @@ func (d *draPlugin) PublishResources(ctx context.Context, nodeResources []*resou Name: d.nodeName, UID: d.nodeUID, // Optional, will be determined by controller if empty. } - resources := &resourceslice.Resources{NodeResources: nodeResources} + driverResources := &resourceslice.DriverResources{ + Pools: map[string]resourceslice.Pool{ + d.nodeName: { + Devices: resources.Devices, + }, + }, + } if d.resourceSliceController == nil { // Start publishing the information. The controller is using // our background context, not the one passed into this @@ -380,12 +392,12 @@ func (d *draPlugin) PublishResources(ctx context.Context, nodeResources []*resou controllerLogger := klog.FromContext(controllerCtx) controllerLogger = klog.LoggerWithName(controllerLogger, "ResourceSlice controller") controllerCtx = klog.NewContext(controllerCtx, controllerLogger) - d.resourceSliceController = resourceslice.StartController(controllerCtx, d.kubeClient, d.driverName, owner, resources) + d.resourceSliceController = resourceslice.StartController(controllerCtx, d.kubeClient, d.driverName, owner, driverResources) return } // Inform running controller about new information. - d.resourceSliceController.Update(resources) + d.resourceSliceController.Update(driverResources) } // RegistrationStatus implements [DRAPlugin.RegistrationStatus]. diff --git a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go index 11f820fcded72..3d59e85709ffb 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/resourceclaim/resourceclaim.go @@ -26,15 +26,10 @@ package resourceclaim import ( "errors" "fmt" - "os" - "strings" - "sync/atomic" v1 "k8s.io/api/core/v1" resourceapi "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/client-go/kubernetes" - "k8s.io/utils/ptr" ) var ( @@ -81,78 +76,6 @@ func Name(pod *v1.Pod, podClaim *v1.PodResourceClaim) (name *string, mustCheckOw } } -// NewNameLookup returns an object which handles determining the name of -// a ResourceClaim. In contrast to the stand-alone Name it is compatible -// also with Kubernetes < 1.28. -// -// Providing a client is optional. If none is available, then code can pass nil -// and users can set the DRA_WITH_DETERMINISTIC_RESOURCE_CLAIM_NAMES env -// variable to an arbitrary non-empty value to use the naming from Kubernetes < -// 1.28. -func NewNameLookup(client kubernetes.Interface) *Lookup { - return &Lookup{client: client} -} - -// Lookup stores the state which is necessary to look up ResourceClaim names. -type Lookup struct { - client kubernetes.Interface - usePodStatus atomic.Pointer[bool] -} - -// Name is a variant of the stand-alone Name with support also for Kubernetes < 1.28. -func (l *Lookup) Name(pod *v1.Pod, podClaim *v1.PodResourceClaim) (name *string, mustCheckOwner bool, err error) { - usePodStatus := l.usePodStatus.Load() - if usePodStatus == nil { - if value, _ := os.LookupEnv("DRA_WITH_DETERMINISTIC_RESOURCE_CLAIM_NAMES"); value != "" { - usePodStatus = ptr.To(false) - } else if l.client != nil { - // Check once. This does not detect upgrades or - // downgrades, but that is good enough for the simple - // test scenarios that the Kubernetes < 1.28 support is - // meant for. - info, err := l.client.Discovery().ServerVersion() - if err != nil { - return nil, false, fmt.Errorf("look up server version: %v", err) - } - if info.Major == "" { - // Fake client... - usePodStatus = ptr.To(true) - } else { - switch strings.Compare(info.Major, "1") { - case -1: - // Huh? - usePodStatus = ptr.To(false) - case 0: - // info.Minor may have a suffix which makes it larger than 28. - // We don't care about pre-releases here. - usePodStatus = ptr.To(strings.Compare("28", info.Minor) <= 0) - case 1: - // Kubernetes 2? Yeah! - usePodStatus = ptr.To(true) - } - } - } else { - // No information. Let's assume recent Kubernetes. - usePodStatus = ptr.To(true) - } - l.usePodStatus.Store(usePodStatus) - } - - if *usePodStatus { - return Name(pod, podClaim) - } - - switch { - case podClaim.ResourceClaimName != nil: - return podClaim.ResourceClaimName, false, nil - case podClaim.ResourceClaimTemplateName != nil: - name := pod.Name + "-" + podClaim.Name - return &name, true, nil - default: - return nil, false, fmt.Errorf(`pod "%s/%s", spec.resourceClaim %q: %w`, pod.Namespace, pod.Name, podClaim.Name, ErrAPIUnsupported) - } -} - // IsForPod checks that the ResourceClaim is the one that // was created for the Pod. It returns an error that is informative // enough to be returned by the caller without adding further details @@ -183,9 +106,3 @@ func CanBeReserved(claim *resourceapi.ResourceClaim) bool { // Currently no restrictions on sharing... return true } - -// IsAllocatedWithStructuredParameters checks whether the claim is allocated -// and the allocation was done with structured parameters. -func IsAllocatedWithStructuredParameters(claim *resourceapi.ResourceClaim) bool { - return claim.Status.Allocation != nil && claim.Status.Allocation.Controller == "" -} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go b/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/resourceslicecontroller.go similarity index 53% rename from staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go rename to staging/src/k8s.io/dynamic-resource-allocation/resourceslice/resourceslicecontroller.go index b70212523b373..01fd88be1ba64 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/noderesources.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/resourceslice/resourceslicecontroller.go @@ -25,13 +25,13 @@ import ( "github.com/google/go-cmp/cmp" + "k8s.io/api/core/v1" resourceapi "k8s.io/api/resource/v1alpha3" - apiequality "k8s.io/apimachinery/pkg/api/equality" + apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/sets" resourceinformers "k8s.io/client-go/informers/resource/v1alpha3" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" @@ -46,18 +46,17 @@ const ( resyncPeriod = time.Duration(10 * time.Minute) ) -// Controller synchronizes information about resources of one -// driver with ResourceSlice objects. It currently supports node-local +// Controller synchronizes information about resources of one driver with +// ResourceSlice objects. It supports node-local and network-attached // resources. A DRA driver for node-local resources typically runs this // controller as part of its kubelet plugin. -// -// Support for network-attached resources will be added later. type Controller struct { cancel func(cause error) - driverName string + driver string owner Owner kubeClient kubernetes.Interface wg sync.WaitGroup + // The queue is keyed with the pool name that needs work. queue workqueue.TypedRateLimitingInterface[string] sliceStore cache.Store @@ -66,15 +65,32 @@ type Controller struct { // When receiving updates from the driver, the entire pointer replaced, // so it is okay to not do a deep copy of it when reading it. Only reading // the pointer itself must be protected by a read lock. - resources *Resources + resources *DriverResources +} + +// DriverResources is a complete description of all resources synchronized by the controller. +type DriverResources struct { + // Each driver may manage different resource pools. + Pools map[string]Pool } -// Resources is a complete description of all resources synchronized by the controller. -type Resources struct { - // NodeResources are resources that are local to one node. - NodeResources []*resourceapi.ResourceModel +// Pool is the collection of devices belonging to the same pool. +type Pool struct { + // NodeSelector may be different for each pool. Must not get set together + // with Resources.NodeName. It nil and Resources.NodeName is not set, + // then devices are available on all nodes. + NodeSelector *v1.NodeSelector + + // Generation can be left at zero. It gets bumped up automatically + // by the controller. + Generation int64 + + // Device names must be unique inside the pool. + Devices []resourceapi.Device } +// Owner is the resource which is meant to be listed as owner of the resource slices. +// For a node the UID may be left blank. The controller will look it up automatically. type Owner struct { APIVersion string Kind string @@ -93,7 +109,7 @@ type Owner struct { // the controller is inactive. This can happen when kubelet is run stand-alone // without an apiserver. In that case we can't and don't need to publish // ResourceSlices. -func StartController(ctx context.Context, kubeClient kubernetes.Interface, driverName string, owner Owner, resources *Resources) *Controller { +func StartController(ctx context.Context, kubeClient kubernetes.Interface, driver string, owner Owner, resources *DriverResources) *Controller { if kubeClient == nil { return nil } @@ -104,7 +120,7 @@ func StartController(ctx context.Context, kubeClient kubernetes.Interface, drive c := &Controller{ cancel: cancel, kubeClient: kubeClient, - driverName: driverName, + driver: driver, owner: owner, queue: workqueue.NewTypedRateLimitingQueueWithConfig( workqueue.DefaultTypedControllerRateLimiter[string](), @@ -121,8 +137,10 @@ func StartController(ctx context.Context, kubeClient kubernetes.Interface, drive c.run(ctx) }() - // Sync once. - c.queue.Add("") + // Sync each pool once. + for poolName := range resources.Pools { + c.queue.Add(poolName) + } return c } @@ -137,12 +155,24 @@ func (c *Controller) Stop() { } // Update sets the new desired state of the resource information. -func (c *Controller) Update(resources *Resources) { +// +// The controller takes over ownership, so these resources must +// not get modified after this method returns. +func (c *Controller) Update(resources *DriverResources) { c.mutex.Lock() defer c.mutex.Unlock() + // Sync all old pools.. + for poolName := range c.resources.Pools { + c.queue.Add(poolName) + } + c.resources = resources - c.queue.Add("") + + // ... and the new ones (might be the same). + for poolName := range c.resources.Pools { + c.queue.Add(poolName) + } } // run is running in the background. It handles blocking initialization (like @@ -151,9 +181,9 @@ func (c *Controller) run(ctx context.Context) { logger := klog.FromContext(ctx) // We always filter by driver name, by node name only for node-local resources. - selector := fields.Set{"driverName": c.driverName} + selector := fields.Set{resourceapi.ResourceSliceSelectorDriver: c.driver} if c.owner.APIVersion == "v1" && c.owner.Kind == "Node" { - selector["nodeName"] = c.owner.Name + selector[resourceapi.ResourceSliceSelectorNodeName] = c.owner.Name } informer := resourceinformers.NewFilteredResourceSliceInformer(c.kubeClient, resyncPeriod, nil, func(options *metav1.ListOptions) { options.FieldSelector = selector.String() @@ -166,7 +196,7 @@ func (c *Controller) run(ctx context.Context) { return } logger.V(5).Info("ResourceSlice add", "slice", klog.KObj(slice)) - c.queue.Add("") + c.queue.Add(slice.Spec.Pool.Name) }, UpdateFunc: func(old, new any) { oldSlice, ok := old.(*resourceapi.ResourceSlice) @@ -182,7 +212,8 @@ func (c *Controller) run(ctx context.Context) { } else { logger.V(5).Info("ResourceSlice update", "slice", klog.KObj(newSlice)) } - c.queue.Add("") + c.queue.Add(oldSlice.Spec.Pool.Name) + c.queue.Add(newSlice.Spec.Pool.Name) }, DeleteFunc: func(obj any) { if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { @@ -193,7 +224,7 @@ func (c *Controller) run(ctx context.Context) { return } logger.V(5).Info("ResourceSlice delete", "slice", klog.KObj(slice)) - c.queue.Add("") + c.queue.Add(slice.Spec.Pool.Name) }, }) if err != nil { @@ -219,16 +250,19 @@ func (c *Controller) run(ctx context.Context) { } logger.V(3).Info("ResourceSlice informer has synced") + // Seed the + for c.processNextWorkItem(ctx) { } } func (c *Controller) processNextWorkItem(ctx context.Context) bool { - key, shutdown := c.queue.Get() + poolName, shutdown := c.queue.Get() if shutdown { return false } - defer c.queue.Done(key) + defer c.queue.Done(poolName) + logger := klog.FromContext(ctx) // Panics are caught and treated like errors. var err error @@ -238,154 +272,157 @@ func (c *Controller) processNextWorkItem(ctx context.Context) bool { err = fmt.Errorf("internal error: %v", r) } }() - err = c.sync(ctx) + err = c.syncPool(klog.NewContext(ctx, klog.LoggerWithValues(logger, "poolName", poolName)), poolName) }() if err != nil { utilruntime.HandleErrorWithContext(ctx, err, "processing ResourceSlice objects") - c.queue.AddRateLimited(key) + c.queue.AddRateLimited(poolName) // Return without removing the work item from the queue. // It will be retried. return true } - c.queue.Forget(key) + c.queue.Forget(poolName) return true } -func (c *Controller) sync(ctx context.Context) error { +// syncPool processes one pool. Only runs inside a single worker, so there +// is no need for locking except when accessing c.resources, which may +// be updated at any time by the user of the controller. +func (c *Controller) syncPool(ctx context.Context, poolName string) error { logger := klog.FromContext(ctx) // Gather information about the actual and desired state. - slices := c.sliceStore.List() - var resources *Resources + // TODO: index by pool name. + var slices []*resourceapi.ResourceSlice + for _, obj := range c.sliceStore.List() { + if slice, ok := obj.(*resourceapi.ResourceSlice); ok && slice.Spec.Pool.Name == poolName { + slices = append(slices, slice) + } + } + var resources *DriverResources c.mutex.RLock() resources = c.resources c.mutex.RUnlock() - // Resources that are not yet stored in any slice need to be published. - // Here we track the indices of any resources that are already stored. - storedResourceIndices := sets.New[int]() + // Retrieve node object to get UID? + // The result gets cached and is expected to not change while + // the controller runs. + var nodeName string + if c.owner.APIVersion == "v1" && c.owner.Kind == "Node" { + nodeName = c.owner.Name + if c.owner.UID == "" { + node, err := c.kubeClient.CoreV1().Nodes().Get(ctx, c.owner.Name, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("retrieve node %q: %w", c.owner.Name, err) + } + // There is only one worker, so no locking needed. + c.owner.UID = node.UID + } + } // Slices that don't match any driver resource can either be updated (if there // are new driver resources that need to be stored) or they need to be deleted. obsoleteSlices := make([]*resourceapi.ResourceSlice, 0, len(slices)) - // Match slices with resource information. - for _, obj := range slices { - slice := obj.(*resourceapi.ResourceSlice) - - // TODO: network-attached resources. - index := indexOfModel(resources.NodeResources, &slice.ResourceModel) - if index >= 0 { - storedResourceIndices.Insert(index) - continue + // Determine highest generation. + var generation int64 + for _, slice := range slices { + if slice.Spec.Pool.Generation > generation { + generation = slice.Spec.Pool.Generation } - - obsoleteSlices = append(obsoleteSlices, slice) - } - - if loggerV := logger.V(6); loggerV.Enabled() { - // Dump entire resource information. - loggerV.Info("Syncing existing driver resource slices with driver resources", "slices", klog.KObjSlice(slices), "resources", resources) - } else { - logger.V(5).Info("Syncing existing driver resource slices with driver resources", "slices", klog.KObjSlice(slices), "numResources", len(resources.NodeResources)) } - // Retrieve node object to get UID? - // The result gets cached and is expected to not change while - // the controller runs. - if c.owner.UID == "" && c.owner.APIVersion == "v1" && c.owner.Kind == "Node" { - node, err := c.kubeClient.CoreV1().Nodes().Get(ctx, c.owner.Name, metav1.GetOptions{}) - if err != nil { - return fmt.Errorf("retrieve node %q: %w", c.owner.Name, err) + // Everything older is obsolete. + currentSlices := make([]*resourceapi.ResourceSlice, 0, len(slices)) + for _, slice := range slices { + if slice.Spec.Pool.Generation < generation { + obsoleteSlices = append(obsoleteSlices, slice) + } else { + currentSlices = append(currentSlices, slice) } - // There is only one worker, so no locking needed. - c.owner.UID = node.UID } + slices = currentSlices - // Update stale slices before removing what's left. - // - // We don't really know which of these slices might have - // been used for "the" driver resource because they don't - // have a unique ID. In practice, a driver is most likely - // to just give us one ResourceModel, in which case - // this isn't a problem at all. If we have more than one, - // then at least conceptually it currently doesn't matter - // where we publish it. - // - // The long-term goal is to move the handling of - // ResourceSlice objects into the driver, with kubelet - // just acting as a REST proxy. The advantage of that will - // be that kubelet won't need to support the same - // resource API version as the driver and the control plane. - // With that approach, the driver will be able to match - // up objects more intelligently. - numObsoleteSlices := len(obsoleteSlices) - for index, resource := range resources.NodeResources { - if storedResourceIndices.Has(index) { - // No need to do anything, it is already stored exactly - // like this in an existing slice. - continue - } - - if numObsoleteSlices > 0 { - // Update one existing slice. - slice := obsoleteSlices[numObsoleteSlices-1] - numObsoleteSlices-- - slice = slice.DeepCopy() - slice.ResourceModel = *resource - logger.V(5).Info("Reusing existing resource slice", "slice", klog.KObj(slice)) - if _, err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Update(ctx, slice, metav1.UpdateOptions{}); err != nil { - return fmt.Errorf("update resource slice: %w", err) - } - continue + if pool, ok := resources.Pools[poolName]; ok { + if pool.Generation > generation { + generation = pool.Generation } - // Create a new slice. - slice := &resourceapi.ResourceSlice{ - ObjectMeta: metav1.ObjectMeta{ - GenerateName: c.owner.Name + "-" + c.driverName + "-", - OwnerReferences: []metav1.OwnerReference{ - { - APIVersion: c.owner.APIVersion, - Kind: c.owner.Kind, - Name: c.owner.Name, - UID: c.owner.UID, - Controller: ptr.To(true), + // Right now all devices get published in a single slice. + // We simply pick the first one, if there is one, and copy + // it in preparation for updating it. + // + // TODO: support splitting across slices, with unit tests. + if len(slices) > 0 { + obsoleteSlices = append(obsoleteSlices, slices[1:]...) + slices = []*resourceapi.ResourceSlice{slices[0].DeepCopy()} + } else { + slices = []*resourceapi.ResourceSlice{ + { + ObjectMeta: metav1.ObjectMeta{ + GenerateName: c.owner.Name + "-" + c.driver + "-", }, }, - }, - DriverName: c.driverName, - ResourceModel: *resource, - } - if c.owner.APIVersion == "v1" && c.owner.Kind == "Node" { - slice.NodeName = c.owner.Name + } } - logger.V(5).Info("Creating new resource slice", "slice", klog.KObj(slice)) - if _, err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}); err != nil { - return fmt.Errorf("create resource slice: %w", err) + + slice := slices[0] + slice.OwnerReferences = []metav1.OwnerReference{{ + APIVersion: c.owner.APIVersion, + Kind: c.owner.Kind, + Name: c.owner.Name, + UID: c.owner.UID, + Controller: ptr.To(true), + }} + slice.Spec.Driver = c.driver + slice.Spec.Pool.Name = poolName + slice.Spec.Pool.Generation = generation + slice.Spec.Pool.ResourceSliceCount = 1 + slice.Spec.NodeName = nodeName + slice.Spec.NodeSelector = pool.NodeSelector + slice.Spec.AllNodes = pool.NodeSelector == nil && nodeName == "" + slice.Spec.Devices = pool.Devices + + if loggerV := logger.V(6); loggerV.Enabled() { + // Dump entire resource information. + loggerV.Info("Syncing resource slices", "obsoleteSlices", klog.KObjSlice(obsoleteSlices), "slices", klog.KObjSlice(slices), "pool", pool) + } else { + logger.V(5).Info("Syncing resource slices", "obsoleteSlices", klog.KObjSlice(obsoleteSlices), "slices", klog.KObjSlice(slices), "numDevices", len(pool.Devices)) } + } else if len(slices) > 0 { + // All are obsolete, pool does not exist anymore. + + logger.V(5).Info("Removing resource slices after pool removal", "obsoleteSlices", klog.KObjSlice(obsoleteSlices), "slices", klog.KObjSlice(slices), "numDevices", len(pool.Devices)) + obsoleteSlices = append(obsoleteSlices, slices...) } - // All remaining slices are truly orphaned. - for i := 0; i < numObsoleteSlices; i++ { - slice := obsoleteSlices[i] + // Remove stale slices. + for _, slice := range obsoleteSlices { logger.V(5).Info("Deleting obsolete resource slice", "slice", klog.KObj(slice)) - if err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}); err != nil { + if err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { return fmt.Errorf("delete resource slice: %w", err) } } - return nil -} + // Create or update slices. + for _, slice := range slices { + if slice.UID == "" { + logger.V(5).Info("Creating new resource slice", "slice", klog.KObj(slice)) + if _, err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}); err != nil { + return fmt.Errorf("create resource slice: %w", err) + } + continue + } -func indexOfModel(models []*resourceapi.ResourceModel, model *resourceapi.ResourceModel) int { - for index, m := range models { - if apiequality.Semantic.DeepEqual(m, model) { - return index + // TODO: switch to SSA once unit testing supports it. + logger.V(5).Info("Updating existing resource slice", "slice", klog.KObj(slice)) + if _, err := c.kubeClient.ResourceV1alpha3().ResourceSlices().Update(ctx, slice, metav1.UpdateOptions{}); err != nil { + return fmt.Errorf("delete resource slice: %w", err) } } - return -1 + + return nil } From 8bd90c7d7fd08d7a7e5d245fd9aa30d67551653f Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 19 Jun 2024 16:00:46 +0200 Subject: [PATCH 14/20] DRA kubelet: adapt to v1alpha3 API This adds the ability to select specific requests inside a claim for a container. NodePrepareResources is always called, even if the claim is not used by any container. This could be useful for drivers where that call has some effect other than injecting CDI device IDs into containers. It also ensures that drivers can validate configs. The pod resource API can no longer report a class for each claim because there is no such 1:1 relationship anymore. Instead, that API reports claim, API devices (with driver/pool/device as ID) and CDI device IDs. The kubelet itself doesn't extract that information from the claim. Instead, it relies on drivers to report this information when the claim gets prepared. This isolates the kubelet from API changes. Because of a faulty E2E test, kubelet was told to contact the wrong driver for a claim. This was not visible in the kubelet log output. Now changes to the claim info cache are getting logged. While at it, naming of variables and some existing log output gets harmonized. Co-authored-by: Oksana Baranova Co-authored-by: Ed Bartosh --- .../checkpointmanager/checksum/checksum.go | 5 +- .../checkpointmanager/errors/errors.go | 14 +- pkg/kubelet/cm/container_manager_linux.go | 18 +- pkg/kubelet/cm/cpumanager/state/checkpoint.go | 5 +- pkg/kubelet/cm/dra/claiminfo.go | 92 +- pkg/kubelet/cm/dra/claiminfo_test.go | 368 ++--- pkg/kubelet/cm/dra/manager.go | 150 +- pkg/kubelet/cm/dra/manager_test.go | 1372 +++++------------ pkg/kubelet/cm/dra/plugin/client_test.go | 9 +- pkg/kubelet/cm/dra/plugin/plugin.go | 9 +- pkg/kubelet/cm/dra/state/checkpoint.go | 54 - pkg/kubelet/cm/dra/state/state_checkpoint.go | 50 +- .../cm/dra/state/state_checkpoint_test.go | 239 ++- .../cm/dra/state/zz_generated.deepcopy.go | 65 +- pkg/kubelet/cm/dra/types.go | 2 - pkg/kubelet/cm/dra/zz_generated.deepcopy.go | 19 - pkg/kubelet/container/runtime.go | 3 +- .../kubelet/pkg/apis/dra/v1alpha4/api.pb.go | 474 +++++- .../kubelet/pkg/apis/dra/v1alpha4/api.proto | 21 +- .../pkg/apis/podresources/v1/api.pb.go | 315 ++-- .../pkg/apis/podresources/v1/api.proto | 11 +- 21 files changed, 1488 insertions(+), 1807 deletions(-) diff --git a/pkg/kubelet/checkpointmanager/checksum/checksum.go b/pkg/kubelet/checkpointmanager/checksum/checksum.go index d5892b7be65db..5dcd4f24194d6 100644 --- a/pkg/kubelet/checkpointmanager/checksum/checksum.go +++ b/pkg/kubelet/checkpointmanager/checksum/checksum.go @@ -28,8 +28,9 @@ type Checksum uint64 // Verify verifies that passed checksum is same as calculated checksum func (cs Checksum) Verify(data interface{}) error { - if cs != New(data) { - return errors.ErrCorruptCheckpoint + actualCS := New(data) + if cs != actualCS { + return &errors.CorruptCheckpointError{ActualCS: uint64(actualCS), ExpectedCS: uint64(cs)} } return nil } diff --git a/pkg/kubelet/checkpointmanager/errors/errors.go b/pkg/kubelet/checkpointmanager/errors/errors.go index bb445f207ec23..b39fab9de5969 100644 --- a/pkg/kubelet/checkpointmanager/errors/errors.go +++ b/pkg/kubelet/checkpointmanager/errors/errors.go @@ -18,8 +18,18 @@ package errors import "fmt" -// ErrCorruptCheckpoint error is reported when checksum does not match -var ErrCorruptCheckpoint = fmt.Errorf("checkpoint is corrupted") +// ErrCorruptCheckpoint error is reported when checksum does not match. +// Check for it with: +// +// var csErr CorruptCheckpointError +// if errors.As(err, &csErr) { ... } +type CorruptCheckpointError struct { + ActualCS, ExpectedCS uint64 +} + +func (err CorruptCheckpointError) Error() string { + return "checkpoint is corrupted" +} // ErrCheckpointNotFound is reported when checkpoint is not found for a given key var ErrCheckpointNotFound = fmt.Errorf("checkpoint is not found") diff --git a/pkg/kubelet/cm/container_manager_linux.go b/pkg/kubelet/cm/container_manager_linux.go index 1a884163b3a73..5c78e6b5eb4b3 100644 --- a/pkg/kubelet/cm/container_manager_linux.go +++ b/pkg/kubelet/cm/container_manager_linux.go @@ -661,10 +661,6 @@ func (cm *containerManagerImpl) GetResources(pod *v1.Pod, container *v1.Containe if err != nil { return nil, err } - // NOTE: Passing CDI device names as annotations is a temporary solution - // It will be removed after all runtimes are updated - // to get CDI device names from the ContainerConfig.CDIDevices field - opts.Annotations = append(opts.Annotations, resOpts.Annotations...) opts.CDIDevices = append(opts.CDIDevices, resOpts.CDIDevices...) } // Allocate should already be called during predicateAdmitHandler.Admit(), @@ -969,15 +965,19 @@ func (cm *containerManagerImpl) GetDynamicResources(pod *v1.Pod, container *v1.C // a set of CDIDevices from a different kubelet plugin. In the future we may want to // include the name of the kubelet plugin and/or other types of resources that are // not CDIDevices (assuming the DRAmanager supports this). - for _, klPluginCdiDevices := range containerClaimInfo.CDIDevices { + for /* driverName */ _, driverState := range containerClaimInfo.DriverState { var cdiDevices []*podresourcesapi.CDIDevice - for _, cdiDevice := range klPluginCdiDevices { - cdiDevices = append(cdiDevices, &podresourcesapi.CDIDevice{Name: cdiDevice}) + for _, device := range driverState.Devices { + for _, cdiDeviceID := range device.CDIDeviceIDs { + cdiDevices = append(cdiDevices, &podresourcesapi.CDIDevice{Name: cdiDeviceID}) + } + } + resources := &podresourcesapi.ClaimResource{ + CDIDevices: cdiDevices, } - claimResources = append(claimResources, &podresourcesapi.ClaimResource{CDIDevices: cdiDevices}) + claimResources = append(claimResources, resources) } containerDynamicResource := podresourcesapi.DynamicResource{ - ClassName: containerClaimInfo.ClassName, ClaimName: containerClaimInfo.ClaimName, ClaimNamespace: containerClaimInfo.Namespace, ClaimResources: claimResources, diff --git a/pkg/kubelet/cm/cpumanager/state/checkpoint.go b/pkg/kubelet/cm/cpumanager/state/checkpoint.go index eb2bfa27eaf14..e7bebf5be9f47 100644 --- a/pkg/kubelet/cm/cpumanager/state/checkpoint.go +++ b/pkg/kubelet/cm/cpumanager/state/checkpoint.go @@ -110,8 +110,9 @@ func (cp *CPUManagerCheckpointV1) VerifyChecksum() error { hash := fnv.New32a() fmt.Fprintf(hash, "%v", object) - if cp.Checksum != checksum.Checksum(hash.Sum32()) { - return errors.ErrCorruptCheckpoint + actualCS := checksum.Checksum(hash.Sum32()) + if cp.Checksum != actualCS { + return &errors.CorruptCheckpointError{ActualCS: uint64(actualCS), ExpectedCS: uint64(cp.Checksum)} } return nil diff --git a/pkg/kubelet/cm/dra/claiminfo.go b/pkg/kubelet/cm/dra/claiminfo.go index 4ff46d7a976a8..59b17abfac1d8 100644 --- a/pkg/kubelet/cm/dra/claiminfo.go +++ b/pkg/kubelet/cm/dra/claiminfo.go @@ -17,6 +17,7 @@ limitations under the License. package dra import ( + "errors" "fmt" "sync" @@ -24,8 +25,6 @@ import ( "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/kubelet/cm/dra/state" - "k8s.io/kubernetes/pkg/kubelet/cm/util/cdi" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) // ClaimInfo holds information required @@ -33,10 +32,7 @@ import ( // +k8s:deepcopy-gen=true type ClaimInfo struct { state.ClaimInfoState - // annotations is a mapping of container annotations per DRA plugin associated with - // a prepared resource - annotations map[string][]kubecontainer.Annotation - prepared bool + prepared bool } // claimInfoCache is a cache of processed resource claims keyed by namespace/claimname. @@ -47,89 +43,45 @@ type claimInfoCache struct { } // newClaimInfoFromClaim creates a new claim info from a resource claim. -func newClaimInfoFromClaim(claim *resourceapi.ResourceClaim) *ClaimInfo { - // Grab the allocation.resourceHandles. If there are no - // allocation.resourceHandles, create a single resourceHandle with no - // content. This will trigger processing of this claim by a single - // kubelet plugin whose name matches resourceClaim.Status.DriverName. - resourceHandles := claim.Status.Allocation.ResourceHandles - if len(resourceHandles) == 0 { - resourceHandles = make([]resourceapi.ResourceHandle, 1) - } +// It verifies that the kubelet can handle the claim. +func newClaimInfoFromClaim(claim *resourceapi.ResourceClaim) (*ClaimInfo, error) { claimInfoState := state.ClaimInfoState{ - DriverName: claim.Status.DriverName, - ClassName: claim.Spec.ResourceClassName, - ClaimUID: claim.UID, - ClaimName: claim.Name, - Namespace: claim.Namespace, - PodUIDs: sets.New[string](), - ResourceHandles: resourceHandles, - CDIDevices: make(map[string][]string), + ClaimUID: claim.UID, + ClaimName: claim.Name, + Namespace: claim.Namespace, + PodUIDs: sets.New[string](), + DriverState: make(map[string]state.DriverState), + } + if claim.Status.Allocation == nil { + return nil, errors.New("not allocated") + } + for _, result := range claim.Status.Allocation.Devices.Results { + claimInfoState.DriverState[result.Driver] = state.DriverState{} } info := &ClaimInfo{ ClaimInfoState: claimInfoState, - annotations: make(map[string][]kubecontainer.Annotation), prepared: false, } - return info + return info, nil } // newClaimInfoFromClaim creates a new claim info from a checkpointed claim info state object. func newClaimInfoFromState(state *state.ClaimInfoState) *ClaimInfo { info := &ClaimInfo{ ClaimInfoState: *state.DeepCopy(), - annotations: make(map[string][]kubecontainer.Annotation), prepared: false, } - for pluginName, devices := range info.CDIDevices { - annotations, _ := cdi.GenerateAnnotations(info.ClaimUID, info.DriverName, devices) - info.annotations[pluginName] = append(info.annotations[pluginName], annotations...) - } return info } // setCDIDevices adds a set of CDI devices to the claim info. -func (info *ClaimInfo) setCDIDevices(pluginName string, cdiDevices []string) error { - // NOTE: Passing CDI device names as annotations is a temporary solution - // It will be removed after all runtimes are updated - // to get CDI device names from the ContainerConfig.CDIDevices field - annotations, err := cdi.GenerateAnnotations(info.ClaimUID, info.DriverName, cdiDevices) - if err != nil { - return fmt.Errorf("failed to generate container annotations, err: %+v", err) - } - - if info.CDIDevices == nil { - info.CDIDevices = make(map[string][]string) - } - - if info.annotations == nil { - info.annotations = make(map[string][]kubecontainer.Annotation) - } - - info.CDIDevices[pluginName] = cdiDevices - info.annotations[pluginName] = annotations - - return nil -} - -// annotationsAsList returns container annotations as a single list. -func (info *ClaimInfo) annotationsAsList() []kubecontainer.Annotation { - var lst []kubecontainer.Annotation - for _, v := range info.annotations { - lst = append(lst, v...) - } - return lst -} - -// cdiDevicesAsList returns a list of CDIDevices from the provided claim info. -func (info *ClaimInfo) cdiDevicesAsList() []kubecontainer.CDIDevice { - var cdiDevices []kubecontainer.CDIDevice - for _, devices := range info.CDIDevices { - for _, device := range devices { - cdiDevices = append(cdiDevices, kubecontainer.CDIDevice{Name: device}) - } +func (info *ClaimInfo) addDevice(driverName string, device state.Device) { + if info.DriverState == nil { + info.DriverState = make(map[string]state.DriverState) } - return cdiDevices + driverState := info.DriverState[driverName] + driverState.Devices = append(driverState.Devices, device) + info.DriverState[driverName] = driverState } // addPodReference adds a pod reference to the claim info. diff --git a/pkg/kubelet/cm/dra/claiminfo_test.go b/pkg/kubelet/cm/dra/claiminfo_test.go index b6bb619d71d7f..139ecc8c9e2d1 100644 --- a/pkg/kubelet/cm/dra/claiminfo_test.go +++ b/pkg/kubelet/cm/dra/claiminfo_test.go @@ -18,30 +18,46 @@ package dra import ( "errors" - "fmt" "path" "reflect" - "sort" "testing" "github.com/stretchr/testify/assert" + resourceapi "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/kubelet/cm/dra/state" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) // ClaimInfo test cases -func TestNewClaimInfoFromClaim(t *testing.T) { - namespace := "test-namespace" - className := "test-class" - driverName := "test-plugin" - claimUID := types.UID("claim-uid") - claimName := "test-claim" +const ( + namespace = "test-namespace" + className = "test-class" + driverName = "test-driver" + deviceName = "test-device" // name inside ResourceSlice + cdiDeviceName = "cdi-test-device" // name inside CDI spec + cdiID = "test-driver/test=cdi-test-device" // CDI device ID + poolName = "test-pool" + requestName = "test-request" + claimName = "test-claim" + claimUID = types.UID(claimName + "-uid") + podUID = "test-pod-uid" +) +var ( + device = state.Device{ + PoolName: poolName, + DeviceName: deviceName, + RequestNames: []string{requestName}, + CDIDeviceIDs: []string{cdiID}, + } + devices = []state.Device{device} +) + +func TestNewClaimInfoFromClaim(t *testing.T) { for _, test := range []struct { description string claim *resourceapi.ResourceClaim @@ -56,28 +72,41 @@ func TestNewClaimInfoFromClaim(t *testing.T) { Namespace: namespace, }, Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{}, + Devices: resourceapi.DeviceAllocationResult{ + Results: []resourceapi.DeviceRequestAllocationResult{ + { + Request: requestName, + Pool: poolName, + Device: deviceName, + Driver: driverName, + }, + }, + }, }, }, Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: className, + Devices: resourceapi.DeviceClaim{ + Requests: []resourceapi.DeviceRequest{ + { + Name: requestName, + DeviceClassName: className, + }, + }, + }, }, }, expectedResult: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClassName: className, - ClaimUID: claimUID, - ClaimName: claimName, - Namespace: claimName, - PodUIDs: sets.New[string](), - ResourceHandles: []resourceapi.ResourceHandle{ - {}, + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](), + DriverState: map[string]state.DriverState{ + driverName: {}, }, - CDIDevices: make(map[string][]string), }, + prepared: false, }, }, { @@ -89,33 +118,29 @@ func TestNewClaimInfoFromClaim(t *testing.T) { Namespace: namespace, }, Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, Allocation: &resourceapi.AllocationResult{}, }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: className, - }, + Spec: resourceapi.ResourceClaimSpec{}, }, expectedResult: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClassName: className, - ClaimUID: claimUID, - ClaimName: claimName, - Namespace: claimName, - PodUIDs: sets.New[string](), - ResourceHandles: []resourceapi.ResourceHandle{ - {}, - }, - CDIDevices: make(map[string][]string), + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](), + DriverState: map[string]state.DriverState{}, }, + prepared: false, }, }, } { t.Run(test.description, func(t *testing.T) { - result := newClaimInfoFromClaim(test.claim) - if reflect.DeepEqual(result, test.expectedResult) { - t.Errorf("Expected %v, but got %v", test.expectedResult, result) + result, err := newClaimInfoFromClaim(test.claim) + if err != nil { + t.Errorf("Unexpected error: %v", err) + } + if !reflect.DeepEqual(test.expectedResult, result) { + t.Errorf("Expected %+v, but got %+v", test.expectedResult, result) } }) } @@ -130,237 +155,95 @@ func TestNewClaimInfoFromState(t *testing.T) { { description: "successfully created object", state: &state.ClaimInfoState{ - DriverName: "test-driver", - ClassName: "test-class", - ClaimUID: "test-uid", - ClaimName: "test-claim", - Namespace: "test-namespace", - PodUIDs: sets.New[string]("test-pod-uid"), - ResourceHandles: []resourceapi.ResourceHandle{}, - CDIDevices: map[string][]string{}, - }, - }, - } { - t.Run(test.description, func(t *testing.T) { - result := newClaimInfoFromState(test.state) - if reflect.DeepEqual(result, test.expectedResult) { - t.Errorf("Expected %v, but got %v", test.expectedResult, result) - } - }) - } -} - -func TestClaimInfoSetCDIDevices(t *testing.T) { - claimUID := types.UID("claim-uid") - pluginName := "test-plugin" - device := "vendor.com/device=device1" - annotationName := fmt.Sprintf("cdi.k8s.io/%s_%s", pluginName, claimUID) - for _, test := range []struct { - description string - claimInfo *ClaimInfo - devices []string - expectedCDIDevices map[string][]string - expectedAnnotations map[string][]kubecontainer.Annotation - wantErr bool - }{ - { - description: "successfully add one device", - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: pluginName, - ClaimUID: claimUID, - }, - }, - devices: []string{device}, - expectedCDIDevices: map[string][]string{ - pluginName: {device}, - }, - expectedAnnotations: map[string][]kubecontainer.Annotation{ - pluginName: { - { - Name: annotationName, - Value: device, + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](podUID), + DriverState: map[string]state.DriverState{ + driverName: { + Devices: devices, }, }, }, - }, - { - description: "empty list of devices", - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: pluginName, - ClaimUID: claimUID, - }, - }, - devices: []string{}, - expectedCDIDevices: map[string][]string{pluginName: {}}, - expectedAnnotations: map[string][]kubecontainer.Annotation{pluginName: nil}, - }, - { - description: "incorrect device format", - claimInfo: &ClaimInfo{ + expectedResult: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - DriverName: pluginName, - ClaimUID: claimUID, - }, - }, - devices: []string{"incorrect"}, - wantErr: true, - }, - } { - t.Run(test.description, func(t *testing.T) { - err := test.claimInfo.setCDIDevices(pluginName, test.devices) - if test.wantErr { - assert.Error(t, err) - return - } - assert.NoError(t, err) - assert.Equal(t, test.expectedCDIDevices, test.claimInfo.CDIDevices) - assert.Equal(t, test.expectedAnnotations, test.claimInfo.annotations) - }) - } -} - -func TestClaimInfoAnnotationsAsList(t *testing.T) { - for _, test := range []struct { - description string - claimInfo *ClaimInfo - expectedResult []kubecontainer.Annotation - }{ - { - description: "empty annotations", - claimInfo: &ClaimInfo{ - annotations: map[string][]kubecontainer.Annotation{}, - }, - }, - { - description: "nil annotations", - claimInfo: &ClaimInfo{}, - }, - { - description: "valid annotations", - claimInfo: &ClaimInfo{ - annotations: map[string][]kubecontainer.Annotation{ - "test-plugin1": { - { - Name: "cdi.k8s.io/test-plugin1_claim-uid1", - Value: "vendor.com/device=device1", - }, - { - Name: "cdi.k8s.io/test-plugin1_claim-uid2", - Value: "vendor.com/device=device2", - }, - }, - "test-plugin2": { - { - Name: "cdi.k8s.io/test-plugin2_claim-uid1", - Value: "vendor.com/device=device1", - }, - { - Name: "cdi.k8s.io/test-plugin2_claim-uid2", - Value: "vendor.com/device=device2", + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](podUID), + DriverState: map[string]state.DriverState{ + driverName: { + Devices: devices, }, }, }, - }, - expectedResult: []kubecontainer.Annotation{ - { - Name: "cdi.k8s.io/test-plugin1_claim-uid1", - Value: "vendor.com/device=device1", - }, - { - Name: "cdi.k8s.io/test-plugin1_claim-uid2", - Value: "vendor.com/device=device2", - }, - { - Name: "cdi.k8s.io/test-plugin2_claim-uid1", - Value: "vendor.com/device=device1", - }, - { - Name: "cdi.k8s.io/test-plugin2_claim-uid2", - Value: "vendor.com/device=device2", - }, + prepared: false, }, }, } { t.Run(test.description, func(t *testing.T) { - result := test.claimInfo.annotationsAsList() - sort.Slice(result, func(i, j int) bool { - return result[i].Name < result[j].Name - }) - assert.Equal(t, test.expectedResult, result) + result := newClaimInfoFromState(test.state) + if !reflect.DeepEqual(result, test.expectedResult) { + t.Errorf("Expected %+v, but got %+v", test.expectedResult, result) + } }) } } -func TestClaimInfoCDIdevicesAsList(t *testing.T) { +func TestClaimInfoAddDevice(t *testing.T) { for _, test := range []struct { - description string - claimInfo *ClaimInfo - expectedResult []kubecontainer.CDIDevice + description string + claimInfo *ClaimInfo + device state.Device }{ { - description: "empty CDI devices", + description: "add new device", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - CDIDevices: map[string][]string{}, + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](podUID), }, + prepared: false, }, + device: device, }, { - description: "nil CDI devices", - claimInfo: &ClaimInfo{}, - }, - { - description: "valid CDI devices", + description: "other new device", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - CDIDevices: map[string][]string{ - "test-plugin1": { - "vendor.com/device=device1", - "vendor.com/device=device2", - }, - "test-plugin2": { - "vendor.com/device=device1", - "vendor.com/device=device2", - }, - }, - }, - }, - expectedResult: []kubecontainer.CDIDevice{ - { - Name: "vendor.com/device=device1", - }, - { - Name: "vendor.com/device=device1", - }, - { - Name: "vendor.com/device=device2", - }, - { - Name: "vendor.com/device=device2", + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](podUID), }, }, + device: func() state.Device { + device := device + device.PoolName += "-2" + device.DeviceName += "-2" + device.RequestNames = []string{device.RequestNames[0] + "-2"} + device.CDIDeviceIDs = []string{device.CDIDeviceIDs[0] + "-2"} + return device + }(), }, } { t.Run(test.description, func(t *testing.T) { - result := test.claimInfo.cdiDevicesAsList() - sort.Slice(result, func(i, j int) bool { - return result[i].Name < result[j].Name - }) - assert.Equal(t, test.expectedResult, result) + test.claimInfo.addDevice(driverName, test.device) + assert.Equal(t, []state.Device{test.device}, test.claimInfo.DriverState[driverName].Devices) }) } } + func TestClaimInfoAddPodReference(t *testing.T) { - podUID := types.UID("pod-uid") for _, test := range []struct { description string claimInfo *ClaimInfo expectedLen int }{ { - description: "successfully add pod reference", + description: "empty PodUIDs list", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ PodUIDs: sets.New[string](), @@ -369,16 +252,16 @@ func TestClaimInfoAddPodReference(t *testing.T) { expectedLen: 1, }, { - description: "duplicate pod reference", + description: "first pod reference", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - PodUIDs: sets.New[string](string(podUID)), + PodUIDs: sets.New[string](podUID), }, }, expectedLen: 1, }, { - description: "duplicate pod reference", + description: "second pod reference", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ PodUIDs: sets.New[string]("pod-uid1"), @@ -396,7 +279,6 @@ func TestClaimInfoAddPodReference(t *testing.T) { } func TestClaimInfoHasPodReference(t *testing.T) { - podUID := types.UID("pod-uid") for _, test := range []struct { description string claimInfo *ClaimInfo @@ -414,7 +296,7 @@ func TestClaimInfoHasPodReference(t *testing.T) { description: "claim references pod", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - PodUIDs: sets.New[string](string(podUID)), + PodUIDs: sets.New[string](podUID), }, }, expectedResult: true, @@ -431,7 +313,6 @@ func TestClaimInfoHasPodReference(t *testing.T) { } func TestClaimInfoDeletePodReference(t *testing.T) { - podUID := types.UID("pod-uid") for _, test := range []struct { description string claimInfo *ClaimInfo @@ -448,7 +329,7 @@ func TestClaimInfoDeletePodReference(t *testing.T) { description: "claim references pod", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - PodUIDs: sets.New[string](string(podUID)), + PodUIDs: sets.New[string](podUID), }, }, }, @@ -694,8 +575,8 @@ func TestClaimInfoCacheAdd(t *testing.T) { description: "claimInfo successfully added", claimInfo: &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{ - ClaimName: "test-claim", - Namespace: "test-namespace", + ClaimName: claimName, + Namespace: namespace, }, }, }, @@ -711,8 +592,6 @@ func TestClaimInfoCacheAdd(t *testing.T) { } func TestClaimInfoCacheContains(t *testing.T) { - claimName := "test-claim" - namespace := "test-namespace" for _, test := range []struct { description string claimInfo *ClaimInfo @@ -764,8 +643,6 @@ func TestClaimInfoCacheContains(t *testing.T) { } func TestClaimInfoCacheGet(t *testing.T) { - claimName := "test-claim" - namespace := "test-namespace" for _, test := range []struct { description string claimInfoCache *claimInfoCache @@ -801,8 +678,6 @@ func TestClaimInfoCacheGet(t *testing.T) { } func TestClaimInfoCacheDelete(t *testing.T) { - claimName := "test-claim" - namespace := "test-namespace" for _, test := range []struct { description string claimInfoCache *claimInfoCache @@ -833,9 +708,6 @@ func TestClaimInfoCacheDelete(t *testing.T) { } func TestClaimInfoCacheHasPodReference(t *testing.T) { - claimName := "test-claim" - namespace := "test-namespace" - uid := types.UID("test-uid") for _, test := range []struct { description string claimInfoCache *claimInfoCache @@ -849,7 +721,7 @@ func TestClaimInfoCacheHasPodReference(t *testing.T) { ClaimInfoState: state.ClaimInfoState{ ClaimName: claimName, Namespace: namespace, - PodUIDs: sets.New[string](string(uid)), + PodUIDs: sets.New[string](podUID), }, }, }, @@ -862,7 +734,7 @@ func TestClaimInfoCacheHasPodReference(t *testing.T) { }, } { t.Run(test.description, func(t *testing.T) { - assert.Equal(t, test.expectedResult, test.claimInfoCache.hasPodReference(uid)) + assert.Equal(t, test.expectedResult, test.claimInfoCache.hasPodReference(podUID)) }) } } diff --git a/pkg/kubelet/cm/dra/manager.go b/pkg/kubelet/cm/dra/manager.go index c226bb35b2285..acd925c6d3163 100644 --- a/pkg/kubelet/cm/dra/manager.go +++ b/pkg/kubelet/cm/dra/manager.go @@ -19,6 +19,7 @@ package dra import ( "context" "fmt" + "slices" "time" v1 "k8s.io/api/core/v1" @@ -32,6 +33,7 @@ import ( "k8s.io/klog/v2" drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" dra "k8s.io/kubernetes/pkg/kubelet/cm/dra/plugin" + "k8s.io/kubernetes/pkg/kubelet/cm/dra/state" "k8s.io/kubernetes/pkg/kubelet/config" kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) @@ -45,7 +47,7 @@ const defaultReconcilePeriod = 60 * time.Second // ActivePodsFunc is a function that returns a list of pods to reconcile. type ActivePodsFunc func() []*v1.Pod -// ManagerImpl is the structure in charge of managing DRA resource Plugins. +// ManagerImpl is the structure in charge of managing DRA drivers. type ManagerImpl struct { // cache contains cached claim info cache *claimInfoCache @@ -145,8 +147,8 @@ func (m *ManagerImpl) reconcileLoop() { } } -// PrepareResources attempts to prepare all of the required resource -// plugin resources for the input container, issue NodePrepareResources rpc requests +// PrepareResources attempts to prepare all of the required resources +// for the input container, issue NodePrepareResources rpc requests // for each new resource requirement, process their responses and update the cached // containerResources on success. func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { @@ -154,7 +156,7 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { resourceClaims := make(map[types.UID]*resourceapi.ResourceClaim) for i := range pod.Spec.ResourceClaims { podClaim := &pod.Spec.ResourceClaims[i] - klog.V(3).InfoS("Processing resource", "podClaim", podClaim.Name, "pod", pod.Name) + klog.V(3).InfoS("Processing resource", "pod", klog.KObj(pod), "podClaim", podClaim.Name) claimName, mustCheckOwner, err := resourceclaim.Name(pod, podClaim) if err != nil { return fmt.Errorf("prepare resource claim: %v", err) @@ -162,6 +164,7 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { if claimName == nil { // Nothing to do. + klog.V(5).InfoS("No need to prepare resources, no claim generated", "pod", klog.KObj(pod), "podClaim", podClaim.Name) continue } // Query claim object from the API server @@ -185,20 +188,20 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { pod.Name, pod.UID, *claimName, resourceClaim.UID) } - // If no container actually uses the claim, then we don't need - // to prepare it. - if !claimIsUsedByPod(podClaim, pod) { - klog.V(5).InfoS("Skipping unused resource", "claim", claimName, "pod", pod.Name) - continue - } - // Atomically perform some operations on the claimInfo cache. err = m.cache.withLock(func() error { // Get a reference to the claim info for this claim from the cache. // If there isn't one yet, then add it to the cache. claimInfo, exists := m.cache.get(resourceClaim.Name, resourceClaim.Namespace) if !exists { - claimInfo = m.cache.add(newClaimInfoFromClaim(resourceClaim)) + ci, err := newClaimInfoFromClaim(resourceClaim) + if err != nil { + return fmt.Errorf("claim %s: %w", klog.KObj(resourceClaim), err) + } + claimInfo = m.cache.add(ci) + klog.V(6).InfoS("Created new claim info cache entry", "pod", klog.KObj(pod), "podClaim", podClaim.Name, "claim", klog.KObj(resourceClaim), "claimInfoEntry", claimInfo) + } else { + klog.V(6).InfoS("Found existing claim info cache entry", "pod", klog.KObj(pod), "podClaim", podClaim.Name, "claim", klog.KObj(resourceClaim), "claimInfoEntry", claimInfo) } // Add a reference to the current pod in the claim info. @@ -214,6 +217,7 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { // If this claim is already prepared, there is no need to prepare it again. if claimInfo.isPrepared() { + klog.V(5).InfoS("Resources already prepared", "pod", klog.KObj(pod), "podClaim", podClaim.Name, "claim", klog.KObj(resourceClaim)) return nil } @@ -221,15 +225,14 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { // after NodePrepareResources GRPC succeeds resourceClaims[claimInfo.ClaimUID] = resourceClaim - // Loop through all plugins and prepare for calling NodePrepareResources. - for _, resourceHandle := range claimInfo.ResourceHandles { - claim := &drapb.Claim{ - Namespace: claimInfo.Namespace, - Uid: string(claimInfo.ClaimUID), - Name: claimInfo.ClaimName, - } - pluginName := resourceHandle.DriverName - batches[pluginName] = append(batches[pluginName], claim) + // Loop through all drivers and prepare for calling NodePrepareResources. + claim := &drapb.Claim{ + Namespace: claimInfo.Namespace, + Uid: string(claimInfo.ClaimUID), + Name: claimInfo.ClaimName, + } + for driverName := range claimInfo.DriverState { + batches[driverName] = append(batches[driverName], claim) } return nil @@ -242,16 +245,16 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { // Call NodePrepareResources for all claims in each batch. // If there is any error, processing gets aborted. // We could try to continue, but that would make the code more complex. - for pluginName, claims := range batches { + for driverName, claims := range batches { // Call NodePrepareResources RPC for all resource handles. - client, err := dra.NewDRAPluginClient(pluginName) + client, err := dra.NewDRAPluginClient(driverName) if err != nil { - return fmt.Errorf("failed to get DRA Plugin client for plugin name %s: %v", pluginName, err) + return fmt.Errorf("failed to get gRPC client for driver %s: %w", driverName, err) } response, err := client.NodePrepareResources(context.Background(), &drapb.NodePrepareResourcesRequest{Claims: claims}) if err != nil { // General error unrelated to any particular claim. - return fmt.Errorf("NodePrepareResources failed: %v", err) + return fmt.Errorf("NodePrepareResources failed: %w", err) } for claimUID, result := range response.Claims { reqClaim := lookupClaimRequest(claims, claimUID) @@ -270,8 +273,8 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error { if !exists { return fmt.Errorf("unable to get claim info for claim %s in namespace %s", claim.Name, claim.Namespace) } - if err := info.setCDIDevices(pluginName, result.GetCDIDevices()); err != nil { - return fmt.Errorf("unable to add CDI devices for plugin %s of claim %s in namespace %s", pluginName, claim.Name, claim.Namespace) + for _, device := range result.GetDevices() { + info.addDevice(driverName, state.Device{PoolName: device.PoolName, DeviceName: device.DeviceName, RequestNames: device.RequestNames, CDIDeviceIDs: device.CDIDeviceIDs}) } return nil }) @@ -321,53 +324,26 @@ func lookupClaimRequest(claims []*drapb.Claim, claimUID string) *drapb.Claim { return nil } -func claimIsUsedByPod(podClaim *v1.PodResourceClaim, pod *v1.Pod) bool { - if claimIsUsedByContainers(podClaim, pod.Spec.InitContainers) { - return true - } - if claimIsUsedByContainers(podClaim, pod.Spec.Containers) { - return true - } - return false -} - -func claimIsUsedByContainers(podClaim *v1.PodResourceClaim, containers []v1.Container) bool { - for i := range containers { - if claimIsUsedByContainer(podClaim, &containers[i]) { - return true - } - } - return false -} - -func claimIsUsedByContainer(podClaim *v1.PodResourceClaim, container *v1.Container) bool { - for _, c := range container.Resources.Claims { - if c.Name == podClaim.Name { - return true - } - } - return false -} - // GetResources gets a ContainerInfo object from the claimInfo cache. // This information is used by the caller to update a container config. func (m *ManagerImpl) GetResources(pod *v1.Pod, container *v1.Container) (*ContainerInfo, error) { - annotations := []kubecontainer.Annotation{} cdiDevices := []kubecontainer.CDIDevice{} - for i, podResourceClaim := range pod.Spec.ResourceClaims { - claimName, _, err := resourceclaim.Name(pod, &pod.Spec.ResourceClaims[i]) + for i := range pod.Spec.ResourceClaims { + podClaim := &pod.Spec.ResourceClaims[i] + claimName, _, err := resourceclaim.Name(pod, podClaim) if err != nil { - return nil, fmt.Errorf("list resource claims: %v", err) + return nil, fmt.Errorf("list resource claims: %w", err) } // The claim name might be nil if no underlying resource claim // was generated for the referenced claim. There are valid use // cases when this might happen, so we simply skip it. if claimName == nil { + klog.V(5).InfoS("No CDI devices, no claim generated", "pod", klog.KObj(pod), "podClaimName", podClaim.Name) continue } for _, claim := range container.Resources.Claims { - if podResourceClaim.Name != claim.Name { + if podClaim.Name != claim.Name { continue } @@ -377,13 +353,17 @@ func (m *ManagerImpl) GetResources(pod *v1.Pod, container *v1.Container) (*Conta return fmt.Errorf("unable to get claim info for claim %s in namespace %s", *claimName, pod.Namespace) } - claimAnnotations := claimInfo.annotationsAsList() - klog.V(3).InfoS("Add resource annotations", "claim", *claimName, "annotations", claimAnnotations) - annotations = append(annotations, claimAnnotations...) - - devices := claimInfo.cdiDevicesAsList() - klog.V(3).InfoS("Add CDI devices", "claim", *claimName, "CDI devices", devices) - cdiDevices = append(cdiDevices, devices...) + // As of Kubernetes 1.31, CDI device IDs are not passed via annotations anymore. + for _, driverData := range claimInfo.DriverState { + for _, device := range driverData.Devices { + claimRequestName := claim.Request + if claimRequestName == "" || len(device.RequestNames) == 0 || slices.Contains(device.RequestNames, claimRequestName) { + for _, cdiDeviceID := range device.CDIDeviceIDs { + cdiDevices = append(cdiDevices, kubecontainer.CDIDevice{Name: cdiDeviceID}) + } + } + } + } return nil }) @@ -393,10 +373,11 @@ func (m *ManagerImpl) GetResources(pod *v1.Pod, container *v1.Container) (*Conta } } - return &ContainerInfo{Annotations: annotations, CDIDevices: cdiDevices}, nil + klog.V(5).InfoS("Determined CDI devices for pod", "pod", klog.KObj(pod), "cdiDevices", cdiDevices) + return &ContainerInfo{CDIDevices: cdiDevices}, nil } -// UnprepareResources calls a plugin's NodeUnprepareResource API for each resource claim owned by a pod. +// UnprepareResources calls a driver's NodeUnprepareResource API for each resource claim owned by a pod. // This function is idempotent and may be called multiple times against the same pod. // As such, calls to the underlying NodeUnprepareResource API are skipped for claims that have // already been successfully unprepared. @@ -405,7 +386,7 @@ func (m *ManagerImpl) UnprepareResources(pod *v1.Pod) error { for i := range pod.Spec.ResourceClaims { claimName, _, err := resourceclaim.Name(pod, &pod.Spec.ResourceClaims[i]) if err != nil { - return fmt.Errorf("unprepare resource claim: %v", err) + return fmt.Errorf("unprepare resource claim: %w", err) } // The claim name might be nil if no underlying resource claim // was generated for the referenced claim. There are valid use @@ -448,15 +429,14 @@ func (m *ManagerImpl) unprepareResources(podUID types.UID, namespace string, cla // after NodeUnprepareResources GRPC succeeds claimNamesMap[claimInfo.ClaimUID] = claimInfo.ClaimName - // Loop through all plugins and prepare for calling NodeUnprepareResources. - for _, resourceHandle := range claimInfo.ResourceHandles { - claim := &drapb.Claim{ - Namespace: claimInfo.Namespace, - Uid: string(claimInfo.ClaimUID), - Name: claimInfo.ClaimName, - } - pluginName := resourceHandle.DriverName - batches[pluginName] = append(batches[pluginName], claim) + // Loop through all drivers and prepare for calling NodeUnprepareResources. + claim := &drapb.Claim{ + Namespace: claimInfo.Namespace, + Uid: string(claimInfo.ClaimUID), + Name: claimInfo.ClaimName, + } + for driverName := range claimInfo.DriverState { + batches[driverName] = append(batches[driverName], claim) } return nil @@ -469,16 +449,16 @@ func (m *ManagerImpl) unprepareResources(podUID types.UID, namespace string, cla // Call NodeUnprepareResources for all claims in each batch. // If there is any error, processing gets aborted. // We could try to continue, but that would make the code more complex. - for pluginName, claims := range batches { + for driverName, claims := range batches { // Call NodeUnprepareResources RPC for all resource handles. - client, err := dra.NewDRAPluginClient(pluginName) + client, err := dra.NewDRAPluginClient(driverName) if err != nil { - return fmt.Errorf("failed to get DRA Plugin client for plugin name %s: %v", pluginName, err) + return fmt.Errorf("get gRPC client for DRA driver %s: %w", driverName, err) } response, err := client.NodeUnprepareResources(context.Background(), &drapb.NodeUnprepareResourcesRequest{Claims: claims}) if err != nil { // General error unrelated to any particular claim. - return fmt.Errorf("NodeUnprepareResources failed: %v", err) + return fmt.Errorf("NodeUnprepareResources failed: %w", err) } for claimUID, result := range response.Claims { @@ -501,7 +481,9 @@ func (m *ManagerImpl) unprepareResources(podUID types.UID, namespace string, cla err := m.cache.withLock(func() error { // Delete all claimInfos from the cache that have just been unprepared. for _, claimName := range claimNamesMap { + claimInfo, _ := m.cache.get(claimName, namespace) m.cache.delete(claimName, namespace) + klog.V(6).InfoS("Deleted claim info cache entry", "claim", klog.KRef(namespace, claimName), "claimInfoEntry", claimInfo) } // Atomically sync the cache back to the checkpoint. @@ -532,7 +514,7 @@ func (m *ManagerImpl) GetContainerClaimInfos(pod *v1.Pod, container *v1.Containe for i, podResourceClaim := range pod.Spec.ResourceClaims { claimName, _, err := resourceclaim.Name(pod, &pod.Spec.ResourceClaims[i]) if err != nil { - return nil, fmt.Errorf("determine resource claim information: %v", err) + return nil, fmt.Errorf("determine resource claim information: %w", err) } for _, claim := range container.Resources.Claims { diff --git a/pkg/kubelet/cm/dra/manager_test.go b/pkg/kubelet/cm/dra/manager_test.go index 848ef76b6ba56..7ca16a4ae5ccb 100644 --- a/pkg/kubelet/cm/dra/manager_test.go +++ b/pkg/kubelet/cm/dra/manager_test.go @@ -28,7 +28,9 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "google.golang.org/grpc" + v1 "k8s.io/api/core/v1" resourceapi "k8s.io/api/resource/v1alpha3" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,12 +41,12 @@ import ( drapb "k8s.io/kubelet/pkg/apis/dra/v1alpha4" "k8s.io/kubernetes/pkg/kubelet/cm/dra/plugin" "k8s.io/kubernetes/pkg/kubelet/cm/dra/state" - kubecontainer "k8s.io/kubernetes/pkg/kubelet/container" ) const ( - driverName = "test-cdi-device" driverClassName = "test" + podName = "test-pod" + containerName = "test-container" ) type fakeDRADriverGRPCServer struct { @@ -65,12 +67,19 @@ func (s *fakeDRADriverGRPCServer) NodePrepareResources(ctx context.Context, req } if s.prepareResourcesResponse == nil { - deviceName := "claim-" + req.Claims[0].Uid - result := s.driverName + "/" + driverClassName + "=" + deviceName + cdiDeviceName := "claim-" + req.Claims[0].Uid + cdiID := s.driverName + "/" + driverClassName + "=" + cdiDeviceName return &drapb.NodePrepareResourcesResponse{ Claims: map[string]*drapb.NodePrepareResourceResponse{ req.Claims[0].Uid: { - CDIDevices: []string{result}, + Devices: []*drapb.Device{ + { + PoolName: poolName, + DeviceName: deviceName, + RequestNames: []string{req.Claims[0].Name}, + CDIDeviceIDs: []string{cdiID}, + }, + }, }, }, }, nil @@ -193,122 +202,153 @@ func TestNewManagerImpl(t *testing.T) { } } -func TestGetResources(t *testing.T) { - kubeClient := fake.NewSimpleClientset() - resourceClaimName := "test-pod-claim-1" - - for _, test := range []struct { - description string - container *v1.Container - pod *v1.Pod - claimInfo *ClaimInfo - wantErr bool - }{ - { - description: "claim info with annotations", - container: &v1.Container{ - Name: "test-container", - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-1", +// genTestPod generates pod object +func genTestPod() *v1.Pod { + claimName := claimName + return &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: podName, + Namespace: namespace, + UID: podUID, + }, + Spec: v1.PodSpec{ + ResourceClaims: []v1.PodResourceClaim{ + { + Name: claimName, + ResourceClaimName: &claimName, + }, + }, + Containers: []v1.Container{ + { + Resources: v1.ResourceRequirements{ + Claims: []v1.ResourceClaim{ + { + Name: claimName, + }, }, }, }, }, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-1", - ResourceClaimName: &resourceClaimName, - }, + }, + } +} + +// getTestClaim generates resource claim object +func genTestClaim(name, driver, device, podUID string) *resourceapi.ResourceClaim { + return &resourceapi.ResourceClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + UID: types.UID(fmt.Sprintf("%s-uid", name)), + }, + Spec: resourceapi.ResourceClaimSpec{ + Devices: resourceapi.DeviceClaim{ + Requests: []resourceapi.DeviceRequest{ + { + Name: requestName, + DeviceClassName: className, }, }, }, - claimInfo: &ClaimInfo{ - annotations: map[string][]kubecontainer.Annotation{ - "test-plugin": { + }, + Status: resourceapi.ResourceClaimStatus{ + Allocation: &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: []resourceapi.DeviceRequestAllocationResult{ { - Name: "test-annotation", - Value: "123", + Request: requestName, + Pool: poolName, + Device: device, + Driver: driver, }, }, }, - ClaimInfoState: state.ClaimInfoState{ - ClaimName: "test-pod-claim-1", - CDIDevices: map[string][]string{ - driverName: {"123"}, - }, - Namespace: "test-namespace", + }, + ReservedFor: []resourceapi.ResourceClaimConsumerReference{ + {UID: types.UID(podUID)}, + }, + }, + } +} + +// genTestClaimInfo generates claim info object +func genTestClaimInfo(podUIDs []string, prepared bool) *ClaimInfo { + return &ClaimInfo{ + ClaimInfoState: state.ClaimInfoState{ + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](podUIDs...), + DriverState: map[string]state.DriverState{ + driverName: { + Devices: []state.Device{{ + PoolName: poolName, + DeviceName: deviceName, + RequestNames: []string{requestName}, + CDIDeviceIDs: []string{cdiID}, + }}, }, }, }, + prepared: prepared, + } +} + +// genClaimInfoState generates claim info state object +func genClaimInfoState(cdiDeviceID string) state.ClaimInfoState { + s := state.ClaimInfoState{ + ClaimUID: claimUID, + ClaimName: claimName, + Namespace: namespace, + PodUIDs: sets.New[string](podUID), + DriverState: map[string]state.DriverState{ + driverName: {}, + }, + } + if cdiDeviceID != "" { + s.DriverState[driverName] = state.DriverState{Devices: []state.Device{{PoolName: poolName, DeviceName: deviceName, RequestNames: []string{requestName}, CDIDeviceIDs: []string{cdiDeviceID}}}} + } + return s +} + +func TestGetResources(t *testing.T) { + kubeClient := fake.NewSimpleClientset() + + for _, test := range []struct { + description string + container *v1.Container + pod *v1.Pod + claimInfo *ClaimInfo + wantErr bool + }{ { - description: "claim info without annotations", + description: "claim info with devices", container: &v1.Container{ - Name: "test-container", + Name: containerName, Resources: v1.ResourceRequirements{ Claims: []v1.ResourceClaim{ { - Name: "test-pod-claim-1", - }, - }, - }, - }, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-1", - ResourceClaimName: &resourceClaimName, + Name: claimName, }, }, }, }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - ClaimName: "test-pod-claim-1", - CDIDevices: map[string][]string{ - driverName: {"123"}, - }, - Namespace: "test-namespace", - }, - }, + pod: genTestPod(), + claimInfo: genTestClaimInfo(nil, false), }, { - description: "no claim info", + description: "nil claiminfo", container: &v1.Container{ - Name: "test-container", + Name: containerName, Resources: v1.ResourceRequirements{ Claims: []v1.ResourceClaim{ { - Name: "test-pod-claim-1", - }, - }, - }, - }, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-1", + Name: claimName, }, }, }, }, + pod: genTestPod(), wantErr: true, }, } { @@ -323,11 +363,10 @@ func TestGetResources(t *testing.T) { containerInfo, err := manager.GetResources(test.pod, test.container) if test.wantErr { assert.Error(t, err) - return + } else { + require.NoError(t, err) + assert.Equal(t, test.claimInfo.DriverState[driverName].Devices[0].CDIDeviceIDs[0], containerInfo.CDIDevices[0].Name) } - - assert.NoError(t, err) - assert.Equal(t, test.claimInfo.CDIDevices[driverName][0], containerInfo.CDIDevices[0].Name) }) } } @@ -337,560 +376,165 @@ func getFakeNode() (*v1.Node, error) { } func TestPrepareResources(t *testing.T) { + claimName := claimName fakeKubeClient := fake.NewSimpleClientset() for _, test := range []struct { - description string - driverName string - pod *v1.Pod - claimInfo *ClaimInfo - resourceClaim *resourceapi.ResourceClaim - resp *drapb.NodePrepareResourcesResponse - wantErr bool - wantTimeout bool - wantResourceSkipped bool - expectedCDIDevices []string - ExpectedPrepareCalls uint32 + description string + driverName string + pod *v1.Pod + claimInfo *ClaimInfo + claim *resourceapi.ResourceClaim + resp *drapb.NodePrepareResourcesResponse + wantTimeout bool + wantResourceSkipped bool + + expectedErrMsg string + expectedClaimInfoState state.ClaimInfoState + expectedPrepareCalls uint32 }{ { - description: "failed to fetch ResourceClaim", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-0", - - ResourceClaimName: func() *string { - s := "test-pod-claim-0" - return &s - }(), - }, - }, - }, - }, - wantErr: true, + description: "claim doesn't exist", + driverName: driverName, + pod: genTestPod(), + expectedErrMsg: "failed to fetch ResourceClaim ", }, { - description: "plugin does not exist", - driverName: "this-plugin-does-not-exist", - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-1", - ResourceClaimName: func() *string { - s := "test-pod-claim-1" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-1", - }, - }, - }, - }, - }, - }, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-1", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, - }, - }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, - }, - }, - wantErr: true, + description: "unknown driver", + pod: genTestPod(), + claim: genTestClaim(claimName, "unknown driver", deviceName, podUID), + expectedErrMsg: "plugin name unknown driver not found in the list of registered DRA plugins", }, { - description: "should prepare resources, driver returns nil value", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-nil", - ResourceClaimName: func() *string { - s := "test-pod-claim-nil" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-nil", - }, - }, - }, - }, - }, - }, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-nil", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, - }, - }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, - }, - }, - resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{"test-reserved": nil}}, - expectedCDIDevices: []string{}, - ExpectedPrepareCalls: 1, + description: "should prepare resources, driver returns nil value", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{string(claimUID): nil}}, + expectedClaimInfoState: genClaimInfoState(""), + expectedPrepareCalls: 1, + }, + { + description: "driver returns empty result", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{}}, + expectedPrepareCalls: 1, + expectedErrMsg: "NodePrepareResources left out 1 claims", + }, + { + description: "pod is not allowed to use resource claim", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, ""), + expectedErrMsg: "is not allowed to use resource claim ", }, { - description: "should prepare resources, driver returns empty result", + description: "no container uses the claim", driverName: driverName, pod: &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", + Name: podName, + Namespace: namespace, + UID: podUID, }, Spec: v1.PodSpec{ ResourceClaims: []v1.PodResourceClaim{ { - Name: "test-pod-claim-empty", - ResourceClaimName: func() *string { - s := "test-pod-claim-empty" - return &s - }(), + Name: claimName, + ResourceClaimName: &claimName, }, }, Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-empty", - }, - }, - }, - }, + {}, }, }, }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-empty", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, + claim: genTestClaim(claimName, driverName, deviceName, podUID), + expectedPrepareCalls: 1, + expectedClaimInfoState: genClaimInfoState(cdiID), + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{ + string(claimUID): { + Devices: []*drapb.Device{ + { + PoolName: poolName, + DeviceName: deviceName, + RequestNames: []string{requestName}, + CDIDeviceIDs: []string{cdiID}, }, }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, }, - }, - resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{"test-reserved": nil}}, - expectedCDIDevices: []string{}, - ExpectedPrepareCalls: 1, + }}, }, { - description: "pod is not allowed to use resource claim", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ + description: "resource already prepared", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + claimInfo: genTestClaimInfo([]string{podUID}, true), + expectedClaimInfoState: genClaimInfoState(cdiID), + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{ + string(claimUID): { + Devices: []*drapb.Device{ { - Name: "test-pod-claim-2", - ResourceClaimName: func() *string { - s := "test-pod-claim-2" - return &s - }(), - }, - }, - }, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-2", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, + PoolName: poolName, + DeviceName: deviceName, + RequestNames: []string{requestName}, + CDIDeviceIDs: []string{cdiID}, }, }, }, - }, - wantErr: true, + }}, }, { - description: "no container actually uses the claim", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ + description: "should timeout", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + wantTimeout: true, + expectedPrepareCalls: 1, + expectedErrMsg: "NodePrepareResources failed: rpc error: code = DeadlineExceeded desc = context deadline exceeded", + }, + { + description: "should prepare resource, claim not in cache", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + expectedClaimInfoState: genClaimInfoState(cdiID), + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{ + string(claimUID): { + Devices: []*drapb.Device{ { - Name: "test-pod-claim-3", - ResourceClaimName: func() *string { - s := "test-pod-claim-3" - return &s - }(), - }, - }, - }, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-3", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, + PoolName: poolName, + DeviceName: deviceName, + RequestNames: []string{requestName}, + CDIDeviceIDs: []string{cdiID}, }, }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, }, - }, - wantResourceSkipped: true, + }}, + expectedPrepareCalls: 1, }, { - description: "resource already prepared", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-4", - ResourceClaimName: func() *string { - s := "test-pod-claim-4" - return &s - }(), - }, - }, - Containers: []v1.Container{ + description: "resource already prepared", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + claimInfo: genTestClaimInfo([]string{podUID}, true), + expectedClaimInfoState: genClaimInfoState(cdiID), + resp: &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{ + string(claimUID): { + Devices: []*drapb.Device{ { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-4", - }, - }, - }, + PoolName: poolName, + DeviceName: deviceName, + RequestNames: []string{requestName}, + CDIDeviceIDs: []string{cdiID}, }, }, }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClaimName: "test-pod-claim-4", - Namespace: "test-namespace", - PodUIDs: sets.Set[string]{"test-another-pod-reserved": sets.Empty{}}, - }, - prepared: true, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-4", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, - }, - }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, - }, - }, - expectedCDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}, - wantResourceSkipped: true, - }, - { - description: "should timeout", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-5", - ResourceClaimName: func() *string { - s := "test-pod-claim-5" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-5", - }, - }, - }, - }, - }, - }, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-5", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, - }, - }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, - }, - }, - resp: &drapb.NodePrepareResourcesResponse{ - Claims: map[string]*drapb.NodePrepareResourceResponse{ - "test-reserved": {CDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}}, - }, - }, - wantErr: true, - wantTimeout: true, - ExpectedPrepareCalls: 1, - }, - { - description: "should prepare resource, claim not in cache", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-6", - ResourceClaimName: func() *string { - s := "test-pod-claim-6" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-6", - }, - }, - }, - }, - }, - }, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim-6", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, - }, - }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, - }, - }, - resp: &drapb.NodePrepareResourcesResponse{ - Claims: map[string]*drapb.NodePrepareResourceResponse{ - "test-reserved": {CDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}}, - }, - }, - expectedCDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}, - ExpectedPrepareCalls: 1, - }, - { - description: "should prepare resource. claim in cache, manager did not prepare resource", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim", - ResourceClaimName: func() *string { - s := "test-pod-claim" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim", - }, - }, - }, - }, - }, - }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClassName: "test-class", - ClaimName: "test-pod-claim", - ClaimUID: "test-reserved", - Namespace: "test-namespace", - PodUIDs: sets.Set[string]{"test-reserved": sets.Empty{}}, - ResourceHandles: []resourceapi.ResourceHandle{{Data: "test-data", DriverName: driverName}}, - }, - annotations: make(map[string][]kubecontainer.Annotation), - prepared: false, - }, - resourceClaim: &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod-claim", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, - }, - }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: "test-reserved"}, - }, - }, - }, - resp: &drapb.NodePrepareResourcesResponse{ - Claims: map[string]*drapb.NodePrepareResourceResponse{ - "test-reserved": {CDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}}, - }, - }, - expectedCDIDevices: []string{fmt.Sprintf("%s/%s=claim-test-reserved", driverName, driverClassName)}, - ExpectedPrepareCalls: 1, + }}, }, } { t.Run(test.description, func(t *testing.T) { @@ -904,10 +548,13 @@ func TestPrepareResources(t *testing.T) { cache: cache, } - if test.resourceClaim != 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) + if test.claim != nil { + if _, err := fakeKubeClient.ResourceV1alpha3().ResourceClaims(test.pod.Namespace).Create(context.Background(), test.claim, metav1.CreateOptions{}); err != nil { + t.Fatalf("failed to create ResourceClaim %s: %+v", test.claim.Name, err) } + defer func() { + require.NoError(t, fakeKubeClient.ResourceV1alpha3().ResourceClaims(test.pod.Namespace).Delete(context.Background(), test.claim.Name, metav1.DeleteOptions{})) + }() } var pluginClientTimeout *time.Duration @@ -934,17 +581,22 @@ func TestPrepareResources(t *testing.T) { err = manager.PrepareResources(test.pod) - assert.Equal(t, test.ExpectedPrepareCalls, draServerInfo.server.prepareResourceCalls.Load()) + assert.Equal(t, test.expectedPrepareCalls, draServerInfo.server.prepareResourceCalls.Load()) - if test.wantErr { + if test.expectedErrMsg != "" { assert.Error(t, err) - return // PrepareResources returned an error so stopping the subtest here - } else if test.wantResourceSkipped { - assert.NoError(t, err) - return // resource skipped so no need to continue + if err != nil { + assert.Contains(t, err.Error(), test.expectedErrMsg) + } + return // PrepareResources returned an error so stopping the test case here } assert.NoError(t, err) + + if test.wantResourceSkipped { + return // resource skipped so no need to continue + } + // check the cache contains the expected claim info claimName, _, err := resourceclaim.Name(test.pod, &test.pod.Spec.ResourceClaims[0]) if err != nil { @@ -954,320 +606,84 @@ func TestPrepareResources(t *testing.T) { if !ok { t.Fatalf("claimInfo not found in cache for claim %s", *claimName) } - if claimInfo.DriverName != test.resourceClaim.Status.DriverName { - t.Fatalf("driverName mismatch: expected %s, got %s", test.resourceClaim.Status.DriverName, claimInfo.DriverName) - } - if claimInfo.ClassName != test.resourceClaim.Spec.ResourceClassName { - t.Fatalf("resourceClassName mismatch: expected %s, got %s", test.resourceClaim.Spec.ResourceClassName, claimInfo.ClassName) - } if len(claimInfo.PodUIDs) != 1 || !claimInfo.PodUIDs.Has(string(test.pod.UID)) { t.Fatalf("podUIDs mismatch: expected [%s], got %v", test.pod.UID, claimInfo.PodUIDs) } - assert.ElementsMatchf(t, claimInfo.CDIDevices[test.resourceClaim.Status.DriverName], test.expectedCDIDevices, - "cdiDevices mismatch: expected [%v], got %v", test.expectedCDIDevices, claimInfo.CDIDevices[test.resourceClaim.Status.DriverName]) + + assert.Equal(t, test.expectedClaimInfoState, claimInfo.ClaimInfoState) }) } } func TestUnprepareResources(t *testing.T) { fakeKubeClient := fake.NewSimpleClientset() - for _, test := range []struct { - description string - driverName string - pod *v1.Pod - claimInfo *ClaimInfo - resp *drapb.NodeUnprepareResourcesResponse - wantErr bool - wantTimeout bool - wantResourceSkipped bool + description string + driverName string + pod *v1.Pod + claimInfo *ClaimInfo + claim *resourceapi.ResourceClaim + resp *drapb.NodeUnprepareResourcesResponse + wantTimeout bool + wantResourceSkipped bool + expectedUnprepareCalls uint32 + expectedErrMsg string }{ { - description: "plugin does not exist", - driverName: "this-plugin-does-not-exist", - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "another-claim-test", - ResourceClaimName: func() *string { - s := "another-claim-test" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "another-claim-test", - }, - }, - }, - }, - }, - }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClaimName: "another-claim-test", - Namespace: "test-namespace", - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: driverName, - Data: "test data", - }, - }, - }, - }, - wantErr: true, + description: "unknown driver", + pod: genTestPod(), + claim: genTestClaim(claimName, "unknown driver", deviceName, podUID), + claimInfo: genTestClaimInfo([]string{podUID}, true), + expectedErrMsg: "plugin name test-driver not found in the list of registered DRA plugins", }, { - description: "resource claim referenced by other pod(s)", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-1", - ResourceClaimName: func() *string { - s := "test-pod-claim-1" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-1", - }, - }, - }, - }, - }, - }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClaimName: "test-pod-claim-1", - Namespace: "test-namespace", - PodUIDs: sets.Set[string]{"test-reserved": sets.Empty{}, "test-reserved-2": sets.Empty{}}, - }, - }, + description: "resource claim referenced by other pod(s)", + driverName: driverName, + pod: genTestPod(), + claimInfo: genTestClaimInfo([]string{podUID, "another-pod-uid"}, true), wantResourceSkipped: true, }, { - description: "should timeout", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-2", - ResourceClaimName: func() *string { - s := "test-pod-claim-2" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-2", - }, - }, - }, - }, - }, - }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClaimName: "test-pod-claim-2", - Namespace: "test-namespace", - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: driverName, - Data: "test data", - }, - }, - }, - }, - resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"test-reserved": {}}}, - wantErr: true, + description: "should timeout", + driverName: driverName, + pod: genTestPod(), + claimInfo: genTestClaimInfo([]string{podUID}, true), wantTimeout: true, expectedUnprepareCalls: 1, + expectedErrMsg: "context deadline exceeded", }, { - description: "should unprepare resource, claim previously prepared by currently running manager", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-3", - ResourceClaimName: func() *string { - s := "test-pod-claim-3" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-3", - }, - }, - }, - }, - }, - }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClaimName: "test-pod-claim-3", - Namespace: "test-namespace", - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: driverName, - Data: "test data", - }, - }, - }, - prepared: true, - }, - resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"": {}}}, + description: "should fail when driver returns empty response", + driverName: driverName, + pod: genTestPod(), + claimInfo: genTestClaimInfo([]string{podUID}, true), + resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{}}, expectedUnprepareCalls: 1, + expectedErrMsg: "NodeUnprepareResources left out 1 claims", }, { - description: "should unprepare resource, claim previously was not prepared by currently running manager", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim", - ResourceClaimName: func() *string { - s := "test-pod-claim" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim", - }, - }, - }, - }, - }, - }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClaimName: "test-pod-claim", - Namespace: "test-namespace", - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: driverName, - Data: "test data", - }, - }, - }, - prepared: false, - }, - resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"": {}}}, + description: "should unprepare resource", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + claimInfo: genTestClaimInfo([]string{podUID}, false), expectedUnprepareCalls: 1, }, { - description: "should unprepare resource, driver returns nil value", - driverName: driverName, - pod: &v1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: "test-pod", - Namespace: "test-namespace", - UID: "test-reserved", - }, - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "test-pod-claim-nil", - ResourceClaimName: func() *string { - s := "test-pod-claim-nil" - return &s - }(), - }, - }, - Containers: []v1.Container{ - { - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "test-pod-claim-nil", - }, - }, - }, - }, - }, - }, - }, - claimInfo: &ClaimInfo{ - ClaimInfoState: state.ClaimInfoState{ - DriverName: driverName, - ClaimName: "test-pod-claim-nil", - Namespace: "test-namespace", - ClaimUID: "test-reserved", - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: driverName, - Data: "test data", - }, - }, - }, - prepared: true, - }, - resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{"test-reserved": nil}}, + description: "should unprepare already prepared resource", + driverName: driverName, + pod: genTestPod(), + claim: genTestClaim(claimName, driverName, deviceName, podUID), + claimInfo: genTestClaimInfo([]string{podUID}, true), + expectedUnprepareCalls: 1, + }, + { + description: "should unprepare resource when driver returns nil value", + driverName: driverName, + pod: genTestPod(), + claimInfo: genTestClaimInfo([]string{podUID}, true), + resp: &drapb.NodeUnprepareResourcesResponse{Claims: map[string]*drapb.NodeUnprepareResourceResponse{string(claimUID): nil}}, expectedUnprepareCalls: 1, }, } { @@ -1308,15 +724,20 @@ func TestUnprepareResources(t *testing.T) { assert.Equal(t, test.expectedUnprepareCalls, draServerInfo.server.unprepareResourceCalls.Load()) - if test.wantErr { + if test.expectedErrMsg != "" { assert.Error(t, err) - return // UnprepareResources returned an error so stopping the subtest here - } else if test.wantResourceSkipped { - assert.NoError(t, err) - return // resource skipped so no need to continue + if err != nil { + assert.Contains(t, err.Error(), test.expectedErrMsg) + } + return // PrepareResources returned an error so stopping the test case here } assert.NoError(t, err) + + if test.wantResourceSkipped { + return // resource skipped so no need to continue + } + // Check that the cache has been updated correctly claimName, _, err := resourceclaim.Name(test.pod, &test.pod.Spec.ResourceClaims[0]) if err != nil { @@ -1342,10 +763,6 @@ func TestPodMightNeedToUnprepareResources(t *testing.T) { cache: cache, } - claimName := "test-claim" - podUID := "test-pod-uid" - namespace := "test-namespace" - claimInfo := &ClaimInfo{ ClaimInfoState: state.ClaimInfoState{PodUIDs: sets.New(podUID), ClaimName: claimName, Namespace: namespace}, } @@ -1359,81 +776,89 @@ func TestPodMightNeedToUnprepareResources(t *testing.T) { } func TestGetContainerClaimInfos(t *testing.T) { - cache, err := newClaimInfoCache(t.TempDir(), draManagerStateFileName) - if err != nil { - t.Fatalf("error occur:%v", err) - } - manager := &ManagerImpl{ - cache: cache, - } - - resourceClaimName := "test-resource-claim-1" - resourceClaimName2 := "test-resource-claim-2" + for _, test := range []struct { + description string + pod *v1.Pod + claimInfo *ClaimInfo - for i, test := range []struct { expectedClaimName string - pod *v1.Pod - container *v1.Container - claimInfo *ClaimInfo + expectedErrMsg string }{ { - expectedClaimName: resourceClaimName, - pod: &v1.Pod{ - Spec: v1.PodSpec{ - ResourceClaims: []v1.PodResourceClaim{ - { - Name: "claim1", - ResourceClaimName: &resourceClaimName, - }, - }, - }, - }, - container: &v1.Container{ - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ - { - Name: "claim1", - }, - }, - }, - }, - claimInfo: &ClaimInfo{ClaimInfoState: state.ClaimInfoState{ClaimName: resourceClaimName}}, + description: "should get claim info", + expectedClaimName: claimName, + pod: genTestPod(), + claimInfo: genTestClaimInfo([]string{podUID}, false), + }, + { + description: "should fail when claim info not found", + pod: genTestPod(), + claimInfo: &ClaimInfo{}, + expectedErrMsg: "unable to get claim info for claim ", }, { - expectedClaimName: resourceClaimName2, + description: "should fail when none of the supported fields are set", pod: &v1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: podName, + Namespace: namespace, + UID: podUID, + }, Spec: v1.PodSpec{ ResourceClaims: []v1.PodResourceClaim{ { - Name: "claim2", - ResourceClaimName: &resourceClaimName2, + Name: claimName, + // missing ResourceClaimName or ResourceClaimTemplateName }, }, - }, - }, - container: &v1.Container{ - Resources: v1.ResourceRequirements{ - Claims: []v1.ResourceClaim{ + Containers: []v1.Container{ { - Name: "claim2", + Resources: v1.ResourceRequirements{ + Claims: []v1.ResourceClaim{ + { + Name: claimName, + }, + }, + }, }, }, }, }, - claimInfo: &ClaimInfo{ClaimInfoState: state.ClaimInfoState{ClaimName: resourceClaimName2}}, + claimInfo: genTestClaimInfo([]string{podUID}, false), + expectedErrMsg: "none of the supported fields are set", + }, + { + description: "should fail when claim info is not cached", + pod: genTestPod(), + expectedErrMsg: "unable to get claim info for claim ", }, } { - t.Run(fmt.Sprintf("test-%d", i), func(t *testing.T) { - manager.cache.add(test.claimInfo) + t.Run(test.description, func(t *testing.T) { + cache, err := newClaimInfoCache(t.TempDir(), draManagerStateFileName) + if err != nil { + t.Fatalf("error occur:%v", err) + } + manager := &ManagerImpl{ + cache: cache, + } - fakeClaimInfos, err := manager.GetContainerClaimInfos(test.pod, test.container) - assert.NoError(t, err) - assert.Len(t, fakeClaimInfos, 1) - assert.Equal(t, test.expectedClaimName, fakeClaimInfos[0].ClaimInfoState.ClaimName) + if test.claimInfo != nil { + manager.cache.add(test.claimInfo) + } + + claimInfos, err := manager.GetContainerClaimInfos(test.pod, &test.pod.Spec.Containers[0]) + + if test.expectedErrMsg != "" { + assert.Error(t, err) + if err != nil { + assert.Contains(t, err.Error(), test.expectedErrMsg) + } + return + } - manager.cache.delete(test.pod.Spec.ResourceClaims[0].Name, "default") - _, err = manager.GetContainerClaimInfos(test.pod, test.container) assert.NoError(t, err) + assert.Len(t, claimInfos, 1) + assert.Equal(t, test.expectedClaimName, claimInfos[0].ClaimInfoState.ClaimName) }) } } @@ -1476,13 +901,12 @@ func TestParallelPrepareUnprepareResources(t *testing.T) { wgStart.Wait() // Wait to start all goroutines at the same time var err error - nameSpace := "test-namespace-parallel" claimName := fmt.Sprintf("test-pod-claim-%d", goRoutineNum) - podUID := types.UID(fmt.Sprintf("test-reserved-%d", goRoutineNum)) + podUID := types.UID(fmt.Sprintf("test-pod-uid-%d", goRoutineNum)) pod := &v1.Pod{ ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("test-pod-%d", goRoutineNum), - Namespace: nameSpace, + Namespace: namespace, UID: podUID, }, Spec: v1.PodSpec{ @@ -1508,30 +932,10 @@ func TestParallelPrepareUnprepareResources(t *testing.T) { }, }, } - resourceClaim := &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - Name: claimName, - Namespace: nameSpace, - UID: types.UID(fmt.Sprintf("claim-%d", goRoutineNum)), - }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: "test-class", - }, - Status: resourceapi.ResourceClaimStatus{ - DriverName: driverName, - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - {Data: "test-data", DriverName: driverName}, - }, - }, - ReservedFor: []resourceapi.ResourceClaimConsumerReference{ - {UID: podUID}, - }, - }, - } + claim := genTestClaim(claimName, driverName, deviceName, string(podUID)) - 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) + if _, err = fakeKubeClient.ResourceV1alpha3().ResourceClaims(pod.Namespace).Create(context.Background(), claim, metav1.CreateOptions{}); err != nil { + t.Errorf("failed to create ResourceClaim %s: %+v", claim.Name, err) return } diff --git a/pkg/kubelet/cm/dra/plugin/client_test.go b/pkg/kubelet/cm/dra/plugin/client_test.go index ef374bd10c992..8858f077ff777 100644 --- a/pkg/kubelet/cm/dra/plugin/client_test.go +++ b/pkg/kubelet/cm/dra/plugin/client_test.go @@ -42,7 +42,14 @@ type fakeV1alpha4GRPCServer struct { var _ drapb.NodeServer = &fakeV1alpha4GRPCServer{} func (f *fakeV1alpha4GRPCServer) NodePrepareResources(ctx context.Context, in *drapb.NodePrepareResourcesRequest) (*drapb.NodePrepareResourcesResponse, error) { - return &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{"dummy": {CDIDevices: []string{"dummy"}}}}, nil + return &drapb.NodePrepareResourcesResponse{Claims: map[string]*drapb.NodePrepareResourceResponse{"claim-uid": { + CDIDevices: []*drapb.Device{ + { + RequestName: "test-request", + CdiIds: []string{"test-cdi-id"}, + }, + }, + }}}, nil } func (f *fakeV1alpha4GRPCServer) NodeUnprepareResources(ctx context.Context, in *drapb.NodeUnprepareResourcesRequest) (*drapb.NodeUnprepareResourcesResponse, error) { diff --git a/pkg/kubelet/cm/dra/plugin/plugin.go b/pkg/kubelet/cm/dra/plugin/plugin.go index cab052089d33c..9ccd8142f5711 100644 --- a/pkg/kubelet/cm/dra/plugin/plugin.go +++ b/pkg/kubelet/cm/dra/plugin/plugin.go @@ -24,6 +24,7 @@ import ( "time" v1 "k8s.io/api/core/v1" + resourceapi "k8s.io/api/resource/v1alpha3" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/fields" @@ -72,7 +73,7 @@ func NewRegistrationHandler(kubeClient kubernetes.Interface, getNode func() (*v1 } // wipeResourceSlices deletes ResourceSlices of the node, optionally just for a specific driver. -func (h *RegistrationHandler) wipeResourceSlices(pluginName string) { +func (h *RegistrationHandler) wipeResourceSlices(driver string) { if h.kubeClient == nil { return } @@ -97,9 +98,9 @@ func (h *RegistrationHandler) wipeResourceSlices(pluginName string) { logger.Error(err, "Unexpected error checking for node") return false, nil } - fieldSelector := fields.Set{"nodeName": node.Name} - if pluginName != "" { - fieldSelector["driverName"] = pluginName + fieldSelector := fields.Set{resourceapi.ResourceSliceSelectorNodeName: node.Name} + if driver != "" { + fieldSelector[resourceapi.ResourceSliceSelectorDriver] = driver } err = h.kubeClient.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: fieldSelector.String()}) diff --git a/pkg/kubelet/cm/dra/state/checkpoint.go b/pkg/kubelet/cm/dra/state/checkpoint.go index 7c44f12eea9dd..7cce61181822c 100644 --- a/pkg/kubelet/cm/dra/state/checkpoint.go +++ b/pkg/kubelet/cm/dra/state/checkpoint.go @@ -18,14 +18,9 @@ package state import ( "encoding/json" - "fmt" - "hash/fnv" - "strings" - "k8s.io/apimachinery/pkg/util/dump" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/checksum" - "k8s.io/kubernetes/pkg/kubelet/checkpointmanager/errors" ) var _ checkpointmanager.Checkpoint = &DRAManagerCheckpoint{} @@ -39,20 +34,9 @@ type DRAManagerCheckpoint struct { Checksum checksum.Checksum `json:"checksum"` } -// DraManagerCheckpoint struct is an old implementation of the DraManagerCheckpoint -type DRAManagerCheckpointWithoutResourceHandles struct { - Version string `json:"version"` - Entries ClaimInfoStateListWithoutResourceHandles `json:"entries,omitempty"` - Checksum checksum.Checksum `json:"checksum"` -} - // List of claim info to store in checkpoint type ClaimInfoStateList []ClaimInfoState -// List of claim info to store in checkpoint -// TODO: remove in Beta -type ClaimInfoStateListWithoutResourceHandles []ClaimInfoStateWithoutResourceHandles - // NewDRAManagerCheckpoint returns an instance of Checkpoint func NewDRAManagerCheckpoint() *DRAManagerCheckpoint { return &DRAManagerCheckpoint{ @@ -79,44 +63,6 @@ func (dc *DRAManagerCheckpoint) VerifyChecksum() error { ck := dc.Checksum dc.Checksum = 0 err := ck.Verify(dc) - if err == errors.ErrCorruptCheckpoint { - // Verify with old structs without ResourceHandles field - // TODO: remove in Beta - err = verifyChecksumWithoutResourceHandles(dc, ck) - } dc.Checksum = ck return err } - -// verifyChecksumWithoutResourceHandles is a helper function that verifies checksum of the -// checkpoint in the old format, without ResourceHandles field. -// TODO: remove in Beta. -func verifyChecksumWithoutResourceHandles(dc *DRAManagerCheckpoint, checkSum checksum.Checksum) error { - entries := ClaimInfoStateListWithoutResourceHandles{} - for _, entry := range dc.Entries { - entries = append(entries, ClaimInfoStateWithoutResourceHandles{ - DriverName: entry.DriverName, - ClassName: entry.ClassName, - ClaimUID: entry.ClaimUID, - ClaimName: entry.ClaimName, - Namespace: entry.Namespace, - PodUIDs: entry.PodUIDs, - CDIDevices: entry.CDIDevices, - }) - } - oldcheckpoint := &DRAManagerCheckpointWithoutResourceHandles{ - Version: checkpointVersion, - Entries: entries, - Checksum: 0, - } - // Calculate checksum for old checkpoint - object := dump.ForHash(oldcheckpoint) - object = strings.Replace(object, "DRAManagerCheckpointWithoutResourceHandles", "DRAManagerCheckpoint", 1) - object = strings.Replace(object, "ClaimInfoStateListWithoutResourceHandles", "ClaimInfoStateList", 1) - hash := fnv.New32a() - fmt.Fprintf(hash, "%v", object) - if checkSum != checksum.Checksum(hash.Sum32()) { - return errors.ErrCorruptCheckpoint - } - return nil -} diff --git a/pkg/kubelet/cm/dra/state/state_checkpoint.go b/pkg/kubelet/cm/dra/state/state_checkpoint.go index 097cefe228cf3..ce20e1ffdf944 100644 --- a/pkg/kubelet/cm/dra/state/state_checkpoint.go +++ b/pkg/kubelet/cm/dra/state/state_checkpoint.go @@ -37,12 +37,6 @@ type CheckpointState interface { // ClaimInfoState is used to store claim info state in a checkpoint // +k8s:deepcopy-gen=true type ClaimInfoState struct { - // Name of the DRA driver - DriverName string - - // ClassName is a resource class of the claim - ClassName string - // ClaimUID is an UID of the resource claim ClaimUID types.UID @@ -55,35 +49,25 @@ type ClaimInfoState struct { // PodUIDs is a set of pod UIDs that reference a resource PodUIDs sets.Set[string] - // CDIDevices is a map of DriverName --> CDI devices returned by the - // GRPC API call NodePrepareResource - CDIDevices map[string][]string + // DriverState contains information about all drivers which have allocation + // results in the claim, even if they don't provide devices for their results. + DriverState map[string]DriverState } -// ClaimInfoStateWithoutResourceHandles is an old implementation of the ClaimInfoState -// TODO: remove in Beta -type ClaimInfoStateWithoutResourceHandles struct { - // Name of the DRA driver - DriverName string - - // ClassName is a resource class of the claim - ClassName string - - // ClaimUID is an UID of the resource claim - ClaimUID types.UID - - // ClaimName is a name of the resource claim - ClaimName string - - // Namespace is a claim namespace - Namespace string - - // PodUIDs is a set of pod UIDs that reference a resource - PodUIDs sets.Set[string] +// DriverState is used to store per-device claim info state in a checkpoint +// +k8s:deepcopy-gen=true +type DriverState struct { + Devices []Device +} - // CDIDevices is a map of DriverName --> CDI devices returned by the - // GRPC API call NodePrepareResource - CDIDevices map[string][]string +// Device is how a DRA driver described an allocated device in a claim +// to kubelet. RequestName and CDI device IDs are optional. +// +k8s:deepcopy-gen=true +type Device struct { + PoolName string + DeviceName string + RequestNames []string + CDIDeviceIDs []string } type stateCheckpoint struct { @@ -122,7 +106,7 @@ func (sc *stateCheckpoint) GetOrCreate() (ClaimInfoStateList, error) { return ClaimInfoStateList{}, nil } if err != nil { - return nil, fmt.Errorf("failed to get checkpoint %v: %v", sc.checkpointName, err) + return nil, fmt.Errorf("failed to get checkpoint %v: %w", sc.checkpointName, err) } return checkpoint.Entries, nil diff --git a/pkg/kubelet/cm/dra/state/state_checkpoint_test.go b/pkg/kubelet/cm/dra/state/state_checkpoint_test.go index cf2e30870ce89..c22cd630ea409 100644 --- a/pkg/kubelet/cm/dra/state/state_checkpoint_test.go +++ b/pkg/kubelet/cm/dra/state/state_checkpoint_test.go @@ -18,13 +18,12 @@ package state import ( "os" - "path" "strings" "testing" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" - resourceapi "k8s.io/api/resource/v1alpha3" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/kubernetes/pkg/kubelet/checkpointmanager" testutil "k8s.io/kubernetes/pkg/kubelet/cm/cpumanager/state/testing" @@ -52,116 +51,120 @@ func TestCheckpointGetOrCreate(t *testing.T) { expectedState ClaimInfoStateList }{ { - "Create non-existing checkpoint", - "", - "", - []ClaimInfoState{}, + description: "Create non-existing checkpoint", + checkpointContent: "", + expectedError: "", + expectedState: []ClaimInfoState{}, }, { - "Restore checkpoint - single claim", - `{"version":"v1","entries":[{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"ResourceHandles":[{"driverName":"test-driver.cdi.k8s.io","data":"{\"a\": \"b\"}"}],"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example"]}}],"checksum":113577689}`, - "", - []ClaimInfoState{ + description: "Restore checkpoint - single claim", + checkpointContent: `{"version":"v1","entries":[{"ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"DriverState":{"test-driver.cdi.k8s.io":{"Devices":[{"PoolName":"worker-1","DeviceName":"dev-1","RequestNames":["test request"],"CDIDeviceIDs":["example.com/example=cdi-example"]}]}}}],"checksum":1925941526}`, + expectedState: []ClaimInfoState{ { - DriverName: "test-driver.cdi.k8s.io", - ClassName: "class-name", - ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", - ClaimName: "example", - Namespace: "default", - PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: "test-driver.cdi.k8s.io", - Data: `{"a": "b"}`, + DriverState: map[string]DriverState{ + "test-driver.cdi.k8s.io": { + Devices: []Device{ + { + PoolName: "worker-1", + DeviceName: "dev-1", + RequestNames: []string{"test request"}, + CDIDeviceIDs: []string{"example.com/example=cdi-example"}, + }, + }, }, }, - CDIDevices: map[string][]string{ - "test-driver.cdi.k8s.io": {"example.com/example=cdi-example"}, - }, + ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", + ClaimName: "example", + Namespace: "default", + PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), }, }, }, { - "Restore checkpoint - single claim - multiple devices", - `{"version":"v1","entries":[{"DriverName":"meta-test-driver.cdi.k8s.io","ClassName":"class-name","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"ResourceHandles":[{"driverName":"test-driver-1.cdi.k8s.io","data":"{\"a\": \"b\"}"},{"driverName":"test-driver-2.cdi.k8s.io","data":"{\"c\": \"d\"}"}],"CDIDevices":{"test-driver-1.cdi.k8s.io":["example-1.com/example-1=cdi-example-1"],"test-driver-2.cdi.k8s.io":["example-2.com/example-2=cdi-example-2"]}}],"checksum":1466990255}`, - "", - []ClaimInfoState{ + description: "Restore checkpoint - single claim - multiple devices", + checkpointContent: `{"version":"v1","entries":[{"ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"DriverState":{"test-driver.cdi.k8s.io":{"Devices":[{"PoolName":"worker-1","DeviceName":"dev-1","RequestNames":["test request"],"CDIDeviceIDs":["example.com/example=cdi-example"]},{"PoolName":"worker-1","DeviceName":"dev-2","RequestNames":["test request2"],"CDIDeviceIDs":["example.com/example=cdi-example2"]}]}}}],"checksum":3560752542}`, + expectedError: "", + expectedState: []ClaimInfoState{ { - DriverName: "meta-test-driver.cdi.k8s.io", - ClassName: "class-name", - ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", - ClaimName: "example", - Namespace: "default", - PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: "test-driver-1.cdi.k8s.io", - Data: `{"a": "b"}`, - }, - { - DriverName: "test-driver-2.cdi.k8s.io", - Data: `{"c": "d"}`, + DriverState: map[string]DriverState{ + "test-driver.cdi.k8s.io": { + Devices: []Device{ + { + PoolName: "worker-1", + DeviceName: "dev-1", + RequestNames: []string{"test request"}, + CDIDeviceIDs: []string{"example.com/example=cdi-example"}, + }, + { + PoolName: "worker-1", + DeviceName: "dev-2", + RequestNames: []string{"test request2"}, + CDIDeviceIDs: []string{"example.com/example=cdi-example2"}, + }, + }, }, }, - CDIDevices: map[string][]string{ - "test-driver-1.cdi.k8s.io": {"example-1.com/example-1=cdi-example-1"}, - "test-driver-2.cdi.k8s.io": {"example-2.com/example-2=cdi-example-2"}, - }, + ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", + ClaimName: "example", + Namespace: "default", + PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), }, }, }, { - "Restore checkpoint - multiple claims", - `{"version":"v1","entries":[{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name-1","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example-1","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"ResourceHandles":[{"driverName":"test-driver.cdi.k8s.io","data":"{\"a\": \"b\"}"}],"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example-1"]}},{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name-2","ClaimUID":"4cf8db2d-06c0-7d70-1a51-e59b25b2c16c","ClaimName":"example-2","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"ResourceHandles":[{"driverName":"test-driver.cdi.k8s.io","data":"{\"c\": \"d\"}"}],"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example-2"]}}],"checksum":471181742}`, - "", - []ClaimInfoState{ + description: "Restore checkpoint - multiple claims", + checkpointContent: `{"version":"v1","entries":[{"ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example-1","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"DriverState":{"test-driver.cdi.k8s.io":{"Devices":[{"PoolName":"worker-1","DeviceName":"dev-1","RequestNames":["test request"],"CDIDeviceIDs":["example.com/example=cdi-example"]}]}}},{"ClaimUID":"4cf8db2d-06c0-7d70-1a51-e59b25b2c16c","ClaimName":"example-2","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"DriverState":{"test-driver.cdi.k8s.io":{"Devices":[{"PoolName":"worker-1","DeviceName":"dev-1","RequestNames":["test request"],"CDIDeviceIDs":["example.com/example=cdi-example"]}]}}}],"checksum":351581974}`, + expectedError: "", + expectedState: []ClaimInfoState{ { - DriverName: "test-driver.cdi.k8s.io", - ClassName: "class-name-1", - ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", - ClaimName: "example-1", - Namespace: "default", - PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: "test-driver.cdi.k8s.io", - Data: `{"a": "b"}`, + DriverState: map[string]DriverState{ + "test-driver.cdi.k8s.io": { + Devices: []Device{ + { + PoolName: "worker-1", + DeviceName: "dev-1", + RequestNames: []string{"test request"}, + CDIDeviceIDs: []string{"example.com/example=cdi-example"}, + }, + }, }, }, - CDIDevices: map[string][]string{ - "test-driver.cdi.k8s.io": {"example.com/example=cdi-example-1"}, - }, + ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", + ClaimName: "example-1", + Namespace: "default", + PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), }, { - DriverName: "test-driver.cdi.k8s.io", - ClassName: "class-name-2", - ClaimUID: "4cf8db2d-06c0-7d70-1a51-e59b25b2c16c", - ClaimName: "example-2", - Namespace: "default", - PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: "test-driver.cdi.k8s.io", - Data: `{"c": "d"}`, + DriverState: map[string]DriverState{ + "test-driver.cdi.k8s.io": { + Devices: []Device{ + { + PoolName: "worker-1", + DeviceName: "dev-1", + RequestNames: []string{"test request"}, + CDIDeviceIDs: []string{"example.com/example=cdi-example"}, + }, + }, }, }, - CDIDevices: map[string][]string{ - "test-driver.cdi.k8s.io": {"example.com/example=cdi-example-2"}, - }, + ClaimUID: "4cf8db2d-06c0-7d70-1a51-e59b25b2c16c", + ClaimName: "example-2", + Namespace: "default", + PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), }, }, }, { - "Restore checkpoint - invalid checksum", - `{"version":"v1","entries":[{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example"]}}],"checksum":1988120168}`, - "checkpoint is corrupted", - []ClaimInfoState{}, + description: "Restore checkpoint - invalid checksum", + checkpointContent: `{"version":"v1","entries":[{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example"]}}],"checksum":1988120168}`, + expectedError: "checkpoint is corrupted", + expectedState: []ClaimInfoState{}, }, { - "Restore checkpoint with invalid JSON", - `{`, - "unexpected end of JSON input", - []ClaimInfoState{}, + description: "Restore checkpoint with invalid JSON", + checkpointContent: `{`, + expectedError: "unexpected end of JSON input", + expectedState: []ClaimInfoState{}, }, } @@ -195,10 +198,9 @@ func TestCheckpointGetOrCreate(t *testing.T) { state, err = checkpointState.GetOrCreate() } if strings.TrimSpace(tc.expectedError) != "" { - assert.Error(t, err) - assert.Contains(t, err.Error(), tc.expectedError) + assert.ErrorContains(t, err, tc.expectedError) } else { - assert.NoError(t, err, "unexpected error while creating checkpointState") + require.NoError(t, err, "unexpected error while creating checkpointState") // compare state after restoration with the one expected assertStateEqual(t, state, tc.expectedState) } @@ -207,25 +209,40 @@ func TestCheckpointGetOrCreate(t *testing.T) { } func TestCheckpointStateStore(t *testing.T) { - claimInfoState := ClaimInfoState{ - DriverName: "test-driver.cdi.k8s.io", - ClassName: "class-name", - ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", - ClaimName: "example", - Namespace: "default", - PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: "test-driver.cdi.k8s.io", - Data: `{"a": "b"}`, + claimInfoStateList := ClaimInfoStateList{ + { + DriverState: map[string]DriverState{ + "test-driver.cdi.k8s.io": { + Devices: []Device{{ + PoolName: "worker-1", + DeviceName: "dev-1", + RequestNames: []string{"test request"}, + CDIDeviceIDs: []string{"example.com/example=cdi-example"}, + }}, + }, }, + ClaimUID: "067798be-454e-4be4-9047-1aa06aea63f7", + ClaimName: "example-1", + Namespace: "default", + PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), }, - CDIDevices: map[string][]string{ - "test-driver.cdi.k8s.io": {"example.com/example=cdi-example"}, + { + DriverState: map[string]DriverState{ + "test-driver.cdi.k8s.io": { + Devices: []Device{{ + PoolName: "worker-1", + DeviceName: "dev-2", + }}, + }, + }, + ClaimUID: "4cf8db2d-06c0-7d70-1a51-e59b25b2c16c", + ClaimName: "example-2", + Namespace: "default", + PodUIDs: sets.New("139cdb46-f989-4f17-9561-ca10cfb509a6"), }, } - expectedCheckpoint := `{"version":"v1","entries":[{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"ResourceHandles":[{"driverName":"test-driver.cdi.k8s.io","data":"{\"a\": \"b\"}"}],"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example"]}}],"checksum":113577689}` + expectedCheckpoint := `{"version":"v1","entries":[{"ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example-1","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"DriverState":{"test-driver.cdi.k8s.io":{"Devices":[{"PoolName":"worker-1","DeviceName":"dev-1","RequestNames":["test request"],"CDIDeviceIDs":["example.com/example=cdi-example"]}]}}},{"ClaimUID":"4cf8db2d-06c0-7d70-1a51-e59b25b2c16c","ClaimName":"example-2","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"DriverState":{"test-driver.cdi.k8s.io":{"Devices":[{"PoolName":"worker-1","DeviceName":"dev-2","RequestNames":null,"CDIDeviceIDs":null}]}}}],"checksum":1191151426}` // Should return an error, stateDir cannot be an empty string if _, err := NewCheckpointState("", testingCheckpoint); err == nil { @@ -245,7 +262,7 @@ func TestCheckpointStateStore(t *testing.T) { cs, err := NewCheckpointState(testingDir, testingCheckpoint) assert.NoError(t, err, "could not create testing checkpointState instance") - err = cs.Store(ClaimInfoStateList{claimInfoState}) + err = cs.Store(claimInfoStateList) assert.NoError(t, err, "could not store ClaimInfoState") checkpoint := NewDRAManagerCheckpoint() cpm.GetCheckpoint(testingCheckpoint, checkpoint) @@ -258,23 +275,3 @@ func TestCheckpointStateStore(t *testing.T) { t.Fatal("expected error but got nil") } } - -func TestOldCheckpointRestore(t *testing.T) { - testingDir := t.TempDir() - cpm, err := checkpointmanager.NewCheckpointManager(testingDir) - assert.NoError(t, err, "could not create testing checkpoint manager") - - oldCheckpointData := `{"version":"v1","entries":[{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example"]}}],"checksum":153446146}` - err = os.WriteFile(path.Join(testingDir, testingCheckpoint), []byte(oldCheckpointData), 0644) - assert.NoError(t, err, "could not store checkpoint data") - - checkpoint := NewDRAManagerCheckpoint() - err = cpm.GetCheckpoint(testingCheckpoint, checkpoint) - assert.NoError(t, err, "could not restore checkpoint") - - checkpointData, err := checkpoint.MarshalCheckpoint() - assert.NoError(t, err, "could not Marshal Checkpoint") - - expectedData := `{"version":"v1","entries":[{"DriverName":"test-driver.cdi.k8s.io","ClassName":"class-name","ClaimUID":"067798be-454e-4be4-9047-1aa06aea63f7","ClaimName":"example","Namespace":"default","PodUIDs":{"139cdb46-f989-4f17-9561-ca10cfb509a6":{}},"ResourceHandles":null,"CDIDevices":{"test-driver.cdi.k8s.io":["example.com/example=cdi-example"]}}],"checksum":453625682}` - assert.Equal(t, expectedData, string(checkpointData), "expected ClaimInfoState does not equal to restored one") -} diff --git a/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go b/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go index a0ab5191dc42c..6489dab7a513f 100644 --- a/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go +++ b/pkg/kubelet/cm/dra/state/zz_generated.deepcopy.go @@ -35,19 +35,11 @@ func (in *ClaimInfoState) DeepCopyInto(out *ClaimInfoState) { (*out)[key] = val } } - if in.CDIDevices != nil { - in, out := &in.CDIDevices, &out.CDIDevices - *out = make(map[string][]string, len(*in)) + if in.DriverState != nil { + in, out := &in.DriverState, &out.DriverState + *out = make(map[string]DriverState, len(*in)) for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal + (*out)[key] = *val.DeepCopy() } } return @@ -62,3 +54,52 @@ func (in *ClaimInfoState) DeepCopy() *ClaimInfoState { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Device) DeepCopyInto(out *Device) { + *out = *in + if in.RequestNames != nil { + in, out := &in.RequestNames, &out.RequestNames + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.CDIDeviceIDs != nil { + in, out := &in.CDIDeviceIDs, &out.CDIDeviceIDs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device. +func (in *Device) DeepCopy() *Device { + if in == nil { + return nil + } + out := new(Device) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DriverState) DeepCopyInto(out *DriverState) { + *out = *in + if in.Devices != nil { + in, out := &in.Devices, &out.Devices + *out = make([]Device, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriverState. +func (in *DriverState) DeepCopy() *DriverState { + if in == nil { + return nil + } + out := new(DriverState) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/kubelet/cm/dra/types.go b/pkg/kubelet/cm/dra/types.go index e009e952eb45b..6b37d5039b521 100644 --- a/pkg/kubelet/cm/dra/types.go +++ b/pkg/kubelet/cm/dra/types.go @@ -50,8 +50,6 @@ type Manager interface { // ContainerInfo contains information required by the runtime to consume prepared resources. type ContainerInfo struct { - // The Annotations for the container - Annotations []kubecontainer.Annotation // CDI Devices for the container CDIDevices []kubecontainer.CDIDevice } diff --git a/pkg/kubelet/cm/dra/zz_generated.deepcopy.go b/pkg/kubelet/cm/dra/zz_generated.deepcopy.go index cc10fdaf53efa..577fd431881ab 100644 --- a/pkg/kubelet/cm/dra/zz_generated.deepcopy.go +++ b/pkg/kubelet/cm/dra/zz_generated.deepcopy.go @@ -21,29 +21,10 @@ limitations under the License. package dra -import ( - container "k8s.io/kubernetes/pkg/kubelet/container" -) - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClaimInfo) DeepCopyInto(out *ClaimInfo) { *out = *in in.ClaimInfoState.DeepCopyInto(&out.ClaimInfoState) - if in.annotations != nil { - in, out := &in.annotations, &out.annotations - *out = make(map[string][]container.Annotation, len(*in)) - for key, val := range *in { - var outVal []container.Annotation - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]container.Annotation, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } return } diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index b6c4ff6624d18..89121b0505b86 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -492,7 +492,8 @@ type DeviceInfo struct { // CDIDevice contains information about CDI device type CDIDevice struct { - // Name is a fully qualified device name + // Name is a fully qualified device name according to + // https://github.com/cncf-tags/container-device-interface/blob/e66544063aa7760c4ea6330ce9e6c757f8e61df2/README.md?plain=1#L9-L15 Name string } diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go index 5c96e3edda5a6..04d0562c0e407 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.pb.go @@ -145,9 +145,10 @@ func (m *NodePrepareResourcesResponse) GetClaims() map[string]*NodePrepareResour type NodePrepareResourceResponse struct { // These are the additional devices that kubelet must - // make available via the container runtime. A resource + // make available via the container runtime. A claim + // may have zero or more requests and each request // may have zero or more devices. - CDIDevices []string `protobuf:"bytes,1,rep,name=cdi_devices,json=cdiDevices,proto3" json:"cdi_devices,omitempty"` + Devices []*Device `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"` // If non-empty, preparing the ResourceClaim failed. // cdi_devices is ignored in that case. Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` @@ -187,9 +188,9 @@ func (m *NodePrepareResourceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_NodePrepareResourceResponse proto.InternalMessageInfo -func (m *NodePrepareResourceResponse) GetCDIDevices() []string { +func (m *NodePrepareResourceResponse) GetDevices() []*Device { if m != nil { - return m.CDIDevices + return m.Devices } return nil } @@ -201,6 +202,81 @@ func (m *NodePrepareResourceResponse) GetError() string { return "" } +type Device struct { + // The requests in the claim that this device is associated with. + // Optional. If empty, the device is associated with all requests. + RequestNames []string `protobuf:"bytes,1,rep,name=request_names,json=requestNames,proto3" json:"request_names,omitempty"` + // The pool which contains the device. Required. + PoolName string `protobuf:"bytes,2,opt,name=pool_name,json=poolName,proto3" json:"pool_name,omitempty"` + // The device itself. Required. + DeviceName string `protobuf:"bytes,3,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + // A single device instance may map to several CDI device IDs. + // None is also valid. + CDIDeviceIDs []string `protobuf:"bytes,4,rep,name=cdi_device_ids,json=cdiDeviceIds,proto3" json:"cdi_device_ids,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Device) Reset() { *m = Device{} } +func (*Device) ProtoMessage() {} +func (*Device) Descriptor() ([]byte, []int) { + return fileDescriptor_00212fb1f9d3bf1c, []int{3} +} +func (m *Device) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Device.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Device) XXX_Merge(src proto.Message) { + xxx_messageInfo_Device.Merge(m, src) +} +func (m *Device) XXX_Size() int { + return m.Size() +} +func (m *Device) XXX_DiscardUnknown() { + xxx_messageInfo_Device.DiscardUnknown(m) +} + +var xxx_messageInfo_Device proto.InternalMessageInfo + +func (m *Device) GetRequestNames() []string { + if m != nil { + return m.RequestNames + } + return nil +} + +func (m *Device) GetPoolName() string { + if m != nil { + return m.PoolName + } + return "" +} + +func (m *Device) GetDeviceName() string { + if m != nil { + return m.DeviceName + } + return "" +} + +func (m *Device) GetCDIDeviceIDs() []string { + if m != nil { + return m.CDIDeviceIDs + } + return nil +} + type NodeUnprepareResourcesRequest struct { // The list of ResourceClaims that are to be unprepared. Claims []*Claim `protobuf:"bytes,1,rep,name=claims,proto3" json:"claims,omitempty"` @@ -211,7 +287,7 @@ type NodeUnprepareResourcesRequest struct { func (m *NodeUnprepareResourcesRequest) Reset() { *m = NodeUnprepareResourcesRequest{} } func (*NodeUnprepareResourcesRequest) ProtoMessage() {} func (*NodeUnprepareResourcesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{3} + return fileDescriptor_00212fb1f9d3bf1c, []int{4} } func (m *NodeUnprepareResourcesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -259,7 +335,7 @@ type NodeUnprepareResourcesResponse struct { func (m *NodeUnprepareResourcesResponse) Reset() { *m = NodeUnprepareResourcesResponse{} } func (*NodeUnprepareResourcesResponse) ProtoMessage() {} func (*NodeUnprepareResourcesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{4} + return fileDescriptor_00212fb1f9d3bf1c, []int{5} } func (m *NodeUnprepareResourcesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -305,7 +381,7 @@ type NodeUnprepareResourceResponse struct { func (m *NodeUnprepareResourceResponse) Reset() { *m = NodeUnprepareResourceResponse{} } func (*NodeUnprepareResourceResponse) ProtoMessage() {} func (*NodeUnprepareResourceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{5} + return fileDescriptor_00212fb1f9d3bf1c, []int{6} } func (m *NodeUnprepareResourceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -358,7 +434,7 @@ type Claim struct { func (m *Claim) Reset() { *m = Claim{} } func (*Claim) ProtoMessage() {} func (*Claim) Descriptor() ([]byte, []int) { - return fileDescriptor_00212fb1f9d3bf1c, []int{6} + return fileDescriptor_00212fb1f9d3bf1c, []int{7} } func (m *Claim) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -413,6 +489,7 @@ func init() { proto.RegisterType((*NodePrepareResourcesResponse)(nil), "v1alpha3.NodePrepareResourcesResponse") proto.RegisterMapType((map[string]*NodePrepareResourceResponse)(nil), "v1alpha3.NodePrepareResourcesResponse.ClaimsEntry") proto.RegisterType((*NodePrepareResourceResponse)(nil), "v1alpha3.NodePrepareResourceResponse") + proto.RegisterType((*Device)(nil), "v1alpha3.Device") proto.RegisterType((*NodeUnprepareResourcesRequest)(nil), "v1alpha3.NodeUnprepareResourcesRequest") proto.RegisterType((*NodeUnprepareResourcesResponse)(nil), "v1alpha3.NodeUnprepareResourcesResponse") proto.RegisterMapType((map[string]*NodeUnprepareResourceResponse)(nil), "v1alpha3.NodeUnprepareResourcesResponse.ClaimsEntry") @@ -423,38 +500,42 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 481 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0xcd, 0x36, 0x4d, 0x85, 0x27, 0x12, 0xa0, 0x55, 0x85, 0xa2, 0x50, 0x4c, 0x64, 0x51, 0x92, - 0x0b, 0xb6, 0x48, 0x8b, 0x54, 0x81, 0xb8, 0xa4, 0x05, 0xf1, 0x25, 0x84, 0x2c, 0x71, 0xe1, 0x02, - 0x6b, 0x7b, 0x70, 0x57, 0xf9, 0xd8, 0x65, 0xd7, 0x8e, 0xd4, 0x1b, 0x3f, 0x81, 0x9f, 0xd5, 0x03, - 0x07, 0xc4, 0x89, 0x53, 0x45, 0xcd, 0x1f, 0x41, 0x5e, 0x3b, 0xe9, 0x87, 0x9c, 0x26, 0x52, 0x6f, - 0x33, 0xe3, 0x9d, 0x79, 0x6f, 0xde, 0x1b, 0x19, 0x2c, 0x26, 0xb9, 0x2b, 0x95, 0x48, 0x04, 0xbd, - 0x31, 0x7d, 0xcc, 0x46, 0xf2, 0x90, 0xed, 0xb4, 0x1f, 0xc5, 0x3c, 0x39, 0x4c, 0x03, 0x37, 0x14, - 0x63, 0x2f, 0x16, 0xb1, 0xf0, 0xcc, 0x83, 0x20, 0xfd, 0x6a, 0x32, 0x93, 0x98, 0xa8, 0x68, 0x74, - 0x5e, 0xc2, 0xdd, 0xf7, 0x22, 0xc2, 0x0f, 0x0a, 0x25, 0x53, 0x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0x45, 0x0b, 0xba, 0x4b, 0xd0, 0xaa, 0x4c, 0x78, 0xb2, 0x40, 0x9e, 0xf9, 0x4a, 0x73, 0x55, 0xc9, - 0x79, 0x55, 0xdf, 0x42, 0xc3, 0x50, 0xa3, 0x5b, 0x60, 0x4d, 0xd8, 0x18, 0xb5, 0x64, 0x21, 0x96, - 0x4f, 0xce, 0x0a, 0x39, 0xe5, 0x94, 0x47, 0xa5, 0x21, 0x79, 0x48, 0x29, 0xac, 0xe7, 0x9f, 0x5b, - 0x75, 0x53, 0x32, 0x71, 0xff, 0x84, 0xc0, 0x7a, 0x4e, 0x82, 0xc6, 0xb0, 0x59, 0x75, 0xa7, 0x74, - 0x7b, 0xd9, 0x1d, 0x1b, 0x27, 0xdb, 0x0f, 0x57, 0x3b, 0x77, 0xa7, 0x46, 0xc7, 0x70, 0xa7, 0xda, - 0x0f, 0xda, 0x5d, 0xee, 0x58, 0x01, 0xd6, 0x5b, 0xd5, 0x5a, 0xa7, 0x36, 0x18, 0x1c, 0x9f, 0xda, - 0xe4, 0xcf, 0xa9, 0x5d, 0xfb, 0x9e, 0xd9, 0xe4, 0x38, 0xb3, 0xc9, 0xaf, 0xcc, 0x26, 0x7f, 0x33, - 0x9b, 0xfc, 0xf8, 0x67, 0xd7, 0x3e, 0x3d, 0x18, 0xee, 0x69, 0x97, 0x0b, 0x6f, 0x98, 0x06, 0x38, - 0xc2, 0xc4, 0x93, 0xc3, 0xd8, 0x63, 0x92, 0x6b, 0x2f, 0x52, 0xcc, 0x2b, 0x41, 0x76, 0x83, 0x0d, - 0xf3, 0x2f, 0xd9, 0xf9, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x65, 0xc5, 0xc2, 0x0e, 0x91, 0x04, 0x00, - 0x00, + // 552 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0xcd, 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a, 0x2d, + 0xef, 0x4c, 0xbc, 0x91, 0xce, 0xaa, 0x1b, 0x79, 0x71, 0xf1, 0x46, 0xaa, 0x2b, 0xd8, 0x92, 0xae, + 0xe4, 0xc9, 0x92, 0xf5, 0xcc, 0x3e, 0x69, 0xa6, 0x3d, 0x5a, 0xd4, 0xfe, 0x2d, 0x64, 0xd5, 0x68, + 0x78, 0x0b, 0x2c, 0xa5, 0x38, 0xf3, 0x03, 0x62, 0x4a, 0xe6, 0x01, 0x39, 0x72, 0x1c, 0x85, 0x46, + 0x6c, 0x69, 0x62, 0x0c, 0x99, 0x05, 0x81, 0x95, 0xdd, 0x38, 0x43, 0x90, 0x91, 0x43, 0xe0, 0x2e, + 0x6c, 0x24, 0x3d, 0x24, 0xbc, 0xb3, 0xea, 0xa1, 0x29, 0x25, 0xcb, 0x0f, 0xae, 0xf7, 0x1e, 0x9d, + 0x14, 0x1e, 0xc0, 0x9d, 0x64, 0x3d, 0x70, 0x75, 0xb5, 0x62, 0x9a, 0xac, 0x76, 0x5d, 0x69, 0x9d, + 0x54, 0xb3, 0x79, 0x7a, 0x6e, 0xa3, 0xdf, 0xe7, 0x76, 0xea, 0xeb, 0xc4, 0x46, 0xa7, 0x13, 0x1b, + 0xfd, 0x9c, 0xd8, 0xe8, 0xcf, 0xc4, 0x46, 0xdf, 0xfe, 0xda, 0xa9, 0x8f, 0xf7, 0x7b, 0xfb, 0xa2, + 0x1e, 0x51, 0xb7, 0x17, 0x77, 0x48, 0x9f, 0x8c, 0x5c, 0xd6, 0xeb, 0xba, 0x3e, 0x8b, 0x84, 0x1b, + 0x72, 0xdf, 0x35, 0x24, 0x7b, 0x9d, 0x9c, 0xfa, 0xd9, 0xed, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, + 0xa8, 0x76, 0xf5, 0x4f, 0x32, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -698,11 +779,71 @@ func (m *NodePrepareResourceResponse) MarshalToSizedBuffer(dAtA []byte) (int, er i-- dAtA[i] = 0x12 } - if len(m.CDIDevices) > 0 { - for iNdEx := len(m.CDIDevices) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CDIDevices[iNdEx]) - copy(dAtA[i:], m.CDIDevices[iNdEx]) - i = encodeVarintApi(dAtA, i, uint64(len(m.CDIDevices[iNdEx]))) + if len(m.Devices) > 0 { + for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintApi(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Device) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Device) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CDIDeviceIDs) > 0 { + for iNdEx := len(m.CDIDeviceIDs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.CDIDeviceIDs[iNdEx]) + copy(dAtA[i:], m.CDIDeviceIDs[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.CDIDeviceIDs[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.DeviceName) > 0 { + i -= len(m.DeviceName) + copy(dAtA[i:], m.DeviceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.DeviceName))) + i-- + dAtA[i] = 0x1a + } + if len(m.PoolName) > 0 { + i -= len(m.PoolName) + copy(dAtA[i:], m.PoolName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PoolName))) + i-- + dAtA[i] = 0x12 + } + if len(m.RequestNames) > 0 { + for iNdEx := len(m.RequestNames) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.RequestNames[iNdEx]) + copy(dAtA[i:], m.RequestNames[iNdEx]) + i = encodeVarintApi(dAtA, i, uint64(len(m.RequestNames[iNdEx]))) i-- dAtA[i] = 0xa } @@ -924,9 +1065,9 @@ func (m *NodePrepareResourceResponse) Size() (n int) { } var l int _ = l - if len(m.CDIDevices) > 0 { - for _, s := range m.CDIDevices { - l = len(s) + if len(m.Devices) > 0 { + for _, e := range m.Devices { + l = e.Size() n += 1 + l + sovApi(uint64(l)) } } @@ -937,6 +1078,35 @@ func (m *NodePrepareResourceResponse) Size() (n int) { return n } +func (m *Device) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RequestNames) > 0 { + for _, s := range m.RequestNames { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + l = len(m.PoolName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.DeviceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.CDIDeviceIDs) > 0 { + for _, s := range m.CDIDeviceIDs { + l = len(s) + n += 1 + l + sovApi(uint64(l)) + } + } + return n +} + func (m *NodeUnprepareResourcesRequest) Size() (n int) { if m == nil { return 0 @@ -1053,13 +1223,31 @@ func (this *NodePrepareResourceResponse) String() string { if this == nil { return "nil" } + repeatedStringForDevices := "[]*Device{" + for _, f := range this.Devices { + repeatedStringForDevices += strings.Replace(f.String(), "Device", "Device", 1) + "," + } + repeatedStringForDevices += "}" s := strings.Join([]string{`&NodePrepareResourceResponse{`, - `CDIDevices:` + fmt.Sprintf("%v", this.CDIDevices) + `,`, + `Devices:` + repeatedStringForDevices + `,`, `Error:` + fmt.Sprintf("%v", this.Error) + `,`, `}`, }, "") return s } +func (this *Device) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Device{`, + `RequestNames:` + fmt.Sprintf("%v", this.RequestNames) + `,`, + `PoolName:` + fmt.Sprintf("%v", this.PoolName) + `,`, + `DeviceName:` + fmt.Sprintf("%v", this.DeviceName) + `,`, + `CDIDeviceIDs:` + fmt.Sprintf("%v", this.CDIDeviceIDs) + `,`, + `}`, + }, "") + return s +} func (this *NodeUnprepareResourcesRequest) String() string { if this == nil { return "nil" @@ -1419,7 +1607,41 @@ func (m *NodePrepareResourceResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CDIDevices", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Devices = append(m.Devices, &Device{}) + if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1447,11 +1669,93 @@ func (m *NodePrepareResourceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CDIDevices = append(m.CDIDevices, string(dAtA[iNdEx:postIndex])) + m.Error = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipApi(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthApi + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Device) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Device: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestNames", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequestNames = append(m.RequestNames, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PoolName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1479,7 +1783,71 @@ func (m *NodePrepareResourceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Error = string(dAtA[iNdEx:postIndex]) + m.PoolName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CDIDeviceIDs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CDIDeviceIDs = append(m.CDIDeviceIDs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex diff --git a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto index 04a374535b6f2..5a7404795743f 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/dra/v1alpha4/api.proto @@ -62,14 +62,31 @@ message NodePrepareResourcesResponse { message NodePrepareResourceResponse { // These are the additional devices that kubelet must - // make available via the container runtime. A resource + // make available via the container runtime. A claim + // may have zero or more requests and each request // may have zero or more devices. - repeated string cdi_devices = 1 [(gogoproto.customname) = "CDIDevices"]; + repeated Device devices = 1; // If non-empty, preparing the ResourceClaim failed. // cdi_devices is ignored in that case. string error = 2; } +message Device { + // The requests in the claim that this device is associated with. + // Optional. If empty, the device is associated with all requests. + repeated string request_names = 1; + + // The pool which contains the device. Required. + string pool_name = 2; + + // The device itself. Required. + string device_name = 3; + + // A single device instance may map to several CDI device IDs. + // None is also valid. + repeated string cdi_device_ids = 4 [(gogoproto.customname) = "CDIDeviceIDs"]; +} + message NodeUnprepareResourcesRequest { // The list of ResourceClaims that are to be unprepared. repeated Claim claims = 1; diff --git a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.pb.go b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.pb.go index 5ca454588ce87..a67c289a50a66 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.pb.go +++ b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.pb.go @@ -586,7 +586,8 @@ func (m *NUMANode) GetID() int64 { // DynamicResource contains information about the devices assigned to a container by DRA type DynamicResource struct { - ClassName string `protobuf:"bytes,1,opt,name=class_name,json=className,proto3" json:"class_name,omitempty"` + // tombstone: removed in 1.31 because claims are no longer associated with one class + // string class_name = 1; ClaimName string `protobuf:"bytes,2,opt,name=claim_name,json=claimName,proto3" json:"claim_name,omitempty"` ClaimNamespace string `protobuf:"bytes,3,opt,name=claim_namespace,json=claimNamespace,proto3" json:"claim_namespace,omitempty"` ClaimResources []*ClaimResource `protobuf:"bytes,4,rep,name=claim_resources,json=claimResources,proto3" json:"claim_resources,omitempty"` @@ -626,13 +627,6 @@ func (m *DynamicResource) XXX_DiscardUnknown() { var xxx_messageInfo_DynamicResource proto.InternalMessageInfo -func (m *DynamicResource) GetClassName() string { - if m != nil { - return m.ClassName - } - return "" -} - func (m *DynamicResource) GetClaimName() string { if m != nil { return m.ClaimName @@ -654,9 +648,15 @@ func (m *DynamicResource) GetClaimResources() []*ClaimResource { return nil } -// ClaimResource contains per plugin resource information +// ClaimResource contains resource information. The driver name/pool name/device name +// triplet uniquely identifies the device. Should DRA get extended to other kinds +// of resources, then device_name will be empty and other fields will get added. +// Each device at the DRA API level may map to zero or more CDI devices. type ClaimResource struct { CDIDevices []*CDIDevice `protobuf:"bytes,1,rep,name=cdi_devices,json=cdiDevices,proto3" json:"cdi_devices,omitempty"` + DriverName string `protobuf:"bytes,2,opt,name=driver_name,json=driverName,proto3" json:"driver_name,omitempty"` + PoolName string `protobuf:"bytes,3,opt,name=pool_name,json=poolName,proto3" json:"pool_name,omitempty"` + DeviceName string `protobuf:"bytes,4,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_sizecache int32 `json:"-"` } @@ -700,6 +700,27 @@ func (m *ClaimResource) GetCDIDevices() []*CDIDevice { return nil } +func (m *ClaimResource) GetDriverName() string { + if m != nil { + return m.DriverName + } + return "" +} + +func (m *ClaimResource) GetPoolName() string { + if m != nil { + return m.PoolName + } + return "" +} + +func (m *ClaimResource) GetDeviceName() string { + if m != nil { + return m.DeviceName + } + return "" +} + // CDIDevice specifies a CDI device information type CDIDevice struct { // Fully qualified CDI device name @@ -871,55 +892,57 @@ func init() { func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) } var fileDescriptor_00212fb1f9d3bf1c = []byte{ - // 760 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5d, 0x6f, 0x12, 0x4d, - 0x14, 0xee, 0xb0, 0xf4, 0x83, 0x53, 0xe8, 0xc7, 0xbc, 0x6f, 0x5a, 0x4a, 0x5b, 0x20, 0xdb, 0x8b, - 0x36, 0x51, 0x21, 0xad, 0xd1, 0x18, 0x2f, 0x4c, 0x3f, 0x30, 0x0d, 0x89, 0xad, 0x75, 0x53, 0x13, - 0xe3, 0x85, 0x64, 0xd9, 0x9d, 0xe2, 0xa4, 0xc0, 0x8c, 0xcc, 0x42, 0xc4, 0x2b, 0x2f, 0xfc, 0x01, - 0x5e, 0xf8, 0x53, 0xfc, 0x11, 0xbd, 0xf4, 0x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xc8, 0x93, 0xd7, 0x0f, 0xba, 0x7d, 0xfd, - 0xec, 0xfd, 0x41, 0x80, 0xc3, 0xb0, 0x5c, 0x6f, 0xa4, 0x85, 0x8f, 0x20, 0x2e, 0x4f, 0x78, 0x5d, - 0xba, 0x4f, 0xd8, 0x86, 0x99, 0x8d, 0x68, 0x50, 0x27, 0x64, 0x4e, 0xe1, 0x77, 0x2a, 0xdb, 0xa8, - 0x0d, 0x8f, 0x73, 0xd2, 0xf5, 0x1f, 0xdf, 0x86, 0x4c, 0x7e, 0x32, 0x21, 0x88, 0xbf, 0x0f, 0xc6, - 0x31, 0xf1, 0x70, 0x46, 0x52, 0xa3, 0x05, 0xcf, 0xac, 0x47, 0x62, 0x7e, 0x84, 0xc3, 0xe7, 0x57, - 0x37, 0x59, 0xf4, 0xf3, 0x26, 0x3b, 0xf5, 0xb9, 0x97, 0x45, 0x57, 0xbd, 0x2c, 0xfa, 0xd1, 0xcb, - 0xa2, 0xeb, 0x5e, 0x16, 0x7d, 0xfd, 0x9d, 0x9d, 0x7a, 0xbb, 0x7d, 0xf9, 0x44, 0x14, 0x28, 0x2b, - 0x5e, 0xb6, 0xab, 0xa4, 0x4e, 0xbc, 0x22, 0xbf, 0xac, 0x15, 0x6d, 0x4e, 0x45, 0x91, 0x33, 0x37, - 0xd0, 0xb9, 0xd8, 0xd9, 0xad, 0xce, 0xa8, 0xcf, 0xdd, 0xc3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x49, 0xac, 0x87, 0x00, 0x2e, 0x07, 0x00, 0x00, + // 789 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xda, 0x48, + 0x18, 0xce, 0x60, 0x92, 0xc0, 0x0b, 0xe4, 0x63, 0x76, 0x95, 0x10, 0x48, 0x00, 0x39, 0x87, 0x44, + 0xda, 0x5d, 0x50, 0xb2, 0xda, 0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, 0x2f, 0xb0, 0xd4, 0x25, 0x5d, 0xea, + 0x0e, 0xf3, 0x9a, 0xf4, 0xf3, 0xd3, 0x84, 0x9f, 0x73, 0x49, 0x19, 0xbe, 0x44, 0xdf, 0x82, 0xcd, + 0xff, 0x1c, 0xee, 0x5d, 0x52, 0x7b, 0x26, 0xe2, 0xff, 0x21, 0x3f, 0x4b, 0xf9, 0xc1, 0xfe, 0x01, + 0x39, 0x46, 0xed, 0xa6, 0x1b, 0x10, 0x7e, 0xc8, 0x6b, 0xe2, 0xa9, 0x09, 0x83, 0x2c, 0x8b, 0xdc, + 0xf4, 0x57, 0x90, 0x8d, 0xb2, 0x18, 0x43, 0xb2, 0x67, 0x76, 0x49, 0x1e, 0x55, 0xd0, 0x7e, 0xda, + 0x90, 0x67, 0xbc, 0x0d, 0x69, 0xf1, 0xcb, 0x99, 0x69, 0x91, 0x7c, 0x42, 0x12, 0x63, 0x00, 0xff, + 0x09, 0x60, 0x05, 0xa9, 0x70, 0x3f, 0xc1, 0x8d, 0x89, 0x04, 0xc7, 0x6f, 0x47, 0x94, 0xfa, 0x1d, + 0x02, 0x3c, 0x2b, 0x89, 0x0d, 0x20, 0xd2, 0x88, 0xc4, 0x23, 0x1b, 0xa1, 0xcd, 0x69, 0x44, 0xf2, + 0xc1, 0x46, 0xe0, 0x23, 0x58, 0xb7, 0x87, 0x3d, 0xb3, 0xeb, 0x58, 0x91, 0xaa, 0x2e, 0x8e, 0xed, + 0xea, 0x8a, 0x0c, 0x42, 0x37, 0xd6, 0xec, 0x49, 0x80, 0xeb, 0x1e, 0xac, 0x4e, 0x39, 0xc7, 0x65, + 0xc8, 0x28, 0xf7, 0x4d, 0x6f, 0xc8, 0x82, 0x2c, 0x41, 0x41, 0x57, 0x43, 0x46, 0x44, 0xfe, 0xdc, + 0x79, 0xad, 0xea, 0x9c, 0x34, 0xe4, 0x19, 0xff, 0x0a, 0x29, 0x8f, 0x32, 0xda, 0xa1, 0x6d, 0x31, + 0x41, 0x28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 0xda, + 0xe0, 0xa0, 0xb5, 0x24, 0xbf, 0x97, 0xbf, 0x7f, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x1b, 0x18, + 0xf9, 0x6f, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1580,13 +1603,6 @@ func (m *DynamicResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.ClassName) > 0 { - i -= len(m.ClassName) - copy(dAtA[i:], m.ClassName) - i = encodeVarintApi(dAtA, i, uint64(len(m.ClassName))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -1610,6 +1626,27 @@ func (m *ClaimResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.DeviceName) > 0 { + i -= len(m.DeviceName) + copy(dAtA[i:], m.DeviceName) + i = encodeVarintApi(dAtA, i, uint64(len(m.DeviceName))) + i-- + dAtA[i] = 0x22 + } + if len(m.PoolName) > 0 { + i -= len(m.PoolName) + copy(dAtA[i:], m.PoolName) + i = encodeVarintApi(dAtA, i, uint64(len(m.PoolName))) + i-- + dAtA[i] = 0x1a + } + if len(m.DriverName) > 0 { + i -= len(m.DriverName) + copy(dAtA[i:], m.DriverName) + i = encodeVarintApi(dAtA, i, uint64(len(m.DriverName))) + i-- + dAtA[i] = 0x12 + } if len(m.CDIDevices) > 0 { for iNdEx := len(m.CDIDevices) - 1; iNdEx >= 0; iNdEx-- { { @@ -1938,10 +1975,6 @@ func (m *DynamicResource) Size() (n int) { } var l int _ = l - l = len(m.ClassName) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } l = len(m.ClaimName) if l > 0 { n += 1 + l + sovApi(uint64(l)) @@ -1971,6 +2004,18 @@ func (m *ClaimResource) Size() (n int) { n += 1 + l + sovApi(uint64(l)) } } + l = len(m.DriverName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.PoolName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.DeviceName) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } return n } @@ -2183,7 +2228,6 @@ func (this *DynamicResource) String() string { } repeatedStringForClaimResources += "}" s := strings.Join([]string{`&DynamicResource{`, - `ClassName:` + fmt.Sprintf("%v", this.ClassName) + `,`, `ClaimName:` + fmt.Sprintf("%v", this.ClaimName) + `,`, `ClaimNamespace:` + fmt.Sprintf("%v", this.ClaimNamespace) + `,`, `ClaimResources:` + repeatedStringForClaimResources + `,`, @@ -2202,6 +2246,9 @@ func (this *ClaimResource) String() string { repeatedStringForCDIDevices += "}" s := strings.Join([]string{`&ClaimResource{`, `CDIDevices:` + repeatedStringForCDIDevices + `,`, + `DriverName:` + fmt.Sprintf("%v", this.DriverName) + `,`, + `PoolName:` + fmt.Sprintf("%v", this.PoolName) + `,`, + `DeviceName:` + fmt.Sprintf("%v", this.DeviceName) + `,`, `}`, }, "") return s @@ -3500,38 +3547,6 @@ func (m *DynamicResource) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: DynamicResource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClassName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClassName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ClaimName", wireType) @@ -3714,6 +3729,102 @@ func (m *ClaimResource) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DriverName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApi + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApi + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DeviceName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApi(dAtA[iNdEx:]) diff --git a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto index 9e6022ac32c38..93ab0185d5866 100644 --- a/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto +++ b/staging/src/k8s.io/kubelet/pkg/apis/podresources/v1/api.proto @@ -82,15 +82,22 @@ message NUMANode { // DynamicResource contains information about the devices assigned to a container by DRA message DynamicResource { - string class_name = 1; + // tombstone: removed in 1.31 because claims are no longer associated with one class + // string class_name = 1; string claim_name = 2; string claim_namespace = 3; repeated ClaimResource claim_resources = 4; } -// ClaimResource contains per plugin resource information +// ClaimResource contains resource information. The driver name/pool name/device name +// triplet uniquely identifies the device. Should DRA get extended to other kinds +// of resources, then device_name will be empty and other fields will get added. +// Each device at the DRA API level may map to zero or more CDI devices. message ClaimResource { repeated CDIDevice cdi_devices = 1 [(gogoproto.customname) = "CDIDevices"]; + string driver_name = 2; + string pool_name = 3; + string device_name = 4; } // CDIDevice specifies a CDI device information From 861df385a16a973c3cf30303362ef54d8624a73d Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Jul 2024 16:29:14 +0200 Subject: [PATCH 15/20] DRA e2e: adapt to v1alpha3 API --- test/e2e/dra/deploy.go | 121 +-- test/e2e/dra/dra.go | 816 +++++++++--------- test/e2e/dra/kind.yaml | 1 + test/e2e/dra/test-driver/app/controller.go | 173 ++-- test/e2e/dra/test-driver/app/kubeletplugin.go | 303 +++---- .../deploy/example/deviceclass.yaml | 8 + .../deploy/example/resourceclaim.yaml | 17 +- .../deploy/example/resourceclass.yaml | 7 - 8 files changed, 705 insertions(+), 741 deletions(-) create mode 100644 test/e2e/dra/test-driver/deploy/example/deviceclass.yaml delete mode 100644 test/e2e/dra/test-driver/deploy/example/resourceclass.yaml diff --git a/test/e2e/dra/deploy.go b/test/e2e/dra/deploy.go index 62da5d00d3fa4..074d46a16e424 100644 --- a/test/e2e/dra/deploy.go +++ b/test/e2e/dra/deploy.go @@ -38,7 +38,6 @@ import ( appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" resourceapi "k8s.io/api/resource/v1alpha3" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -99,6 +98,7 @@ func NewNodes(f *framework.Framework, minNodes, maxNodes int) *Nodes { for _, node := range nodeList.Items { nodes.NodeNames = append(nodes.NodeNames, node.Name) } + sort.Strings(nodes.NodeNames) framework.Logf("testing on nodes %v", nodes.NodeNames) // Watch claims in the namespace. This is useful for monitoring a test @@ -153,7 +153,7 @@ func validateClaim(claim *resourceapi.ResourceClaim) { // NewDriver sets up controller (as client of the cluster) and // kubelet plugin (via proxy) before the test runs. It cleans // up after the test. -func NewDriver(f *framework.Framework, nodes *Nodes, configureResources func() app.Resources) *Driver { +func NewDriver(f *framework.Framework, nodes *Nodes, configureResources func() app.Resources, devicesPerNode ...map[string]map[resourceapi.QualifiedName]resourceapi.DeviceAttribute) *Driver { d := &Driver{ f: f, fail: map[MethodInstance]bool{}, @@ -169,7 +169,7 @@ func NewDriver(f *framework.Framework, nodes *Nodes, configureResources func() a resources.Nodes = nodes.NodeNames } ginkgo.DeferCleanup(d.IsGone) // Register first so it gets called last. - d.SetUp(nodes, resources) + d.SetUp(nodes, resources, devicesPerNode...) ginkgo.DeferCleanup(d.TearDown) }) return d @@ -191,13 +191,8 @@ type Driver struct { Name string Nodes map[string]*app.ExamplePlugin - parameterMode parameterMode - parameterAPIGroup string - parameterAPIVersion string - claimParameterAPIKind string - classParameterAPIKind string - - NodeV1alpha3 bool + parameterMode parameterMode // empty == parameterModeStructured + NodeV1alpha3 bool mutex sync.Mutex fail map[MethodInstance]bool @@ -207,12 +202,11 @@ type Driver struct { type parameterMode string const ( - parameterModeConfigMap parameterMode = "configmap" // ConfigMap parameters, control plane controller. - parameterModeStructured parameterMode = "structured" // No ConfigMaps, directly create and reference in-tree parameter objects. - parameterModeTranslated parameterMode = "translated" // Reference ConfigMaps in claim and class, generate in-tree parameter objects. + parameterModeClassicDRA parameterMode = "classic" // control plane controller + parameterModeStructured parameterMode = "structured" // allocation through scheduler ) -func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { +func (d *Driver) SetUp(nodes *Nodes, resources app.Resources, devicesPerNode ...map[string]map[resourceapi.QualifiedName]resourceapi.DeviceAttribute) { ginkgo.By(fmt.Sprintf("deploying driver on nodes %v", nodes.NodeNames)) d.Nodes = map[string]*app.ExamplePlugin{} d.Name = d.f.UniqueName + d.NameSuffix + ".k8s.io" @@ -227,8 +221,12 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { d.ctx = ctx d.cleanup = append(d.cleanup, cancel) + if d.parameterMode == "" { + d.parameterMode = parameterModeStructured + } + switch d.parameterMode { - case "", parameterModeConfigMap: + case parameterModeClassicDRA: // The controller is easy: we simply connect to the API server. d.Controller = app.NewController(d.f.ClientSet, resources) d.wg.Add(1) @@ -236,6 +234,41 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { defer d.wg.Done() d.Controller.Run(d.ctx, 5 /* workers */) }() + case parameterModeStructured: + if !resources.NodeLocal { + // Publish one resource pool with "network-attached" devices. + slice := &resourceapi.ResourceSlice{ + ObjectMeta: metav1.ObjectMeta{ + Name: d.Name, // globally unique + }, + Spec: resourceapi.ResourceSliceSpec{ + Driver: d.Name, + Pool: resourceapi.ResourcePool{ + Name: "network", + Generation: 1, + ResourceSliceCount: 1, + }, + AllNodes: true, + }, + } + maxAllocations := resources.MaxAllocations + if maxAllocations <= 0 { + // Cannot be empty, otherwise nothing runs. + maxAllocations = 10 + } + for i := 0; i < maxAllocations; i++ { + slice.Spec.Devices = append(slice.Spec.Devices, resourceapi.Device{ + Name: fmt.Sprintf("device-%d", i), + Basic: &resourceapi.BasicDevice{}, + }) + } + + _, err := d.f.ClientSet.ResourceV1alpha3().ResourceSlices().Create(ctx, slice, metav1.CreateOptions{}) + framework.ExpectNoError(err) + ginkgo.DeferCleanup(func(ctx context.Context) { + framework.ExpectNoError(d.f.ClientSet.ResourceV1alpha3().ResourceSlices().Delete(ctx, slice.Name, metav1.DeleteOptions{})) + }) + } } manifests := []string{ @@ -243,24 +276,12 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { // container names, etc.). "test/e2e/testing-manifests/dra/dra-test-driver-proxy.yaml", } - if d.parameterMode == "" { - d.parameterMode = parameterModeConfigMap - } - var numResourceInstances = -1 // disabled - if d.parameterMode != parameterModeConfigMap { - numResourceInstances = resources.MaxAllocations + var numDevices = -1 // disabled + if d.parameterMode != parameterModeClassicDRA && resources.NodeLocal { + numDevices = resources.MaxAllocations } switch d.parameterMode { - case parameterModeConfigMap, parameterModeTranslated: - d.parameterAPIGroup = "" - d.parameterAPIVersion = "v1" - d.claimParameterAPIKind = "ConfigMap" - d.classParameterAPIKind = "ConfigMap" - case parameterModeStructured: - d.parameterAPIGroup = "resource.k8s.io" - d.parameterAPIVersion = "v1alpha3" - d.claimParameterAPIKind = "ResourceClaimParameters" - d.classParameterAPIKind = "ResourceClassParameters" + case parameterModeClassicDRA, parameterModeStructured: default: framework.Failf("unknown test driver parameter mode: %s", d.parameterMode) } @@ -304,10 +325,6 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { item.Spec.Template.Spec.Volumes[2].HostPath.Path = path.Join(framework.TestContext.KubeletRootDir, "plugins_registry") item.Spec.Template.Spec.Containers[0].Args = append(item.Spec.Template.Spec.Containers[0].Args, "--endpoint=/plugins_registry/"+d.Name+"-reg.sock") item.Spec.Template.Spec.Containers[1].Args = append(item.Spec.Template.Spec.Containers[1].Args, "--endpoint=/dra/"+d.Name+".sock") - case *apiextensionsv1.CustomResourceDefinition: - item.Name = strings.ReplaceAll(item.Name, "dra.e2e.example.com", d.parameterAPIGroup) - item.Spec.Group = d.parameterAPIGroup - } return nil }, manifests...) @@ -326,9 +343,12 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { pods, err := d.f.ClientSet.CoreV1().Pods(d.f.Namespace.Name).List(ctx, metav1.ListOptions{LabelSelector: selector.String()}) framework.ExpectNoError(err, "list proxy pods") gomega.Expect(numNodes).To(gomega.Equal(int32(len(pods.Items))), "number of proxy pods") + sort.Slice(pods.Items, func(i, j int) bool { + return pods.Items[i].Spec.NodeName < pods.Items[j].Spec.NodeName + }) // Run registrar and plugin for each of the pods. - for _, pod := range pods.Items { + for i, pod := range pods.Items { // Need a local variable, not the loop variable, for the anonymous // callback functions below. pod := pod @@ -353,18 +373,23 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { framework.ExpectNoError(err, "create client for driver") logger := klog.LoggerWithValues(klog.LoggerWithName(klog.Background(), "kubelet plugin"), "node", pod.Spec.NodeName, "pod", klog.KObj(&pod)) loggerCtx := klog.NewContext(ctx, logger) - plugin, err := app.StartPlugin(loggerCtx, "/cdi", d.Name, driverClient, nodename, - app.FileOperations{ - Create: func(name string, content []byte) error { - klog.Background().Info("creating CDI file", "node", nodename, "filename", name, "content", string(content)) - return d.createFile(&pod, name, content) - }, - Remove: func(name string) error { - klog.Background().Info("deleting CDI file", "node", nodename, "filename", name) - return d.removeFile(&pod, name) - }, - NumResourceInstances: numResourceInstances, + fileOps := app.FileOperations{ + Create: func(name string, content []byte) error { + klog.Background().Info("creating CDI file", "node", nodename, "filename", name, "content", string(content)) + return d.createFile(&pod, name, content) + }, + Remove: func(name string) error { + klog.Background().Info("deleting CDI file", "node", nodename, "filename", name) + return d.removeFile(&pod, name) }, + } + if i < len(devicesPerNode) { + fileOps.Devices = devicesPerNode[i] + fileOps.NumDevices = -1 + } else { + fileOps.NumDevices = numDevices + } + plugin, err := app.StartPlugin(loggerCtx, "/cdi", d.Name, driverClient, nodename, fileOps, kubeletplugin.GRPCVerbosity(0), kubeletplugin.GRPCInterceptor(func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { return d.interceptor(nodename, ctx, req, info, handler) @@ -499,7 +524,7 @@ func (d *Driver) TearDown() { func (d *Driver) IsGone(ctx context.Context) { gomega.Eventually(ctx, func(ctx context.Context) ([]resourceapi.ResourceSlice, error) { - slices, err := d.f.ClientSet.ResourceV1alpha3().ResourceSlices().List(ctx, metav1.ListOptions{FieldSelector: "driverName=" + d.Name}) + slices, err := d.f.ClientSet.ResourceV1alpha3().ResourceSlices().List(ctx, metav1.ListOptions{FieldSelector: resourceapi.ResourceSliceSelectorDriver + "=" + d.Name}) if err != nil { return nil, err } diff --git a/test/e2e/dra/dra.go b/test/e2e/dra/dra.go index 935c1856df159..3b00f26027619 100644 --- a/test/e2e/dra/dra.go +++ b/test/e2e/dra/dra.go @@ -18,7 +18,7 @@ package dra import ( "context" - "encoding/json" + _ "embed" "errors" "fmt" "strings" @@ -32,6 +32,7 @@ import ( v1 "k8s.io/api/core/v1" resourceapi "k8s.io/api/resource/v1alpha3" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" @@ -52,6 +53,9 @@ const ( podStartTimeout = 5 * time.Minute ) +//go:embed test-driver/deploy/example/admin-access-policy.yaml +var adminAccessPolicyYAML string + // networkResources can be passed to NewDriver directly. func networkResources() app.Resources { return app.Resources{} @@ -79,105 +83,98 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.Context("kubelet", func() { nodes := NewNodes(f, 1, 1) + driver := NewDriver(f, nodes, networkResources) + b := newBuilder(f, driver) - ginkgo.Context("with ConfigMap parameters", func() { - driver := NewDriver(f, nodes, networkResources) - b := newBuilder(f, driver) - - ginkgo.It("registers plugin", func() { - ginkgo.By("the driver is running") - }) + ginkgo.It("registers plugin", func() { + ginkgo.By("the driver is running") + }) - ginkgo.It("must retry NodePrepareResources", func(ctx context.Context) { - // We have exactly one host. - m := MethodInstance{driver.Nodenames()[0], NodePrepareResourcesMethod} + ginkgo.It("must retry NodePrepareResources", func(ctx context.Context) { + // We have exactly one host. + m := MethodInstance{driver.Nodenames()[0], NodePrepareResourcesMethod} - driver.Fail(m, true) + driver.Fail(m, true) - ginkgo.By("waiting for container startup to fail") - parameters := b.parameters() - pod, template := b.podInline() + ginkgo.By("waiting for container startup to fail") + pod, template := b.podInline() - b.create(ctx, parameters, pod, template) + b.create(ctx, pod, template) - ginkgo.By("wait for NodePrepareResources call") - gomega.Eventually(ctx, func(ctx context.Context) error { - if driver.CallCount(m) == 0 { - return errors.New("NodePrepareResources not called yet") - } - return nil - }).WithTimeout(podStartTimeout).Should(gomega.Succeed()) - - ginkgo.By("allowing container startup to succeed") - callCount := driver.CallCount(m) - driver.Fail(m, false) - err := e2epod.WaitForPodNameRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace) - framework.ExpectNoError(err, "start pod with inline resource claim") - if driver.CallCount(m) == callCount { - framework.Fail("NodePrepareResources should have been called again") + ginkgo.By("wait for NodePrepareResources call") + gomega.Eventually(ctx, func(ctx context.Context) error { + if driver.CallCount(m) == 0 { + return errors.New("NodePrepareResources not called yet") } - }) - - ginkgo.It("must not run a pod if a claim is not ready", func(ctx context.Context) { - claim := b.externalClaim() - b.create(ctx, claim) - pod := b.podExternal() + return nil + }).WithTimeout(podStartTimeout).Should(gomega.Succeed()) + + ginkgo.By("allowing container startup to succeed") + callCount := driver.CallCount(m) + driver.Fail(m, false) + err := e2epod.WaitForPodNameRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace) + framework.ExpectNoError(err, "start pod with inline resource claim") + if driver.CallCount(m) == callCount { + framework.Fail("NodePrepareResources should have been called again") + } + }) - // This bypasses scheduling and therefore the pod gets - // to run on the node although the claim is not ready. - // Because the parameters are missing, the claim - // also cannot be allocated later. - pod.Spec.NodeName = nodes.NodeNames[0] - b.create(ctx, pod) + ginkgo.It("must not run a pod if a claim is not ready", func(ctx context.Context) { + claim := b.externalClaim() + b.create(ctx, claim) + pod := b.podExternal() - gomega.Consistently(ctx, func(ctx context.Context) error { - testPod, err := b.f.ClientSet.CoreV1().Pods(pod.Namespace).Get(ctx, pod.Name, metav1.GetOptions{}) - if err != nil { - return fmt.Errorf("expected the test pod %s to exist: %w", pod.Name, err) - } - if testPod.Status.Phase != v1.PodPending { - return fmt.Errorf("pod %s: unexpected status %s, expected status: %s", pod.Name, testPod.Status.Phase, v1.PodPending) - } - return nil - }, 20*time.Second, 200*time.Millisecond).Should(gomega.BeNil()) - }) + // This bypasses scheduling and therefore the pod gets + // to run on the node although the claim is not ready. + // Because the parameters are missing, the claim + // also cannot be allocated later. + pod.Spec.NodeName = nodes.NodeNames[0] + b.create(ctx, pod) - ginkgo.It("must unprepare resources for force-deleted pod", func(ctx context.Context) { - parameters := b.parameters() - claim := b.externalClaim() - pod := b.podExternal() - zero := int64(0) - pod.Spec.TerminationGracePeriodSeconds = &zero + gomega.Consistently(ctx, func(ctx context.Context) error { + testPod, err := b.f.ClientSet.CoreV1().Pods(pod.Namespace).Get(ctx, pod.Name, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("expected the test pod %s to exist: %w", pod.Name, err) + } + if testPod.Status.Phase != v1.PodPending { + return fmt.Errorf("pod %s: unexpected status %s, expected status: %s", pod.Name, testPod.Status.Phase, v1.PodPending) + } + return nil + }, 20*time.Second, 200*time.Millisecond).Should(gomega.BeNil()) + }) - b.create(ctx, parameters, claim, pod) + ginkgo.It("must unprepare resources for force-deleted pod", func(ctx context.Context) { + claim := b.externalClaim() + pod := b.podExternal() + zero := int64(0) + pod.Spec.TerminationGracePeriodSeconds = &zero - b.testPod(ctx, f.ClientSet, pod) + b.create(ctx, claim, pod) - ginkgo.By(fmt.Sprintf("force delete test pod %s", pod.Name)) - err := b.f.ClientSet.CoreV1().Pods(b.f.Namespace.Name).Delete(ctx, pod.Name, metav1.DeleteOptions{GracePeriodSeconds: &zero}) - if !apierrors.IsNotFound(err) { - framework.ExpectNoError(err, "force delete test pod") - } + b.testPod(ctx, f.ClientSet, pod) - for host, plugin := range b.driver.Nodes { - ginkgo.By(fmt.Sprintf("waiting for resources on %s to be unprepared", host)) - gomega.Eventually(plugin.GetPreparedResources).WithTimeout(time.Minute).Should(gomega.BeEmpty(), "prepared claims on host %s", host) - } - }) + ginkgo.By(fmt.Sprintf("force delete test pod %s", pod.Name)) + err := b.f.ClientSet.CoreV1().Pods(b.f.Namespace.Name).Delete(ctx, pod.Name, metav1.DeleteOptions{GracePeriodSeconds: &zero}) + if !apierrors.IsNotFound(err) { + framework.ExpectNoError(err, "force delete test pod") + } - ginkgo.It("must skip NodePrepareResource if not used by any container", func(ctx context.Context) { - parameters := b.parameters() - pod, template := b.podInline() - for i := range pod.Spec.Containers { - pod.Spec.Containers[i].Resources.Claims = nil - } - b.create(ctx, parameters, pod, template) - framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(ctx, f.ClientSet, pod), "start pod") - for host, plugin := range b.driver.Nodes { - gomega.Expect(plugin.GetPreparedResources()).Should(gomega.BeEmpty(), "not claims should be prepared on host %s while pod is running", host) - } - }) + for host, plugin := range b.driver.Nodes { + ginkgo.By(fmt.Sprintf("waiting for resources on %s to be unprepared", host)) + gomega.Eventually(plugin.GetPreparedResources).WithTimeout(time.Minute).Should(gomega.BeEmpty(), "prepared claims on host %s", host) + } + }) + ginkgo.It("must call NodePrepareResources even if not used by any container", func(ctx context.Context) { + pod, template := b.podInline() + for i := range pod.Spec.Containers { + pod.Spec.Containers[i].Resources.Claims = nil + } + b.create(ctx, pod, template) + framework.ExpectNoError(e2epod.WaitForPodRunningInNamespace(ctx, f.ClientSet, pod), "start pod") + for host, plugin := range b.driver.Nodes { + gomega.Expect(plugin.GetPreparedResources()).ShouldNot(gomega.BeEmpty(), "claims should be prepared on host %s while pod is running", host) + } }) }) @@ -185,81 +182,64 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // claims, both inline and external. claimTests := func(b *builder, driver *Driver) { ginkgo.It("supports simple pod referencing inline resource claim", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() pod, template := b.podInline() - objects = append(objects, pod, template) - b.create(ctx, objects...) - - b.testPod(ctx, f.ClientSet, pod, expectedEnv...) + b.create(ctx, pod, template) + b.testPod(ctx, f.ClientSet, pod) }) ginkgo.It("supports inline claim referenced by multiple containers", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() pod, template := b.podInlineMultiple() - objects = append(objects, pod, template) - b.create(ctx, objects...) - - b.testPod(ctx, f.ClientSet, pod, expectedEnv...) + b.create(ctx, pod, template) + b.testPod(ctx, f.ClientSet, pod) }) ginkgo.It("supports simple pod referencing external resource claim", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() pod := b.podExternal() claim := b.externalClaim() - objects = append(objects, claim, pod) - b.create(ctx, objects...) - - b.testPod(ctx, f.ClientSet, pod, expectedEnv...) + b.create(ctx, claim, pod) + b.testPod(ctx, f.ClientSet, pod) }) ginkgo.It("supports external claim referenced by multiple pods", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() pod1 := b.podExternal() pod2 := b.podExternal() pod3 := b.podExternal() claim := b.externalClaim() - objects = append(objects, claim, pod1, pod2, pod3) - b.create(ctx, objects...) + b.create(ctx, claim, pod1, pod2, pod3) for _, pod := range []*v1.Pod{pod1, pod2, pod3} { - b.testPod(ctx, f.ClientSet, pod, expectedEnv...) + b.testPod(ctx, f.ClientSet, pod) } }) ginkgo.It("supports external claim referenced by multiple containers of multiple pods", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() pod1 := b.podExternalMultiple() pod2 := b.podExternalMultiple() pod3 := b.podExternalMultiple() claim := b.externalClaim() - objects = append(objects, claim, pod1, pod2, pod3) - b.create(ctx, objects...) + b.create(ctx, claim, pod1, pod2, pod3) for _, pod := range []*v1.Pod{pod1, pod2, pod3} { - b.testPod(ctx, f.ClientSet, pod, expectedEnv...) + b.testPod(ctx, f.ClientSet, pod) } }) ginkgo.It("supports init containers", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() pod, template := b.podInline() pod.Spec.InitContainers = []v1.Container{pod.Spec.Containers[0]} pod.Spec.InitContainers[0].Name += "-init" // This must succeed for the pod to start. pod.Spec.InitContainers[0].Command = []string{"sh", "-c", "env | grep user_a=b"} - objects = append(objects, pod, template) - b.create(ctx, objects...) + b.create(ctx, pod, template) - b.testPod(ctx, f.ClientSet, pod, expectedEnv...) + b.testPod(ctx, f.ClientSet, pod) }) ginkgo.It("removes reservation from claim when pod is done", func(ctx context.Context) { - objects, _ := b.flexibleParameters() pod := b.podExternal() claim := b.externalClaim() pod.Spec.Containers[0].Command = []string{"true"} - objects = append(objects, claim, pod) - b.create(ctx, objects...) + b.create(ctx, claim, pod) ginkgo.By("waiting for pod to finish") framework.ExpectNoError(e2epod.WaitForPodNoLongerRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace), "wait for pod to finish") @@ -270,11 +250,9 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("deletes generated claims when pod is done", func(ctx context.Context) { - objects, _ := b.flexibleParameters() pod, template := b.podInline() pod.Spec.Containers[0].Command = []string{"true"} - objects = append(objects, template, pod) - b.create(ctx, objects...) + b.create(ctx, template, pod) ginkgo.By("waiting for pod to finish") framework.ExpectNoError(e2epod.WaitForPodNoLongerRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace), "wait for pod to finish") @@ -289,12 +267,10 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("does not delete generated claims when pod is restarting", func(ctx context.Context) { - objects, _ := b.flexibleParameters() pod, template := b.podInline() pod.Spec.Containers[0].Command = []string{"sh", "-c", "sleep 1; exit 1"} pod.Spec.RestartPolicy = v1.RestartPolicyAlways - objects = append(objects, template, pod) - b.create(ctx, objects...) + b.create(ctx, template, pod) ginkgo.By("waiting for pod to restart twice") gomega.Eventually(ctx, func(ctx context.Context) (*v1.Pod, error) { @@ -306,17 +282,15 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("must deallocate after use", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() pod := b.podExternal() claim := b.externalClaim() - objects = append(objects, claim, pod) - b.create(ctx, objects...) + b.create(ctx, claim, pod) gomega.Eventually(ctx, func(ctx context.Context) (*resourceapi.ResourceClaim, error) { return b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Get(ctx, claim.Name, metav1.GetOptions{}) }).WithTimeout(f.Timeouts.PodDelete).ShouldNot(gomega.HaveField("Status.Allocation", (*resourceapi.AllocationResult)(nil))) - b.testPod(ctx, f.ClientSet, pod, expectedEnv...) + b.testPod(ctx, f.ClientSet, pod) ginkgo.By(fmt.Sprintf("deleting pod %s", klog.KObj(pod))) framework.ExpectNoError(b.f.ClientSet.CoreV1().Pods(b.f.Namespace.Name).Delete(ctx, pod.Name, metav1.DeleteOptions{})) @@ -339,23 +313,20 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, driver := NewDriver(f, nodes, generateResources) // All tests get their own driver instance. driver.parameterMode = parameterMode b := newBuilder(f, driver) - // We need the parameters name *before* creating it. - b.parametersCounter = 1 - b.classParametersName = b.parametersName() + // We have to set the parameters *before* creating the class. + b.classParameters = `{"x":"y"}` + expectedEnv := []string{"admin_x", "y"} + _, expected := b.parametersEnv() + expectedEnv = append(expectedEnv, expected...) ginkgo.It("supports claim and class parameters", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() - pod, template := b.podInline() - objects = append(objects, pod, template) - - b.create(ctx, objects...) - + b.create(ctx, pod, template) b.testPod(ctx, f.ClientSet, pod, expectedEnv...) }) ginkgo.It("supports reusing resources", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() + var objects []klog.KMetadata pods := make([]*v1.Pod, numPods) for i := 0; i < numPods; i++ { pod, template := b.podInline() @@ -383,9 +354,8 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) ginkgo.It("supports sharing a claim concurrently", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() + var objects []klog.KMetadata objects = append(objects, b.externalClaim()) - pods := make([]*v1.Pod, numPods) for i := 0; i < numPods; i++ { pod := b.podExternal() @@ -411,7 +381,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) f.It("supports sharing a claim sequentially", f.WithSlow(), func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() + var objects []klog.KMetadata objects = append(objects, b.externalClaim()) // This test used to test usage of the claim by one pod @@ -447,12 +417,14 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, wg.Wait() }) - ginkgo.It("retries pod scheduling after creating resource class", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() + ginkgo.It("retries pod scheduling after creating device class", func(ctx context.Context) { + var objects []klog.KMetadata pod, template := b.podInline() - class, err := f.ClientSet.ResourceV1alpha3().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) + deviceClassName := template.Spec.Spec.Devices.Requests[0].DeviceClassName + class, err := f.ClientSet.ResourceV1alpha3().DeviceClasses().Get(ctx, deviceClassName, metav1.GetOptions{}) framework.ExpectNoError(err) - template.Spec.Spec.ResourceClassName += "-b" + deviceClassName += "-b" + template.Spec.Spec.Devices.Requests[0].DeviceClassName = deviceClassName objects = append(objects, template, pod) b.create(ctx, objects...) @@ -460,33 +432,46 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, class.UID = "" class.ResourceVersion = "" - class.Name = template.Spec.Spec.ResourceClassName + class.Name = deviceClassName b.create(ctx, class) b.testPod(ctx, f.ClientSet, pod, expectedEnv...) }) - ginkgo.It("retries pod scheduling after updating resource class", func(ctx context.Context) { - objects, expectedEnv := b.flexibleParameters() + ginkgo.It("retries pod scheduling after updating device class", func(ctx context.Context) { + var objects []klog.KMetadata pod, template := b.podInline() - // First modify the class so that it matches no nodes. - class, err := f.ClientSet.ResourceV1alpha3().ResourceClasses().Get(ctx, template.Spec.Spec.ResourceClassName, metav1.GetOptions{}) + // First modify the class so that it matches no nodes (for classic DRA) and no devices (structured parameters). + deviceClassName := template.Spec.Spec.Devices.Requests[0].DeviceClassName + class, err := f.ClientSet.ResourceV1alpha3().DeviceClasses().Get(ctx, deviceClassName, metav1.GetOptions{}) framework.ExpectNoError(err) - class.SuitableNodes = &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{ - { - MatchExpressions: []v1.NodeSelectorRequirement{ - { - Key: "no-such-label", - Operator: v1.NodeSelectorOpIn, - Values: []string{"no-such-value"}, + originalClass := class.DeepCopy() + switch driver.parameterMode { + case parameterModeClassicDRA: + class.Spec.SuitableNodes = &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "no-such-label", + Operator: v1.NodeSelectorOpIn, + Values: []string{"no-such-value"}, + }, }, }, }, - }, + } + case parameterModeStructured: + class.Spec.Selectors = []resourceapi.DeviceSelector{{ + CEL: &resourceapi.CELDeviceSelector{ + Expression: "false", + }, + }} + default: + framework.Failf("unexpected mode: %s", driver.parameterMode) } - class, err = f.ClientSet.ResourceV1alpha3().ResourceClasses().Update(ctx, class, metav1.UpdateOptions{}) + class, err = f.ClientSet.ResourceV1alpha3().DeviceClasses().Update(ctx, class, metav1.UpdateOptions{}) framework.ExpectNoError(err) // Now create the pod. @@ -496,8 +481,9 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, framework.ExpectNoError(e2epod.WaitForPodNameUnschedulableInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace)) // Unblock the pod. - class.SuitableNodes = nil - _, err = f.ClientSet.ResourceV1alpha3().ResourceClasses().Update(ctx, class, metav1.UpdateOptions{}) + class.Spec.SuitableNodes = originalClass.Spec.SuitableNodes + class.Spec.Selectors = originalClass.Spec.Selectors + _, err = f.ClientSet.ResourceV1alpha3().DeviceClasses().Update(ctx, class, metav1.UpdateOptions{}) framework.ExpectNoError(err) b.testPod(ctx, f.ClientSet, pod, expectedEnv...) @@ -530,7 +516,6 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, b := newBuilder(f, driver) ginkgo.It("schedules onto different nodes", func(ctx context.Context) { - parameters := b.parameters() label := "app.kubernetes.io/instance" instance := f.UniqueName + "-test-app" antiAffinity := &v1.Affinity{ @@ -556,7 +541,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, pod1 := createPod() pod2 := createPod() claim := b.externalClaim() - b.create(ctx, parameters, claim, pod1, pod2) + b.create(ctx, claim, pod1, pod2) for _, pod := range []*v1.Pod{pod1, pod2} { err := e2epod.WaitForPodRunningInNamespace(ctx, f.ClientSet, pod) @@ -571,13 +556,12 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // nodes by running `docker stop `, which is very kind-specific. f.It(f.WithSerial(), f.WithDisruptive(), f.WithSlow(), "must deallocate on non graceful node shutdown", func(ctx context.Context) { ginkgo.By("create test pod") - parameters := b.parameters() label := "app.kubernetes.io/instance" instance := f.UniqueName + "-test-app" pod := b.podExternal() pod.Labels[label] = instance claim := b.externalClaim() - b.create(ctx, parameters, claim, pod) + b.create(ctx, claim, pod) ginkgo.By("wait for test pod " + pod.Name + " to run") labelSelector := labels.SelectorFromSet(labels.Set(pod.Labels)) @@ -616,7 +600,75 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, multiNodeTests := func(parameterMode parameterMode) { nodes := NewNodes(f, 2, 8) - if parameterMode == parameterModeConfigMap { + switch parameterMode { + case parameterModeStructured: + ginkgo.Context("with different ResourceSlices", func() { + firstDevice := "pre-defined-device-01" + secondDevice := "pre-defined-device-02" + devicesPerNode := []map[string]map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + // First node: + { + firstDevice: { + "healthy": {BoolValue: ptr.To(true)}, + "exists": {BoolValue: ptr.To(true)}, + }, + }, + // Second node: + { + secondDevice: { + "healthy": {BoolValue: ptr.To(false)}, + // Has no "exists" attribute! + }, + }, + } + driver := NewDriver(f, nodes, perNode(-1, nodes), devicesPerNode...) + b := newBuilder(f, driver) + + ginkgo.It("keeps pod pending because of CEL runtime errors", func(ctx context.Context) { + // When pod scheduling encounters CEL runtime errors for some nodes, but not all, + // it should still not schedule the pod because there is something wrong with it. + // Scheduling it would make it harder to detect that there is a problem. + // + // This matches the "CEL-runtime-error-for-subset-of-nodes" unit test, except that + // here we try it in combination with the actual scheduler and can extend it with + // other checks, like event handling (future extension). + + gomega.Eventually(ctx, framework.ListObjects(f.ClientSet.ResourceV1alpha3().ResourceSlices().List, + metav1.ListOptions{ + FieldSelector: resourceapi.ResourceSliceSelectorDriver + "=" + driver.Name, + }, + )).Should(gomega.HaveField("Items", gomega.ConsistOf( + gomega.HaveField("Spec.Devices", gomega.ConsistOf( + gomega.Equal(resourceapi.Device{ + Name: firstDevice, + Basic: &resourceapi.BasicDevice{ + Attributes: devicesPerNode[0][firstDevice], + }, + }))), + gomega.HaveField("Spec.Devices", gomega.ConsistOf( + gomega.Equal(resourceapi.Device{ + Name: firstDevice, + Basic: &resourceapi.BasicDevice{ + Attributes: devicesPerNode[0][firstDevice], + }, + }))), + ))) + + pod, template := b.podInline() + template.Spec.Spec.Devices.Requests[0].Selectors = append(template.Spec.Spec.Devices.Requests[0].Selectors, + resourceapi.DeviceSelector{ + CEL: &resourceapi.CELDeviceSelector{ + // Runtime error on one node, but not all. + Expression: fmt.Sprintf(`device.attributes["%s"].exists`, driver.Name), + }, + }, + ) + b.create(ctx, pod, template) + + framework.ExpectNoError(e2epod.WaitForPodNameUnschedulableInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace), "pod must not get scheduled because of a CEL runtime error") + }) + }) + case parameterModeClassicDRA: ginkgo.Context("with network-attached resources", func() { multiNodeDRAControllerTests(nodes) }) @@ -663,8 +715,6 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ctx, cancel := context.WithCancel(ctx) defer cancel() - parameters1 := b.parameters() - parameters2 := b2.parameters() // Order is relevant here: each pod must be matched with its own claim. pod1claim1 := b.externalClaim() pod1 := b.podExternal() @@ -697,7 +747,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, handler(ctx, claimAllocations, selectedNode) } - b.create(ctx, parameters1, parameters2, pod1claim1, pod1claim2, pod1) + b.create(ctx, pod1claim1, pod1claim2, pod1) ginkgo.By("waiting for one claim from driver1 to be allocated") var nodeSelector *v1.NodeSelector @@ -710,7 +760,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, for _, claim := range claims.Items { if claim.Status.Allocation != nil { allocated++ - nodeSelector = claim.Status.Allocation.AvailableOnNodes + nodeSelector = claim.Status.Allocation.NodeSelector } } return allocated, nil @@ -754,7 +804,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, b := newBuilder(f, driver) ginkgo.It("uses all resources", func(ctx context.Context) { - objs, _ := b.flexibleParameters() + var objs []klog.KMetadata var pods []*v1.Pod for i := 0; i < len(nodes.NodeNames); i++ { pod, template := b.podInline() @@ -801,8 +851,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }) } - ginkgo.Context("with ConfigMap parameters", func() { tests(parameterModeConfigMap) }) - ginkgo.Context("with translated parameters", func() { tests(parameterModeTranslated) }) + ginkgo.Context("with classic DRA", func() { tests(parameterModeClassicDRA) }) ginkgo.Context("with structured parameters", func() { tests(parameterModeStructured) }) // TODO (https://github.com/kubernetes/kubernetes/issues/123699): move most of the test below into `testDriver` so that they get @@ -814,15 +863,60 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, b := newBuilder(f, driver) ginkgo.It("truncates the name of a generated resource claim", func(ctx context.Context) { - parameters := b.parameters() pod, template := b.podInline() pod.Name = strings.Repeat("p", 63) pod.Spec.ResourceClaims[0].Name = strings.Repeat("c", 63) pod.Spec.Containers[0].Resources.Claims[0].Name = pod.Spec.ResourceClaims[0].Name - b.create(ctx, parameters, template, pod) + b.create(ctx, template, pod) b.testPod(ctx, f.ClientSet, pod) }) + + ginkgo.It("supports count/resourceclaim.resource ResourceQuota", func(ctx context.Context) { + claim := &resourceapi.ResourceClaim{ + ObjectMeta: metav1.ObjectMeta{ + Name: "claim-0", + Namespace: f.Namespace.Name, + }, + Spec: resourceapi.ResourceClaimSpec{ + Devices: resourceapi.DeviceClaim{ + Requests: []resourceapi.DeviceRequest{{ + Name: "req-0", + DeviceClassName: "my-class", + }}, + }, + }, + } + _, err := f.ClientSet.ResourceV1alpha3().ResourceClaims(f.Namespace.Name).Create(ctx, claim, metav1.CreateOptions{}) + framework.ExpectNoError(err, "create first claim") + + resourceName := "count/resourceclaims.resource.k8s.io" + quota := &v1.ResourceQuota{ + ObjectMeta: metav1.ObjectMeta{ + Name: "object-count", + Namespace: f.Namespace.Name, + }, + Spec: v1.ResourceQuotaSpec{ + Hard: v1.ResourceList{v1.ResourceName(resourceName): resource.MustParse("1")}, + }, + } + quota, err = f.ClientSet.CoreV1().ResourceQuotas(f.Namespace.Name).Create(ctx, quota, metav1.CreateOptions{}) + framework.ExpectNoError(err, "create resource quota") + + // Eventually the quota status should consider the existing claim. + gomega.Eventually(ctx, framework.GetObject(f.ClientSet.CoreV1().ResourceQuotas(quota.Namespace).Get, quota.Name, metav1.GetOptions{})). + Should(gstruct.PointTo(gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ + "Status": gomega.Equal(v1.ResourceQuotaStatus{ + Hard: v1.ResourceList{v1.ResourceName(resourceName): resource.MustParse("1")}, + Used: v1.ResourceList{v1.ResourceName(resourceName): resource.MustParse("1")}, + })}))) + + // Now creating another claim should fail. + claim2 := claim.DeepCopy() + claim2.Name = "claim-1" + _, err = f.ClientSet.ResourceV1alpha3().ResourceClaims(f.Namespace.Name).Create(ctx, claim2, metav1.CreateOptions{}) + gomega.Expect(err).Should(gomega.MatchError(gomega.ContainSubstring("exceeded quota: object-count, requested: count/resourceclaims.resource.k8s.io=1, used: count/resourceclaims.resource.k8s.io=1, limited: count/resourceclaims.resource.k8s.io=1")), "creating second claim not allowed") + }) }) // The following tests are all about behavior in combination with a @@ -830,67 +924,6 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.Context("cluster with DRA driver controller", func() { nodes := NewNodes(f, 1, 4) - ginkgo.Context("with structured parameters", func() { - driver := NewDriver(f, nodes, perNode(1, nodes)) - driver.parameterMode = parameterModeStructured - - f.It("must manage ResourceSlices", f.WithSlow(), func(ctx context.Context) { - driverName := driver.Name - - // Now check for exactly the right set of objects for all nodes. - ginkgo.By("check if ResourceSlice object(s) exist on the API server") - resourceClient := f.ClientSet.ResourceV1alpha3().ResourceSlices() - var expectedObjects []any - for _, nodeName := range nodes.NodeNames { - node, err := f.ClientSet.CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{}) - framework.ExpectNoError(err, "get node") - expectedObjects = append(expectedObjects, - gstruct.MatchAllFields(gstruct.Fields{ - "TypeMeta": gstruct.Ignore(), - "ObjectMeta": gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ - "OwnerReferences": gomega.ContainElements( - gstruct.MatchAllFields(gstruct.Fields{ - "APIVersion": gomega.Equal("v1"), - "Kind": gomega.Equal("Node"), - "Name": gomega.Equal(nodeName), - "UID": gomega.Equal(node.UID), - "Controller": gomega.Equal(ptr.To(true)), - "BlockOwnerDeletion": gomega.BeNil(), - }), - ), - }), - "NodeName": gomega.Equal(nodeName), - "DriverName": gomega.Equal(driver.Name), - "ResourceModel": gomega.Equal(resourceapi.ResourceModel{NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "instance-00"}}, - }}), - }), - ) - } - matchSlices := gomega.ContainElements(expectedObjects...) - getSlices := func(ctx context.Context) ([]resourceapi.ResourceSlice, error) { - slices, err := resourceClient.List(ctx, metav1.ListOptions{FieldSelector: fmt.Sprintf("driverName=%s", driverName)}) - if err != nil { - return nil, err - } - return slices.Items, nil - } - gomega.Eventually(ctx, getSlices).WithTimeout(20 * time.Second).Should(matchSlices) - gomega.Consistently(ctx, getSlices).WithTimeout(20 * time.Second).Should(matchSlices) - - // Removal of node resource slice is tested by the general driver removal code. - }) - - // TODO (https://github.com/kubernetes/kubernetes/issues/123699): more test scenarios: - // - driver returns "unimplemented" as method response - // - driver returns "Unimplemented" as part of stream - // - driver returns EOF - // - driver changes resources - // - // None of those matter if the publishing gets moved into the driver itself, - // which is the goal for 1.31 to support version skew for kubelet. - }) - // kube-controller-manager can trigger delayed allocation for pods where the // node name was already selected when creating the pod. For immediate // allocation, the creator has to ensure that the node matches the claims. @@ -899,20 +932,18 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // on all nodes. preScheduledTests := func(b *builder, driver *Driver) { ginkgo.It("supports scheduled pod referencing inline resource claim", func(ctx context.Context) { - parameters := b.parameters() pod, template := b.podInline() pod.Spec.NodeName = nodes.NodeNames[0] - b.create(ctx, parameters, pod, template) + b.create(ctx, pod, template) b.testPod(ctx, f.ClientSet, pod) }) ginkgo.It("supports scheduled pod referencing external resource claim", func(ctx context.Context) { - parameters := b.parameters() claim := b.externalClaim() pod := b.podExternal() pod.Spec.NodeName = nodes.NodeNames[0] - b.create(ctx, parameters, claim, pod) + b.create(ctx, claim, pod) b.testPod(ctx, f.ClientSet, pod) }) @@ -920,6 +951,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, ginkgo.Context("with setting ReservedFor", func() { driver := NewDriver(f, nodes, networkResources) + driver.parameterMode = parameterModeClassicDRA b := newBuilder(f, driver) preScheduledTests(b, driver) claimTests(b, driver) @@ -931,12 +963,72 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, resources.DontSetReservedFor = true return resources }) + driver.parameterMode = parameterModeClassicDRA b := newBuilder(f, driver) preScheduledTests(b, driver) claimTests(b, driver) }) }) + ginkgo.Context("cluster with structured parameters", func() { + nodes := NewNodes(f, 1, 4) + driver := NewDriver(f, nodes, perNode(1, nodes)) + + f.It("must manage ResourceSlices", f.WithSlow(), func(ctx context.Context) { + driverName := driver.Name + + // Now check for exactly the right set of objects for all nodes. + ginkgo.By("check if ResourceSlice object(s) exist on the API server") + resourceClient := f.ClientSet.ResourceV1alpha3().ResourceSlices() + var expectedObjects []any + for _, nodeName := range nodes.NodeNames { + node, err := f.ClientSet.CoreV1().Nodes().Get(ctx, nodeName, metav1.GetOptions{}) + framework.ExpectNoError(err, "get node") + expectedObjects = append(expectedObjects, + gstruct.MatchAllFields(gstruct.Fields{ + "TypeMeta": gstruct.Ignore(), + "ObjectMeta": gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ + "OwnerReferences": gomega.ContainElements( + gstruct.MatchAllFields(gstruct.Fields{ + "APIVersion": gomega.Equal("v1"), + "Kind": gomega.Equal("Node"), + "Name": gomega.Equal(nodeName), + "UID": gomega.Equal(node.UID), + "Controller": gomega.Equal(ptr.To(true)), + "BlockOwnerDeletion": gomega.BeNil(), + }), + ), + }), + "Spec": gstruct.MatchAllFields(gstruct.Fields{ + "Driver": gomega.Equal(driver.Name), + "NodeName": gomega.Equal(nodeName), + "NodeSelector": gomega.BeNil(), + "AllNodes": gomega.BeFalseBecause("slice should be using NodeName"), + "Pool": gstruct.MatchAllFields(gstruct.Fields{ + "Name": gomega.Equal(nodeName), + "Generation": gstruct.Ignore(), + "ResourceSliceCount": gomega.Equal(int64(1)), + }), + "Devices": gomega.Equal([]resourceapi.Device{{Name: "device-00", Basic: &resourceapi.BasicDevice{}}}), + }), + }), + ) + } + matchSlices := gomega.ContainElements(expectedObjects...) + getSlices := func(ctx context.Context) ([]resourceapi.ResourceSlice, error) { + slices, err := resourceClient.List(ctx, metav1.ListOptions{FieldSelector: resourceapi.ResourceSliceSelectorDriver + "=" + driverName}) + if err != nil { + return nil, err + } + return slices.Items, nil + } + gomega.Eventually(ctx, getSlices).WithTimeout(20 * time.Second).Should(matchSlices) + gomega.Consistently(ctx, getSlices).WithTimeout(20 * time.Second).Should(matchSlices) + + // Removal of node resource slice is tested by the general driver removal code. + }) + }) + multipleDrivers := func(nodeV1alpha3 bool) { nodes := NewNodes(f, 1, 4) driver1 := NewDriver(f, nodes, perNode(2, nodes)) @@ -949,8 +1041,6 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, b2 := newBuilder(f, driver2) ginkgo.It("work", func(ctx context.Context) { - parameters1 := b1.parameters() - parameters2 := b2.parameters() claim1 := b1.externalClaim() claim1b := b1.externalClaim() claim2 := b2.externalClaim() @@ -965,7 +1055,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, }, ) } - b1.create(ctx, parameters1, parameters2, claim1, claim1b, claim2, claim2b, pod) + b1.create(ctx, claim1, claim1b, claim2, claim2b, pod) b1.testPod(ctx, f.ClientSet, pod) }) } @@ -986,36 +1076,43 @@ type builder struct { f *framework.Framework driver *Driver - podCounter int - parametersCounter int - claimCounter int - - classParametersName string + podCounter int + claimCounter int + classParameters string // JSON } -// className returns the default resource class name. +// className returns the default device class name. func (b *builder) className() string { return b.f.UniqueName + b.driver.NameSuffix + "-class" } -// class returns the resource class that the builder's other objects +// class returns the device class that the builder's other objects // reference. -func (b *builder) class() *resourceapi.ResourceClass { - class := &resourceapi.ResourceClass{ +func (b *builder) class() *resourceapi.DeviceClass { + class := &resourceapi.DeviceClass{ ObjectMeta: metav1.ObjectMeta{ Name: b.className(), }, - DriverName: b.driver.Name, - SuitableNodes: b.nodeSelector(), - StructuredParameters: ptr.To(b.driver.parameterMode != parameterModeConfigMap), } - if b.classParametersName != "" { - class.ParametersRef = &resourceapi.ResourceClassParametersReference{ - APIGroup: b.driver.parameterAPIGroup, - Kind: b.driver.classParameterAPIKind, - Name: b.classParametersName, - Namespace: b.f.Namespace.Name, - } + switch b.driver.parameterMode { + case parameterModeClassicDRA: + class.Spec.SuitableNodes = b.nodeSelector() + case parameterModeStructured: + class.Spec.Selectors = []resourceapi.DeviceSelector{{ + CEL: &resourceapi.CELDeviceSelector{ + Expression: fmt.Sprintf(`device.driver == "%s"`, b.driver.Name), + }, + }} + } + if b.classParameters != "" { + class.Spec.Config = []resourceapi.DeviceClassConfiguration{{ + DeviceConfiguration: resourceapi.DeviceConfiguration{ + Opaque: &resourceapi.OpaqueDeviceConfiguration{ + Driver: b.driver.Name, + Parameters: runtime.RawExtension{Raw: []byte(b.classParameters)}, + }, + }, + }} } return class } @@ -1046,162 +1143,49 @@ func (b *builder) externalClaim() *resourceapi.ResourceClaim { if b.claimCounter > 1 { name += fmt.Sprintf("-%d", b.claimCounter) } + // TODO: parameters return &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: b.className(), - ParametersRef: &resourceapi.ResourceClaimParametersReference{ - APIGroup: b.driver.parameterAPIGroup, - Kind: b.driver.claimParameterAPIKind, - Name: b.parametersName(), - }, - }, - } -} - -// flexibleParameters returns parameter objects for claims and -// class with their type depending on the current parameter mode. -// It also returns the expected environment in a pod using -// the corresponding resource. -func (b *builder) flexibleParameters() ([]klog.KMetadata, []string) { - var objects []klog.KMetadata - switch b.driver.parameterMode { - case parameterModeConfigMap: - objects = append(objects, - b.parameters("x", "y"), - b.parameters("a", "b", "request_foo", "bar"), - ) - case parameterModeTranslated: - objects = append(objects, - b.parameters("x", "y"), - b.classParameters(b.parametersName(), "x", "y"), - b.parameters("a", "b", "request_foo", "bar"), - b.claimParameters(b.parametersName(), []string{"a", "b"}, []string{"request_foo", "bar"}), - ) - // The parameters object is not the last one but the second-last. - b.parametersCounter-- - case parameterModeStructured: - objects = append(objects, - b.classParameters("", "x", "y"), - b.claimParameters("", []string{"a", "b"}, []string{"request_foo", "bar"}), - ) - } - env := []string{"user_a", "b", "user_request_foo", "bar"} - if b.classParametersName != "" { - env = append(env, "admin_x", "y") - } - return objects, env -} - -// parametersName returns the current ConfigMap name for resource -// claim or class parameters. -func (b *builder) parametersName() string { - return fmt.Sprintf("parameters%s-%d", b.driver.NameSuffix, b.parametersCounter) -} - -// parametersEnv returns the default env variables. -func (b *builder) parametersEnv() map[string]string { - return map[string]string{ - "a": "b", - "request_foo": "bar", - } -} - -// parameters returns a config map with the default env variables. -func (b *builder) parameters(kv ...string) *v1.ConfigMap { - data := b.parameterData(kv...) - b.parametersCounter++ - return &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: b.f.Namespace.Name, - Name: b.parametersName(), - }, - Data: data, - } -} - -func (b *builder) classParameters(generatedFrom string, kv ...string) *resourceapi.ResourceClassParameters { - raw := b.rawParameterData(kv...) - b.parametersCounter++ - parameters := &resourceapi.ResourceClassParameters{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: b.f.Namespace.Name, - Name: b.parametersName(), - }, - - VendorParameters: []resourceapi.VendorParameters{ - {DriverName: b.driver.Name, Parameters: runtime.RawExtension{Raw: raw}}, - }, - } - - if generatedFrom != "" { - parameters.GeneratedFrom = &resourceapi.ResourceClassParametersReference{ - Kind: "ConfigMap", - Namespace: b.f.Namespace.Name, - Name: generatedFrom, - } + Spec: b.claimSpec(), } - - return parameters } -func (b *builder) claimParameters(generatedFrom string, claimKV, requestKV []string) *resourceapi.ResourceClaimParameters { - b.parametersCounter++ - parameters := &resourceapi.ResourceClaimParameters{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: b.f.Namespace.Name, - Name: b.parametersName(), - }, - - // Without any request, nothing gets allocated and vendor - // parameters are also not passed down because they get - // attached to the allocation result. - DriverRequests: []resourceapi.DriverRequests{ - { - DriverName: b.driver.Name, - VendorParameters: runtime.RawExtension{Raw: b.rawParameterData(claimKV...)}, - Requests: []resourceapi.ResourceRequest{ - { - VendorParameters: runtime.RawExtension{Raw: b.rawParameterData(requestKV...)}, - ResourceRequestModel: resourceapi.ResourceRequestModel{ - NamedResources: &resourceapi.NamedResourcesRequest{ - Selector: "true", - }, +// claimSpec returns the device request for a claim or claim template +// with the associated config +func (b *builder) claimSpec() resourceapi.ResourceClaimSpec { + parameters, _ := b.parametersEnv() + spec := resourceapi.ResourceClaimSpec{ + Devices: resourceapi.DeviceClaim{ + Requests: []resourceapi.DeviceRequest{{ + Name: "my-request", + DeviceClassName: b.className(), + }}, + Config: []resourceapi.DeviceClaimConfiguration{{ + DeviceConfiguration: resourceapi.DeviceConfiguration{ + Opaque: &resourceapi.OpaqueDeviceConfiguration{ + Driver: b.driver.Name, + Parameters: runtime.RawExtension{ + Raw: []byte(parameters), }, }, }, - }, + }}, }, } - if generatedFrom != "" { - parameters.GeneratedFrom = &resourceapi.ResourceClaimParametersReference{ - Kind: "ConfigMap", - Name: generatedFrom, - } + if b.driver.parameterMode == parameterModeClassicDRA { + spec.Controller = b.driver.Name } - return parameters -} - -func (b *builder) parameterData(kv ...string) map[string]string { - data := map[string]string{} - for i := 0; i < len(kv); i += 2 { - data[kv[i]] = kv[i+1] - } - if len(data) == 0 { - data = b.parametersEnv() - } - return data + return spec } -func (b *builder) rawParameterData(kv ...string) []byte { - data := b.parameterData(kv...) - raw, err := json.Marshal(data) - framework.ExpectNoError(err, "JSON encoding of parameter data") - return raw +// parametersEnv returns the default user env variables as JSON (config) and key/value list (pod env). +func (b *builder) parametersEnv() (string, []string) { + return `{"a":"b"}`, + []string{"user_a", "b"} } // makePod returns a simple pod with no resource claims. @@ -1249,14 +1233,7 @@ func (b *builder) podInline() (*v1.Pod, *resourceapi.ResourceClaimTemplate) { Namespace: pod.Namespace, }, Spec: resourceapi.ResourceClaimTemplateSpec{ - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: b.className(), - ParametersRef: &resourceapi.ResourceClaimParametersReference{ - APIGroup: b.driver.parameterAPIGroup, - Kind: b.driver.claimParameterAPIKind, - Name: b.parametersName(), - }, - }, + Spec: b.claimSpec(), }, } return pod, template @@ -1304,11 +1281,11 @@ func (b *builder) create(ctx context.Context, objs ...klog.KMetadata) []klog.KMe var err error var createdObj klog.KMetadata switch obj := obj.(type) { - case *resourceapi.ResourceClass: - createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClasses().Create(ctx, obj, metav1.CreateOptions{}) + case *resourceapi.DeviceClass: + createdObj, err = b.f.ClientSet.ResourceV1alpha3().DeviceClasses().Create(ctx, obj, metav1.CreateOptions{}) ginkgo.DeferCleanup(func(ctx context.Context) { - err := b.f.ClientSet.ResourceV1alpha3().ResourceClasses().Delete(ctx, createdObj.GetName(), metav1.DeleteOptions{}) - framework.ExpectNoError(err, "delete resource class") + err := b.f.ClientSet.ResourceV1alpha3().DeviceClasses().Delete(ctx, createdObj.GetName(), metav1.DeleteOptions{}) + framework.ExpectNoError(err, "delete device class") }) case *v1.Pod: createdObj, err = b.f.ClientSet.CoreV1().Pods(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) @@ -1318,10 +1295,6 @@ func (b *builder) create(ctx context.Context, objs ...klog.KMetadata) []klog.KMe createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) case *resourceapi.ResourceClaimTemplate: createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClaimTemplates(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) - case *resourceapi.ResourceClassParameters: - createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClassParameters(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) - case *resourceapi.ResourceClaimParameters: - createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceClaimParameters(b.f.Namespace.Name).Create(ctx, obj, metav1.CreateOptions{}) case *resourceapi.ResourceSlice: createdObj, err = b.f.ClientSet.ResourceV1alpha3().ResourceSlices().Create(ctx, obj, metav1.CreateOptions{}) ginkgo.DeferCleanup(func(ctx context.Context) { @@ -1346,15 +1319,11 @@ func (b *builder) testPod(ctx context.Context, clientSet kubernetes.Interface, p log, err := e2epod.GetPodLogs(ctx, clientSet, pod.Namespace, pod.Name, container.Name) framework.ExpectNoError(err, "get logs") if len(env) == 0 { - for key, value := range b.parametersEnv() { - envStr := fmt.Sprintf("\nuser_%s=%s\n", key, value) - gomega.Expect(log).To(gomega.ContainSubstring(envStr), "container env variables") - } - } else { - for i := 0; i < len(env); i += 2 { - envStr := fmt.Sprintf("\n%s=%s\n", env[i], env[i+1]) - gomega.Expect(log).To(gomega.ContainSubstring(envStr), "container env variables") - } + _, env = b.parametersEnv() + } + for i := 0; i < len(env); i += 2 { + envStr := fmt.Sprintf("\n%s=%s\n", env[i], env[i+1]) + gomega.Expect(log).To(gomega.ContainSubstring(envStr), "container env variables") } } } @@ -1369,7 +1338,6 @@ func newBuilder(f *framework.Framework, driver *Driver) *builder { func (b *builder) setUp() { b.podCounter = 0 - b.parametersCounter = 0 b.claimCounter = 0 b.create(context.Background(), b.class()) ginkgo.DeferCleanup(b.tearDown) diff --git a/test/e2e/dra/kind.yaml b/test/e2e/dra/kind.yaml index 952f874812be1..80146fe1fc76e 100644 --- a/test/e2e/dra/kind.yaml +++ b/test/e2e/dra/kind.yaml @@ -14,6 +14,7 @@ nodes: scheduler: extraArgs: v: "5" + vmodule: "allocator=6,dynamicresources=6" # structured/allocator.go, DRA scheduler plugin controllerManager: extraArgs: v: "5" diff --git a/test/e2e/dra/test-driver/app/controller.go b/test/e2e/dra/test-driver/app/controller.go index 5a578ba3664f0..b3398bd13a295 100644 --- a/test/e2e/dra/test-driver/app/controller.go +++ b/test/e2e/dra/test-driver/app/controller.go @@ -20,16 +20,13 @@ package app import ( "context" - "encoding/json" "errors" "fmt" - "math/rand" - "strings" + "slices" "sync" v1 "k8s.io/api/core/v1" resourceapi "k8s.io/api/resource/v1alpha3" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/informers" @@ -48,7 +45,9 @@ type Resources struct { Nodes []string // NodeLabels are labels which determine on which nodes resources are // available. Mutually exclusive with Nodes. - NodeLabels labels.Set + NodeLabels labels.Set + + // Number of devices called "device-000", "device-001", ... on each node or in the cluster. MaxAllocations int // AllocateWrapper, if set, gets called for each Allocate call. @@ -68,12 +67,16 @@ func (r Resources) AllNodes(nodeLister listersv1.NodeLister) []string { return r.Nodes } -func (r Resources) NewAllocation(node string, data []byte) *resourceapi.AllocationResult { - allocation := &resourceapi.AllocationResult{} - allocation.ResourceHandles = []resourceapi.ResourceHandle{ - { - DriverName: r.DriverName, - Data: string(data), +func (r Resources) newAllocation(requestName, node string, config []resourceapi.DeviceAllocationConfiguration) *resourceapi.AllocationResult { + allocation := &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: []resourceapi.DeviceRequestAllocationResult{{ + Driver: r.DriverName, + Pool: "none", + Request: requestName, + Device: "none", + }}, + Config: config, }, } if node == "" && len(r.NodeLabels) > 0 { @@ -86,7 +89,7 @@ func (r Resources) NewAllocation(node string, data []byte) *resourceapi.Allocati Values: []string{value}, }) } - allocation.AvailableOnNodes = &v1.NodeSelector{ + allocation.NodeSelector = &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{ { MatchExpressions: requirements, @@ -103,7 +106,7 @@ func (r Resources) NewAllocation(node string, data []byte) *resourceapi.Allocati nodes = r.Nodes } if len(nodes) > 0 { - allocation.AvailableOnNodes = &v1.NodeSelector{ + allocation.NodeSelector = &v1.NodeSelector{ NodeSelectorTerms: []v1.NodeSelectorTerm{ { MatchExpressions: []v1.NodeSelectorRequirement{ @@ -166,11 +169,6 @@ func (c *ExampleController) Run(ctx context.Context, workers int) { informerFactory.Shutdown() } -type parameters struct { - EnvVars map[string]string - NodeName string -} - var _ controller.Driver = &ExampleController{} // GetNumAllocations returns the number of times that a claim was allocated. @@ -193,36 +191,6 @@ func (c *ExampleController) GetNumDeallocations() int64 { return c.numDeallocations } -func (c *ExampleController) GetClassParameters(ctx context.Context, class *resourceapi.ResourceClass) (interface{}, error) { - if class.ParametersRef != nil { - if class.ParametersRef.APIGroup != "" || - class.ParametersRef.Kind != "ConfigMap" { - return nil, fmt.Errorf("class parameters are only supported in APIVersion v1, Kind ConfigMap, got: %v", class.ParametersRef) - } - return c.readParametersFromConfigMap(ctx, class.ParametersRef.Namespace, class.ParametersRef.Name) - } - return nil, nil -} - -func (c *ExampleController) GetClaimParameters(ctx context.Context, claim *resourceapi.ResourceClaim, class *resourceapi.ResourceClass, classParameters interface{}) (interface{}, error) { - if claim.Spec.ParametersRef != nil { - if claim.Spec.ParametersRef.APIGroup != "" || - claim.Spec.ParametersRef.Kind != "ConfigMap" { - return nil, fmt.Errorf("claim parameters are only supported in APIVersion v1, Kind ConfigMap, got: %v", claim.Spec.ParametersRef) - } - return c.readParametersFromConfigMap(ctx, claim.Namespace, claim.Spec.ParametersRef.Name) - } - return nil, nil -} - -func (c *ExampleController) readParametersFromConfigMap(ctx context.Context, namespace, name string) (map[string]string, error) { - configMap, err := c.clientset.CoreV1().ConfigMaps(namespace).Get(ctx, name, metav1.GetOptions{}) - if err != nil { - return nil, fmt.Errorf("get config map: %w", err) - } - return configMap.Data, nil -} - func (c *ExampleController) Allocate(ctx context.Context, claimAllocations []*controller.ClaimAllocation, selectedNode string) { if c.resources.AllocateWrapper != nil { @@ -236,7 +204,7 @@ func (c *ExampleController) Allocate(ctx context.Context, claimAllocations []*co func (c *ExampleController) allocateOneByOne(ctx context.Context, claimAllocations []*controller.ClaimAllocation, selectedNode string) { for _, ca := range claimAllocations { - allocationResult, err := c.allocateOne(ctx, ca.Claim, ca.ClaimParameters, ca.Class, ca.ClassParameters, selectedNode) + allocationResult, err := c.allocateOne(ctx, ca.Claim, ca.DeviceClasses, selectedNode) if err != nil { ca.Error = err continue @@ -246,12 +214,25 @@ func (c *ExampleController) allocateOneByOne(ctx context.Context, claimAllocatio } // allocate simply copies parameters as JSON map into a ResourceHandle. -func (c *ExampleController) allocateOne(ctx context.Context, claim *resourceapi.ResourceClaim, claimParameters interface{}, class *resourceapi.ResourceClass, classParameters interface{}, selectedNode string) (result *resourceapi.AllocationResult, err error) { +func (c *ExampleController) allocateOne(ctx context.Context, claim *resourceapi.ResourceClaim, deviceClasses map[string]*resourceapi.DeviceClass, selectedNode string) (result *resourceapi.AllocationResult, err error) { logger := klog.LoggerWithValues(klog.LoggerWithName(klog.FromContext(ctx), "Allocate"), "claim", klog.KObj(claim), "uid", claim.UID) defer func() { logger.V(3).Info("done", "result", result, "err", err) }() + if len(claim.Spec.Devices.Requests) != 1 || + claim.Spec.Devices.Requests[0].DeviceClassName == "" || + claim.Spec.Devices.Requests[0].CountMode != resourceapi.DeviceCountModeExact || + claim.Spec.Devices.Requests[0].Count != 1 { + return nil, errors.New("only claims requesting exactly one device are supported") + } + request := claim.Spec.Devices.Requests[0] + class := deviceClasses[request.DeviceClassName] + if len(request.Selectors) > 0 || + class != nil && len(class.Spec.Selectors) > 0 { + return nil, errors.New("device selectors are not supported") + } + c.mutex.Lock() defer c.mutex.Unlock() @@ -267,24 +248,7 @@ func (c *ExampleController) allocateOne(ctx context.Context, claim *resourceapi. nodes := c.resources.AllNodes(c.nodeLister) if c.resources.NodeLocal { node = selectedNode - if node == "" { - // If none has been selected because we do immediate allocation, - // then we need to pick one ourselves. - var viableNodes []string - for _, n := range nodes { - if c.resources.MaxAllocations == 0 || - c.claimsPerNode[n] < c.resources.MaxAllocations { - viableNodes = append(viableNodes, n) - } - } - if len(viableNodes) == 0 { - return nil, errors.New("resources exhausted on all nodes") - } - // Pick randomly. We could also prefer the one with the least - // number of allocations (even spreading) or the most (packing). - node = viableNodes[rand.Intn(len(viableNodes))] - logger.V(3).Info("picked a node ourselves", "selectedNode", selectedNode) - } else if !contains(nodes, node) || + if !slices.Contains(nodes, node) || c.resources.MaxAllocations > 0 && c.claimsPerNode[node] >= c.resources.MaxAllocations { return nil, fmt.Errorf("resources exhausted on node %q", node) @@ -297,17 +261,47 @@ func (c *ExampleController) allocateOne(ctx context.Context, claim *resourceapi. } } - p := parameters{ - EnvVars: make(map[string]string), - NodeName: node, + var configs []resourceapi.DeviceAllocationConfiguration + for i, config := range claim.Spec.Devices.Config { + if len(config.Requests) != 0 && + !slices.Contains(config.Requests, request.Name) { + // Does not apply to request. + continue + } + if config.Opaque == nil { + return nil, fmt.Errorf("claim config #%d: only opaque configuration supported", i) + } + if config.Opaque.Driver != c.resources.DriverName { + // Does not apply to driver. + continue + } + // A normal driver would validate the config here. The test + // driver just passes it through. + configs = append(configs, + resourceapi.DeviceAllocationConfiguration{ + Source: resourceapi.AllocationConfigSourceClaim, + DeviceConfiguration: config.DeviceConfiguration, + }, + ) } - toEnvVars("user", claimParameters, p.EnvVars) - toEnvVars("admin", classParameters, p.EnvVars) - data, err := json.Marshal(p) - if err != nil { - return nil, fmt.Errorf("encode parameters: %w", err) + if class != nil { + for i, config := range class.Spec.Config { + if config.Opaque == nil { + return nil, fmt.Errorf("class config #%d: only opaque configuration supported", i) + } + if config.Opaque.Driver != c.resources.DriverName { + // Does not apply to driver. + continue + } + configs = append(configs, + resourceapi.DeviceAllocationConfiguration{ + Source: resourceapi.AllocationConfigSourceClass, + DeviceConfiguration: config.DeviceConfiguration, + }, + ) + } } - allocation := c.resources.NewAllocation(node, data) + allocation := c.resources.newAllocation(request.Name, node, configs) if !alreadyAllocated { c.numAllocations++ c.allocated[claim.UID] = node @@ -359,7 +353,7 @@ func (c *ExampleController) UnsuitableNodes(ctx context.Context, pod *v1.Pod, cl // can only work if a node has capacity left // for all of them. Also, nodes that the driver // doesn't run on cannot be used. - if !contains(nodes, node) || + if !slices.Contains(nodes, node) || c.claimsPerNode[node]+len(claims) > c.resources.MaxAllocations { claim.UnsuitableNodes = append(claim.UnsuitableNodes, node) } @@ -372,7 +366,7 @@ func (c *ExampleController) UnsuitableNodes(ctx context.Context, pod *v1.Pod, cl for _, claim := range claims { claim.UnsuitableNodes = nil for _, node := range potentialNodes { - if !contains(nodes, node) || + if !slices.Contains(nodes, node) || allocations+len(claims) > c.resources.MaxAllocations { claim.UnsuitableNodes = append(claim.UnsuitableNodes, node) } @@ -381,24 +375,3 @@ func (c *ExampleController) UnsuitableNodes(ctx context.Context, pod *v1.Pod, cl return nil } - -func toEnvVars(what string, from interface{}, to map[string]string) { - if from == nil { - return - } - - env := from.(map[string]string) - for key, value := range env { - to[what+"_"+strings.ToLower(key)] = value - } -} - -func contains[T comparable](list []T, value T) bool { - for _, v := range list { - if v == value { - return true - } - } - - return false -} diff --git a/test/e2e/dra/test-driver/app/kubeletplugin.go b/test/e2e/dra/test-driver/app/kubeletplugin.go index 5b7c1f0742256..a6db33cb3c57a 100644 --- a/test/e2e/dra/test-driver/app/kubeletplugin.go +++ b/test/e2e/dra/test-driver/app/kubeletplugin.go @@ -23,6 +23,8 @@ import ( "fmt" "os" "path/filepath" + "slices" + "sort" "strings" "sync" @@ -46,15 +48,14 @@ type ExamplePlugin struct { d kubeletplugin.DRAPlugin fileOps FileOperations - cdiDir string - driverName string - nodeName string - instances sets.Set[string] + cdiDir string + driverName string + nodeName string + deviceNames sets.Set[string] - mutex sync.Mutex - instancesInUse sets.Set[string] - prepared map[ClaimID][]string // instance names - gRPCCalls []GRPCCall + mutex sync.Mutex + prepared map[ClaimID][]Device // prepared claims -> result of nodePrepareResource + gRPCCalls []GRPCCall blockPrepareResourcesMutex sync.Mutex blockUnprepareResourcesMutex sync.Mutex @@ -88,11 +89,18 @@ type ClaimID struct { UID string } +type Device struct { + PoolName string + DeviceName string + RequestName string + CDIDeviceID string +} + var _ drapb.NodeServer = &ExamplePlugin{} // getJSONFilePath returns the absolute path where CDI file is/should be. -func (ex *ExamplePlugin) getJSONFilePath(claimUID string) string { - return filepath.Join(ex.cdiDir, fmt.Sprintf("%s-%s.json", ex.driverName, claimUID)) +func (ex *ExamplePlugin) getJSONFilePath(claimUID string, requestName string) string { + return filepath.Join(ex.cdiDir, fmt.Sprintf("%s-%s-%s.json", ex.driverName, claimUID, requestName)) } // FileOperations defines optional callbacks for handling CDI files @@ -105,10 +113,13 @@ type FileOperations struct { // file does not exist. Remove func(name string) error - // NumResourceInstances determines whether the plugin reports resources - // instances and how many. A negative value causes it to report "not implemented" - // in the NodeListAndWatchResources gRPC call. - NumResourceInstances int + // NumDevices determines whether the plugin reports devices + // and how many. It reports nothing if negative. + NumDevices int + + // Pre-defined devices, with each device name mapped to + // the device attributes. Not used if NumDevices >= 0. + Devices map[string]map[resourceapi.QualifiedName]resourceapi.DeviceAttribute } // StartPlugin sets up the servers that are necessary for a DRA kubelet plugin. @@ -129,22 +140,23 @@ func StartPlugin(ctx context.Context, cdiDir, driverName string, kubeClient kube } } ex := &ExamplePlugin{ - stopCh: ctx.Done(), - logger: logger, - kubeClient: kubeClient, - fileOps: fileOps, - cdiDir: cdiDir, - driverName: driverName, - nodeName: nodeName, - instances: sets.New[string](), - instancesInUse: sets.New[string](), - prepared: make(map[ClaimID][]string), + stopCh: ctx.Done(), + logger: logger, + kubeClient: kubeClient, + fileOps: fileOps, + cdiDir: cdiDir, + driverName: driverName, + nodeName: nodeName, + prepared: make(map[ClaimID][]Device), + deviceNames: sets.New[string](), } - for i := 0; i < ex.fileOps.NumResourceInstances; i++ { - ex.instances.Insert(fmt.Sprintf("instance-%02d", i)) + for i := 0; i < ex.fileOps.NumDevices; i++ { + ex.deviceNames.Insert(fmt.Sprintf("device-%02d", i)) + } + for deviceName := range ex.fileOps.Devices { + ex.deviceNames.Insert(deviceName) } - opts = append(opts, kubeletplugin.DriverName(driverName), kubeletplugin.NodeName(nodeName), @@ -158,19 +170,30 @@ func StartPlugin(ctx context.Context, cdiDir, driverName string, kubeClient kube } ex.d = d - if fileOps.NumResourceInstances >= 0 { - instances := make([]resourceapi.NamedResourcesInstance, ex.fileOps.NumResourceInstances) - for i := 0; i < ex.fileOps.NumResourceInstances; i++ { - instances[i].Name = fmt.Sprintf("instance-%02d", i) + if fileOps.NumDevices >= 0 { + devices := make([]resourceapi.Device, ex.fileOps.NumDevices) + for i := 0; i < ex.fileOps.NumDevices; i++ { + devices[i] = resourceapi.Device{ + Name: fmt.Sprintf("device-%02d", i), + Basic: &resourceapi.BasicDevice{}, + } } - nodeResources := []*resourceapi.ResourceModel{ - { - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: instances, - }, - }, + resources := kubeletplugin.Resources{ + Devices: devices, + } + ex.d.PublishResources(ctx, resources) + } else if len(ex.fileOps.Devices) > 0 { + devices := make([]resourceapi.Device, len(ex.fileOps.Devices)) + for i, deviceName := range sets.List(ex.deviceNames) { + devices[i] = resourceapi.Device{ + Name: deviceName, + Basic: &resourceapi.BasicDevice{Attributes: ex.fileOps.Devices[deviceName]}, + } + } + resources := kubeletplugin.Resources{ + Devices: devices, } - ex.d.PublishResources(ctx, nodeResources) + ex.d.PublishResources(ctx, resources) } return ex, nil @@ -245,17 +268,15 @@ func (ex *ExamplePlugin) getUnprepareResourcesFailure() error { return ex.unprepareResourcesFailure } -// NodePrepareResource ensures that the CDI file for the claim exists. It uses +// NodePrepareResource ensures that the CDI file(s) (one per request) for the claim exists. It uses // a deterministic name to simplify NodeUnprepareResource (no need to remember // or discover the name) and idempotency (when called again, the file simply // gets written again). -func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimReq *drapb.Claim) ([]string, error) { +func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimReq *drapb.Claim) ([]Device, error) { logger := klog.FromContext(ctx) // The plugin must retrieve the claim itself to get it in the version // that it understands. - var resourceHandle string - var structuredResourceHandle *resourceapi.StructuredResourceHandle claim, err := ex.kubeClient.ResourceV1alpha3().ResourceClaims(claimReq.Namespace).Get(ctx, claimReq.Name, metav1.GetOptions{}) if err != nil { return nil, fmt.Errorf("retrieve claim %s/%s: %w", claimReq.Namespace, claimReq.Name, err) @@ -266,124 +287,104 @@ func (ex *ExamplePlugin) nodePrepareResource(ctx context.Context, claimReq *drap if claim.UID != types.UID(claimReq.Uid) { return nil, fmt.Errorf("claim %s/%s got replaced", claimReq.Namespace, claimReq.Name) } - haveResources := false - for _, handle := range claim.Status.Allocation.ResourceHandles { - if handle.DriverName == ex.driverName { - haveResources = true - resourceHandle = handle.Data - structuredResourceHandle = handle.StructuredData - break - } - } - if !haveResources { - // Nothing to do. - return nil, nil - } ex.mutex.Lock() defer ex.mutex.Unlock() ex.blockPrepareResourcesMutex.Lock() defer ex.blockPrepareResourcesMutex.Unlock() - deviceName := "claim-" + claimReq.Uid - vendor := ex.driverName - class := "test" - dev := vendor + "/" + class + "=" + deviceName claimID := ClaimID{Name: claimReq.Name, UID: claimReq.Uid} - if _, ok := ex.prepared[claimID]; ok { + if result, ok := ex.prepared[claimID]; ok { // Idempotent call, nothing to do. - return []string{dev}, nil + return result, nil } - // Determine environment variables. - var p parameters - var instanceNames []string - if structuredResourceHandle == nil { - // Control plane controller did the allocation. - if err := json.Unmarshal([]byte(resourceHandle), &p); err != nil { - return nil, fmt.Errorf("unmarshal resource handle: %w", err) - } - } else { - // Scheduler did the allocation with structured parameters. - p.NodeName = structuredResourceHandle.NodeName - if err := extractParameters(structuredResourceHandle.VendorClassParameters, &p.EnvVars, "admin"); err != nil { - return nil, err - } - if err := extractParameters(structuredResourceHandle.VendorClaimParameters, &p.EnvVars, "user"); err != nil { - return nil, err - } - for _, result := range structuredResourceHandle.Results { - if err := extractParameters(result.VendorRequestParameters, &p.EnvVars, "user"); err != nil { - return nil, err - } - namedResources := result.NamedResources - if namedResources == nil { - return nil, errors.New("missing named resources allocation result") - } - instanceName := namedResources.Name - if instanceName == "" { - return nil, errors.New("empty named resources instance name") - } - if !ex.instances.Has(instanceName) { - return nil, fmt.Errorf("unknown allocated instance %q", instanceName) + var devices []Device + for _, result := range claim.Status.Allocation.Devices.Results { + requestName := result.Request + + // The driver joins all env variables in the order in which + // they appear in results (last one wins). + env := make(map[string]string) + for i, config := range claim.Status.Allocation.Devices.Config { + if config.Opaque == nil || + config.Opaque.Driver != ex.driverName || + len(config.Requests) > 0 && !slices.Contains(config.Requests, requestName) { + continue } - if ex.instancesInUse.Has(instanceName) { - return nil, fmt.Errorf("resource instance %q used more than once", instanceName) + if err := extractParameters(config.Opaque.Parameters, &env, config.Source == resourceapi.AllocationConfigSourceClass); err != nil { + return nil, fmt.Errorf("parameters in config #%d: %w", i, err) } - instanceNames = append(instanceNames, instanceName) } - } - // Sanity check scheduling. - if p.NodeName != "" && ex.nodeName != "" && p.NodeName != ex.nodeName { - return nil, fmt.Errorf("claim was allocated for %q, cannot be prepared on %q", p.NodeName, ex.nodeName) - } + deviceName := "claim-" + claimReq.Uid + "-" + requestName + vendor := ex.driverName + class := "test" + cdiDeviceID := vendor + "/" + class + "=" + deviceName - // CDI wants env variables as set of strings. - envs := []string{} - for key, val := range p.EnvVars { - envs = append(envs, key+"="+val) - } + // CDI wants env variables as set of strings. + envs := []string{} + for key, val := range env { + envs = append(envs, key+"="+val) + } + sort.Strings(envs) + + if len(envs) == 0 { + // CDI does not support empty ContainerEdits. For example, + // kubelet+crio then fail with: + // CDI device injection failed: unresolvable CDI devices ... + // + // Inject nothing instead, which is supported by DRA. + continue + } - spec := &spec{ - Version: "0.3.0", // This has to be a version accepted by the runtimes. - Kind: vendor + "/" + class, - // At least one device is required and its entry must have more - // than just the name. - Devices: []device{ - { - Name: deviceName, - ContainerEdits: containerEdits{ - Env: envs, + spec := &spec{ + Version: "0.3.0", // This has to be a version accepted by the runtimes. + Kind: vendor + "/" + class, + // At least one device is required and its entry must have more + // than just the name. + Devices: []device{ + { + Name: deviceName, + ContainerEdits: containerEdits{ + Env: envs, + }, }, }, - }, - } - filePath := ex.getJSONFilePath(claimReq.Uid) - buffer, err := json.Marshal(spec) - if err != nil { - return nil, fmt.Errorf("marshal spec: %w", err) - } - if err := ex.fileOps.Create(filePath, buffer); err != nil { - return nil, fmt.Errorf("failed to write CDI file %v", err) - } - - ex.prepared[claimID] = instanceNames - for _, instanceName := range instanceNames { - ex.instancesInUse.Insert(instanceName) + } + filePath := ex.getJSONFilePath(claimReq.Uid, requestName) + buffer, err := json.Marshal(spec) + if err != nil { + return nil, fmt.Errorf("marshal spec: %w", err) + } + if err := ex.fileOps.Create(filePath, buffer); err != nil { + return nil, fmt.Errorf("failed to write CDI file: %w", err) + } + device := Device{ + PoolName: result.Pool, + DeviceName: result.Device, + RequestName: requestName, + CDIDeviceID: cdiDeviceID, + } + devices = append(devices, device) } - logger.V(3).Info("CDI file created", "path", filePath, "device", dev) - return []string{dev}, nil + logger.V(3).Info("CDI file(s) created", "devices", devices) + ex.prepared[claimID] = devices + return devices, nil } -func extractParameters(parameters runtime.RawExtension, env *map[string]string, kind string) error { +func extractParameters(parameters runtime.RawExtension, env *map[string]string, admin bool) error { if len(parameters.Raw) == 0 { return nil } + kind := "user" + if admin { + kind = "admin" + } var data map[string]string if err := json.Unmarshal(parameters.Raw, &data); err != nil { - return fmt.Errorf("decoding %s parameters: %v", kind, err) + return fmt.Errorf("decoding %s parameters: %w", kind, err) } if len(data) > 0 && *env == nil { *env = make(map[string]string) @@ -404,15 +405,23 @@ func (ex *ExamplePlugin) NodePrepareResources(ctx context.Context, req *drapb.No } for _, claimReq := range req.Claims { - cdiDevices, err := ex.nodePrepareResource(ctx, claimReq) + devices, err := ex.nodePrepareResource(ctx, claimReq) if err != nil { resp.Claims[claimReq.Uid] = &drapb.NodePrepareResourceResponse{ Error: err.Error(), } } else { - resp.Claims[claimReq.Uid] = &drapb.NodePrepareResourceResponse{ - CDIDevices: cdiDevices, + r := &drapb.NodePrepareResourceResponse{} + for _, device := range devices { + pbDevice := &drapb.Device{ + PoolName: device.PoolName, + DeviceName: device.DeviceName, + RequestNames: []string{device.RequestName}, + CDIDeviceIDs: []string{device.CDIDeviceID}, + } + r.Devices = append(r.Devices, pbDevice) } + resp.Claims[claimReq.Uid] = r } } return resp, nil @@ -427,27 +436,23 @@ func (ex *ExamplePlugin) nodeUnprepareResource(ctx context.Context, claimReq *dr logger := klog.FromContext(ctx) - filePath := ex.getJSONFilePath(claimReq.Uid) - if err := ex.fileOps.Remove(filePath); err != nil { - return fmt.Errorf("error removing CDI file: %w", err) - } - logger.V(3).Info("CDI file removed", "path", filePath) - - ex.mutex.Lock() - defer ex.mutex.Unlock() - claimID := ClaimID{Name: claimReq.Name, UID: claimReq.Uid} - instanceNames, ok := ex.prepared[claimID] + devices, ok := ex.prepared[claimID] if !ok { // Idempotent call, nothing to do. return nil } - delete(ex.prepared, claimID) - for _, instanceName := range instanceNames { - ex.instancesInUse.Delete(instanceName) + for _, device := range devices { + filePath := ex.getJSONFilePath(claimReq.Uid, device.RequestName) + if err := ex.fileOps.Remove(filePath); err != nil { + return fmt.Errorf("error removing CDI file: %w", err) + } + logger.V(3).Info("CDI file removed", "path", filePath) } + delete(ex.prepared, claimID) + return nil } diff --git a/test/e2e/dra/test-driver/deploy/example/deviceclass.yaml b/test/e2e/dra/test-driver/deploy/example/deviceclass.yaml new file mode 100644 index 0000000000000..44f4fcf468689 --- /dev/null +++ b/test/e2e/dra/test-driver/deploy/example/deviceclass.yaml @@ -0,0 +1,8 @@ +apiVersion: resource.k8s.io/v1alpha3 +kind: ResourceClass +metadata: + name: example +spec: + selectors: + - cel: + expression: device.driver == "test-driver.cdi.k8s.io" diff --git a/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml b/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml index c6e92bb4d2efa..ec965e847e224 100644 --- a/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml +++ b/test/e2e/dra/test-driver/deploy/example/resourceclaim.yaml @@ -1,19 +1,10 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: example-claim-parameters - namespace: default -data: - a: b ---- apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaim metadata: name: example namespace: default spec: - allocationMode: Immediate - resourceClassName: example - parametersRef: - kind: ConfigMap - name: example-claim-parameters + devices: + requests: + - name: req-0 + deviceClassName: example diff --git a/test/e2e/dra/test-driver/deploy/example/resourceclass.yaml b/test/e2e/dra/test-driver/deploy/example/resourceclass.yaml deleted file mode 100644 index 89b856295e316..0000000000000 --- a/test/e2e/dra/test-driver/deploy/example/resourceclass.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: resource.k8s.io/v1alpha3 -kind: ResourceClass -metadata: - name: example -driverName: test-driver.cdi.k8s.io -# TODO: -# parameters From 04c980ec5ed6b4572847ccd90db1c9710767d365 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 19 Jun 2024 16:00:46 +0200 Subject: [PATCH 16/20] DRA e2e: use VAP to control "admin access" permissions The advantages of using a validation admission policy (VAP) are that no changes are needed in Kubernetes and that admins have full flexibility if and how they want to control which users are allowed to use "admin access" in their requests. The downside is that without admins taking actions, the feature is enabled out-of-the-box in a cluster. Documentation for DRA will have to make it very clear that something needs to be done in multi-tenant clusters. The test/e2e/testing-manifests/dra/admin-access-policy.yaml shows how to do this. The corresponding E2E tests ensures that it actually works as intended. For some reason, adding the namespace to the message expression leads to a type check errors, so it's currently commented out. --- test/e2e/dra/dra.go | 59 +++++++++++++++ .../deploy/example/admin-access-policy.yaml | 71 +++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 test/e2e/dra/test-driver/deploy/example/admin-access-policy.yaml diff --git a/test/e2e/dra/dra.go b/test/e2e/dra/dra.go index 3b00f26027619..540ee9bf64e2a 100644 --- a/test/e2e/dra/dra.go +++ b/test/e2e/dra/dra.go @@ -29,6 +29,7 @@ import ( "github.com/onsi/gomega" "github.com/onsi/gomega/gstruct" + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" v1 "k8s.io/api/core/v1" resourceapi "k8s.io/api/resource/v1alpha3" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -36,6 +37,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" + applyv1 "k8s.io/client-go/applyconfigurations/core/v1" "k8s.io/client-go/kubernetes" "k8s.io/dynamic-resource-allocation/controller" "k8s.io/klog/v2" @@ -862,6 +864,63 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, driver := NewDriver(f, nodes, networkResources) b := newBuilder(f, driver) + ginkgo.It("support validating admission policy for admin access", func(ctx context.Context) { + // Create VAP, after making it unique to the current test. + adminAccessPolicyYAML := strings.ReplaceAll(adminAccessPolicyYAML, "dra.example.com", b.f.UniqueName) + driver.createFromYAML(ctx, []byte(adminAccessPolicyYAML), "") + + // Wait for both VAPs to be processed. This ensures that there are no check errors in the status. + matchStatus := gomega.Equal(admissionregistrationv1.ValidatingAdmissionPolicyStatus{ObservedGeneration: 1, TypeChecking: &admissionregistrationv1.TypeChecking{}}) + gomega.Eventually(ctx, framework.ListObjects(b.f.ClientSet.AdmissionregistrationV1().ValidatingAdmissionPolicies().List, metav1.ListOptions{})).Should(gomega.HaveField("Items", gomega.ContainElements( + gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ + "ObjectMeta": gomega.HaveField("Name", "resourceclaim-policy."+b.f.UniqueName), + "Status": matchStatus, + }), + gstruct.MatchFields(gstruct.IgnoreExtras, gstruct.Fields{ + "ObjectMeta": gomega.HaveField("Name", "resourceclaimtemplate-policy."+b.f.UniqueName), + "Status": matchStatus, + }), + ))) + + // Attempt to create claim and claim template with admin access. Must fail eventually. + claim := b.externalClaim() + claim.Spec.Devices.Requests[0].AdminAccess = true + _, claimTemplate := b.podInline() + claimTemplate.Spec.Spec.Devices.Requests[0].AdminAccess = true + matchVAPError := gomega.MatchError(gomega.ContainSubstring("admin access to devices not enabled" /* in namespace " + b.f.Namespace.Name */)) + gomega.Eventually(ctx, func(ctx context.Context) error { + // First delete, in case that it succeeded earlier. + if err := b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Delete(ctx, claim.Name, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { + return err + } + _, err := b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Create(ctx, claim, metav1.CreateOptions{}) + return err + }).Should(matchVAPError) + + gomega.Eventually(ctx, func(ctx context.Context) error { + // First delete, in case that it succeeded earlier. + if err := b.f.ClientSet.ResourceV1alpha3().ResourceClaimTemplates(b.f.Namespace.Name).Delete(ctx, claimTemplate.Name, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { + return err + } + _, err := b.f.ClientSet.ResourceV1alpha3().ResourceClaimTemplates(b.f.Namespace.Name).Create(ctx, claimTemplate, metav1.CreateOptions{}) + return err + }).Should(matchVAPError) + + // After labeling the namespace, creation must (eventually...) succeed. + _, err := b.f.ClientSet.CoreV1().Namespaces().Apply(ctx, + applyv1.Namespace(b.f.Namespace.Name).WithLabels(map[string]string{"admin-access." + b.f.UniqueName: "on"}), + metav1.ApplyOptions{FieldManager: b.f.UniqueName}) + framework.ExpectNoError(err) + gomega.Eventually(ctx, func(ctx context.Context) error { + _, err := b.f.ClientSet.ResourceV1alpha3().ResourceClaims(b.f.Namespace.Name).Create(ctx, claim, metav1.CreateOptions{}) + return err + }).Should(gomega.Succeed()) + gomega.Eventually(ctx, func(ctx context.Context) error { + _, err := b.f.ClientSet.ResourceV1alpha3().ResourceClaimTemplates(b.f.Namespace.Name).Create(ctx, claimTemplate, metav1.CreateOptions{}) + return err + }).Should(gomega.Succeed()) + }) + ginkgo.It("truncates the name of a generated resource claim", func(ctx context.Context) { pod, template := b.podInline() pod.Name = strings.Repeat("p", 63) diff --git a/test/e2e/dra/test-driver/deploy/example/admin-access-policy.yaml b/test/e2e/dra/test-driver/deploy/example/admin-access-policy.yaml new file mode 100644 index 0000000000000..133dd2caf78fc --- /dev/null +++ b/test/e2e/dra/test-driver/deploy/example/admin-access-policy.yaml @@ -0,0 +1,71 @@ +# This example shows how to use a validating admission policy (VAP) +# to control who may use "admin access", a privileged mode which +# grants access to devices which are currently in use, potentially +# by some other user. +# +# The policy applies in any namespace which does not have the +# "admin-access.dra.example.com" label. Other ways of making that decision are +# also possible. +# +# Cluster administrators need to adapt at least the names and replace +# "dra.example.com". + +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingAdmissionPolicy +metadata: + name: resourceclaim-policy.dra.example.com +spec: + failurePolicy: Fail + matchConstraints: + resourceRules: + - apiGroups: ["resource.k8s.io"] + apiVersions: ["v1alpha3"] + operations: ["CREATE", "UPDATE"] + resources: ["resourceclaims"] + validations: + - expression: '! object.spec.devices.requests.exists(e, has(e.adminAccess) && e.adminAccess)' + reason: Forbidden + messageExpression: '"admin access to devices not enabled"' # in namespace " + object.metadata.namespace' - need to use __namespace__, but somehow that also doesn't work. +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingAdmissionPolicyBinding +metadata: + name: resourceclaim-binding.dra.example.com +spec: + policyName: resourceclaim-policy.dra.example.com + validationActions: [Deny] + matchResources: + namespaceSelector: + matchExpressions: + - key: admin-access.dra.example.com + operator: DoesNotExist +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingAdmissionPolicy +metadata: + name: resourceclaimtemplate-policy.dra.example.com +spec: + failurePolicy: Fail + matchConstraints: + resourceRules: + - apiGroups: ["resource.k8s.io"] + apiVersions: ["v1alpha3"] + operations: ["CREATE", "UPDATE"] + resources: ["resourceclaimtemplates"] + validations: + - expression: '! object.spec.spec.devices.requests.exists(e, has(e.adminAccess) && e.adminAccess)' + reason: Forbidden + messageExpression: '"admin access to devices not enabled"' # in namespace " + object.metadata.namespace' - need to use __namespace__, but somehow that also doesn't work. +--- +apiVersion: admissionregistration.k8s.io/v1 +kind: ValidatingAdmissionPolicyBinding +metadata: + name: resourceclaimtemplate-binding.dra.example.com +spec: + policyName: resourceclaimtemplate-policy.dra.example.com + validationActions: [Deny] + matchResources: + namespaceSelector: + matchExpressions: + - key: admin-access.dra.example.com + operator: DoesNotExist From 7d9f1a6bf74f4a769431387002c71c4874829854 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Jul 2024 16:40:10 +0200 Subject: [PATCH 17/20] DRA resource claim controller: update test The resource claim controller is completely agnostic to the claim spec. It doesn't care about classes or devices, therefore it needs no changes in 1.31 besides the v1alpha2 -> v1alpha3 renaming from a previous commit. --- pkg/controller/resourceclaim/controller_test.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pkg/controller/resourceclaim/controller_test.go b/pkg/controller/resourceclaim/controller_test.go index 789f0cd401947..9921c88a19855 100644 --- a/pkg/controller/resourceclaim/controller_test.go +++ b/pkg/controller/resourceclaim/controller_test.go @@ -527,9 +527,6 @@ func TestSyncHandler(t *testing.T) { func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourceapi.ResourceClaim { claim := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: classname, - }, } if owner != nil { claim.OwnerReferences = []metav1.OwnerReference{*owner} @@ -546,9 +543,6 @@ func makeGeneratedClaim(podClaimName, generateName, namespace, classname string, Namespace: namespace, Annotations: map[string]string{"resource.kubernetes.io/pod-claim-name": podClaimName}, }, - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: classname, - }, } if owner != nil { claim.OwnerReferences = []metav1.OwnerReference{*owner} @@ -604,11 +598,6 @@ func makePod(name, namespace string, uid types.UID, podClaims ...v1.PodResourceC func makeTemplate(name, namespace, classname string) *resourceapi.ResourceClaimTemplate { template := &resourceapi.ResourceClaimTemplate{ ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, - Spec: resourceapi.ResourceClaimTemplateSpec{ - Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: classname, - }, - }, } return template } From 1aa17fe849464ac9980b46b8e13e0a5df84b4a78 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Jul 2024 16:42:51 +0200 Subject: [PATCH 18/20] DRA scheduler: adapt to v1alpha3 API The structured parameter allocation logic was written from scratch in staging/src/k8s.io/dynamic-resource-allocation/structured where it might be useful for out-of-tree components. Besides the new features (amount, admin access) and API it now supports backtracking when the initial device selection doesn't lead to a complete allocation of all claims. Co-authored-by: Ed Bartosh --- pkg/scheduler/eventhandlers.go | 24 +- pkg/scheduler/eventhandlers_test.go | 30 +- .../dynamicresources/dynamicresources.go | 652 +++------ .../dynamicresources/dynamicresources_test.go | 477 +++---- .../namedresources/namedresourcesmodel.go | 153 -- .../namedresourcesmodel_test.go | 327 ----- .../dynamicresources/structuredparameters.go | 274 ---- .../structuredparameters_test.go | 1257 ----------------- pkg/scheduler/framework/types.go | 26 +- pkg/scheduler/scheduler_test.go | 32 +- pkg/scheduler/testing/wrappers.go | 193 +-- staging/publishing/import-restrictions.yaml | 1 + .../structured/allocator.go | 745 ++++++++++ .../structured/allocator_test.go | 1177 +++++++++++++++ .../structured/doc.go | 18 + .../structured/pools.go | 131 ++ test/integration/scheduler/scheduler_test.go | 17 +- .../dra/another-resourceclaimtemplate.yaml | 8 +- .../config/dra/another-resourceclass.yaml | 5 - .../config/dra/claim-template.yaml | 7 - .../config/dra/deviceclass-structured.yaml | 8 + .../{resourceclass.yaml => deviceclass.yaml} | 3 +- .../config/dra/resourceclaim-structured.yaml | 9 +- .../config/dra/resourceclaim.yaml | 6 +- .../config/dra/resourceclaimparameters.yaml | 10 - .../dra/resourceclaimtemplate-structured.yaml | 9 +- .../config/dra/resourceclaimtemplate.yaml | 6 +- .../config/dra/resourceclass-structured.yaml | 6 - .../config/performance-config.yaml | 25 +- test/integration/scheduler_perf/dra.go | 21 +- 30 files changed, 2560 insertions(+), 3097 deletions(-) delete mode 100644 pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go delete mode 100644 pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go delete mode 100644 pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go delete mode 100644 pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go create mode 100644 staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go create mode 100644 staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go create mode 100644 staging/src/k8s.io/dynamic-resource-allocation/structured/doc.go create mode 100644 staging/src/k8s.io/dynamic-resource-allocation/structured/pools.go delete mode 100644 test/integration/scheduler_perf/config/dra/another-resourceclass.yaml delete mode 100644 test/integration/scheduler_perf/config/dra/claim-template.yaml create mode 100644 test/integration/scheduler_perf/config/dra/deviceclass-structured.yaml rename test/integration/scheduler_perf/config/dra/{resourceclass.yaml => deviceclass.yaml} (54%) delete mode 100644 test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml delete mode 100644 test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml diff --git a/pkg/scheduler/eventhandlers.go b/pkg/scheduler/eventhandlers.go index 575bae33d9e7d..3f03f4e531730 100644 --- a/pkg/scheduler/eventhandlers.go +++ b/pkg/scheduler/eventhandlers.go @@ -489,28 +489,10 @@ func addAllEventHandlers( ) handlers = append(handlers, handlerRegistration) } - case framework.ResourceClass: + case framework.DeviceClass: if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { - if handlerRegistration, err = informerFactory.Resource().V1alpha3().ResourceClasses().Informer().AddEventHandler( - buildEvtResHandler(at, framework.ResourceClass, "ResourceClass"), - ); err != nil { - return err - } - handlers = append(handlers, handlerRegistration) - } - case framework.ResourceClaimParameters: - if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { - if handlerRegistration, err = informerFactory.Resource().V1alpha3().ResourceClaimParameters().Informer().AddEventHandler( - buildEvtResHandler(at, framework.ResourceClaimParameters, "ResourceClaimParameters"), - ); err != nil { - return err - } - handlers = append(handlers, handlerRegistration) - } - case framework.ResourceClassParameters: - if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { - if handlerRegistration, err = informerFactory.Resource().V1alpha3().ResourceClassParameters().Informer().AddEventHandler( - buildEvtResHandler(at, framework.ResourceClassParameters, "ResourceClassParameters"), + if handlerRegistration, err = informerFactory.Resource().V1alpha3().DeviceClasses().Informer().AddEventHandler( + buildEvtResHandler(at, framework.DeviceClass, "DeviceClass"), ); err != nil { return err } diff --git a/pkg/scheduler/eventhandlers_test.go b/pkg/scheduler/eventhandlers_test.go index 15a545e0cc8bf..b8cd9be73a9c5 100644 --- a/pkg/scheduler/eventhandlers_test.go +++ b/pkg/scheduler/eventhandlers_test.go @@ -384,11 +384,9 @@ func TestAddAllEventHandlers(t *testing.T) { { name: "DRA events disabled", gvkMap: map[framework.GVK]framework.ActionType{ - framework.PodSchedulingContext: framework.Add, - framework.ResourceClaim: framework.Add, - framework.ResourceClass: framework.Add, - framework.ResourceClaimParameters: framework.Add, - framework.ResourceClassParameters: framework.Add, + framework.PodSchedulingContext: framework.Add, + framework.ResourceClaim: framework.Add, + framework.DeviceClass: framework.Add, }, expectStaticInformers: map[reflect.Type]bool{ reflect.TypeOf(&v1.Pod{}): true, @@ -400,22 +398,18 @@ func TestAddAllEventHandlers(t *testing.T) { { name: "DRA events enabled", gvkMap: map[framework.GVK]framework.ActionType{ - framework.PodSchedulingContext: framework.Add, - framework.ResourceClaim: framework.Add, - framework.ResourceClass: framework.Add, - framework.ResourceClaimParameters: framework.Add, - framework.ResourceClassParameters: framework.Add, + framework.PodSchedulingContext: framework.Add, + framework.ResourceClaim: framework.Add, + framework.DeviceClass: framework.Add, }, enableDRA: true, expectStaticInformers: map[reflect.Type]bool{ - reflect.TypeOf(&v1.Pod{}): true, - reflect.TypeOf(&v1.Node{}): true, - reflect.TypeOf(&v1.Namespace{}): true, - reflect.TypeOf(&resourceapi.PodSchedulingContext{}): true, - reflect.TypeOf(&resourceapi.ResourceClaim{}): true, - reflect.TypeOf(&resourceapi.ResourceClaimParameters{}): true, - reflect.TypeOf(&resourceapi.ResourceClass{}): true, - reflect.TypeOf(&resourceapi.ResourceClassParameters{}): true, + reflect.TypeOf(&v1.Pod{}): true, + reflect.TypeOf(&v1.Node{}): true, + reflect.TypeOf(&v1.Namespace{}): true, + reflect.TypeOf(&resourceapi.PodSchedulingContext{}): true, + reflect.TypeOf(&resourceapi.ResourceClaim{}): true, + reflect.TypeOf(&resourceapi.DeviceClass{}): true, }, expectDynamicInformers: map[schema.GroupVersionResource]bool{}, }, diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go index 9fd43ec8e45eb..16135247dcd55 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go @@ -38,10 +38,10 @@ import ( resourceapiapply "k8s.io/client-go/applyconfigurations/resource/v1alpha3" "k8s.io/client-go/kubernetes" resourcelisters "k8s.io/client-go/listers/resource/v1alpha3" - "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/retry" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" "k8s.io/dynamic-resource-allocation/resourceclaim" + "k8s.io/dynamic-resource-allocation/structured" "k8s.io/klog/v2" "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" @@ -56,10 +56,6 @@ const ( Name = names.DynamicResources stateKey framework.StateKey = Name - - // generatedFromIndex is the lookup name for the index function - // which indexes by other resource which generated the parameters object. - generatedFromIndex = "generated-from-index" ) // The state is initialized in PreFilter phase. Because we save the pointer in @@ -82,9 +78,8 @@ type stateData struct { // (if one exists) and the changes made to it. podSchedulingState podSchedulingState - // resourceModel contains the information about available and allocated resources when using - // structured parameters and the pod needs this information. - resources resources + // Allocator handles claims with structured parameters. + allocator *structured.Allocator // mutex must be locked while accessing any of the fields below. mutex sync.Mutex @@ -99,6 +94,18 @@ type stateData struct { unavailableClaims sets.Set[int] informationsForClaim []informationForClaim + + // nodeAllocations caches the result of Filter for the nodes. + nodeAllocations map[string][]*resourceapi.AllocationResult + + // filterErr is set by Filter if a CEL runtime error is encountered + // for at least one node. Such an error indicates that something is + // wrong with the input (class or claim) and thus scheduling should not + // proceed, even if the error did not occur on all nodes. + // + // This error gets returned by PostFilter as-is and thus should + // contain all relevant details. + filterErr error } func (d *stateData) Clone() framework.StateData { @@ -106,24 +113,20 @@ func (d *stateData) Clone() framework.StateData { } type informationForClaim struct { - // The availableOnNode node filter of the claim converted from the - // v1 API to nodeaffinity.NodeSelector by PreFilter for repeated - // evaluation in Filter. Nil for claim which don't have it. - availableOnNode *nodeaffinity.NodeSelector + // Node selectors based on the claim status (single entry, key is empty) if allocated, + // otherwise the device class AvailableOnNodes selectors (potentially multiple entries, + // key is the device class name). + availableOnNodes map[string]*nodeaffinity.NodeSelector // The status of the claim got from the // schedulingCtx by PreFilter for repeated // evaluation in Filter. Nil for claim which don't have it. status *resourceapi.ResourceClaimSchedulingStatus - // structuredParameters is true if the claim is handled via the builtin - // controller. structuredParameters bool - controller *claimController // Set by Reserved, published by PreBind. - allocation *resourceapi.AllocationResult - allocationDriverName string + allocation *resourceapi.AllocationResult } type podSchedulingState struct { @@ -276,19 +279,9 @@ type dynamicResources struct { enabled bool fh framework.Handle clientset kubernetes.Interface - classLister resourcelisters.ResourceClassLister + classLister resourcelisters.DeviceClassLister podSchedulingContextLister resourcelisters.PodSchedulingContextLister - claimParametersLister resourcelisters.ResourceClaimParametersLister - classParametersLister resourcelisters.ResourceClassParametersLister - resourceSliceLister resourcelisters.ResourceSliceLister - claimNameLookup *resourceclaim.Lookup - - // claimParametersIndexer has the common claimParametersGeneratedFrom indexer installed to - // limit iteration over claimParameters to those of interest. - claimParametersIndexer cache.Indexer - // classParametersIndexer has the common classParametersGeneratedFrom indexer installed to - // limit iteration over classParameters to those of interest. - classParametersIndexer cache.Indexer + sliceLister resourcelisters.ResourceSliceLister // claimAssumeCache enables temporarily storing a newer claim object // while the scheduler has allocated it and the corresponding object @@ -357,61 +350,15 @@ func New(ctx context.Context, plArgs runtime.Object, fh framework.Handle, fts fe enabled: true, fh: fh, clientset: fh.ClientSet(), - classLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClasses().Lister(), + classLister: fh.SharedInformerFactory().Resource().V1alpha3().DeviceClasses().Lister(), podSchedulingContextLister: fh.SharedInformerFactory().Resource().V1alpha3().PodSchedulingContexts().Lister(), - claimParametersLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClaimParameters().Lister(), - claimParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClaimParameters().Informer().GetIndexer(), - classParametersLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClassParameters().Lister(), - classParametersIndexer: fh.SharedInformerFactory().Resource().V1alpha3().ResourceClassParameters().Informer().GetIndexer(), - resourceSliceLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceSlices().Lister(), - claimNameLookup: resourceclaim.NewNameLookup(fh.ClientSet()), + sliceLister: fh.SharedInformerFactory().Resource().V1alpha3().ResourceSlices().Lister(), claimAssumeCache: fh.ResourceClaimCache(), } - if err := pl.claimParametersIndexer.AddIndexers(cache.Indexers{generatedFromIndex: claimParametersGeneratedFromIndexFunc}); err != nil { - return nil, fmt.Errorf("add claim parameters cache indexer: %w", err) - } - if err := pl.classParametersIndexer.AddIndexers(cache.Indexers{generatedFromIndex: classParametersGeneratedFromIndexFunc}); err != nil { - return nil, fmt.Errorf("add class parameters cache indexer: %w", err) - } - return pl, nil } -func claimParametersReferenceKeyFunc(namespace string, ref *resourceapi.ResourceClaimParametersReference) string { - return ref.APIGroup + "/" + ref.Kind + "/" + namespace + "/" + ref.Name -} - -// claimParametersGeneratedFromIndexFunc is an index function that returns other resource keys -// (= apiGroup/kind/namespace/name) for ResourceClaimParametersReference in a given claim parameters. -func claimParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) { - parameters, ok := obj.(*resourceapi.ResourceClaimParameters) - if !ok { - return nil, nil - } - if parameters.GeneratedFrom == nil { - return nil, nil - } - return []string{claimParametersReferenceKeyFunc(parameters.Namespace, parameters.GeneratedFrom)}, nil -} - -func classParametersReferenceKeyFunc(ref *resourceapi.ResourceClassParametersReference) string { - return ref.APIGroup + "/" + ref.Kind + "/" + ref.Namespace + "/" + ref.Name -} - -// classParametersGeneratedFromIndexFunc is an index function that returns other resource keys -// (= apiGroup/kind/namespace/name) for ResourceClassParametersReference in a given class parameters. -func classParametersGeneratedFromIndexFunc(obj interface{}) ([]string, error) { - parameters, ok := obj.(*resourceapi.ResourceClassParameters) - if !ok { - return nil, nil - } - if parameters.GeneratedFrom == nil { - return nil, nil - } - return []string{classParametersReferenceKeyFunc(parameters.GeneratedFrom)}, nil -} - var _ framework.PreEnqueuePlugin = &dynamicResources{} var _ framework.PreFilterPlugin = &dynamicResources{} var _ framework.FilterPlugin = &dynamicResources{} @@ -435,11 +382,6 @@ func (pl *dynamicResources) EventsToRegister() []framework.ClusterEventWithHint } events := []framework.ClusterEventWithHint{ - // Changes for claim or class parameters creation may make pods - // schedulable which depend on claims using those parameters. - {Event: framework.ClusterEvent{Resource: framework.ResourceClaimParameters, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterClaimParametersChange}, - {Event: framework.ClusterEvent{Resource: framework.ResourceClassParameters, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterClassParametersChange}, - // Allocation is tracked in ResourceClaims, so any changes may make the pods schedulable. {Event: framework.ClusterEvent{Resource: framework.ResourceClaim, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterClaimChange}, // When a driver has provided additional information, a pod waiting for that information @@ -458,7 +400,7 @@ func (pl *dynamicResources) EventsToRegister() []framework.ClusterEventWithHint // See: https://github.com/kubernetes/kubernetes/issues/110175 {Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel | framework.UpdateNodeTaint}}, // A pod might be waiting for a class to get created or modified. - {Event: framework.ClusterEvent{Resource: framework.ResourceClass, ActionType: framework.Add | framework.Update}}, + {Event: framework.ClusterEvent{Resource: framework.DeviceClass, ActionType: framework.Add | framework.Update}}, } return events } @@ -473,149 +415,6 @@ func (pl *dynamicResources) PreEnqueue(ctx context.Context, pod *v1.Pod) (status return nil } -// isSchedulableAfterClaimParametersChange is invoked for add and update claim parameters events reported by -// an informer. It checks whether that change made a previously unschedulable -// 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. -func (pl *dynamicResources) isSchedulableAfterClaimParametersChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { - originalParameters, modifiedParameters, err := schedutil.As[*resourceapi.ResourceClaimParameters](oldObj, newObj) - if err != nil { - // Shouldn't happen. - return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClaimParametersChange: %w", err) - } - - usesParameters := false - if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourceapi.ResourceClaim) { - ref := claim.Spec.ParametersRef - if ref == nil { - return - } - - // Using in-tree parameters directly? - if ref.APIGroup == resourceapi.SchemeGroupVersion.Group && - ref.Kind == "ResourceClaimParameters" { - if modifiedParameters.Name == ref.Name { - usesParameters = true - } - return - } - - // Need to look for translated parameters. - generatedFrom := modifiedParameters.GeneratedFrom - if generatedFrom == nil { - return - } - if generatedFrom.APIGroup == ref.APIGroup && - generatedFrom.Kind == ref.Kind && - generatedFrom.Name == ref.Name { - usesParameters = true - } - }); err != nil { - // This is not an unexpected error: we know that - // foreachPodResourceClaim only returns errors for "not - // schedulable". - logger.V(4).Info("pod is not schedulable", "pod", klog.KObj(pod), "claim", klog.KObj(modifiedParameters), "reason", err.Error()) - return framework.QueueSkip, nil - } - - if !usesParameters { - // This were not the parameters the pod was waiting for. - logger.V(6).Info("unrelated claim parameters got modified", "pod", klog.KObj(pod), "claimParameters", klog.KObj(modifiedParameters)) - return framework.QueueSkip, nil - } - - if originalParameters == nil { - logger.V(4).Info("claim parameters for pod got created", "pod", klog.KObj(pod), "claimParameters", klog.KObj(modifiedParameters)) - return framework.Queue, nil - } - - // Modifications may or may not be relevant. If the entire - // requests are as before, then something else must have changed - // and we don't care. - if apiequality.Semantic.DeepEqual(&originalParameters.DriverRequests, &modifiedParameters.DriverRequests) { - logger.V(6).Info("claim parameters for pod got modified where the pod doesn't care", "pod", klog.KObj(pod), "claimParameters", klog.KObj(modifiedParameters)) - return framework.QueueSkip, nil - } - - logger.V(4).Info("requests in claim parameters for pod got updated", "pod", klog.KObj(pod), "claimParameters", klog.KObj(modifiedParameters)) - return framework.Queue, nil -} - -// isSchedulableAfterClassParametersChange is invoked for add and update class parameters events reported by -// an informer. It checks whether that change made a previously unschedulable -// 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. -func (pl *dynamicResources) isSchedulableAfterClassParametersChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { - originalParameters, modifiedParameters, err := schedutil.As[*resourceapi.ResourceClassParameters](oldObj, newObj) - if err != nil { - // Shouldn't happen. - return framework.Queue, fmt.Errorf("unexpected object in isSchedulableAfterClassParametersChange: %w", err) - } - - usesParameters := false - if err := pl.foreachPodResourceClaim(pod, func(_ string, claim *resourceapi.ResourceClaim) { - class, err := pl.classLister.Get(claim.Spec.ResourceClassName) - if err != nil { - if !apierrors.IsNotFound(err) { - logger.Error(err, "look up resource class") - } - return - } - ref := class.ParametersRef - if ref == nil { - return - } - - // Using in-tree parameters directly? - if ref.APIGroup == resourceapi.SchemeGroupVersion.Group && - ref.Kind == "ResourceClassParameters" { - if modifiedParameters.Name == ref.Name { - usesParameters = true - } - return - } - - // Need to look for translated parameters. - generatedFrom := modifiedParameters.GeneratedFrom - if generatedFrom == nil { - return - } - if generatedFrom.APIGroup == ref.APIGroup && - generatedFrom.Kind == ref.Kind && - generatedFrom.Name == ref.Name { - usesParameters = true - } - }); err != nil { - // This is not an unexpected error: we know that - // foreachPodResourceClaim only returns errors for "not - // schedulable". - logger.V(4).Info("pod is not schedulable", "pod", klog.KObj(pod), "classParameters", klog.KObj(modifiedParameters), "reason", err.Error()) - return framework.QueueSkip, nil - } - - if !usesParameters { - // This were not the parameters the pod was waiting for. - logger.V(6).Info("unrelated class parameters got modified", "pod", klog.KObj(pod), "classParameters", klog.KObj(modifiedParameters)) - return framework.QueueSkip, nil - } - - if originalParameters == nil { - logger.V(4).Info("class parameters for pod got created", "pod", klog.KObj(pod), "class", klog.KObj(modifiedParameters)) - return framework.Queue, nil - } - - // Modifications may or may not be relevant. If the entire - // requests are as before, then something else must have changed - // and we don't care. - if apiequality.Semantic.DeepEqual(&originalParameters.Filters, &modifiedParameters.Filters) { - logger.V(6).Info("class parameters for pod got modified where the pod doesn't care", "pod", klog.KObj(pod), "classParameters", klog.KObj(modifiedParameters)) - return framework.QueueSkip, nil - } - - logger.V(4).Info("filters in class parameters for pod got updated", "pod", klog.KObj(pod), "classParameters", klog.KObj(modifiedParameters)) - return framework.Queue, nil -} - // isSchedulableAfterClaimChange is invoked for add and update claim events reported by // an informer. It checks whether that change made a previously unschedulable // pod schedulable. It errs on the side of letting a pod scheduling attempt @@ -641,7 +440,8 @@ func (pl *dynamicResources) isSchedulableAfterClaimChange(logger klog.Logger, po } if originalClaim != nil && - resourceclaim.IsAllocatedWithStructuredParameters(originalClaim) && + originalClaim.Status.Allocation != nil && + originalClaim.Status.Allocation.Controller == "" && modifiedClaim.Status.Allocation == nil { // A claim with structured parameters was deallocated. This might have made // resources available for other pods. @@ -823,7 +623,7 @@ func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourceapi.Resou // It calls an optional handler for those claims that it finds. func (pl *dynamicResources) foreachPodResourceClaim(pod *v1.Pod, cb func(podResourceName string, claim *resourceapi.ResourceClaim)) error { for _, resource := range pod.Spec.ResourceClaims { - claimName, mustCheckOwner, err := pl.claimNameLookup.Name(pod, &resource) + claimName, mustCheckOwner, err := resourceclaim.Name(pod, &resource) if err != nil { return err } @@ -892,8 +692,10 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl return nil, statusError(logger, err) } + // All claims which the scheduler needs to allocate itself. + allocateClaims := make([]*resourceapi.ResourceClaim, 0, len(claims)) + s.informationsForClaim = make([]informationForClaim, len(claims)) - needResourceInformation := false for index, claim := range claims { if claim.Status.DeallocationRequested { // This will get resolved by the resource driver. @@ -907,44 +709,19 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl } if claim.Status.Allocation != nil { - if claim.Status.Allocation.AvailableOnNodes != nil { - nodeSelector, err := nodeaffinity.NewNodeSelector(claim.Status.Allocation.AvailableOnNodes) + s.informationsForClaim[index].structuredParameters = claim.Status.Allocation.Controller == "" + if claim.Status.Allocation.NodeSelector != nil { + nodeSelector, err := nodeaffinity.NewNodeSelector(claim.Status.Allocation.NodeSelector) if err != nil { return nil, statusError(logger, err) } - s.informationsForClaim[index].availableOnNode = nodeSelector + s.informationsForClaim[index].availableOnNodes = map[string]*nodeaffinity.NodeSelector{"": nodeSelector} } - - // The claim was allocated by the scheduler if it has the finalizer that is - // reserved for Kubernetes. - s.informationsForClaim[index].structuredParameters = slices.Contains(claim.Finalizers, resourceapi.Finalizer) } else { - // The ResourceClass might have a node filter. This is - // useful for trimming the initial set of potential - // nodes before we ask the driver(s) for information - // about the specific pod. - class, err := pl.classLister.Get(claim.Spec.ResourceClassName) - if err != nil { - // If the class cannot be retrieved, allocation cannot proceed. - if apierrors.IsNotFound(err) { - // Here we mark the pod as "unschedulable", so it'll sleep in - // the unscheduleable queue until a ResourceClass event occurs. - return nil, statusUnschedulable(logger, fmt.Sprintf("resource class %s does not exist", claim.Spec.ResourceClassName)) - } - // Other error, retry with backoff. - return nil, statusError(logger, fmt.Errorf("look up resource class: %v", err)) - } - if class.SuitableNodes != nil { - selector, err := nodeaffinity.NewNodeSelector(class.SuitableNodes) - if err != nil { - return nil, statusError(logger, err) - } - s.informationsForClaim[index].availableOnNode = selector - } - s.informationsForClaim[index].status = statusForClaim(s.podSchedulingState.schedulingCtx, pod.Spec.ResourceClaims[index].Name) - - if class.StructuredParameters != nil && *class.StructuredParameters { - s.informationsForClaim[index].structuredParameters = true + structuredParameters := claim.Spec.Controller == "" + s.informationsForClaim[index].structuredParameters = structuredParameters + if structuredParameters { + allocateClaims = append(allocateClaims, claim) // Allocation in flight? Better wait for that // to finish, see inFlightAllocations @@ -952,164 +729,92 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl if _, found := pl.inFlightAllocations.Load(claim.UID); found { return nil, statusUnschedulable(logger, fmt.Sprintf("resource claim %s is in the process of being allocated", klog.KObj(claim))) } + } else { + s.informationsForClaim[index].status = statusForClaim(s.podSchedulingState.schedulingCtx, pod.Spec.ResourceClaims[index].Name) + } - // We need the claim and class parameters. If - // they don't exist yet, the pod has to wait. - // - // TODO (https://github.com/kubernetes/kubernetes/issues/123697): - // check this already in foreachPodResourceClaim, together with setting up informationsForClaim. - // Then PreEnqueue will also check for existence of parameters. - classParameters, claimParameters, status := pl.lookupParameters(logger, class, claim) - if status != nil { - return nil, status + // Check all requests and device classes. If a class + // does not exist, scheduling cannot proceed, no matter + // how the claim is being allocated. + // + // When using a control plane controller, a class might + // have a node filter. This is useful for trimming the + // initial set of potential nodes before we ask the + // driver(s) for information about the specific pod. + for _, request := range claim.Spec.Devices.Requests { + if request.DeviceClassName == "" { + return nil, statusError(logger, fmt.Errorf("request %s: unsupported request type", request.Name)) } - controller, err := newClaimController(logger, class, classParameters, claimParameters) + + class, err := pl.classLister.Get(request.DeviceClassName) if err != nil { - return nil, statusError(logger, err) + // If the class cannot be retrieved, allocation cannot proceed. + if apierrors.IsNotFound(err) { + // Here we mark the pod as "unschedulable", so it'll sleep in + // the unscheduleable queue until a DeviceClass event occurs. + return nil, statusUnschedulable(logger, fmt.Sprintf("request %s: device class %s does not exist", request.Name, request.DeviceClassName)) + } + // Other error, retry with backoff. + return nil, statusError(logger, fmt.Errorf("request %s: look up device class: %w", request.Name, err)) + } + if class.Spec.SuitableNodes != nil && !structuredParameters { + selector, err := nodeaffinity.NewNodeSelector(class.Spec.SuitableNodes) + if err != nil { + return nil, statusError(logger, err) + } + if s.informationsForClaim[index].availableOnNodes == nil { + s.informationsForClaim[index].availableOnNodes = make(map[string]*nodeaffinity.NodeSelector) + } + s.informationsForClaim[index].availableOnNodes[class.Name] = selector } - s.informationsForClaim[index].controller = controller - needResourceInformation = true } } } - if needResourceInformation { + if len(allocateClaims) > 0 { + logger.V(5).Info("Preparing allocation with structured parameters", "pod", klog.KObj(pod), "resourceclaims", klog.KObjSlice(allocateClaims)) + // Doing this over and over again for each pod could be avoided - // by parsing once when creating the plugin and then updating - // that state in informer callbacks. But that would cause - // problems for using the plugin in the Cluster Autoscaler. If - // this step here turns out to be expensive, we may have to - // maintain and update state more persistently. + // by setting the allocator up once and then keeping it up-to-date + // as changes are observed. + // + // But that would cause problems for using the plugin in the + // Cluster Autoscaler. If this step here turns out to be + // expensive, we may have to maintain and update state more + // persistently. // // Claims are treated as "allocated" if they are in the assume cache // or currently their allocation is in-flight. - resources, err := newResourceModel(logger, pl.resourceSliceLister, pl.claimAssumeCache, &pl.inFlightAllocations) - logger.V(5).Info("Resource usage", "resources", klog.Format(resources)) + allocator, err := structured.NewAllocator(ctx, allocateClaims, &claimListerForAssumeCache{assumeCache: pl.claimAssumeCache, inFlightAllocations: &pl.inFlightAllocations}, pl.classLister, pl.sliceLister) if err != nil { return nil, statusError(logger, err) } - s.resources = resources + s.allocator = allocator } s.claims = claims return nil, nil } -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) - if status != nil { - return - } - claimParameters, status = pl.lookupClaimParameters(logger, class, claim) - return +type claimListerForAssumeCache struct { + assumeCache *assumecache.AssumeCache + inFlightAllocations *sync.Map } -func (pl *dynamicResources) lookupClassParameters(logger klog.Logger, class *resourceapi.ResourceClass) (*resourceapi.ResourceClassParameters, *framework.Status) { - defaultClassParameters := resourceapi.ResourceClassParameters{} - - if class.ParametersRef == nil { - return &defaultClassParameters, nil - } - - if class.ParametersRef.APIGroup == resourceapi.SchemeGroupVersion.Group && - class.ParametersRef.Kind == "ResourceClassParameters" { - // Use the parameters which were referenced directly. - parameters, err := pl.classParametersLister.ResourceClassParameters(class.ParametersRef.Namespace).Get(class.ParametersRef.Name) - if err != nil { - if apierrors.IsNotFound(err) { - return nil, statusUnschedulable(logger, fmt.Sprintf("class parameters %s not found", klog.KRef(class.ParametersRef.Namespace, class.ParametersRef.Name))) - } - return nil, statusError(logger, fmt.Errorf("get class parameters %s: %v", klog.KRef(class.Namespace, class.ParametersRef.Name), err)) - } - return parameters, nil - } - - objs, err := pl.classParametersIndexer.ByIndex(generatedFromIndex, classParametersReferenceKeyFunc(class.ParametersRef)) - if err != nil { - return nil, statusError(logger, fmt.Errorf("listing class parameters failed: %v", err)) - } - switch len(objs) { - 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))) - case 1: - parameters, ok := objs[0].(*resourceapi.ResourceClassParameters) - if !ok { - return nil, statusError(logger, fmt.Errorf("unexpected object in class parameters index: %T", objs[0])) - } - return parameters, nil - default: - sort.Slice(objs, func(i, j int) bool { - obj1, obj2 := objs[i].(*resourceapi.ResourceClassParameters), objs[j].(*resourceapi.ResourceClassParameters) - if obj1 == nil || obj2 == nil { - return false - } - return obj1.Name < obj2.Name - }) - return nil, statusError(logger, fmt.Errorf("multiple generated class parameters for %s.%s %s found: %s", class.ParametersRef.Kind, class.ParametersRef.APIGroup, klog.KRef(class.Namespace, class.ParametersRef.Name), klog.KObjSlice(objs))) - } -} - -func (pl *dynamicResources) lookupClaimParameters(logger klog.Logger, class *resourceapi.ResourceClass, claim *resourceapi.ResourceClaim) (*resourceapi.ResourceClaimParameters, *framework.Status) { - defaultClaimParameters := resourceapi.ResourceClaimParameters{ - DriverRequests: []resourceapi.DriverRequests{ - { - DriverName: class.DriverName, - Requests: []resourceapi.ResourceRequest{ - { - ResourceRequestModel: resourceapi.ResourceRequestModel{ - // TODO: This only works because NamedResources is - // the only model currently implemented. We need to - // match the default to how the resources of this - // class are being advertized in a ResourceSlice. - NamedResources: &resourceapi.NamedResourcesRequest{ - Selector: "true", - }, - }, - }, - }, - }, - }, - } - - if claim.Spec.ParametersRef == nil { - return &defaultClaimParameters, nil - } - if claim.Spec.ParametersRef.APIGroup == resourceapi.SchemeGroupVersion.Group && - claim.Spec.ParametersRef.Kind == "ResourceClaimParameters" { - // Use the parameters which were referenced directly. - parameters, err := pl.claimParametersLister.ResourceClaimParameters(claim.Namespace).Get(claim.Spec.ParametersRef.Name) - if err != nil { - if apierrors.IsNotFound(err) { - return nil, statusUnschedulable(logger, fmt.Sprintf("claim parameters %s not found", klog.KRef(claim.Namespace, claim.Spec.ParametersRef.Name))) - } - return nil, statusError(logger, fmt.Errorf("get claim parameters %s: %v", klog.KRef(claim.Namespace, claim.Spec.ParametersRef.Name), err)) +func (cl *claimListerForAssumeCache) ListAllAllocated() ([]*resourceapi.ResourceClaim, error) { + // Probably not worth adding an index for? + objs := cl.assumeCache.List(nil) + allocated := make([]*resourceapi.ResourceClaim, 0, len(objs)) + for _, obj := range objs { + claim := obj.(*resourceapi.ResourceClaim) + if obj, ok := cl.inFlightAllocations.Load(claim.UID); ok { + claim = obj.(*resourceapi.ResourceClaim) } - return parameters, nil - } - - objs, err := pl.claimParametersIndexer.ByIndex(generatedFromIndex, claimParametersReferenceKeyFunc(claim.Namespace, claim.Spec.ParametersRef)) - if err != nil { - return nil, statusError(logger, fmt.Errorf("listing claim parameters failed: %v", err)) - } - switch len(objs) { - 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))) - case 1: - parameters, ok := objs[0].(*resourceapi.ResourceClaimParameters) - if !ok { - return nil, statusError(logger, fmt.Errorf("unexpected object in claim parameters index: %T", objs[0])) + if claim.Status.Allocation != nil { + allocated = append(allocated, claim) } - return parameters, nil - default: - sort.Slice(objs, func(i, j int) bool { - obj1, obj2 := objs[i].(*resourceapi.ResourceClaimParameters), objs[j].(*resourceapi.ResourceClaimParameters) - if obj1 == nil || obj2 == nil { - return false - } - return obj1.Name < obj2.Name - }) - return nil, statusError(logger, fmt.Errorf("multiple generated claim parameters for %s.%s %s found: %s", claim.Spec.ParametersRef.Kind, claim.Spec.ParametersRef.APIGroup, klog.KRef(claim.Namespace, claim.Spec.ParametersRef.Name), klog.KObjSlice(objs))) } + return allocated, nil } // PreFilterExtensions returns prefilter extensions, pod add and remove. @@ -1158,10 +863,11 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState logger.V(10).Info("filtering based on resource claims of the pod", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) if claim.Status.Allocation != nil { - if nodeSelector := state.informationsForClaim[index].availableOnNode; nodeSelector != nil { + for _, nodeSelector := range state.informationsForClaim[index].availableOnNodes { if !nodeSelector.Match(node) { logger.V(5).Info("AvailableOnNodes does not match", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) unavailableClaims = append(unavailableClaims, index) + break } } continue @@ -1172,40 +878,62 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState return statusUnschedulable(logger, "resourceclaim must be reallocated", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) } - if selector := state.informationsForClaim[index].availableOnNode; selector != nil { - if matches := selector.Match(node); !matches { - return statusUnschedulable(logger, "excluded by resource class node filter", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclassName", claim.Spec.ResourceClassName) + for className, nodeSelector := range state.informationsForClaim[index].availableOnNodes { + if !nodeSelector.Match(node) { + return statusUnschedulable(logger, "excluded by device class node filter", "pod", klog.KObj(pod), "node", klog.KObj(node), "deviceclass", klog.KRef("", className)) } } - // Can the builtin controller tell us whether the node is suitable? - if state.informationsForClaim[index].structuredParameters { - suitable, err := state.informationsForClaim[index].controller.nodeIsSuitable(ctx, node.Name, state.resources) - if err != nil { - // An error indicates that something wasn't configured correctly, for example - // writing a CEL expression which doesn't handle a map lookup error. Normally - // this should never fail. We could return an error here, but then the pod - // would get retried. Instead we ignore the node. - return statusUnschedulable(logger, fmt.Sprintf("checking structured parameters failed: %v", err), "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) - } - if !suitable { - return statusUnschedulable(logger, "resourceclaim cannot be allocated for the node (unsuitable)", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) - } - } else { - if status := state.informationsForClaim[index].status; status != nil { - for _, unsuitableNode := range status.UnsuitableNodes { - if node.Name == unsuitableNode { - return statusUnschedulable(logger, "resourceclaim cannot be allocated for the node (unsuitable)", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim), "unsuitablenodes", status.UnsuitableNodes) - } + + // Use information from control plane controller? + if status := state.informationsForClaim[index].status; status != nil { + for _, unsuitableNode := range status.UnsuitableNodes { + if node.Name == unsuitableNode { + return statusUnschedulable(logger, "resourceclaim cannot be allocated for the node (unsuitable)", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim), "unsuitablenodes", status.UnsuitableNodes) } } } } + // Use allocator to check the node and cache the result in case that the node is picked. + var allocations []*resourceapi.AllocationResult + if state.allocator != nil { + allocCtx := ctx + if loggerV := logger.V(5); loggerV.Enabled() { + allocCtx = klog.NewContext(allocCtx, klog.LoggerWithValues(logger, "node", klog.KObj(node))) + } + + // TODO: is emitting log output at V(4) okay in Filter? That is what the + // allocator does for one-time output. + + a, err := state.allocator.Allocate(allocCtx, node) + if err != nil { + // This should only fail if there is something wrong with the claim or class. + // Mark the pod as unschedulable until they get updated to fix the problem. + // + // Also record the error in the state to ensure that PreScore sees it and + // can prevent scheduling from continuing. + state.mutex.Lock() + defer state.mutex.Unlock() + state.filterErr = fmt.Errorf("filter node %s: %w", node.Name, err) + return statusUnschedulable(logger, err.Error(), "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaims", klog.KObjSlice(state.allocator.ClaimsToAllocate())) + } + // Check for exact length just to be sure. In practice this is all-or-nothing. + if len(a) != len(state.allocator.ClaimsToAllocate()) { + return statusUnschedulable(logger, "cannot allocate all claims", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaims", klog.KObjSlice(state.allocator.ClaimsToAllocate())) + } + // Reserve uses this information. + allocations = a + } + + // Store information in state while holding the mutex. + if state.allocator != nil || len(unavailableClaims) > 0 { + state.mutex.Lock() + defer state.mutex.Unlock() + } + if len(unavailableClaims) > 0 { // Remember all unavailable claims. This might be observed // concurrently, so we have to lock the state before writing. - state.mutex.Lock() - defer state.mutex.Unlock() if state.unavailableClaims == nil { state.unavailableClaims = sets.New[int]() @@ -1217,6 +945,13 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState return statusUnschedulable(logger, "resourceclaim not available on the node", "pod", klog.KObj(pod)) } + if state.allocator != nil { + if state.nodeAllocations == nil { + state.nodeAllocations = make(map[string][]*resourceapi.AllocationResult) + } + state.nodeAllocations[node.Name] = allocations + } + return nil } @@ -1266,7 +1001,6 @@ func (pl *dynamicResources) PostFilter(ctx context.Context, cs *framework.CycleS claim := claim.DeepCopy() claim.Status.ReservedFor = nil if clearAllocation { - claim.Status.DriverName = "" claim.Status.Allocation = nil } else { claim.Status.DeallocationRequested = true @@ -1300,10 +1034,13 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta } logger := klog.FromContext(ctx) + if state.filterErr != nil { + return statusUnschedulable(logger, state.filterErr.Error()) + } pending := false for index, claim := range state.claims { if claim.Status.Allocation == nil && - state.informationsForClaim[index].controller == nil { + !state.informationsForClaim[index].structuredParameters { pending = true break } @@ -1379,10 +1116,15 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat return nil } + logger := klog.FromContext(ctx) + // PreScore might not have been called when there was only one node. + if state.filterErr != nil { + return statusUnschedulable(logger, state.filterErr.Error()) + } + numDelayedAllocationPending := 0 numClaimsWithStatusInfo := 0 - claimsWithBuiltinController := make([]int, 0, len(state.claims)) - logger := klog.FromContext(ctx) + numClaimsWithAllocator := 0 for index, claim := range state.claims { if claim.Status.Allocation != nil { // Allocated, but perhaps not reserved yet. We checked in PreFilter that @@ -1393,9 +1135,9 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat continue } - // Do we have the builtin controller? - if state.informationsForClaim[index].controller != nil { - claimsWithBuiltinController = append(claimsWithBuiltinController, index) + // Do we use the allocator for it? + if state.informationsForClaim[index].structuredParameters { + numClaimsWithAllocator++ continue } @@ -1409,7 +1151,7 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat } } - if numDelayedAllocationPending == 0 && len(claimsWithBuiltinController) == 0 { + if numDelayedAllocationPending == 0 && numClaimsWithAllocator == 0 { // Nothing left to do. return nil } @@ -1430,27 +1172,41 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat } // Prepare allocation of claims handled by the schedulder. - for _, index := range claimsWithBuiltinController { - claim := state.claims[index] - driverName, allocation, err := state.informationsForClaim[index].controller.allocate(ctx, nodeName, state.resources) - if err != nil { + if state.allocator != nil { + // Entries in these two slices match each other. + claimsToAllocate := state.allocator.ClaimsToAllocate() + allocations, ok := state.nodeAllocations[nodeName] + if !ok { // We checked before that the node is suitable. This shouldn't have failed, // so treat this as an error. - return statusError(logger, fmt.Errorf("claim allocation failed unexpectedly: %v", err)) + return statusError(logger, errors.New("claim allocation not found for node")) + } + + // Sanity check: do we have results for all pending claims? + if len(allocations) != len(claimsToAllocate) || + len(allocations) != numClaimsWithAllocator { + return statusError(logger, fmt.Errorf("internal error, have %d allocations, %d claims to allocate, want %d claims", len(allocations), len(claimsToAllocate), numClaimsWithAllocator)) } - state.informationsForClaim[index].allocation = allocation - state.informationsForClaim[index].allocationDriverName = driverName - // Strictly speaking, we don't need to store the full modified object. - // The allocation would be enough. The full object is useful for - // debugging and testing, so let's make it realistic. - claim = claim.DeepCopy() - if !slices.Contains(claim.Finalizers, resourceapi.Finalizer) { - claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer) + + for i, claim := range claimsToAllocate { + index := slices.Index(state.claims, claim) + if index < 0 { + return statusError(logger, fmt.Errorf("internal error, claim %s with allocation not found", claim.Name)) + } + allocation := allocations[i] + state.informationsForClaim[index].allocation = allocation + + // Strictly speaking, we don't need to store the full modified object. + // The allocation would be enough. The full object is useful for + // debugging, testing and the allocator, so let's make it realistic. + claim = claim.DeepCopy() + if !slices.Contains(claim.Finalizers, resourceapi.Finalizer) { + claim.Finalizers = append(claim.Finalizers, resourceapi.Finalizer) + } + claim.Status.Allocation = allocation + pl.inFlightAllocations.Store(claim.UID, claim) + logger.V(5).Info("Reserved resource in allocation result", "claim", klog.KObj(claim), "allocation", klog.Format(allocation)) } - claim.Status.DriverName = driverName - claim.Status.Allocation = allocation - pl.inFlightAllocations.Store(claim.UID, claim) - logger.V(5).Info("Reserved resource in allocation result", "claim", klog.KObj(claim), "driver", driverName, "allocation", klog.Format(allocation)) } // When there is only one pending resource, we can go ahead with @@ -1460,8 +1216,8 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat // // If all pending claims are handled with the builtin controller, // there is no need for a PodSchedulingContext change. - if numDelayedAllocationPending == 1 && len(claimsWithBuiltinController) == 0 || - numClaimsWithStatusInfo+len(claimsWithBuiltinController) == numDelayedAllocationPending && len(claimsWithBuiltinController) < numDelayedAllocationPending { + if numDelayedAllocationPending == 1 && numClaimsWithAllocator == 0 || + numClaimsWithStatusInfo+numClaimsWithAllocator == numDelayedAllocationPending && numClaimsWithAllocator < numDelayedAllocationPending { // TODO: can we increase the chance that the scheduler picks // the same node as before when allocation is on-going, // assuming that that node still fits the pod? Picking a @@ -1530,7 +1286,7 @@ func (pl *dynamicResources) Unreserve(ctx context.Context, cs *framework.CycleSt for index, claim := range state.claims { // If allocation was in-flight, then it's not anymore and we need to revert the // claim object in the assume cache to what it was before. - if state.informationsForClaim[index].controller != nil { + if state.informationsForClaim[index].structuredParameters { if _, found := pl.inFlightAllocations.LoadAndDelete(state.claims[index].UID); found { pl.claimAssumeCache.Restore(claim.Namespace + "/" + claim.Name) } @@ -1661,8 +1417,6 @@ func (pl *dynamicResources) bindClaim(ctx context.Context, state *stateData, ind } claim = updatedClaim } - - claim.Status.DriverName = state.informationsForClaim[index].allocationDriverName claim.Status.Allocation = allocation } diff --git a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go index cecc5211ae30f..439e650500441 100644 --- a/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go +++ b/pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go @@ -51,6 +51,11 @@ import ( var ( podKind = v1.SchemeGroupVersion.WithKind("Pod") + nodeName = "worker" + node2Name = "worker-2" + node3Name = "worker-3" + controller = "some-driver" + driver = controller podName = "my-pod" podUID = "1234" resourceName = "my-resource" @@ -59,45 +64,12 @@ var ( claimName2 = podName + "-" + resourceName + "-2" className = "my-resource-class" namespace = "default" + attrName = resourceapi.QualifiedName("healthy") // device attribute only available on non-default node - resourceClass = &resourceapi.ResourceClass{ + deviceClass = &resourceapi.DeviceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, - DriverName: "some-driver", - } - structuredResourceClass = &resourceapi.ResourceClass{ - ObjectMeta: metav1.ObjectMeta{ - Name: className, - }, - DriverName: "some-driver", - StructuredParameters: ptr.To(true), - } - structuredResourceClassWithParams = &resourceapi.ResourceClass{ - ObjectMeta: metav1.ObjectMeta{ - Name: className, - }, - DriverName: "some-driver", - StructuredParameters: ptr.To(true), - ParametersRef: &resourceapi.ResourceClassParametersReference{ - Name: className, - Namespace: namespace, - Kind: "ResourceClassParameters", - APIGroup: "resource.k8s.io", - }, - } - structuredResourceClassWithCRD = &resourceapi.ResourceClass{ - ObjectMeta: metav1.ObjectMeta{ - Name: className, - }, - DriverName: "some-driver", - StructuredParameters: ptr.To(true), - ParametersRef: &resourceapi.ResourceClassParametersReference{ - Name: className, - Namespace: namespace, - Kind: "ResourceClassParameters", - APIGroup: "example.com", - }, } podWithClaimName = st.MakePod().Name(podName).Namespace(namespace). @@ -124,39 +96,29 @@ var ( PodResourceClaims(v1.PodResourceClaim{Name: resourceName2, ResourceClaimName: &claimName2}). Obj() - workerNode = &st.MakeNode().Name("worker").Label("kubernetes.io/hostname", "worker").Node - workerNodeSlice = st.MakeResourceSlice("worker", "some-driver").NamedResourcesInstances("instance-1").Obj() + // Node with "instance-1" device and no device attributes. + workerNode = &st.MakeNode().Name(nodeName).Label("kubernetes.io/hostname", nodeName).Node + workerNodeSlice = st.MakeResourceSlice(nodeName, driver).Device("instance-1", nil).Obj() - claimParameters = st.MakeClaimParameters().Name(claimName).Namespace(namespace). - NamedResourcesRequests("some-driver", "true"). - GeneratedFrom(&resourceapi.ResourceClaimParametersReference{ - Name: claimName, - Kind: "ResourceClaimParameters", - APIGroup: "example.com", - }). - Obj() - claimParametersOtherNamespace = st.MakeClaimParameters().Name(claimName).Namespace(namespace+"-2"). - NamedResourcesRequests("some-driver", "true"). - GeneratedFrom(&resourceapi.ResourceClaimParametersReference{ - Name: claimName, - Kind: "ResourceClaimParameters", - APIGroup: "example.com", - }). - Obj() - classParameters = st.MakeClassParameters().Name(className).Namespace(namespace). - NamedResourcesFilters("some-driver", "true"). - GeneratedFrom(&resourceapi.ResourceClassParametersReference{ - Name: className, - Namespace: namespace, - Kind: "ResourceClassParameters", - APIGroup: "example.com", - }). - Obj() + // Node with same device, but now with a "healthy" boolean attribute. + workerNode2 = &st.MakeNode().Name(node2Name).Label("kubernetes.io/hostname", node2Name).Node + workerNode2Slice = st.MakeResourceSlice(node2Name, driver).Device("instance-1", map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{attrName: {BoolValue: ptr.To(true)}}).Obj() + + // Yet another node, same as the second one. + workerNode3 = &st.MakeNode().Name(node3Name).Label("kubernetes.io/hostname", node3Name).Node + workerNode3Slice = st.MakeResourceSlice(node3Name, driver).Device("instance-1", map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{attrName: {BoolValue: ptr.To(true)}}).Obj() - claim = st.MakeResourceClaim(). + brokenSelector = resourceapi.DeviceSelector{ + CEL: &resourceapi.CELDeviceSelector{ + // Not set for workerNode. + Expression: fmt.Sprintf(`device.attributes["%s"].%s`, driver, attrName), + }, + } + + claim = st.MakeResourceClaim(controller). Name(claimName). Namespace(namespace). - ResourceClassName(className). + Request(className). Obj() pendingClaim = st.FromResourceClaim(claim). OwnerReference(podName, podUID, podKind). @@ -164,44 +126,46 @@ var ( pendingClaim2 = st.FromResourceClaim(pendingClaim). Name(claimName2). Obj() + allocationResult = &resourceapi.AllocationResult{ + Controller: controller, + Devices: resourceapi.DeviceAllocationResult{ + Results: []resourceapi.DeviceRequestAllocationResult{{ + Driver: driver, + Pool: nodeName, + Device: "instance-1", + Request: "req-1", + }}, + }, + } deallocatingClaim = st.FromResourceClaim(pendingClaim). - Allocation("some-driver", &resourceapi.AllocationResult{}). + Allocation(allocationResult). DeallocationRequested(true). Obj() inUseClaim = st.FromResourceClaim(pendingClaim). - Allocation("some-driver", &resourceapi.AllocationResult{}). + Allocation(allocationResult). ReservedForPod(podName, types.UID(podUID)). Obj() structuredInUseClaim = st.FromResourceClaim(inUseClaim). - Structured("worker", "instance-1"). + Structured(). Obj() allocatedClaim = st.FromResourceClaim(pendingClaim). - Allocation("some-driver", &resourceapi.AllocationResult{}). + Allocation(allocationResult). Obj() - pendingClaimWithParams = st.FromResourceClaim(pendingClaim).ParametersRef(claimName).Obj() - structuredAllocatedClaim = st.FromResourceClaim(allocatedClaim).Structured("worker", "instance-1").Obj() - structuredAllocatedClaimWithParams = st.FromResourceClaim(structuredAllocatedClaim).ParametersRef(claimName).Obj() - - otherStructuredAllocatedClaim = st.FromResourceClaim(structuredAllocatedClaim).Name(structuredAllocatedClaim.Name + "-other").Obj() - allocatedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaim). - Allocation("some-driver", &resourceapi.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}). + Allocation(&resourceapi.AllocationResult{Controller: controller, NodeSelector: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}). Obj() - structuredAllocatedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaimWithWrongTopology). - Structured("worker-2", "instance-1"). - Obj() allocatedClaimWithGoodTopology = st.FromResourceClaim(allocatedClaim). - Allocation("some-driver", &resourceapi.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("kubernetes.io/hostname", []string{"worker"}).Obj()}). + Allocation(&resourceapi.AllocationResult{Controller: controller, NodeSelector: st.MakeNodeSelector().In("kubernetes.io/hostname", []string{nodeName}).Obj()}). Obj() - structuredAllocatedClaimWithGoodTopology = st.FromResourceClaim(allocatedClaimWithGoodTopology). - Structured("worker", "instance-1"). - Obj() - otherClaim = st.MakeResourceClaim(). + otherClaim = st.MakeResourceClaim(controller). Name("not-my-claim"). Namespace(namespace). - ResourceClassName(className). + Request(className). Obj() + otherAllocatedClaim = st.FromResourceClaim(otherClaim). + Allocation(allocationResult). + Obj() scheduling = st.MakePodSchedulingContexts().Name(podName).Namespace(namespace). OwnerReference(podName, podUID, podKind). @@ -224,36 +188,35 @@ func reserve(claim *resourceapi.ResourceClaim, pod *v1.Pod) *resourceapi.Resourc Obj() } -// claimWithCRD replaces the in-tree group with "example.com". -func claimWithCRD(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { - claim = claim.DeepCopy() - claim.Spec.ParametersRef.APIGroup = "example.com" - return claim -} - -// classWithCRD replaces the in-tree group with "example.com". -func classWithCRD(class *resourceapi.ResourceClass) *resourceapi.ResourceClass { - class = class.DeepCopy() - class.ParametersRef.APIGroup = "example.com" - return class +func structuredClaim(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { + return st.FromResourceClaim(claim). + Structured(). + Obj() } -func breakCELInClaimParameters(parameters *resourceapi.ResourceClaimParameters) *resourceapi.ResourceClaimParameters { - parameters = parameters.DeepCopy() - for i := range parameters.DriverRequests { - for e := range parameters.DriverRequests[i].Requests { - parameters.DriverRequests[i].Requests[e].NamedResources.Selector = `attributes.bool["no-such-attribute"]` +func breakCELInClaim(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { + claim = claim.DeepCopy() + for i := range claim.Spec.Devices.Requests { + for e := range claim.Spec.Devices.Requests[i].Selectors { + claim.Spec.Devices.Requests[i].Selectors[e] = brokenSelector + } + if len(claim.Spec.Devices.Requests[i].Selectors) == 0 { + claim.Spec.Devices.Requests[i].Selectors = []resourceapi.DeviceSelector{brokenSelector} } } - return parameters + return claim } -func breakCELInClassParameters(parameters *resourceapi.ResourceClassParameters) *resourceapi.ResourceClassParameters { - parameters = parameters.DeepCopy() - for i := range parameters.Filters { - parameters.Filters[i].NamedResources.Selector = `attributes.bool["no-such-attribute"]` +func breakCELInClass(class *resourceapi.DeviceClass) *resourceapi.DeviceClass { + class = class.DeepCopy() + for i := range class.Spec.Selectors { + class.Spec.Selectors[i] = brokenSelector + } + if len(class.Spec.Selectors) == 0 { + class.Spec.Selectors = []resourceapi.DeviceSelector{brokenSelector} } - return parameters + + return class } // result defines the expected outcome of some operation. It covers @@ -337,7 +300,7 @@ func TestPlugin(t *testing.T) { nodes []*v1.Node // default if unset is workerNode pod *v1.Pod claims []*resourceapi.ResourceClaim - classes []*resourceapi.ResourceClass + classes []*resourceapi.DeviceClass schedulings []*resourceapi.PodSchedulingContext // objs get stored directly in the fake client, without passing @@ -378,7 +341,7 @@ func TestPlugin(t *testing.T) { }, "claim-reference-structured": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{structuredAllocatedClaim, otherClaim}, + claims: []*resourceapi.ResourceClaim{structuredClaim(allocatedClaim), otherClaim}, want: want{ prebind: result{ changes: change{ @@ -412,7 +375,7 @@ func TestPlugin(t *testing.T) { }, "claim-template-structured": { pod: podWithClaimTemplateInStatus, - claims: []*resourceapi.ResourceClaim{structuredAllocatedClaim, otherClaim}, + claims: []*resourceapi.ResourceClaim{structuredClaim(allocatedClaim), otherClaim}, want: want{ prebind: result{ changes: change{ @@ -464,12 +427,12 @@ func TestPlugin(t *testing.T) { }, "structured-no-resources": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaim}, - classes: []*resourceapi.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{structuredClaim(pendingClaim)}, + classes: []*resourceapi.DeviceClass{deviceClass}, want: want{ filter: perNodeResult{ workerNode.Name: { - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim cannot be allocated for the node (unsuitable)`), + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `cannot allocate all claims`), }, }, postfilter: result{ @@ -479,28 +442,28 @@ func TestPlugin(t *testing.T) { }, "structured-with-resources": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaim}, - classes: []*resourceapi.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{structuredClaim(pendingClaim)}, + classes: []*resourceapi.DeviceClass{deviceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ reserve: result{ - inFlightClaim: structuredAllocatedClaim, + inFlightClaim: structuredClaim(allocatedClaim), }, prebind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), changes: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() - claim.Finalizers = structuredAllocatedClaim.Finalizers - claim.Status = structuredInUseClaim.Status + claim.Finalizers = structuredClaim(allocatedClaim).Finalizers + claim.Status = structuredClaim(inUseClaim).Status } return claim }, }, }, postbind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), }, }, }, @@ -509,18 +472,18 @@ func TestPlugin(t *testing.T) { // the scheduler got interrupted. pod: podWithClaimName, claims: func() []*resourceapi.ResourceClaim { - claim := pendingClaim.DeepCopy() - claim.Finalizers = structuredAllocatedClaim.Finalizers + claim := structuredClaim(pendingClaim) + claim.Finalizers = structuredClaim(allocatedClaim).Finalizers return []*resourceapi.ResourceClaim{claim} }(), - classes: []*resourceapi.ResourceClass{structuredResourceClass}, + classes: []*resourceapi.DeviceClass{deviceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ reserve: result{ - inFlightClaim: structuredAllocatedClaim, + inFlightClaim: structuredClaim(allocatedClaim), }, prebind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), changes: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { @@ -532,7 +495,7 @@ func TestPlugin(t *testing.T) { }, }, postbind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), }, }, }, @@ -541,11 +504,11 @@ func TestPlugin(t *testing.T) { // removed before the scheduler reaches PreBind. pod: podWithClaimName, claims: func() []*resourceapi.ResourceClaim { - claim := pendingClaim.DeepCopy() - claim.Finalizers = structuredAllocatedClaim.Finalizers + claim := structuredClaim(pendingClaim) + claim.Finalizers = structuredClaim(allocatedClaim).Finalizers return []*resourceapi.ResourceClaim{claim} }(), - classes: []*resourceapi.ResourceClass{structuredResourceClass}, + classes: []*resourceapi.DeviceClass{deviceClass}, objs: []apiruntime.Object{workerNodeSlice}, prepare: prepare{ prebind: change{ @@ -557,15 +520,15 @@ func TestPlugin(t *testing.T) { }, want: want{ reserve: result{ - inFlightClaim: structuredAllocatedClaim, + inFlightClaim: structuredClaim(allocatedClaim), }, prebind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), changes: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { claim = claim.DeepCopy() - claim.Finalizers = structuredAllocatedClaim.Finalizers + claim.Finalizers = structuredClaim(allocatedClaim).Finalizers claim.Status = structuredInUseClaim.Status } return claim @@ -573,7 +536,7 @@ func TestPlugin(t *testing.T) { }, }, postbind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), }, }, }, @@ -581,23 +544,23 @@ func TestPlugin(t *testing.T) { // No finalizer initially, then it gets added before // the scheduler reaches PreBind. Shouldn't happen? pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaim}, - classes: []*resourceapi.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{structuredClaim(pendingClaim)}, + classes: []*resourceapi.DeviceClass{deviceClass}, objs: []apiruntime.Object{workerNodeSlice}, prepare: prepare{ prebind: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { - claim.Finalizers = structuredAllocatedClaim.Finalizers + claim.Finalizers = structuredClaim(allocatedClaim).Finalizers return claim }, }, }, want: want{ reserve: result{ - inFlightClaim: structuredAllocatedClaim, + inFlightClaim: structuredClaim(allocatedClaim), }, prebind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), changes: change{ claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { if claim.Name == claimName { @@ -609,31 +572,31 @@ func TestPlugin(t *testing.T) { }, }, postbind: result{ - assumedClaim: reserve(structuredAllocatedClaim, podWithClaimName), + assumedClaim: reserve(structuredClaim(allocatedClaim), podWithClaimName), }, }, }, "structured-skip-bind": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaim}, - classes: []*resourceapi.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{structuredClaim(pendingClaim)}, + classes: []*resourceapi.DeviceClass{deviceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ reserve: result{ - inFlightClaim: structuredAllocatedClaim, + inFlightClaim: structuredClaim(allocatedClaim), }, unreserveBeforePreBind: &result{}, }, }, "structured-exhausted-resources": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, - classes: []*resourceapi.ResourceClass{structuredResourceClass}, + claims: []*resourceapi.ResourceClaim{structuredClaim(pendingClaim), structuredClaim(otherAllocatedClaim)}, + classes: []*resourceapi.DeviceClass{deviceClass}, objs: []apiruntime.Object{workerNodeSlice}, want: want{ filter: perNodeResult{ workerNode.Name: { - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim cannot be allocated for the node (unsuitable)`), + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `cannot allocate all claims`), }, }, postfilter: result{ @@ -642,182 +605,81 @@ func TestPlugin(t *testing.T) { }, }, - "with-parameters": { - pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, - classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, - objs: []apiruntime.Object{claimParameters, classParameters, workerNodeSlice}, - want: want{ - reserve: result{ - inFlightClaim: structuredAllocatedClaimWithParams, - }, - prebind: result{ - assumedClaim: reserve(structuredAllocatedClaimWithParams, podWithClaimName), - changes: change{ - claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { - if claim.Name == claimName { - claim = claim.DeepCopy() - claim.Finalizers = structuredAllocatedClaim.Finalizers - claim.Status = structuredInUseClaim.Status - } - return claim - }, - }, - }, - postbind: result{ - assumedClaim: reserve(structuredAllocatedClaimWithParams, podWithClaimName), - }, - }, - }, - - "with-translated-parameters": { + "claim-parameters-CEL-runtime-error": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, - objs: []apiruntime.Object{claimParameters, claimParametersOtherNamespace /* must be ignored */, classParameters, workerNodeSlice}, + claims: []*resourceapi.ResourceClaim{breakCELInClaim(structuredClaim(pendingClaim))}, + classes: []*resourceapi.DeviceClass{deviceClass}, + objs: []apiruntime.Object{workerNodeSlice}, want: want{ - reserve: result{ - inFlightClaim: claimWithCRD(structuredAllocatedClaimWithParams), - }, - prebind: result{ - assumedClaim: reserve(claimWithCRD(structuredAllocatedClaimWithParams), podWithClaimName), - changes: change{ - claim: func(claim *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { - if claim.Name == claimName { - claim = claim.DeepCopy() - claim.Finalizers = structuredAllocatedClaim.Finalizers - claim.Status = structuredInUseClaim.Status - } - return claim - }, + filter: perNodeResult{ + workerNode.Name: { + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `claim default/my-pod-my-resource: selector #0: CEL runtime error: no such key: `+string(attrName)), }, }, - postbind: result{ - assumedClaim: reserve(claimWithCRD(structuredAllocatedClaimWithParams), podWithClaimName), - }, - }, - }, - - "missing-class-parameters": { - pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, - classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, - objs: []apiruntime.Object{claimParameters, workerNodeSlice}, - want: want{ - prefilter: result{ - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `class parameters default/my-resource-class not found`), - }, postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), - }, - }, - }, - - "missing-claim-parameters": { - pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, - classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, - objs: []apiruntime.Object{classParameters, workerNodeSlice}, - want: want{ - prefilter: result{ - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `claim parameters default/my-pod-my-resource not found`), - }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), - }, - }, - }, - - "missing-translated-class-parameters": { - pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, - objs: []apiruntime.Object{claimParameters, workerNodeSlice}, - want: want{ - prefilter: result{ - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `generated class parameters for ResourceClassParameters.example.com default/my-resource-class not found`), - }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), - }, - }, - }, - - "missing-translated-claim-parameters": { - pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, - objs: []apiruntime.Object{classParameters, workerNodeSlice}, - want: want{ - prefilter: result{ - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `generated claim parameters for ResourceClaimParameters.example.com default/my-pod-my-resource not found`), - }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), - }, - }, - }, - - "too-many-translated-class-parameters": { - pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, - objs: []apiruntime.Object{claimParameters, classParameters, st.FromClassParameters(classParameters).Name("other").Obj() /* too many */, workerNodeSlice}, - want: want{ - prefilter: result{ - status: framework.AsStatus(errors.New(`multiple generated class parameters for ResourceClassParameters.example.com my-resource-class found: [default/my-resource-class default/other]`)), - }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), + status: framework.NewStatus(framework.Unschedulable, `still not schedulable`), }, }, }, - "too-many-translated-claim-parameters": { + "class-parameters-CEL-runtime-error": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{claimWithCRD(pendingClaimWithParams)}, - classes: []*resourceapi.ResourceClass{classWithCRD(structuredResourceClassWithCRD)}, - objs: []apiruntime.Object{claimParameters, st.FromClaimParameters(claimParameters).Name("other").Obj() /* too many */, classParameters, workerNodeSlice}, + claims: []*resourceapi.ResourceClaim{structuredClaim(pendingClaim)}, + classes: []*resourceapi.DeviceClass{breakCELInClass(deviceClass)}, + objs: []apiruntime.Object{workerNodeSlice}, want: want{ - prefilter: result{ - status: framework.AsStatus(errors.New(`multiple generated claim parameters for ResourceClaimParameters.example.com default/my-pod-my-resource found: [default/my-pod-my-resource default/other]`)), + filter: perNodeResult{ + workerNode.Name: { + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `class my-resource-class: selector #0: CEL runtime error: no such key: `+string(attrName)), + }, }, postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), + status: framework.NewStatus(framework.Unschedulable, `still not schedulable`), }, }, }, - "claim-parameters-CEL-runtime-error": { + // When pod scheduling encounters CEL runtime errors for some nodes, but not all, + // it should still not schedule the pod because there is something wrong with it. + // Scheduling it would make it harder to detect that there is a problem. + // + // This matches the "keeps pod pending because of CEL runtime errors" E2E test. + "CEL-runtime-error-for-one-of-two-nodes": { + nodes: []*v1.Node{workerNode, workerNode2}, pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, - classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, - objs: []apiruntime.Object{breakCELInClaimParameters(claimParameters), classParameters, workerNodeSlice}, + claims: []*resourceapi.ResourceClaim{breakCELInClaim(structuredClaim(pendingClaim))}, + classes: []*resourceapi.DeviceClass{deviceClass}, + objs: []apiruntime.Object{workerNodeSlice, workerNode2Slice}, want: want{ filter: perNodeResult{ workerNode.Name: { - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `checking structured parameters failed: checking node "worker" and resources of driver "some-driver": evaluate request CEL expression: no such key: no-such-attribute`), + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `claim default/my-pod-my-resource: selector #0: CEL runtime error: no such key: `+string(attrName)), }, }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `still not schedulable`), + // PreScore not called, only one suitable node. + reserve: result{ + // This is the error found during Filter. + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `filter node worker: claim default/my-pod-my-resource: selector #0: CEL runtime error: no such key: healthy`), }, }, }, - "class-parameters-CEL-runtime-error": { + // When two nodes where found, PreScore gets called. + "CEL-runtime-error-for-one-of-three-nodes": { + nodes: []*v1.Node{workerNode, workerNode2, workerNode3}, pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaimWithParams}, - classes: []*resourceapi.ResourceClass{structuredResourceClassWithParams}, - objs: []apiruntime.Object{claimParameters, breakCELInClassParameters(classParameters), workerNodeSlice}, + claims: []*resourceapi.ResourceClaim{breakCELInClaim(structuredClaim(pendingClaim))}, + classes: []*resourceapi.DeviceClass{deviceClass}, + objs: []apiruntime.Object{workerNodeSlice, workerNode2Slice, workerNode3Slice}, want: want{ filter: perNodeResult{ workerNode.Name: { - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `checking structured parameters failed: checking node "worker" and resources of driver "some-driver": evaluate filter CEL expression: no such key: no-such-attribute`), + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `claim default/my-pod-my-resource: selector #0: CEL runtime error: no such key: `+string(attrName)), }, }, - postfilter: result{ - status: framework.NewStatus(framework.Unschedulable, `still not schedulable`), + prescore: result{ + // This is the error found during Filter. + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `filter node worker: claim default/my-pod-my-resource: selector #0: CEL runtime error: no such key: healthy`), }, }, }, @@ -839,7 +701,7 @@ func TestPlugin(t *testing.T) { claims: []*resourceapi.ResourceClaim{pendingClaim}, want: want{ prefilter: result{ - status: framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("resource class %s does not exist", className)), + status: framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("request req-1: resource class %s does not exist", className)), }, postfilter: result{ status: framework.NewStatus(framework.Unschedulable, `no new claims to deallocate`), @@ -851,7 +713,7 @@ func TestPlugin(t *testing.T) { // and select a node. pod: podWithClaimName, claims: []*resourceapi.ResourceClaim{pendingClaim}, - classes: []*resourceapi.ResourceClass{resourceClass}, + classes: []*resourceapi.DeviceClass{deviceClass}, want: want{ prebind: result{ status: framework.NewStatus(framework.Pending, `waiting for resource driver`), @@ -865,7 +727,7 @@ func TestPlugin(t *testing.T) { // there are multiple claims. pod: podWithTwoClaimNames, claims: []*resourceapi.ResourceClaim{pendingClaim, pendingClaim2}, - classes: []*resourceapi.ResourceClass{resourceClass}, + classes: []*resourceapi.DeviceClass{deviceClass}, want: want{ prebind: result{ status: framework.NewStatus(framework.Pending, `waiting for resource driver`), @@ -879,7 +741,7 @@ func TestPlugin(t *testing.T) { pod: podWithClaimName, claims: []*resourceapi.ResourceClaim{pendingClaim}, schedulings: []*resourceapi.PodSchedulingContext{schedulingInfo}, - classes: []*resourceapi.ResourceClass{resourceClass}, + classes: []*resourceapi.DeviceClass{deviceClass}, want: want{ prebind: result{ status: framework.NewStatus(framework.Pending, `waiting for resource driver`), @@ -899,7 +761,7 @@ func TestPlugin(t *testing.T) { pod: podWithClaimName, claims: []*resourceapi.ResourceClaim{pendingClaim}, schedulings: []*resourceapi.PodSchedulingContext{schedulingInfo}, - classes: []*resourceapi.ResourceClass{resourceClass}, + classes: []*resourceapi.DeviceClass{deviceClass}, prepare: prepare{ prebind: change{ scheduling: func(in *resourceapi.PodSchedulingContext) *resourceapi.PodSchedulingContext { @@ -923,7 +785,7 @@ func TestPlugin(t *testing.T) { pod: podWithClaimName, claims: []*resourceapi.ResourceClaim{allocatedClaim}, schedulings: []*resourceapi.PodSchedulingContext{schedulingInfo}, - classes: []*resourceapi.ResourceClass{resourceClass}, + classes: []*resourceapi.DeviceClass{deviceClass}, want: want{ prebind: result{ changes: change{ @@ -967,7 +829,7 @@ func TestPlugin(t *testing.T) { // PostFilter tries to get the pod scheduleable by // deallocating the claim. pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{structuredAllocatedClaimWithWrongTopology}, + claims: []*resourceapi.ResourceClaim{structuredClaim(allocatedClaimWithWrongTopology)}, want: want{ filter: perNodeResult{ workerNode.Name: { @@ -979,7 +841,7 @@ func TestPlugin(t *testing.T) { changes: change{ claim: func(in *resourceapi.ResourceClaim) *resourceapi.ResourceClaim { return st.FromResourceClaim(in). - Allocation("", nil). + Allocation(nil). Obj() }, }, @@ -1028,7 +890,7 @@ func TestPlugin(t *testing.T) { }, "bind-failure-structured": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{structuredAllocatedClaimWithGoodTopology}, + claims: []*resourceapi.ResourceClaim{structuredClaim(allocatedClaimWithGoodTopology)}, want: want{ prebind: result{ changes: change{ @@ -1109,15 +971,16 @@ func TestPlugin(t *testing.T) { t.Run(fmt.Sprintf("filter/%s", nodeInfo.Node().Name), func(t *testing.T) { testCtx.verify(t, tc.want.filter.forNode(nodeName), initialObjects, nil, status) }) - if status.Code() != framework.Success { - unschedulable = true - } else { + if status.Code() == framework.Success { potentialNodes = append(potentialNodes, nodeInfo) } } + if len(potentialNodes) == 0 { + unschedulable = true + } } - if !unschedulable && len(potentialNodes) > 0 { + if !unschedulable && len(potentialNodes) > 1 { initialObjects = testCtx.listAll(t) initialObjects = testCtx.updateAPIServer(t, initialObjects, tc.prepare.prescore) status := testCtx.p.PreScore(testCtx.ctx, testCtx.state, tc.pod, potentialNodes) @@ -1184,7 +1047,7 @@ func TestPlugin(t *testing.T) { }) } } - } else { + } else if len(potentialNodes) == 0 { initialObjects = testCtx.listAll(t) initialObjects = testCtx.updateAPIServer(t, initialObjects, tc.prepare.postfilter) result, status := testCtx.p.PostFilter(testCtx.ctx, testCtx.state, tc.pod, nil /* filteredNodeStatusMap not used by plugin */) @@ -1351,7 +1214,7 @@ func update(t *testing.T, objects []metav1.Object, updates change) []metav1.Obje return updated } -func setup(t *testing.T, nodes []*v1.Node, claims []*resourceapi.ResourceClaim, classes []*resourceapi.ResourceClass, schedulings []*resourceapi.PodSchedulingContext, objs []apiruntime.Object) (result *testContext) { +func setup(t *testing.T, nodes []*v1.Node, claims []*resourceapi.ResourceClaim, classes []*resourceapi.DeviceClass, schedulings []*resourceapi.PodSchedulingContext, objs []apiruntime.Object) (result *testContext) { t.Helper() tc := &testContext{} @@ -1387,7 +1250,7 @@ func setup(t *testing.T, nodes []*v1.Node, claims []*resourceapi.ResourceClaim, require.NoError(t, err, "create resource claim") } for _, class := range classes { - _, err := tc.client.ResourceV1alpha3().ResourceClasses().Create(tc.ctx, class, metav1.CreateOptions{}) + _, err := tc.client.ResourceV1alpha3().DeviceClasses().Create(tc.ctx, class, metav1.CreateOptions{}) require.NoError(t, err, "create resource class") } for _, scheduling := range schedulings { @@ -1552,10 +1415,10 @@ func Test_isSchedulableAfterClaimChange(t *testing.T) { }, "structured-claim-deallocate": { pod: podWithClaimName, - claims: []*resourceapi.ResourceClaim{pendingClaim, otherStructuredAllocatedClaim}, - oldObj: otherStructuredAllocatedClaim, + claims: []*resourceapi.ResourceClaim{pendingClaim, structuredClaim(otherAllocatedClaim)}, + oldObj: structuredClaim(otherAllocatedClaim), newObj: func() *resourceapi.ResourceClaim { - claim := otherStructuredAllocatedClaim.DeepCopy() + claim := structuredClaim(otherAllocatedClaim).DeepCopy() claim.Status.Allocation = nil return claim }(), diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go b/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go deleted file mode 100644 index 242013122c1ca..0000000000000 --- a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel.go +++ /dev/null @@ -1,153 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package namedresources - -import ( - "context" - "errors" - "fmt" - "slices" - - resourceapi "k8s.io/api/resource/v1alpha3" - "k8s.io/apiserver/pkg/cel/environment" - "k8s.io/dynamic-resource-allocation/structured/namedresources/cel" -) - -// These types and fields are all exported to allow logging them with -// pretty-printed JSON. - -type Model struct { - Instances []InstanceAllocation -} - -type InstanceAllocation struct { - Allocated bool - Instance *resourceapi.NamedResourcesInstance -} - -// AddResources must be called first to create entries for all existing -// resource instances. The resources parameter may be nil. -func AddResources(m *Model, resources *resourceapi.NamedResourcesResources) { - if resources == nil { - return - } - - for i := range resources.Instances { - m.Instances = append(m.Instances, InstanceAllocation{Instance: &resources.Instances[i]}) - } -} - -// AddAllocation may get called after AddResources to mark some resource -// instances as allocated. The result parameter may be nil. -func AddAllocation(m *Model, result *resourceapi.NamedResourcesAllocationResult) { - if result == nil { - return - } - for i := range m.Instances { - if m.Instances[i].Instance.Name == result.Name { - m.Instances[i].Allocated = true - break - } - } -} - -func NewClaimController(filter *resourceapi.NamedResourcesFilter, requests []*resourceapi.NamedResourcesRequest) (*Controller, error) { - c := &Controller{} - if filter != nil { - compilation := cel.Compiler.CompileCELExpression(filter.Selector, environment.StoredExpressions) - if compilation.Error != nil { - // Shouldn't happen because of validation. - return nil, fmt.Errorf("compile class filter CEL expression: %w", compilation.Error) - } - c.filter = &compilation - } - for _, request := range requests { - compilation := cel.Compiler.CompileCELExpression(request.Selector, environment.StoredExpressions) - if compilation.Error != nil { - // Shouldn't happen because of validation. - return nil, fmt.Errorf("compile request CEL expression: %w", compilation.Error) - } - c.requests = append(c.requests, compilation) - } - return c, nil -} - -type Controller struct { - filter *cel.CompilationResult - requests []cel.CompilationResult -} - -func (c *Controller) NodeIsSuitable(ctx context.Context, model Model) (bool, error) { - indices, err := c.allocate(ctx, model) - return len(indices) == len(c.requests), err -} - -func (c *Controller) Allocate(ctx context.Context, model Model) ([]*resourceapi.NamedResourcesAllocationResult, error) { - indices, err := c.allocate(ctx, model) - if err != nil { - return nil, err - } - if len(indices) != len(c.requests) { - return nil, errors.New("insufficient resources") - } - results := make([]*resourceapi.NamedResourcesAllocationResult, len(c.requests)) - for i := range c.requests { - results[i] = &resourceapi.NamedResourcesAllocationResult{Name: model.Instances[indices[i]].Instance.Name} - } - return results, nil -} - -func (c *Controller) allocate(ctx context.Context, model Model) ([]int, error) { - // Shallow copy, we need to modify the allocated boolean. - instances := slices.Clone(model.Instances) - indices := make([]int, 0, len(c.requests)) - - for _, request := range c.requests { - for i, instance := range instances { - if instance.Allocated { - continue - } - if c.filter != nil { - okay, err := c.filter.Evaluate(ctx, instance.Instance.Attributes) - if err != nil { - return nil, fmt.Errorf("evaluate filter CEL expression: %w", err) - } - if !okay { - continue - } - } - okay, err := request.Evaluate(ctx, instance.Instance.Attributes) - if err != nil { - return nil, fmt.Errorf("evaluate request CEL expression: %w", err) - } - if !okay { - continue - } - // Found a matching, unallocated instance. Let's use it. - // - // A more thorough search would include backtracking because - // allocating one "large" instances for a "small" request may - // make a following "large" request impossible to satisfy when - // only "small" instances are left. - instances[i].Allocated = true - indices = append(indices, i) - break - } - } - return indices, nil - -} diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go b/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go deleted file mode 100644 index d0d8ef602434a..0000000000000 --- a/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go +++ /dev/null @@ -1,327 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package namedresources - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - resourceapi "k8s.io/api/resource/v1alpha3" - "k8s.io/kubernetes/test/utils/ktesting" - "k8s.io/utils/ptr" -) - -func instance(allocated bool, name string, attributes ...resourceapi.NamedResourcesAttribute) InstanceAllocation { - return InstanceAllocation{ - Allocated: allocated, - Instance: &resourceapi.NamedResourcesInstance{ - Name: name, - Attributes: attributes, - }, - } -} - -func TestModel(t *testing.T) { - testcases := map[string]struct { - resources []*resourceapi.NamedResourcesResources - allocations []*resourceapi.NamedResourcesAllocationResult - - expectModel Model - }{ - "empty": {}, - - "nil": { - resources: []*resourceapi.NamedResourcesResources{nil}, - allocations: []*resourceapi.NamedResourcesAllocationResult{nil}, - }, - - "available": { - resources: []*resourceapi.NamedResourcesResources{ - { - Instances: []resourceapi.NamedResourcesInstance{ - {Name: "a"}, - {Name: "b"}, - }, - }, - { - Instances: []resourceapi.NamedResourcesInstance{ - {Name: "x"}, - {Name: "y"}, - }, - }, - }, - - expectModel: Model{Instances: []InstanceAllocation{instance(false, "a"), instance(false, "b"), instance(false, "x"), instance(false, "y")}}, - }, - - "allocated": { - resources: []*resourceapi.NamedResourcesResources{ - { - Instances: []resourceapi.NamedResourcesInstance{ - {Name: "a"}, - {Name: "b"}, - }, - }, - { - Instances: []resourceapi.NamedResourcesInstance{ - {Name: "x"}, - {Name: "y"}, - }, - }, - }, - allocations: []*resourceapi.NamedResourcesAllocationResult{ - { - Name: "something-else", - }, - { - Name: "a", - }, - }, - - expectModel: Model{Instances: []InstanceAllocation{instance(true, "a"), instance(false, "b"), instance(false, "x"), instance(false, "y")}}, - }, - } - - for name, tc := range testcases { - t.Run(name, func(t *testing.T) { - var actualModel Model - for _, resources := range tc.resources { - AddResources(&actualModel, resources) - } - for _, allocation := range tc.allocations { - AddAllocation(&actualModel, allocation) - } - - require.Equal(t, tc.expectModel, actualModel) - }) - } - -} - -func TestController(t *testing.T) { - filterAny := &resourceapi.NamedResourcesFilter{ - Selector: "true", - } - filterNone := &resourceapi.NamedResourcesFilter{ - Selector: "false", - } - filterBrokenType := &resourceapi.NamedResourcesFilter{ - Selector: "1", - } - filterBrokenEvaluation := &resourceapi.NamedResourcesFilter{ - Selector: `attributes.bool["no-such-attribute"]`, - } - filterAttribute := &resourceapi.NamedResourcesFilter{ - Selector: `attributes.bool["usable"]`, - } - - requestAny := &resourceapi.NamedResourcesRequest{ - Selector: "true", - } - requestNone := &resourceapi.NamedResourcesRequest{ - Selector: "false", - } - requestBrokenType := &resourceapi.NamedResourcesRequest{ - Selector: "1", - } - requestBrokenEvaluation := &resourceapi.NamedResourcesRequest{ - Selector: `attributes.bool["no-such-attribute"]`, - } - requestAttribute := &resourceapi.NamedResourcesRequest{ - Selector: `attributes.bool["usable"]`, - } - - instance1 := "instance-1" - oneInstance := Model{ - Instances: []InstanceAllocation{{ - Instance: &resourceapi.NamedResourcesInstance{ - Name: instance1, - }, - }}, - } - - instance2 := "instance-2" - twoInstances := Model{ - Instances: []InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{ - Name: instance1, - Attributes: []resourceapi.NamedResourcesAttribute{{ - Name: "usable", - NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{ - BoolValue: ptr.To(false), - }, - }}, - }, - }, - { - Instance: &resourceapi.NamedResourcesInstance{ - Name: instance2, - Attributes: []resourceapi.NamedResourcesAttribute{{ - Name: "usable", - NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{ - BoolValue: ptr.To(true), - }, - }}, - }, - }, - }, - } - - testcases := map[string]struct { - model Model - filter *resourceapi.NamedResourcesFilter - requests []*resourceapi.NamedResourcesRequest - - expectCreateErr bool - expectAllocation []string - expectAllocateErr bool - }{ - "empty": {}, - - "broken-filter": { - filter: filterBrokenType, - - expectCreateErr: true, - }, - - "broken-request": { - requests: []*resourceapi.NamedResourcesRequest{requestBrokenType}, - - expectCreateErr: true, - }, - - "no-resources": { - filter: filterAny, - requests: []*resourceapi.NamedResourcesRequest{requestAny}, - - expectAllocateErr: true, - }, - - "okay": { - model: oneInstance, - filter: filterAny, - requests: []*resourceapi.NamedResourcesRequest{requestAny}, - - expectAllocation: []string{instance1}, - }, - - "filter-mismatch": { - model: oneInstance, - filter: filterNone, - requests: []*resourceapi.NamedResourcesRequest{requestAny}, - - expectAllocateErr: true, - }, - - "request-mismatch": { - model: oneInstance, - filter: filterAny, - requests: []*resourceapi.NamedResourcesRequest{requestNone}, - - expectAllocateErr: true, - }, - - "many": { - model: twoInstances, - filter: filterAny, - requests: []*resourceapi.NamedResourcesRequest{requestAny, requestAny}, - - expectAllocation: []string{instance1, instance2}, - }, - - "too-many": { - model: oneInstance, - filter: filterAny, - requests: []*resourceapi.NamedResourcesRequest{requestAny, requestAny}, - - expectAllocateErr: true, - }, - - "filter-evaluation-error": { - model: oneInstance, - filter: filterBrokenEvaluation, - requests: []*resourceapi.NamedResourcesRequest{requestAny}, - - expectAllocateErr: true, - }, - - "request-evaluation-error": { - model: oneInstance, - filter: filterAny, - requests: []*resourceapi.NamedResourcesRequest{requestBrokenEvaluation}, - - expectAllocateErr: true, - }, - - "filter-attribute": { - model: twoInstances, - filter: filterAttribute, - requests: []*resourceapi.NamedResourcesRequest{requestAny}, - - expectAllocation: []string{instance2}, - }, - - "request-attribute": { - model: twoInstances, - filter: filterAny, - requests: []*resourceapi.NamedResourcesRequest{requestAttribute}, - - expectAllocation: []string{instance2}, - }, - } - - for name, tc := range testcases { - t.Run(name, func(t *testing.T) { - tCtx := ktesting.Init(t) - - controller, createErr := NewClaimController(tc.filter, tc.requests) - if createErr != nil { - if !tc.expectCreateErr { - tCtx.Fatalf("unexpected create error: %v", createErr) - } - return - } - if tc.expectCreateErr { - tCtx.Fatalf("did not get expected create error") - } - - allocation, createErr := controller.Allocate(tCtx, tc.model) - if createErr != nil { - if !tc.expectAllocateErr { - tCtx.Fatalf("unexpected allocate error: %v", createErr) - } - return - } - if tc.expectAllocateErr { - tCtx.Fatalf("did not get expected allocate error") - } - - expectAllocation := []*resourceapi.NamedResourcesAllocationResult{} - for _, name := range tc.expectAllocation { - expectAllocation = append(expectAllocation, &resourceapi.NamedResourcesAllocationResult{Name: name}) - } - require.Equal(tCtx, expectAllocation, allocation) - - isSuitable, isSuitableErr := controller.NodeIsSuitable(tCtx, tc.model) - assert.Equal(tCtx, len(expectAllocation) == len(tc.requests), isSuitable, "is suitable") - assert.Equal(tCtx, createErr, isSuitableErr) - }) - } -} diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go deleted file mode 100644 index cd100db742a08..0000000000000 --- a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters.go +++ /dev/null @@ -1,274 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package dynamicresources - -import ( - "context" - "fmt" - "sync" - - v1 "k8s.io/api/core/v1" - resourceapi "k8s.io/api/resource/v1alpha3" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog/v2" - namedresourcesmodel "k8s.io/kubernetes/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources" -) - -// resources is a map "node name" -> "driver name" -> available and -// allocated resources per structured parameter model. -type resources map[string]map[string]ResourceModels - -// ResourceModels may have more than one entry because it is valid for a driver to -// use more than one structured parameter model. -type ResourceModels struct { - NamedResources namedresourcesmodel.Model -} - -// resourceSliceLister is the subset of resourcelisters.ResourceSliceLister needed by -// newResourceModel. -type resourceSliceLister interface { - List(selector labels.Selector) (ret []*resourceapi.ResourceSlice, err error) -} - -// assumeCacheLister is the subset of volumebinding.AssumeCache needed by newResourceModel. -type assumeCacheLister interface { - List(indexObj interface{}) []interface{} -} - -// newResourceModel parses the available information about resources. Objects -// with an unknown structured parameter model silently ignored. An error gets -// logged later when parameters required for a pod depend on such an unknown -// model. -func newResourceModel(logger klog.Logger, resourceSliceLister resourceSliceLister, claimAssumeCache assumeCacheLister, inFlightAllocations *sync.Map) (resourceMap, error) { - model := make(resourceMap) - - slices, err := resourceSliceLister.List(labels.Everything()) - if err != nil { - return nil, fmt.Errorf("list node resource slices: %w", err) - } - for _, slice := range slices { - if slice.NamedResources == nil { - // Ignore unknown resource. We don't know what it is, - // so we cannot allocated anything depending on - // it. This is only an error if we actually see a claim - // which needs this unknown model. - continue - } - instances := slice.NamedResources.Instances - if model[slice.NodeName] == nil { - model[slice.NodeName] = make(map[string]Resources) - } - resources := model[slice.NodeName][slice.DriverName] - resources.Instances = make([]Instance, 0, len(instances)) - for i := range instances { - instance := Instance{ - NodeName: slice.NodeName, - DriverName: slice.DriverName, - NamedResourcesInstance: &instances[i], - } - resources.Instances = append(resources.Instances, instance) - } - model[slice.NodeName][slice.DriverName] = resources - } - - objs := claimAssumeCache.List(nil) - for _, obj := range objs { - claim, ok := obj.(*resourceapi.ResourceClaim) - if !ok { - return nil, fmt.Errorf("got unexpected object of type %T from claim assume cache", obj) - } - if obj, ok := inFlightAllocations.Load(claim.UID); ok { - // If the allocation is in-flight, then we have to use the allocation - // from that claim. - claim = obj.(*resourceapi.ResourceClaim) - } - if claim.Status.Allocation == nil { - continue - } - for _, handle := range claim.Status.Allocation.ResourceHandles { - structured := handle.StructuredData - if structured == nil { - continue - } - if model[structured.NodeName] == nil { - model[structured.NodeName] = make(map[string]Resources) - } - resources := model[structured.NodeName][handle.DriverName] - for _, result := range structured.Results { - // Same as above: if we don't know the allocation result model, ignore it. - if result.NamedResources == nil { - continue - } - instanceName := result.NamedResources.Name - for i := range resources.Instances { - if resources.Instances[i].NamedResourcesInstance.Name == instanceName { - resources.Instances[i].Allocated = true - break - } - } - // It could be that we don't know the instance. That's okay, - // we simply ignore the allocation result. - } - } - } - - return model, nil -} - -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 - // multiple requests which need to be allocated together, so here - // we have to collect them per model. - type perDriverRequests struct { - parameters []runtime.RawExtension - requests []*resourceapi.NamedResourcesRequest - } - namedresourcesRequests := make(map[string]perDriverRequests) - for i, request := range claimParameters.DriverRequests { - driverName := request.DriverName - p := namedresourcesRequests[driverName] - for e, request := range request.Requests { - switch { - case request.ResourceRequestModel.NamedResources != nil: - p.parameters = append(p.parameters, request.VendorParameters) - p.requests = append(p.requests, request.ResourceRequestModel.NamedResources) - default: - return nil, fmt.Errorf("claim parameters %s: driverRequests[%d].requests[%d]: no supported structured parameters found", klog.KObj(claimParameters), i, e) - } - } - if len(p.requests) > 0 { - namedresourcesRequests[driverName] = p - } - } - - c := &claimController{ - class: class, - classParameters: classParameters, - claimParameters: claimParameters, - namedresources: make(map[string]perDriverController, len(namedresourcesRequests)), - } - for driverName, perDriver := range namedresourcesRequests { - var filter *resourceapi.NamedResourcesFilter - for _, f := range classParameters.Filters { - if f.DriverName == driverName && f.ResourceFilterModel.NamedResources != nil { - filter = f.ResourceFilterModel.NamedResources - break - } - } - controller, err := namedresourcesmodel.NewClaimController(filter, perDriver.requests) - if err != nil { - return nil, fmt.Errorf("creating claim controller for named resources structured model: %w", err) - } - c.namedresources[driverName] = perDriverController{ - parameters: perDriver.parameters, - controller: controller, - } - } - return c, nil -} - -// claimController currently wraps exactly one structured parameter model. - -type claimController struct { - class *resourceapi.ResourceClass - classParameters *resourceapi.ResourceClassParameters - claimParameters *resourceapi.ResourceClaimParameters - namedresources map[string]perDriverController -} - -type perDriverController struct { - parameters []runtime.RawExtension - controller *namedresourcesmodel.Controller -} - -func (c claimController) nodeIsSuitable(ctx context.Context, nodeName string, resources resources) (bool, error) { - nodeResources := resources[nodeName] - for driverName, perDriver := range c.namedresources { - okay, err := perDriver.controller.NodeIsSuitable(ctx, nodeResources[driverName].NamedResources) - if err != nil { - // This is an error in the CEL expression which needs - // to be fixed. Better fail very visibly instead of - // ignoring the node. - return false, fmt.Errorf("checking node %q and resources of driver %q: %w", nodeName, driverName, err) - } - if !okay { - return false, nil - } - } - return true, nil -} - -func (c claimController) allocate(ctx context.Context, nodeName string, resources resources) (string, *resourceapi.AllocationResult, error) { - allocation := &resourceapi.AllocationResult{ - AvailableOnNodes: &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{ - { - MatchExpressions: []v1.NodeSelectorRequirement{ - {Key: "kubernetes.io/hostname", Operator: v1.NodeSelectorOpIn, Values: []string{nodeName}}, - }, - }, - }, - }, - } - - nodeResources := resources[nodeName] - for driverName, perDriver := range c.namedresources { - // Must return one entry for each request. The entry may be nil. This way, - // the result can be correlated with the per-request parameters. - results, err := perDriver.controller.Allocate(ctx, nodeResources[driverName].NamedResources) - if err != nil { - return "", nil, fmt.Errorf("allocating via named resources structured model: %w", err) - } - handle := resourceapi.ResourceHandle{ - DriverName: driverName, - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: nodeName, - }, - } - for i, result := range results { - if result == nil { - continue - } - handle.StructuredData.Results = append(handle.StructuredData.Results, - resourceapi.DriverAllocationResult{ - VendorRequestParameters: perDriver.parameters[i], - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: result, - }, - }, - ) - } - if c.classParameters != nil { - for _, p := range c.classParameters.VendorParameters { - if p.DriverName == driverName { - handle.StructuredData.VendorClassParameters = p.Parameters - break - } - } - } - for _, request := range c.claimParameters.DriverRequests { - if request.DriverName == driverName { - handle.StructuredData.VendorClaimParameters = request.VendorParameters - break - } - } - allocation.ResourceHandles = append(allocation.ResourceHandles, handle) - } - - return c.class.DriverName, allocation, nil -} diff --git a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go b/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go deleted file mode 100644 index 43b33198d19a4..0000000000000 --- a/pkg/scheduler/framework/plugins/dynamicresources/structuredparameters_test.go +++ /dev/null @@ -1,1257 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package dynamicresources - -import ( - "errors" - "sync" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - v1 "k8s.io/api/core/v1" - resourceapi "k8s.io/api/resource/v1alpha3" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" - namedresourcesmodel "k8s.io/kubernetes/pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources" - "k8s.io/kubernetes/test/utils/ktesting" - "k8s.io/utils/ptr" -) - -func TestModel(t *testing.T) { - testcases := map[string]struct { - slices resourceSliceLister - claims assumeCacheLister - inFlight map[types.UID]resourceapi.ResourceClaimStatus - - wantResources resources - wantErr bool - }{ - "empty": {}, - - "slice-list-error": { - slices: sliceError("slice list error"), - - wantErr: true, - }, - - "unknown-model": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node", - DriverName: "driver", - ResourceModel: resourceapi.ResourceModel{ /* empty! */ }, - }, - }, - - // Not an error. It is safe to ignore unknown resources until a claim requests them. - // The unknown model in that claim then triggers an error for that claim. - wantResources: resources{"node": map[string]ResourceModels{ - "driver": { - NamedResources: namedresourcesmodel.Model{}, - }, - }}, - }, - - "one-instance": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node", - DriverName: "driver", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{ - Name: "one", - Attributes: []resourceapi.NamedResourcesAttribute{{ - Name: "size", - NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{ - IntValue: ptr.To(int64(1)), - }, - }}, - }}, - }, - }, - }, - }, - - wantResources: resources{"node": map[string]ResourceModels{ - "driver": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{ - Name: "one", - Attributes: []resourceapi.NamedResourcesAttribute{{ - Name: "size", - NamedResourcesAttributeValue: resourceapi.NamedResourcesAttributeValue{ - IntValue: ptr.To(int64(1)), - }, - }}, - }, - }, - }, - }, - }, - }}, - }, - - "two-instances": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node", - DriverName: "driver", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - }, - - wantResources: resources{"node": map[string]ResourceModels{ - "driver": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - }}, - }, - - "two-nodes": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - }, - - wantResources: resources{ - "node-a": map[string]ResourceModels{ - "driver": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - }, - "node-b": map[string]ResourceModels{ - "driver": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - }, - }, - }, - - "two-nodes-two-drivers": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - }, - - wantResources: resources{ - "node-a": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - }, - "node-b": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - }, - }, - }, - - "in-use-simple": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - }, - - claims: claimList{ - &resourceapi.ResourceClaim{ - /* not allocated */ - }, - &resourceapi.ResourceClaim{ - Status: resourceapi.ResourceClaimStatus{ - DriverName: "driver-a", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{{ - // Claims not allocated via structured parameters can be ignored. - }}, - }, - }, - }, - &resourceapi.ResourceClaim{ - Status: resourceapi.ResourceClaimStatus{ - DriverName: "driver-a", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{{ - DriverName: "driver-a", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-b", - // Unknown allocations can be ignored. - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{}, - }}, - }, - }}, - }, - }, - }, - &resourceapi.ResourceClaim{ - Status: resourceapi.ResourceClaimStatus{ - DriverName: "driver-a", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{{ - DriverName: "driver-a", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-a", - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "two", - }, - }, - }}, - }, - }}, - }, - }, - }, - }, - - wantResources: resources{ - "node-a": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Allocated: true, - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - }, - "node-b": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - }, - }, - }, - - "in-use-meta-driver": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - }, - - claims: claimList{ - &resourceapi.ResourceClaim{ - Status: resourceapi.ResourceClaimStatus{ - DriverName: "meta-driver", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{{ - DriverName: "driver-b", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-b", - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "X", - }, - }, - }}, - }, - }}, - }, - }, - }, - }, - - wantResources: resources{ - "node-a": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - }, - "node-b": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Allocated: true, - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - }, - }, - }, - - "in-use-many-results": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - }, - - claims: claimList{ - &resourceapi.ResourceClaim{ - Status: resourceapi.ResourceClaimStatus{ - DriverName: "driver-a", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{{ - DriverName: "driver-a", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-a", - Results: []resourceapi.DriverAllocationResult{ - { - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "one", - }, - }, - }, - { - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "two", - }, - }, - }, - }, - }, - }}, - }, - }, - }, - }, - - wantResources: resources{ - "node-a": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Allocated: true, - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Allocated: true, - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - }, - "node-b": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - }, - }, - }, - - "in-use-many-handles": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-a", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}, {Name: "two"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-a", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - &resourceapi.ResourceSlice{ - NodeName: "node-b", - DriverName: "driver-b", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "X"}, {Name: "Y"}}, - }, - }, - }, - }, - - claims: claimList{ - &resourceapi.ResourceClaim{ - Status: resourceapi.ResourceClaimStatus{ - DriverName: "meta-driver", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: "driver-a", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-b", - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "X", - }, - }, - }}, - }, - }, - { - DriverName: "driver-b", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-b", - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "X", - }, - }, - }}, - }, - }, - }, - }, - }, - }, - }, - - wantResources: resources{ - "node-a": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "two"}, - }, - }, - }, - }, - }, - "node-b": map[string]ResourceModels{ - "driver-a": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Allocated: true, - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - "driver-b": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Allocated: true, - Instance: &resourceapi.NamedResourcesInstance{Name: "X"}, - }, - { - Instance: &resourceapi.NamedResourcesInstance{Name: "Y"}, - }, - }, - }, - }, - }, - }, - }, - - "orphaned-allocations": { - claims: claimList{ - &resourceapi.ResourceClaim{ - Status: resourceapi.ResourceClaimStatus{ - DriverName: "meta-driver", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{ - { - DriverName: "driver-a", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-b", - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "X", - }, - }, - }}, - }, - }, - { - DriverName: "driver-b", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node-b", - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "X", - }, - }, - }}, - }, - }, - }, - }, - }, - }, - }, - - wantResources: resources{ - "node-b": map[string]ResourceModels{}, - }, - }, - - "in-flight": { - slices: sliceList{ - &resourceapi.ResourceSlice{ - NodeName: "node", - DriverName: "driver", - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{ - Instances: []resourceapi.NamedResourcesInstance{{Name: "one"}}, - }, - }, - }, - }, - - claims: claimList{ - &resourceapi.ResourceClaim{ - ObjectMeta: metav1.ObjectMeta{ - UID: "abc", - }, - // Allocation not recorded yet. - }, - }, - - inFlight: map[types.UID]resourceapi.ResourceClaimStatus{ - "abc": { - DriverName: "driver", - Allocation: &resourceapi.AllocationResult{ - ResourceHandles: []resourceapi.ResourceHandle{{ - DriverName: "driver", - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: "node", - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: "one", - }, - }, - }}, - }, - }}, - }, - }, - }, - - wantResources: resources{"node": map[string]ResourceModels{ - "driver": { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{ - { - Allocated: true, - Instance: &resourceapi.NamedResourcesInstance{Name: "one"}, - }, - }, - }, - }, - }}, - }, - } - - for name, tc := range testcases { - t.Run(name, func(t *testing.T) { - tCtx := ktesting.Init(t) - - var inFlightAllocations sync.Map - for uid, claimStatus := range tc.inFlight { - inFlightAllocations.Store(uid, &resourceapi.ResourceClaim{Status: claimStatus}) - } - - slices := tc.slices - if slices == nil { - slices = sliceList{} - } - claims := tc.claims - if claims == nil { - claims = claimList{} - } - actualResources, actualErr := newResourceModel(tCtx.Logger(), slices, claims, &inFlightAllocations) - - if actualErr != nil { - if !tc.wantErr { - tCtx.Fatalf("unexpected error: %v", actualErr) - } - return - } - if tc.wantErr { - tCtx.Fatalf("did not get expected error") - } - - expectResources := tc.wantResources - if expectResources == nil { - expectResources = resources{} - } - require.Equal(tCtx, expectResources, actualResources) - }) - } -} - -type sliceList []*resourceapi.ResourceSlice - -func (l sliceList) List(selector labels.Selector) ([]*resourceapi.ResourceSlice, error) { - return l, nil -} - -type sliceError string - -func (l sliceError) List(selector labels.Selector) ([]*resourceapi.ResourceSlice, error) { - return nil, errors.New(string(l)) -} - -type claimList []any - -func (l claimList) List(indexObj any) []any { - return l -} - -func TestController(t *testing.T) { - driver1 := "driver-1" - class1 := &resourceapi.ResourceClass{ - DriverName: driver1, - } - - classParametersEmpty := &resourceapi.ResourceClassParameters{} - classParametersAny := &resourceapi.ResourceClassParameters{ - Filters: []resourceapi.ResourceFilter{{ - DriverName: driver1, - ResourceFilterModel: resourceapi.ResourceFilterModel{ - NamedResources: &resourceapi.NamedResourcesFilter{ - Selector: "true", - }, - }, - }}, - } - - claimParametersEmpty := &resourceapi.ResourceClaimParameters{} - claimParametersAny := &resourceapi.ResourceClaimParameters{ - DriverRequests: []resourceapi.DriverRequests{{ - DriverName: driver1, - }}, - } - claimParametersOne := &resourceapi.ResourceClaimParameters{ - DriverRequests: []resourceapi.DriverRequests{{ - DriverName: driver1, - Requests: []resourceapi.ResourceRequest{{ - ResourceRequestModel: resourceapi.ResourceRequestModel{ - NamedResources: &resourceapi.NamedResourcesRequest{ - Selector: "true", - }, - }, - }}, - }}, - } - claimParametersBroken := &resourceapi.ResourceClaimParameters{ - DriverRequests: []resourceapi.DriverRequests{{ - DriverName: driver1, - Requests: []resourceapi.ResourceRequest{{ - ResourceRequestModel: resourceapi.ResourceRequestModel{ - NamedResources: &resourceapi.NamedResourcesRequest{ - Selector: `attributes.bool["no-such-attribute"]`, - }, - }, - }}, - }}, - } - - instance1 := "instance-1" - - node1 := "node-1" - node1Selector := &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{{ - MatchExpressions: []v1.NodeSelectorRequirement{{ - Key: "kubernetes.io/hostname", - Operator: v1.NodeSelectorOpIn, - Values: []string{node1}, - }}, - }}, - } - node1Resources := resources{node1: map[string]ResourceModels{ - driver1: { - NamedResources: namedresourcesmodel.Model{ - Instances: []namedresourcesmodel.InstanceAllocation{{ - Instance: &resourceapi.NamedResourcesInstance{ - Name: instance1, - }, - }}, - }, - }, - }} - node1Allocation := &resourceapi.AllocationResult{ - AvailableOnNodes: node1Selector, - } - - instance1Allocation := &resourceapi.AllocationResult{ - AvailableOnNodes: node1Selector, - ResourceHandles: []resourceapi.ResourceHandle{{ - DriverName: driver1, - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: node1, - Results: []resourceapi.DriverAllocationResult{{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: instance1, - }, - }, - }}, - }, - }}, - } - - type nodeResult struct { - isSuitable bool - suitableErr string - - driverName string - allocation *resourceapi.AllocationResult - allocateErr string - } - type nodeResults map[string]nodeResult - - testcases := map[string]struct { - resources resources - class *resourceapi.ResourceClass - classParameters *resourceapi.ResourceClassParameters - claimParameters *resourceapi.ResourceClaimParameters - - expectCreateErr bool - expectNodeResults nodeResults - }{ - "empty": { - class: class1, - classParameters: classParametersEmpty, - claimParameters: claimParametersEmpty, - - expectNodeResults: nodeResults{ - node1: {isSuitable: true, driverName: driver1, allocation: node1Allocation}, - }, - }, - - "any": { - class: class1, - classParameters: classParametersEmpty, - claimParameters: claimParametersAny, - - expectNodeResults: nodeResults{ - node1: {isSuitable: true, driverName: driver1, allocation: node1Allocation}, - }, - }, - - "missing-model": { - class: class1, - classParameters: classParametersEmpty, - claimParameters: &resourceapi.ResourceClaimParameters{ - DriverRequests: []resourceapi.DriverRequests{{ - Requests: []resourceapi.ResourceRequest{{ /* empty model */ }}, - }}, - }, - - expectCreateErr: true, - }, - - "no-resources": { - class: class1, - classParameters: classParametersEmpty, - claimParameters: claimParametersOne, - - expectNodeResults: nodeResults{ - node1: {isSuitable: false, allocateErr: "allocating via named resources structured model: insufficient resources"}, - }, - }, - - "have-resources": { - resources: node1Resources, - class: class1, - classParameters: classParametersEmpty, - claimParameters: claimParametersOne, - - expectNodeResults: nodeResults{ - node1: {isSuitable: true, driverName: driver1, allocation: instance1Allocation}, - }, - }, - - "broken-cel": { - resources: node1Resources, - class: class1, - classParameters: classParametersEmpty, - claimParameters: claimParametersBroken, - - expectNodeResults: nodeResults{ - node1: {suitableErr: `checking node "node-1" and resources of driver "driver-1": evaluate request CEL expression: no such key: no-such-attribute`}, - }, - }, - - "class-filter": { - resources: node1Resources, - class: class1, - classParameters: classParametersAny, - claimParameters: claimParametersOne, - - expectNodeResults: nodeResults{ - node1: {isSuitable: true, driverName: driver1, allocation: instance1Allocation}, - }, - }, - - "vendor-parameters": { - resources: node1Resources, - class: class1, - classParameters: func() *resourceapi.ResourceClassParameters { - parameters := classParametersAny.DeepCopy() - parameters.VendorParameters = []resourceapi.VendorParameters{{ - DriverName: driver1, - Parameters: runtime.RawExtension{Raw: []byte("class-parameters")}, - }} - return parameters - }(), - - claimParameters: func() *resourceapi.ResourceClaimParameters { - parameters := claimParametersOne.DeepCopy() - parameters.DriverRequests[0].VendorParameters = runtime.RawExtension{Raw: []byte("claim-parameters")} - parameters.DriverRequests[0].Requests[0].VendorParameters = runtime.RawExtension{Raw: []byte("request-parameters")} - return parameters - }(), - - expectNodeResults: nodeResults{ - node1: {isSuitable: true, driverName: driver1, - allocation: func() *resourceapi.AllocationResult { - allocation := instance1Allocation.DeepCopy() - allocation.ResourceHandles[0].StructuredData.VendorClassParameters = runtime.RawExtension{Raw: []byte("class-parameters")} - allocation.ResourceHandles[0].StructuredData.VendorClaimParameters = runtime.RawExtension{Raw: []byte("claim-parameters")} - allocation.ResourceHandles[0].StructuredData.Results[0].VendorRequestParameters = runtime.RawExtension{Raw: []byte("request-parameters")} - return allocation - }(), - }, - }, - }, - } - - for name, tc := range testcases { - t.Run(name, func(t *testing.T) { - tCtx := ktesting.Init(t) - - controller, err := newClaimController(tCtx.Logger(), tc.class, tc.classParameters, tc.claimParameters) - if err != nil { - if !tc.expectCreateErr { - tCtx.Fatalf("unexpected error: %v", err) - } - return - } - if tc.expectCreateErr { - tCtx.Fatalf("did not get expected error") - } - - for nodeName, expect := range tc.expectNodeResults { - t.Run(nodeName, func(t *testing.T) { - tCtx := ktesting.Init(t) - - isSuitable, err := controller.nodeIsSuitable(tCtx, nodeName, tc.resources) - if err != nil { - if expect.suitableErr == "" { - tCtx.Fatalf("unexpected nodeIsSuitable error: %v", err) - } - require.Equal(tCtx, expect.suitableErr, err.Error()) - return - } - if expect.suitableErr != "" { - tCtx.Fatalf("did not get expected nodeIsSuitable error: %v", expect.suitableErr) - } - assert.Equal(tCtx, expect.isSuitable, isSuitable, "is suitable") - - driverName, allocation, err := controller.allocate(tCtx, nodeName, tc.resources) - if err != nil { - if expect.allocateErr == "" { - tCtx.Fatalf("unexpected allocate error: %v", err) - } - require.Equal(tCtx, expect.allocateErr, err.Error()) - return - } - if expect.allocateErr != "" { - tCtx.Fatalf("did not get expected allocate error: %v", expect.allocateErr) - } - assert.Equal(tCtx, expect.driverName, driverName, "driver name") - assert.Equal(tCtx, expect.allocation, allocation) - }) - } - }) - } -} diff --git a/pkg/scheduler/framework/types.go b/pkg/scheduler/framework/types.go index d066059276f92..43cc16e15dfdf 100644 --- a/pkg/scheduler/framework/types.go +++ b/pkg/scheduler/framework/types.go @@ -93,18 +93,16 @@ const ( // unschedulable pod pool. // This behavior will be removed when we remove the preCheck feature. // See: https://github.com/kubernetes/kubernetes/issues/110175 - Node GVK = "Node" - PersistentVolume GVK = "PersistentVolume" - PersistentVolumeClaim GVK = "PersistentVolumeClaim" - CSINode GVK = "storage.k8s.io/CSINode" - CSIDriver GVK = "storage.k8s.io/CSIDriver" - CSIStorageCapacity GVK = "storage.k8s.io/CSIStorageCapacity" - StorageClass GVK = "storage.k8s.io/StorageClass" - PodSchedulingContext GVK = "PodSchedulingContext" - ResourceClaim GVK = "ResourceClaim" - ResourceClass GVK = "ResourceClass" - ResourceClaimParameters GVK = "ResourceClaimParameters" - ResourceClassParameters GVK = "ResourceClassParameters" + Node GVK = "Node" + PersistentVolume GVK = "PersistentVolume" + PersistentVolumeClaim GVK = "PersistentVolumeClaim" + CSINode GVK = "storage.k8s.io/CSINode" + CSIDriver GVK = "storage.k8s.io/CSIDriver" + CSIStorageCapacity GVK = "storage.k8s.io/CSIStorageCapacity" + StorageClass GVK = "storage.k8s.io/StorageClass" + PodSchedulingContext GVK = "PodSchedulingContext" + ResourceClaim GVK = "ResourceClaim" + DeviceClass GVK = "DeviceClass" // WildCard is a special GVK to match all resources. // e.g., If you register `{Resource: "*", ActionType: All}` in EventsToRegister, @@ -197,9 +195,7 @@ func UnrollWildCardResource() []ClusterEventWithHint { {Event: ClusterEvent{Resource: StorageClass, ActionType: All}}, {Event: ClusterEvent{Resource: PodSchedulingContext, ActionType: All}}, {Event: ClusterEvent{Resource: ResourceClaim, ActionType: All}}, - {Event: ClusterEvent{Resource: ResourceClass, ActionType: All}}, - {Event: ClusterEvent{Resource: ResourceClaimParameters, ActionType: All}}, - {Event: ClusterEvent{Resource: ResourceClassParameters, ActionType: All}}, + {Event: ClusterEvent{Resource: DeviceClass, ActionType: All}}, } } diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go index 5bc55816ffa55..86b317e5b2f31 100644 --- a/pkg/scheduler/scheduler_test.go +++ b/pkg/scheduler/scheduler_test.go @@ -643,13 +643,7 @@ func Test_buildQueueingHintMap(t *testing.T) { {Resource: framework.ResourceClaim, ActionType: framework.All}: { {PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, }, - {Resource: framework.ResourceClass, ActionType: framework.All}: { - {PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, - }, - {Resource: framework.ResourceClaimParameters, ActionType: framework.All}: { - {PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, - }, - {Resource: framework.ResourceClassParameters, ActionType: framework.All}: { + {Resource: framework.DeviceClass, ActionType: framework.All}: { {PluginName: filterWithoutEnqueueExtensions, QueueingHintFn: defaultQueueingHintFn}, }, }, @@ -785,19 +779,17 @@ func Test_UnionedGVKs(t *testing.T) { Disabled: []schedulerapi.Plugin{{Name: "*"}}, // disable default plugins }, want: map[framework.GVK]framework.ActionType{ - framework.Pod: framework.All, - framework.Node: framework.All, - framework.CSINode: framework.All, - framework.CSIDriver: framework.All, - framework.CSIStorageCapacity: framework.All, - framework.PersistentVolume: framework.All, - framework.PersistentVolumeClaim: framework.All, - framework.StorageClass: framework.All, - framework.PodSchedulingContext: framework.All, - framework.ResourceClaim: framework.All, - framework.ResourceClass: framework.All, - framework.ResourceClaimParameters: framework.All, - framework.ResourceClassParameters: framework.All, + framework.Pod: framework.All, + framework.Node: framework.All, + framework.CSINode: framework.All, + framework.CSIDriver: framework.All, + framework.CSIStorageCapacity: framework.All, + framework.PersistentVolume: framework.All, + framework.PersistentVolumeClaim: framework.All, + framework.StorageClass: framework.All, + framework.PodSchedulingContext: framework.All, + framework.ResourceClaim: framework.All, + framework.DeviceClass: framework.All, }, }, { diff --git a/pkg/scheduler/testing/wrappers.go b/pkg/scheduler/testing/wrappers.go index a5bbffaf94865..5562555f19271 100644 --- a/pkg/scheduler/testing/wrappers.go +++ b/pkg/scheduler/testing/wrappers.go @@ -900,8 +900,8 @@ func (p *PersistentVolumeWrapper) NodeAffinityIn(key string, vals []string) *Per type ResourceClaimWrapper struct{ resourceapi.ResourceClaim } // MakeResourceClaim creates a ResourceClaim wrapper. -func MakeResourceClaim() *ResourceClaimWrapper { - return &ResourceClaimWrapper{resourceapi.ResourceClaim{}} +func MakeResourceClaim(controller string) *ResourceClaimWrapper { + return &ResourceClaimWrapper{resourceapi.ResourceClaim{Spec: resourceapi.ResourceClaimSpec{Controller: controller}}} } // FromResourceClaim creates a ResourceClaim wrapper from some existing object. @@ -946,72 +946,33 @@ func (wrapper *ResourceClaimWrapper) OwnerReference(name, uid string, gvk schema return wrapper } -// ParametersRef sets a reference to a ResourceClaimParameters.resource.k8s.io. -func (wrapper *ResourceClaimWrapper) ParametersRef(name string) *ResourceClaimWrapper { - wrapper.ResourceClaim.Spec.ParametersRef = &resourceapi.ResourceClaimParametersReference{ - Name: name, - Kind: "ResourceClaimParameters", - APIGroup: "resource.k8s.io", - } - return wrapper -} - -// ResourceClassName sets the resource class name of the inner object. -func (wrapper *ResourceClaimWrapper) ResourceClassName(name string) *ResourceClaimWrapper { - wrapper.ResourceClaim.Spec.ResourceClassName = name +// Request adds one device request for the given device class. +func (wrapper *ResourceClaimWrapper) Request(deviceClassName string) *ResourceClaimWrapper { + wrapper.Spec.Devices.Requests = append(wrapper.Spec.Devices.Requests, + resourceapi.DeviceRequest{ + Name: fmt.Sprintf("req-%d", len(wrapper.Spec.Devices.Requests)+1), + CountMode: resourceapi.DeviceCountModeExact, + Count: 1, + DeviceClassName: deviceClassName, + }, + ) return wrapper } // Allocation sets the allocation of the inner object. -func (wrapper *ResourceClaimWrapper) Allocation(driverName string, allocation *resourceapi.AllocationResult) *ResourceClaimWrapper { - wrapper.ResourceClaim.Status.DriverName = driverName +func (wrapper *ResourceClaimWrapper) Allocation(allocation *resourceapi.AllocationResult) *ResourceClaimWrapper { wrapper.ResourceClaim.Status.Allocation = allocation return wrapper } // Structured turns a "normal" claim into one which was allocated via structured parameters. -// This modifies the allocation result and adds the reserved finalizer if the claim -// is allocated. The claim has to become local to a node. The assumption is that -// "named resources" are used. -func (wrapper *ResourceClaimWrapper) Structured(nodeName string, namedResourcesInstances ...string) *ResourceClaimWrapper { +// The only difference is that there is no controller name and the special finalizer +// gets added. +func (wrapper *ResourceClaimWrapper) Structured() *ResourceClaimWrapper { + wrapper.Spec.Controller = "" if wrapper.ResourceClaim.Status.Allocation != nil { wrapper.ResourceClaim.Finalizers = append(wrapper.ResourceClaim.Finalizers, resourceapi.Finalizer) - for i, resourceHandle := range wrapper.ResourceClaim.Status.Allocation.ResourceHandles { - resourceHandle.Data = "" - resourceHandle.StructuredData = &resourceapi.StructuredResourceHandle{ - NodeName: nodeName, - } - wrapper.ResourceClaim.Status.Allocation.ResourceHandles[i] = resourceHandle - } - if len(wrapper.ResourceClaim.Status.Allocation.ResourceHandles) == 0 { - wrapper.ResourceClaim.Status.Allocation.ResourceHandles = []resourceapi.ResourceHandle{{ - DriverName: wrapper.ResourceClaim.Status.DriverName, - StructuredData: &resourceapi.StructuredResourceHandle{ - NodeName: nodeName, - }, - }} - } - for _, resourceHandle := range wrapper.ResourceClaim.Status.Allocation.ResourceHandles { - for _, name := range namedResourcesInstances { - result := resourceapi.DriverAllocationResult{ - AllocationResultModel: resourceapi.AllocationResultModel{ - NamedResources: &resourceapi.NamedResourcesAllocationResult{ - Name: name, - }, - }, - } - resourceHandle.StructuredData.Results = append(resourceHandle.StructuredData.Results, result) - } - } - wrapper.ResourceClaim.Status.Allocation.AvailableOnNodes = &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{{ - MatchExpressions: []v1.NodeSelectorRequirement{{ - Key: "kubernetes.io/hostname", - Operator: v1.NodeSelectorOpIn, - Values: []string{nodeName}, - }}, - }}, - } + wrapper.ResourceClaim.Status.Allocation.Controller = "" } return wrapper } @@ -1120,8 +1081,9 @@ type ResourceSliceWrapper struct { func MakeResourceSlice(nodeName, driverName string) *ResourceSliceWrapper { wrapper := new(ResourceSliceWrapper) wrapper.Name = nodeName + "-" + driverName - wrapper.NodeName = nodeName - wrapper.DriverName = driverName + wrapper.Spec.NodeName = nodeName + wrapper.Spec.Pool.Name = nodeName + wrapper.Spec.Driver = driverName return wrapper } @@ -1129,119 +1091,14 @@ func (wrapper *ResourceSliceWrapper) Obj() *resourceapi.ResourceSlice { return &wrapper.ResourceSlice } -func (wrapper *ResourceSliceWrapper) NamedResourcesInstances(names ...string) *ResourceSliceWrapper { - wrapper.ResourceModel = resourceapi.ResourceModel{NamedResources: &resourceapi.NamedResourcesResources{}} +func (wrapper *ResourceSliceWrapper) Devices(names ...string) *ResourceSliceWrapper { for _, name := range names { - wrapper.ResourceModel.NamedResources.Instances = append(wrapper.ResourceModel.NamedResources.Instances, - resourceapi.NamedResourcesInstance{Name: name}, - ) - } - return wrapper -} - -type ClaimParametersWrapper struct { - resourceapi.ResourceClaimParameters -} - -func MakeClaimParameters() *ClaimParametersWrapper { - return &ClaimParametersWrapper{} -} - -// FromClaimParameters creates a ResourceClaimParameters wrapper from an existing object. -func FromClaimParameters(other *resourceapi.ResourceClaimParameters) *ClaimParametersWrapper { - return &ClaimParametersWrapper{*other.DeepCopy()} -} - -func (wrapper *ClaimParametersWrapper) Obj() *resourceapi.ResourceClaimParameters { - return &wrapper.ResourceClaimParameters -} - -func (wrapper *ClaimParametersWrapper) Name(s string) *ClaimParametersWrapper { - wrapper.SetName(s) - return wrapper -} - -func (wrapper *ClaimParametersWrapper) UID(s string) *ClaimParametersWrapper { - wrapper.SetUID(types.UID(s)) - return wrapper -} - -func (wrapper *ClaimParametersWrapper) Namespace(s string) *ClaimParametersWrapper { - wrapper.SetNamespace(s) - return wrapper -} - -func (wrapper *ClaimParametersWrapper) GeneratedFrom(value *resourceapi.ResourceClaimParametersReference) *ClaimParametersWrapper { - wrapper.ResourceClaimParameters.GeneratedFrom = value - return wrapper -} - -func (wrapper *ClaimParametersWrapper) NamedResourcesRequests(driverName string, selectors ...string) *ClaimParametersWrapper { - requests := resourceapi.DriverRequests{ - DriverName: driverName, + wrapper.Spec.Devices = append(wrapper.Spec.Devices, resourceapi.Device{Name: name}) } - for _, selector := range selectors { - request := resourceapi.ResourceRequest{ - ResourceRequestModel: resourceapi.ResourceRequestModel{ - NamedResources: &resourceapi.NamedResourcesRequest{ - Selector: selector, - }, - }, - } - requests.Requests = append(requests.Requests, request) - } - wrapper.DriverRequests = append(wrapper.DriverRequests, requests) return wrapper } -type ClassParametersWrapper struct { - resourceapi.ResourceClassParameters -} - -func MakeClassParameters() *ClassParametersWrapper { - return &ClassParametersWrapper{} -} - -// FromClassParameters creates a ResourceClassParameters wrapper from an existing object. -func FromClassParameters(other *resourceapi.ResourceClassParameters) *ClassParametersWrapper { - return &ClassParametersWrapper{*other.DeepCopy()} -} - -func (wrapper *ClassParametersWrapper) Obj() *resourceapi.ResourceClassParameters { - return &wrapper.ResourceClassParameters -} - -func (wrapper *ClassParametersWrapper) Name(s string) *ClassParametersWrapper { - wrapper.SetName(s) - return wrapper -} - -func (wrapper *ClassParametersWrapper) UID(s string) *ClassParametersWrapper { - wrapper.SetUID(types.UID(s)) - return wrapper -} - -func (wrapper *ClassParametersWrapper) Namespace(s string) *ClassParametersWrapper { - wrapper.SetNamespace(s) - return wrapper -} - -func (wrapper *ClassParametersWrapper) GeneratedFrom(value *resourceapi.ResourceClassParametersReference) *ClassParametersWrapper { - wrapper.ResourceClassParameters.GeneratedFrom = value - return wrapper -} - -func (wrapper *ClassParametersWrapper) NamedResourcesFilters(driverName string, selectors ...string) *ClassParametersWrapper { - for _, selector := range selectors { - filter := resourceapi.ResourceFilter{ - DriverName: driverName, - ResourceFilterModel: resourceapi.ResourceFilterModel{ - NamedResources: &resourceapi.NamedResourcesFilter{ - Selector: selector, - }, - }, - } - wrapper.Filters = append(wrapper.Filters, filter) - } +func (wrapper *ResourceSliceWrapper) Device(name string, attrs map[resourceapi.QualifiedName]resourceapi.DeviceAttribute) *ResourceSliceWrapper { + wrapper.Spec.Devices = append(wrapper.Spec.Devices, resourceapi.Device{Name: name, Basic: &resourceapi.BasicDevice{Attributes: attrs}}) return wrapper } diff --git a/staging/publishing/import-restrictions.yaml b/staging/publishing/import-restrictions.yaml index ad48080bc8789..79133f0425ab2 100644 --- a/staging/publishing/import-restrictions.yaml +++ b/staging/publishing/import-restrictions.yaml @@ -256,6 +256,7 @@ - k8s.io/apiserver/pkg/cel - k8s.io/apiserver/pkg/cel/environment - k8s.io/client-go + - k8s.io/component-helpers/scheduling/corev1/nodeaffinity - k8s.io/dynamic-resource-allocation - k8s.io/klog - k8s.io/kubelet diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go new file mode 100644 index 0000000000000..161b3be99fd8a --- /dev/null +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator.go @@ -0,0 +1,745 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package structured + +import ( + "context" + "errors" + "fmt" + "math" + "strings" + + v1 "k8s.io/api/core/v1" + resourceapi "k8s.io/api/resource/v1alpha3" + "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/cel/environment" + resourcelisters "k8s.io/client-go/listers/resource/v1alpha3" + "k8s.io/dynamic-resource-allocation/cel" + "k8s.io/klog/v2" +) + +// ClaimLister returns a subset of the claims that a +// resourcelisters.ResourceClaimLister would return. +type ClaimLister interface { + // ListAllAllocated returns only claims which are allocated. + ListAllAllocated() ([]*resourceapi.ResourceClaim, error) +} + +// Allocator calculates how to allocate a set of unallocated claims which use +// structured parameters. +// +// It needs as input the node where the allocated claims are meant to be +// available and the current state of the cluster (claims, classes, resource +// slices). +type Allocator struct { + claimsToAllocate []*resourceapi.ResourceClaim + claimLister ClaimLister + classLister resourcelisters.DeviceClassLister + sliceLister resourcelisters.ResourceSliceLister +} + +// NewAllocator returns an allocator for a certain set of claims or an error if +// some problem was detected which makes it impossible to allocate claims. +func NewAllocator(ctx context.Context, + claimsToAllocate []*resourceapi.ResourceClaim, + claimLister ClaimLister, + classLister resourcelisters.DeviceClassLister, + sliceLister resourcelisters.ResourceSliceLister, +) (*Allocator, error) { + return &Allocator{ + claimsToAllocate: claimsToAllocate, + claimLister: claimLister, + classLister: classLister, + sliceLister: sliceLister, + }, nil +} + +// ClaimsToAllocate returns the claims that the allocated was created for. +func (a *Allocator) ClaimsToAllocate() []*resourceapi.ResourceClaim { + return a.claimsToAllocate +} + +// Allocate calculates the allocation(s) for one particular node. +// +// It returns an error only if some fatal problem occurred. These are errors +// caused by invalid input data, like for example errors in CEL selectors, so a +// scheduler should abort and report that problem instead of trying to find +// other nodes where the error doesn't occur. +// +// In the future, special errors will be defined which enable the caller to +// identify which object (like claim or class) caused the problem. This will +// enable reporting the problem as event for those objects. +// +// If the claims cannot be allocated, it returns nil. This includes the +// situation where the resource slices are incomplete at the moment. +// +// If the claims can be allocated, then it prepares one allocation result for +// each unallocated claim. It is the responsibility of the caller to persist +// those allocations, if desired. +// +// Allocate is thread-safe. If the caller wants to get the node name included +// in log output, it can use contextual logging and add the node as an +// additional value. A name can also be useful because log messages do not +// have a common prefix. V(4) is used for one-time log entries, V(5) for important +// progress reports, and V(6) for detailed debug output. +func (a *Allocator) Allocate(ctx context.Context, node *v1.Node) ([]*resourceapi.AllocationResult, error) { + alloc := &allocator{ + Allocator: a, + ctx: ctx, // all methods share the same a and thus ctx + logger: klog.FromContext(ctx), + deviceMatchesRequest: make(map[matchKey]bool), + constraints: make([][]constraint, len(a.claimsToAllocate)), + requestData: make(map[requestIndices]requestData), + allocated: make(map[DeviceID]bool), + result: make([]*resourceapi.AllocationResult, len(a.claimsToAllocate)), + } + + // First determine all eligible pools. + pools, err := GatherPools(ctx, alloc.sliceLister, node) + if err != nil { + return nil, fmt.Errorf("gather pool information: %w", err) + } + alloc.pools = pools + if loggerV := alloc.logger.V(6); loggerV.Enabled() { + loggerV.Info("Gathered pool information", "numPools", len(pools), "pools", pools) + } else { + alloc.logger.V(4).Info("Gathered pool information", "numPools", len(pools)) + } + + // We allocate one claim after the other and for each claim, all of + // its requests. For each individual device we pick one possible + // candidate after the other, checking constraints as we go. + // Each chosen candidate is marked as "in use" and the process + // continues, recursively. This way, all requests get matched against + // all candidates in all possible orders. + // + // The first full solution is chosen. + // + // In other words, this is an exhaustive search. This is okay because + // it aborts early. Once scoring gets added, more intelligence may be + // needed to avoid trying "equivalent" solutions (two identical + // requests, two identical devices, two solutions that are the same in + // practice). + + // This is where we sanity check that we can actually handle the claims + // and their requests. For each claim we determine how many devices + // need to be allocated. If not all can be stored in the result, the + // claim cannot be allocated. + for claimIndex, claim := range alloc.claimsToAllocate { + numDevices := 0 + + // If we have any any request that wants "all" devices, we need to + // figure out how much "all" is. If some pool is incomplete, we stop + // here because allocation cannot succeed. Once we do scoring, we should + // stop in all cases, not just when "all" devices are needed, because + // pulling from an incomplete might not pick the best solution and it's + // better to wait. This does not matter yet as long the incomplete pool + // has some matching device. + for requestIndex := range claim.Spec.Devices.Requests { + request := &claim.Spec.Devices.Requests[requestIndex] + if request.DeviceClassName == "" { + // Unknown future request type! + return nil, fmt.Errorf("claim %s, request %s: unsupported request type", klog.KObj(claim), request.Name) + } + for i, selector := range request.Selectors { + if selector.CEL == nil { + // Unknown future selector type! + return nil, fmt.Errorf("claim %s, request %s, selector #%d: unsupported selector type", klog.KObj(claim), request.Name, i) + } + } + + // Should be set. If it isn't, something changed and we should refuse to proceed. + if request.DeviceClassName == "" { + return nil, fmt.Errorf("claim %s, request %s: missing device class name", klog.KObj(claim), request.Name) + } + class, err := alloc.classLister.Get(request.DeviceClassName) + if err != nil { + return nil, fmt.Errorf("claim %s, request %s: could not retrieve device class %s: %w", klog.KObj(claim), request.Name, request.DeviceClassName, err) + } + + requestData := requestData{ + class: class, + } + + switch request.CountMode { + case resourceapi.DeviceCountModeExact: + numDevices := request.Count + if numDevices > math.MaxInt { + // Allowed by API validation, but doesn't make sense. + return nil, fmt.Errorf("claim %s, request %s: exact count %d is too large", klog.KObj(claim), request.Name, numDevices) + } + requestData.numDevices = int(numDevices) + case resourceapi.DeviceCountModeAll: + requestData.allDevices = make([]deviceWithID, 0, resourceapi.AllocationResultsMaxSize) + for _, pool := range pools { + if pool.IsIncomplete { + return nil, fmt.Errorf("claim %s, request %s: asks for all devices, but resource pool %s is currently being updated", klog.KObj(claim), request.Name, pool.PoolID) + } + + for _, slice := range pool.Slices { + for deviceIndex := range slice.Spec.Devices { + selectable, err := alloc.isSelectable(requestIndices{claimIndex: claimIndex, requestIndex: requestIndex}, slice, deviceIndex) + if err != nil { + return nil, err + } + if selectable { + requestData.allDevices = append(requestData.allDevices, deviceWithID{device: slice.Spec.Devices[deviceIndex].Basic, DeviceID: DeviceID{Driver: slice.Spec.Driver, Pool: slice.Spec.Pool.Name, Device: slice.Spec.Devices[deviceIndex].Name}}) + } + } + } + } + requestData.numDevices = len(requestData.allDevices) + alloc.logger.V(5).Info("Request for 'all' devices", "claim", klog.KObj(claim), "request", request.Name, "numDevicesPerRequest", requestData.numDevices) + default: + return nil, fmt.Errorf("claim %s, request %s: unsupported count mode %s", klog.KObj(claim), request.Name, request.CountMode) + } + alloc.requestData[requestIndices{claimIndex: claimIndex, requestIndex: requestIndex}] = requestData + numDevices += requestData.numDevices + } + alloc.logger.Info("Checked claim", "claim", klog.KObj(claim), "numDevices", numDevices) + + // Check that we don't end up with too many results. + if numDevices > resourceapi.AllocationResultsMaxSize { + return nil, fmt.Errorf("claim %s: number of requested devices %d exceeds the claim limit of %d", klog.KObj(claim), numDevices, resourceapi.AllocationResultsMaxSize) + } + + // If we don't, then we can pre-allocate the result slices for + // appending the actual results later. + alloc.result[claimIndex] = &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: make([]resourceapi.DeviceRequestAllocationResult, 0, numDevices), + }, + } + + // Constraints are assumed to be monotonic: once a constraint returns + // false, adding more devices will not cause it to return true. This + // allows the search to stop early once a constraint returns false. + var constraints = make([]constraint, len(claim.Spec.Devices.Constraints)) + for i, constraint := range claim.Spec.Devices.Constraints { + switch { + case constraint.MatchAttribute != nil: + logger := alloc.logger + if loggerV := alloc.logger.V(5); loggerV.Enabled() { + logger = klog.LoggerWithName(logger, "matchAttributeConstraint") + logger = klog.LoggerWithValues(logger, "matchAttribute", *constraint.MatchAttribute) + } + m := &matchAttributeConstraint{ + logger: logger, + requestNames: sets.New(constraint.Requests...), + attributeName: *constraint.MatchAttribute, + } + constraints[i] = m + default: + // Unknown constraint type! + return nil, fmt.Errorf("claim %s, constraint #%d: unsupported constraint type", klog.KObj(claim), i) + } + } + alloc.constraints[claimIndex] = constraints + } + + // Selecting a device for a request is independent of what has been + // allocated already. Therefore the result of checking a request against + // a device instance in the pool can be cached. The pointer to both + // can serve as key because they are static for the duration of + // the Allocate call and can be compared in Go. + alloc.deviceMatchesRequest = make(map[matchKey]bool) + + // Some of the existing devices are probably already allocated by + // claims... + claims, err := alloc.claimLister.ListAllAllocated() + numAllocated := 0 + if err != nil { + return nil, fmt.Errorf("list allocated claims: %w", err) + } + for _, claim := range claims { + // Sanity check.. + if claim.Status.Allocation == nil { + continue + } + for _, result := range claim.Status.Allocation.Devices.Results { + deviceID := DeviceID{Driver: result.Driver, Pool: result.Pool, Device: result.Device} + alloc.allocated[deviceID] = true + numAllocated++ + } + } + alloc.logger.V(6).Info("Gathered information about allocated devices", "numAllocated", numAllocated) + + // In practice, there aren't going to be many different CEL + // expressions. Most likely, there is going to be handful of different + // device classes that get used repeatedly. Different requests may all + // use the same selector. Therefore compiling CEL expressions on demand + // could be a useful performance enhancement. It's not implemented yet + // because the key is more complex (just the string?) and the memory + // for both key and cached content is larger than for device matches. + // + // We may also want to cache this in the shared [Allocator] instance, + // which implies adding locking. + + // All errors get created such that they can be returned by Allocate + // without further wrapping. + done, err := alloc.allocateOne(deviceIndices{}) + if err != nil { + return nil, err + } + if errors.Is(err, errStop) || !done { + return nil, nil + } + + // Populate configs. + for claimIndex, allocationResult := range alloc.result { + claim := alloc.claimsToAllocate[claimIndex] + for requestIndex := range claim.Spec.Devices.Requests { + class := alloc.requestData[requestIndices{claimIndex: claimIndex, requestIndex: requestIndex}].class + if class != nil { + for _, config := range class.Spec.Config { + allocationResult.Devices.Config = append(allocationResult.Devices.Config, resourceapi.DeviceAllocationConfiguration{ + Source: resourceapi.AllocationConfigSourceClass, + Requests: nil, // All of them... + DeviceConfiguration: config.DeviceConfiguration, + }) + } + } + } + for _, config := range claim.Spec.Devices.Config { + allocationResult.Devices.Config = append(allocationResult.Devices.Config, resourceapi.DeviceAllocationConfiguration{ + Source: resourceapi.AllocationConfigSourceClaim, + Requests: config.Requests, + DeviceConfiguration: config.DeviceConfiguration, + }) + } + } + + return alloc.result, nil +} + +// errStop is a special error that gets returned by allocateOne if it detects +// that allocation cannot succeed. +var errStop = errors.New("stop allocation") + +// allocator is used while an [Allocator.Allocate] is running. Only a single +// goroutine works with it, so there is no need for locking. +type allocator struct { + *Allocator + ctx context.Context + logger klog.Logger + pools []*Pool + deviceMatchesRequest map[matchKey]bool + constraints [][]constraint // one list of constraints per claim + requestData map[requestIndices]requestData // one entry per request + allocated map[DeviceID]bool + skippedUnknownDevice bool + result []*resourceapi.AllocationResult +} + +// matchKey identifies a device/request pair. +type matchKey struct { + DeviceID + requestIndices +} + +// requestIndices identifies one specific request by its +// claim and request index. +type requestIndices struct { + claimIndex, requestIndex int +} + +// deviceIndices identifies one specific required device inside +// a request of a certain claim. +type deviceIndices struct { + claimIndex, requestIndex, deviceIndex int +} + +type requestData struct { + class *resourceapi.DeviceClass + numDevices int + + // pre-determined set of devices for allocating "all" devices + allDevices []deviceWithID +} + +type deviceWithID struct { + DeviceID + device *resourceapi.BasicDevice +} + +type constraint interface { + // add is called whenever a device is about to be allocated. It must + // check whether the device matches the constraint and if yes, + // track that it is allocated. + add(requestName string, device *resourceapi.BasicDevice, deviceID DeviceID) bool + + // For every successful add there is exactly one matching removed call + // with the exact same parameters. + remove(requestName string, device *resourceapi.BasicDevice, deviceID DeviceID) +} + +// matchAttributeConstraint compares an attribute value across devices. +// All devices must share the same value. When the set of devices is +// empty, any device that has the attribute can be added. After that, +// only matching devices can be added. +// +// We don't need to track *which* devices are part of the set, only +// how many. +type matchAttributeConstraint struct { + logger klog.Logger // Includes name and attribute name, so no need to repeat in log messages. + requestNames sets.Set[string] + attributeName resourceapi.FullyQualifiedName + + attribute *resourceapi.DeviceAttribute + numDevices int +} + +func (m *matchAttributeConstraint) add(requestName string, device *resourceapi.BasicDevice, deviceID DeviceID) bool { + if m.requestNames.Len() > 0 && !m.requestNames.Has(requestName) { + // Device not affected by constraint. + m.logger.V(6).Info("Constraint does not apply to request", "request", requestName) + return true + } + + attribute := lookupAttribute(device, deviceID, m.attributeName) + if attribute == nil { + // Doesn't have the attribute. + m.logger.V(6).Info("Constraint not satisfied, attribute not set") + return false + } + + if m.numDevices == 0 { + // The first device can always get picked. + m.attribute = attribute + m.numDevices = 1 + m.logger.V(6).Info("First in set") + return true + } + + switch { + case attribute.StringValue != nil: + if m.attribute.StringValue == nil || *attribute.StringValue != *m.attribute.StringValue { + m.logger.V(6).Info("String values different") + return false + } + case attribute.IntValue != nil: + if m.attribute.IntValue == nil || *attribute.IntValue != *m.attribute.IntValue { + m.logger.V(6).Info("Int values different") + return false + } + case attribute.BoolValue != nil: + if m.attribute.BoolValue == nil || *attribute.BoolValue != *m.attribute.BoolValue { + m.logger.V(6).Info("Bool values different") + return false + } + case attribute.VersionValue != nil: + // semver 2.0.0 requires that version strings are in their + // minimal form (in particular, no leading zeros). Therefore a + // strict "exact equal" check can do a string comparison. + if m.attribute.VersionValue == nil || *attribute.VersionValue != *m.attribute.VersionValue { + m.logger.V(6).Info("Version values different") + return false + } + default: + // Unknown value type, cannot match. + m.logger.V(6).Info("Match attribute type unknown") + return false + } + + m.numDevices++ + m.logger.V(6).Info("Constraint satisfied by device", "device", deviceID, "numDevices", m.numDevices) + return true +} + +func (m *matchAttributeConstraint) remove(requestName string, device *resourceapi.BasicDevice, deviceID DeviceID) { + if m.requestNames.Len() > 0 && !m.requestNames.Has(requestName) { + // Device not affected by constraint. + return + } + + m.numDevices-- + m.logger.V(6).Info("Device removed from constraint set", "device", deviceID, "numDevices", m.numDevices) +} + +func lookupAttribute(device *resourceapi.BasicDevice, deviceID DeviceID, attributeName resourceapi.FullyQualifiedName) *resourceapi.DeviceAttribute { + // Fully-qualified match? + if attr, ok := device.Attributes[resourceapi.QualifiedName(attributeName)]; ok { + return &attr + } + index := strings.Index(string(attributeName), "/") + if index < 0 { + // Should not happen for a valid fully qualified name. + return nil + } + + if string(attributeName[0:index]) != deviceID.Driver { + // Not an attribute of the driver and not found above, + // so it is not available. + return nil + } + + // Domain matches the driver, so let's check just the ID. + if attr, ok := device.Attributes[resourceapi.QualifiedName(attributeName[index+1:])]; ok { + return &attr + } + + return nil +} + +// allocateOne iterates over all eligible devices (not in use, match selector, +// satisfy constraints) for a specific required device. It returns true if +// everything got allocated, an error if allocation needs to stop. +func (alloc *allocator) allocateOne(r deviceIndices) (bool, error) { + if r.claimIndex >= len(alloc.claimsToAllocate) { + // Done! If we were doing scoring, we would compare the current allocation result + // against the previous one, keep the best, and continue. Without scoring, we stop + // and use the first solution. + alloc.logger.V(4).Info("Allocation result found") + return true, nil + } + + claim := alloc.claimsToAllocate[r.claimIndex] + if r.requestIndex >= len(claim.Spec.Devices.Requests) { + // Done with the claim, continue with the next one. + return alloc.allocateOne(deviceIndices{claimIndex: r.claimIndex + 1}) + } + + // We already know how many devices per request are needed. + // Ready to move on to the next request? + requestData := alloc.requestData[requestIndices{claimIndex: r.claimIndex, requestIndex: r.requestIndex}] + if r.deviceIndex >= requestData.numDevices { + return alloc.allocateOne(deviceIndices{claimIndex: r.claimIndex, requestIndex: r.requestIndex + 1}) + } + + request := &alloc.claimsToAllocate[r.claimIndex].Spec.Devices.Requests[r.requestIndex] + doAllDevices := request.CountMode == resourceapi.DeviceCountModeAll + alloc.logger.V(5).Info("Allocating one device", "currentClaim", r.claimIndex, "totalClaims", len(alloc.claimsToAllocate), "currentRequest", r.requestIndex, "totalRequestsPerClaim", len(claim.Spec.Devices.Requests), "currentDevice", r.deviceIndex, "devicesPerRequest", requestData.numDevices, "allDevices", doAllDevices, "adminAccess", request.AdminAccess) + + if doAllDevices { + // For "all" devices we already know which ones we need. We + // just need to check whether we can use them. + deviceWithID := requestData.allDevices[r.deviceIndex] + _, _, err := alloc.allocateDevice(r, deviceWithID.device, deviceWithID.DeviceID, true) + if err != nil { + return false, err + } + done, err := alloc.allocateOne(deviceIndices{claimIndex: r.claimIndex, requestIndex: r.requestIndex, deviceIndex: r.deviceIndex + 1}) + if err != nil { + return false, err + } + + // The order in which we allocate "all" devices doesn't matter, + // so we only try with the one which was up next. If we couldn't + // get all of them, then there is no solution and we have to stop. + if !done { + return false, errStop + } + return done, nil + } + + // We need to find suitable devices. + for _, pool := range alloc.pools { + for _, slice := range pool.Slices { + for deviceIndex := range slice.Spec.Devices { + deviceID := DeviceID{Driver: pool.Driver, Pool: pool.Pool, Device: slice.Spec.Devices[deviceIndex].Name} + + // Checking for "in use" is cheap and thus gets done first. + if !request.AdminAccess && alloc.allocated[deviceID] { + alloc.logger.V(6).Info("Device in use", "device", deviceID) + continue + } + + // Next check selectors. + selectable, err := alloc.isSelectable(requestIndices{claimIndex: r.claimIndex, requestIndex: r.requestIndex}, slice, deviceIndex) + if err != nil { + return false, err + } + if !selectable { + alloc.logger.V(6).Info("Device not selectable", "device", deviceID) + continue + } + + // Finally treat as allocated and move on to the next device. + allocated, deallocate, err := alloc.allocateDevice(r, slice.Spec.Devices[deviceIndex].Basic, deviceID, false) + if err != nil { + return false, err + } + if !allocated { + // In use or constraint violated... + alloc.logger.V(6).Info("Device not usable", "device", deviceID) + continue + } + done, err := alloc.allocateOne(deviceIndices{claimIndex: r.claimIndex, requestIndex: r.requestIndex, deviceIndex: r.deviceIndex + 1}) + if err != nil { + return false, err + } + + // If we found a solution, then we can stop. + if done { + return done, nil + } + + // Otherwise try some other device after rolling back. + deallocate() + } + } + } + + // If we get here without finding a solution, then there is none. + return false, nil +} + +// isSelectable checks whether a device satisfies the request and class selectors. +func (alloc *allocator) isSelectable(r requestIndices, slice *resourceapi.ResourceSlice, deviceIndex int) (bool, error) { + // This is the only supported device type at the moment. + device := slice.Spec.Devices[deviceIndex].Basic + if device == nil { + // Must be some future, unknown device type. We cannot select it. + // If we don't find anything else, then this will get reported + // in the final result, so remember that we skipped some device. + alloc.skippedUnknownDevice = true + return false, nil + } + + deviceID := DeviceID{Driver: slice.Spec.Driver, Pool: slice.Spec.Pool.Name, Device: slice.Spec.Devices[deviceIndex].Name} + matchKey := matchKey{DeviceID: deviceID, requestIndices: r} + if matches, ok := alloc.deviceMatchesRequest[matchKey]; ok { + // No need to check again. + return matches, nil + } + + requestData := alloc.requestData[r] + if requestData.class != nil { + match, err := alloc.selectorsMatch(r, device, deviceID, requestData.class, requestData.class.Spec.Selectors) + if err != nil { + return false, err + } + if !match { + alloc.deviceMatchesRequest[matchKey] = false + return false, nil + } + } + + request := &alloc.claimsToAllocate[r.claimIndex].Spec.Devices.Requests[r.requestIndex] + match, err := alloc.selectorsMatch(r, device, deviceID, nil, request.Selectors) + if err != nil { + return false, err + } + if !match { + alloc.deviceMatchesRequest[matchKey] = false + return false, nil + } + + alloc.deviceMatchesRequest[matchKey] = true + return true, nil + +} + +func (alloc *allocator) selectorsMatch(r requestIndices, device *resourceapi.BasicDevice, deviceID DeviceID, class *resourceapi.DeviceClass, selectors []resourceapi.DeviceSelector) (bool, error) { + for i, selector := range selectors { + expr := cel.Compiler.CompileCELExpression(selector.CEL.Expression, environment.StoredExpressions) + if expr.Error != nil { + // Could happen if some future apiserver accepted some + // future expression and then got downgraded. Normally + // the "stored expression" mechanism prevents that, but + // this code here might be more than one release older + // than the cluster it runs in. + if class != nil { + return false, fmt.Errorf("class %s: selector #%d: CEL compile error: %w", class.Name, i, expr.Error) + } + return false, fmt.Errorf("claim %s: selector #%d: CEL compile error: %w", klog.KObj(alloc.claimsToAllocate[r.claimIndex]), i, expr.Error) + } + + matches, err := expr.DeviceMatches(alloc.ctx, cel.Device{Driver: deviceID.Driver, Attributes: device.Attributes, Capacity: device.Capacity}) + if class != nil { + alloc.logger.V(6).Info("CEL result", "device", deviceID, "class", klog.KObj(class), "selector", i, "expression", selector.CEL.Expression, "matches", matches, "err", err) + } else { + alloc.logger.V(6).Info("CEL result", "device", deviceID, "claim", klog.KObj(alloc.claimsToAllocate[r.claimIndex]), "selector", i, "expression", selector.CEL.Expression, "matches", matches, "err", err) + } + + if err != nil { + // TODO (future): more detailed errors which reference class resp. claim. + if class != nil { + return false, fmt.Errorf("class %s: selector #%d: CEL runtime error: %w", class.Name, i, err) + } + return false, fmt.Errorf("claim %s: selector #%d: CEL runtime error: %w", klog.KObj(alloc.claimsToAllocate[r.claimIndex]), i, err) + } + if !matches { + return false, nil + } + } + + // All of them match. + return true, nil +} + +// allocateDevice checks device availability and constraints for one +// candidate. The device must be selectable. +// +// If that candidate works out okay, the shared state gets updated +// as if that candidate had been allocated. If allocation cannot continue later +// and must try something else, then the rollback function can be invoked to +// restore the previous state. +func (alloc *allocator) allocateDevice(r deviceIndices, device *resourceapi.BasicDevice, deviceID DeviceID, must bool) (bool, func(), error) { + claim := alloc.claimsToAllocate[r.claimIndex] + request := &claim.Spec.Devices.Requests[r.requestIndex] + adminAccess := request.AdminAccess + if !adminAccess && alloc.allocated[deviceID] { + alloc.logger.V(6).Info("Device in use", "device", deviceID) + return false, nil, nil + } + + // It's available. Now check constraints. + for i, constraint := range alloc.constraints[r.claimIndex] { + added := constraint.add(request.Name, device, deviceID) + if !added { + if must { + // It does not make sense to declare a claim where a constraint prevents getting + // all devices. Treat this as an error. + return false, nil, fmt.Errorf("claim %s, request %s: cannot add device %s because a claim constraint would not be satisfied", klog.KObj(claim), request.Name, deviceID) + } + + // Roll back for all previous constraints before we return. + for e := 0; e < i; e++ { + alloc.constraints[r.claimIndex][e].remove(request.Name, device, deviceID) + } + return false, nil, nil + } + } + + // All constraints satisfied. Mark as in use (unless we do admin access) + // and record the result. + alloc.logger.V(6).Info("Device allocated", "device", deviceID) + if !adminAccess { + alloc.allocated[deviceID] = true + } + result := resourceapi.DeviceRequestAllocationResult{ + Request: request.Name, + Driver: deviceID.Driver, + Pool: deviceID.Pool, + Device: deviceID.Device, + } + previousNumResults := len(alloc.result[r.claimIndex].Devices.Results) + alloc.result[r.claimIndex].Devices.Results = append(alloc.result[r.claimIndex].Devices.Results, result) + + return true, func() { + for _, constraint := range alloc.constraints[r.claimIndex] { + constraint.remove(request.Name, device, deviceID) + } + if !adminAccess { + alloc.allocated[deviceID] = false + } + // Truncate, but keep the underlying slice. + alloc.result[r.claimIndex].Devices.Results = alloc.result[r.claimIndex].Devices.Results[:previousNumResults] + alloc.logger.V(6).Info("Device deallocated", "device", deviceID) + }, nil +} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go new file mode 100644 index 0000000000000..7538651ed164d --- /dev/null +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go @@ -0,0 +1,1177 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package structured + +import ( + "errors" + "flag" + "testing" + + "github.com/onsi/gomega" + "github.com/onsi/gomega/types" + + v1 "k8s.io/api/core/v1" + resourceapi "k8s.io/api/resource/v1alpha3" + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2/ktesting" + "sigs.k8s.io/yaml" +) + +func init() { + ktesting.DefaultConfig.AddFlags(flag.CommandLine) +} + +func TestAllocator(t *testing.T) { + // Class with DeviceClassSpec.SuitableNodes selector. + driverA := "driver-a" + driverAClass := &resourceapi.DeviceClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: driverA, + }, + Spec: resourceapi.DeviceClassSpec{ + Selectors: []resourceapi.DeviceSelector{ + { + CEL: &resourceapi.CELDeviceSelector{ + Expression: `device.driver == "driver-a"`, + }, + }, + }, + SuitableNodes: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "region", + Operator: v1.NodeSelectorOpIn, + Values: []string{"west", "east"}, + }, + }, + }, + }, + }, + }, + } + + driverAClassWithConfig := &resourceapi.DeviceClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: driverA, + }, + Spec: resourceapi.DeviceClassSpec{ + Config: []resourceapi.DeviceClassConfiguration{ + { + DeviceConfiguration: resourceapi.DeviceConfiguration{ + Opaque: &resourceapi.OpaqueDeviceConfiguration{ + Driver: driverA, + Parameters: runtime.RawExtension{ + Raw: []byte(`{"classAttribute":"classAttributeValue"}`), + }, + }, + }, + }, + }, + Selectors: []resourceapi.DeviceSelector{ + { + CEL: &resourceapi.CELDeviceSelector{ + Expression: `device.driver == "driver-a"`, + }, + }, + }, + SuitableNodes: &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "region", + Operator: v1.NodeSelectorOpIn, + Values: []string{"west", "east"}, + }, + }, + }, + }, + }, + }, + } + + // Class without DeviceClassSpec.SuitableNodes selector. + driverB := "driver-b" + driverBClass := &resourceapi.DeviceClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: driverB, + }, + Spec: resourceapi.DeviceClassSpec{ + Selectors: []resourceapi.DeviceSelector{ + { + CEL: &resourceapi.CELDeviceSelector{ + Expression: `device.driver == "driver-b"`, + }, + }, + }, + }, + } + // device1 := "device-1" + // device2 := "device-2" + // driverVersion := "driverVersion" + // memory := "memory" + // oneGig := resource.NewQuantity(1024*1024, resource.BinarySI) + // numa := "numa" + // numa1 := ptr.To(int64(1)) + // numa2 := ptr.To(int64(2)) + node1 := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "worker-1", + Labels: map[string]string{ + "region": "west", + }, + }, + } + node2 := &v1.Node{ + ObjectMeta: metav1.ObjectMeta{ + Name: "worker-2", + Labels: map[string]string{ + "region": "east", + }, + }, + } + // regionWest := v1.NodeSelector{ + // NodeSelectorTerms: []v1.NodeSelectorTerm{{ + // MatchExpressions: []v1.NodeSelectorRequirement{{ + // Key: "region", + // Operator: v1.NodeSelectorOpIn, + // Values: []string{"west"}, + // }}, + // }}, + // } + // TODO: use Go to define objects or YAML? + // + // Go is very verbose, but surfaces errors at compile time. + // YAML is more compact and supports global search/replace + // to produce new objects that are derived from others. + // + // node1Slice := &resourceapi.ResourceSlice{ + // ObjectMeta: metav1.ObjectMeta{ + // Name: "node1Slice", + // }, + // Spec: resourceapi.ResourceSliceSpec{ + // NodeName: node1.Name, + // Driver: driverA, + // Pool: resourceapi.ResourcePool{ + // Name: node1.Name, + // ResourceSliceCount: 1, + // }, + // Devices: []resourceapi.Device{ + // { + // Name: device1, + // Attributes: []resourceapi.DeviceAttribute{ + // { + // Name: driverVersion, + // VersionValue: ptr.To("1.0.0"), + // }, + // { + // Name: numa, + // IntValue: numa1, + // }, + // }, + // Capacities: []resourceapi.DeviceCapacity{ + // { + // Name: memory, + // Quantity: oneGig, + // }, + // }, + // }, + // }, + // }, + // } + + // Slices + + node1slice := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-1-slice +spec: + nodeName: worker-1 + driver: driver-a + pool: + name: worker-1 + resourceSliceCount: 2 + generation: 2 + devices: + - name: device-1 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + stringAttribute: + string: stringAttributeValue + boolAttribute: + bool: true + capacity: + memory: 1Gi # small + - name: device-2 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + stringAttribute: + string: stringAttributeValue + boolAttribute: + bool: true + capacity: + memory: 2Gi # large +`) + + // Second slice on the same node, with different device names + // and attributes. + node1slice2 := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-1-2-slice +spec: + nodeName: worker-1 + driver: driver-a + pool: + name: worker-1 + generation: 2 # recent pool generation with 2 slices and 4 devices + resourceSliceCount: 1 + devices: + - name: device-5 + basic: + attributes: + driverVersion: + version: 2.0.0 + numa: + int: 2 + stringAttribute: + string: stringAttributeValue2 + boolAttribute: + bool: false + capacity: + memory: 1Gi # small + - name: device-6 + basic: + attributes: + driverVersion: + version: 2.0.0 + numa: + int: 2 + stringAttribute: + string: stringAttributeValue2 + boolAttribute: + bool: false + capacity: + memory: 2Gi # large +`) + + node1ObsoleteSlice := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-1-obsolete-slice +spec: + nodeName: worker-1 + driver: driver-a + pool: + name: worker-1 + generation: 1 + resourceSliceCount: 1 + devices: + - name: device-1 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 1Gi # small +`) + + node1IncompletePoolSlice := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-1-incomplete-slice +spec: + nodeName: worker-1 + driver: driver-a + pool: + name: worker-1 + generation: 2 + resourceSliceCount: 2 + devices: + - name: device-1 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 1Gi # small +`) + + networkAttachedSliceWest := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-1-slice +spec: + driver: driver-a + pool: + name: worker-1 + resourceSliceCount: 2 + generation: 2 + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: region + operator: In + values: [west] + devices: + - name: device-1 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 1Gi # small + - name: device-2 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 2Gi # large +`) + + networkAttachedSliceEast := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-2-slice +spec: + driver: driver-b + pool: + name: worker-2 + resourceSliceCount: 2 + generation: 2 + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: region + operator: In + values: [east] + devices: + - name: device-1 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 1Gi # small + - name: device-2 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 2Gi # large +`) + + node1DriverBslice := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-1-driverB-slice +spec: + nodeName: worker-1 + driver: driver-b + pool: + name: worker-1 + generation: 1 + resourceSliceCount: 1 + devices: + - name: device-1 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 1Gi # small + - name: device-2 + basic: + attributes: + driverVersion: + version: 1.0.0 + numa: + int: 1 + capacity: + memory: 2Gi # large +`) + + node2slice := unmarshal[resourceapi.ResourceSlice](t, ` +metadata: + name: worker-2-slice +spec: + nodeName: worker-2 + driver: driver-a + pool: + name: worker-2 + resourceSliceCount: 1 + devices: + - name: device-3 + basic: + attributes: + driverVersion: + version: 2.0.0 + numa: + int: 1 + capacity: + memory: 1Gi # small + - name: device-4 + basic: + attributes: + driverVersion: + version: 2.0.0 + numa: + int: 1 + capacity: + memory: 2Gi # large +`) + + // Claims + + simpleClaim := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: driver-a +`) + + simpleClaimDriverB := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: driver-b +`) + + simpleClaimWithConfig := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: driver-a + config: + - opaque: + driver: driver-a + parameters: {"deviceAttribute":"deviceAttributeValue"} +`) + + simpleClaimWithUnknownClassName := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: unknown-class +`) + + simpleClaimWithEmptyClassName := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: "" +`) + + allocatedSimpleClaim := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-1 +`) + + allocatedSimpleClaimWithClassConfig := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-1 + config: + - source: FromClass + opaque: + driver: driver-a + parameters: + classAttribute: classAttributeValue +`) + + allocatedSimpleClaimWithClaimConfig := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-1 + config: + - source: FromClaim + opaque: + driver: driver-a + parameters: + deviceAttribute: deviceAttributeValue +`) + + allocatedSimpleClaimDriverB := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-b + pool: worker-2 + device: device-1 +`) + + allocatedSimpleClaimDriverBWorker1 := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-b + pool: worker-1 + device: device-1 +`) + + allocatedSimpleClaimNode2 := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-a + pool: worker-2 + device: device-3 +`) + + allocated2DeviceClaim := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-5 + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-6 +`) + + allocatedClaim := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 2 + deviceClassName: driver-a +status: + allocation: + devices: + results: + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-1 + - request: req-1 + driver: driver-a + pool: worker-1 + device: device-2 +`) + + twoDeviceClaim := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: driver-a + selectors: + - cel: + # small + expression: device.capacity["driver-a"].memory.compareTo(quantity("1Gi")) >= 0 + - name: req-1 + countMode: Exact + count: 1 + deviceClassName: driver-a + selectors: + - cel: + # large + expression: device.capacity["driver-a"].memory.compareTo(quantity("2Gi")) >= 0 +`) + + twoDeviceClaimWithConstraint := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: driver-a + - name: req-1 + countMode: Exact + count: 1 + deviceClassName: driver-a + constraints: + - matchAttribute: numa + - matchAttribute: driverVersion + - matchAttribute: stringAttribute + - matchAttribute: boolAttribute +`) + + claimWithConstraintNotMatchingIntAttribute := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 3 + deviceClassName: driver-a + constraints: + - matchAttribute: numa +`) + + claimWithConstraintNotMatchingVersionAttribute := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 3 + deviceClassName: driver-a + constraints: + - matchAttribute: driverVersion +`) + + claimWithConstraintNotMatchingStringAttribute := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 3 + deviceClassName: driver-a + constraints: + - matchAttribute: stringAttribute +`) + + claimWithConstraintNotMatchingBoolAttribute := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 3 + deviceClassName: driver-a + constraints: + - matchAttribute: boolAttribute +`) + + fourDeviceClaim := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 2 + deviceClassName: driver-a + selectors: + - cel: + # small + expression: device.capacity["driver-a"].memory.compareTo(quantity("1Gi")) >= 0 + - name: req-1 + countMode: Exact + count: 2 + deviceClassName: driver-a + selectors: + - cel: + # large + expression: device.capacity["driver-a"].memory.compareTo(quantity("2Gi")) >= 0 +`) + + allDeviceClaim := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: All + deviceClassName: driver-a + selectors: + - cel: + # small + expression: device.capacity["driver-a"].memory.compareTo(quantity("1Gi")) >= 0 +`) + + simpleClaimWithConstraintNonExistentAttribute := unmarshal[resourceapi.ResourceClaim](t, ` +metadata: + name: claim +spec: + devices: + requests: + - name: req-0 + countMode: Exact + count: 1 + deviceClassName: driver-a + constraints: + - matchAttribute: NonExistentAttribute +`) + + allocatedTwoDeviceClaim := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-1 + - request: req-1 + driver: driver-a + pool: worker-1 + device: device-2 +`) + + allocatedFourDeviceClaim := unmarshal[resourceapi.AllocationResult](t, ` +devices: + results: + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-1 + - request: req-0 + driver: driver-a + pool: worker-1 + device: device-5 + - request: req-1 + driver: driver-a + pool: worker-1 + device: device-2 + - request: req-1 + driver: driver-a + pool: worker-1 + device: device-6 +`) + + testcases := map[string]struct { + claimsToAllocate []*resourceapi.ResourceClaim + allocatedClaims []*resourceapi.ResourceClaim + classes []*resourceapi.DeviceClass + slices []*resourceapi.ResourceSlice + node *v1.Node + + expectResults []any + expectError types.GomegaMatcher // can be used to check for no error or match specific error types + }{ + + "empty": {}, + "simple": { + claimsToAllocate: objects(simpleClaim), + classes: objects(driverAClass), + slices: objects(node1slice, node2slice), + node: node1, + + expectResults: []any{allocatedSimpleClaim}, + }, + "other-node": { + claimsToAllocate: objects(simpleClaim), + classes: objects(driverAClass), + slices: objects(node1slice, node2slice), + node: node2, + + expectResults: []any{allocatedSimpleClaimNode2}, + }, + "small-and-large": { + claimsToAllocate: objects(twoDeviceClaim), + classes: objects(driverAClass), + slices: objects(node1slice, node2slice), + node: node1, + + expectResults: []any{allocatedTwoDeviceClaim}, + }, + "small-and-large-backtrack": { + claimsToAllocate: objects(twoDeviceClaim), + classes: objects(driverAClass), + // Reversing the order in which the devices are listed causes the "large" device to + // be allocated for the "small" request, leaving the "large" request unsatisfied. + // The initial decision needs to be undone before a solution is found. + slices: objects(func() *resourceapi.ResourceSlice { + slice := node1slice.DeepCopy() + slice.Spec.Devices[0], slice.Spec.Devices[1] = slice.Spec.Devices[1], slice.Spec.Devices[0] + return slice + }()), + node: node1, + + expectResults: []any{allocatedTwoDeviceClaim}, + }, + "devices-split-across-different-slices": { + claimsToAllocate: objects(fourDeviceClaim), + classes: objects(driverAClass), + slices: objects(node1slice, node1slice2), + node: node1, + + expectResults: []any{allocatedFourDeviceClaim}, + }, + "obsolete-slice": { + claimsToAllocate: objects(simpleClaim), + classes: objects(driverAClass), + slices: objects(node1ObsoleteSlice, node1slice), + node: node1, + + expectResults: []any{allocatedSimpleClaim}, + }, + "no-slices": { + claimsToAllocate: objects(simpleClaim), + classes: objects(driverAClass), + slices: nil, + node: node1, + + expectResults: nil, + }, + "not-enough-suitable-devices": { + claimsToAllocate: objects(fourDeviceClaim), + classes: objects(driverAClass), + slices: objects(node1slice), + node: node1, + + expectResults: nil, + }, + "no-classes": { + claimsToAllocate: objects(simpleClaim), + classes: nil, + slices: objects(node1slice), + node: node1, + + expectResults: nil, + expectError: gomega.MatchError(gomega.ContainSubstring("could not retrieve device class driver-a")), + }, + "unknown-class": { + claimsToAllocate: objects(simpleClaimWithUnknownClassName), + classes: objects(driverAClass, driverBClass), + slices: objects(node1slice, node1DriverBslice), + node: node1, + + expectResults: nil, + expectError: gomega.MatchError(gomega.ContainSubstring("could not retrieve device class unknown-class")), + }, + "empty-class": { + claimsToAllocate: objects(simpleClaimWithEmptyClassName), + classes: objects(driverAClass, driverBClass), + slices: objects(node1slice, node1DriverBslice), + node: node1, + + expectResults: nil, + expectError: gomega.MatchError(gomega.ContainSubstring("claim claim, request req-0: unsupported request type")), + }, + "no-claims-to-allocate": { + claimsToAllocate: nil, + classes: objects(driverAClass), + slices: objects(node1slice), + node: node1, + + expectResults: nil, + }, + "all-devices": { + claimsToAllocate: objects(allDeviceClaim), + classes: objects(driverAClass), + slices: objects(node1slice2), + node: node1, + + expectResults: []any{allocated2DeviceClaim}, + }, + "all-devices-of-the-incomplete-pool": { + claimsToAllocate: objects(allDeviceClaim), + classes: objects(driverAClass), + slices: objects(node1IncompletePoolSlice), + node: node1, + + expectResults: nil, + expectError: gomega.MatchError(gomega.ContainSubstring("claim claim, request req-0: asks for all devices, but resource pool driver-a/worker-1 is currently being updated")), + }, + "network-attached-device-with-class.SuitableNodes": { + claimsToAllocate: objects(simpleClaim), + classes: objects(driverAClass), + slices: objects(networkAttachedSliceWest), + node: node1, + + expectResults: []any{allocatedSimpleClaim}, + }, + "network-attached-device-without-class.SuitableNodes": { + claimsToAllocate: objects(simpleClaimDriverB), + classes: objects(driverBClass), + slices: objects(networkAttachedSliceEast), + node: node2, + + expectResults: []any{allocatedSimpleClaimDriverB}, + }, + "unsuccessful-allocation-network-attached-device-with-class.SuitableNodes": { + claimsToAllocate: objects(simpleClaim), + classes: objects(driverAClass), + slices: objects(networkAttachedSliceEast), + node: node1, + + expectResults: nil, + }, + "unsuccessful-allocation-network-attached-device-without-class.SuitableNodes": { + claimsToAllocate: objects(simpleClaimDriverB), + classes: objects(driverBClass), + slices: objects(networkAttachedSliceWest), + node: node2, + + expectResults: nil, + }, + "several-different-drivers": { + claimsToAllocate: objects(simpleClaim, simpleClaimDriverB), + classes: objects(driverAClass, driverBClass), + slices: objects(node1slice, node1DriverBslice), + node: node1, + + expectResults: []any{allocatedSimpleClaim, allocatedSimpleClaimDriverBWorker1}, + }, + "already-allocated-devices": { + claimsToAllocate: objects(simpleClaim), + allocatedClaims: objects(allocatedClaim), + classes: objects(driverAClass), + slices: objects(node1slice), + node: node1, + + expectResults: nil, + }, + "with-constraint": { + claimsToAllocate: objects(twoDeviceClaimWithConstraint), + classes: objects(driverAClass), + slices: objects(node1slice), + node: node1, + + expectResults: []any{allocatedTwoDeviceClaim}, + }, + "with-constraint-non-existent-attribute": { + claimsToAllocate: objects(simpleClaimWithConstraintNonExistentAttribute), + classes: objects(driverAClass), + slices: objects(node1slice), + node: node1, + + expectResults: nil, + }, + "with-constraint-not-matching-int-attribute": { + claimsToAllocate: objects(claimWithConstraintNotMatchingIntAttribute), + classes: objects(driverAClass, driverBClass), + slices: objects(node1slice, node1slice2), + node: node1, + + expectResults: nil, + }, + "with-constraint-not-matching-version-attribute": { + claimsToAllocate: objects(claimWithConstraintNotMatchingVersionAttribute), + classes: objects(driverAClass, driverBClass), + slices: objects(node1slice, node1slice2), + node: node1, + + expectResults: nil, + }, + "with-constraint-not-matching-string-attribute": { + claimsToAllocate: objects(claimWithConstraintNotMatchingStringAttribute), + classes: objects(driverAClass, driverBClass), + slices: objects(node1slice, node1slice2), + node: node1, + + expectResults: nil, + }, + "with-constraint-not-matching-bool-attribute": { + claimsToAllocate: objects(claimWithConstraintNotMatchingBoolAttribute), + classes: objects(driverAClass, driverBClass), + slices: objects(node1slice, node1slice2), + node: node1, + + expectResults: nil, + }, + "with-class-device-config": { + claimsToAllocate: objects(simpleClaim), + classes: objects(driverAClassWithConfig), + slices: objects(node1slice), + node: node1, + + expectResults: []any{allocatedSimpleClaimWithClassConfig}, + }, + "with-claim-device-config": { + claimsToAllocate: objects(simpleClaimWithConfig), + classes: objects(driverAClass), + slices: objects(node1slice), + node: node1, + + expectResults: []any{allocatedSimpleClaimWithClaimConfig}, + }, + } + + for name, tc := range testcases { + t.Run(name, func(t *testing.T) { + _, ctx := ktesting.NewTestContext(t) + g := gomega.NewWithT(t) + + // Listing objects is deterministic and returns them in the same + // order as in the test case. That makes the allocation result + // also deterministic. + var allocated, toAllocate claimLister + var classLister informerLister[resourceapi.DeviceClass] + var sliceLister informerLister[resourceapi.ResourceSlice] + for _, claim := range tc.claimsToAllocate { + toAllocate.claims = append(toAllocate.claims, claim.DeepCopy()) + } + for _, claim := range tc.allocatedClaims { + allocated.claims = append(allocated.claims, claim.DeepCopy()) + } + for _, slice := range tc.slices { + sliceLister.objs = append(sliceLister.objs, slice.DeepCopy()) + } + for _, class := range tc.classes { + classLister.objs = append(classLister.objs, class.DeepCopy()) + } + + allocator, err := NewAllocator(ctx, toAllocate.claims, allocated, classLister, sliceLister) + g.Expect(err).ToNot(gomega.HaveOccurred()) + + results, err := allocator.Allocate(ctx, tc.node) + matchError := tc.expectError + if matchError == nil { + matchError = gomega.Not(gomega.HaveOccurred()) + } + g.Expect(err).To(matchError) + g.Expect(results).To(gomega.HaveExactElements(tc.expectResults...)) + + // Objects that the allocator had access to should not have been modified. + g.Expect(toAllocate.claims).To(gomega.HaveExactElements(tc.claimsToAllocate)) + g.Expect(allocated.claims).To(gomega.HaveExactElements(tc.allocatedClaims)) + g.Expect(sliceLister.objs).To(gomega.ConsistOf(tc.slices)) + g.Expect(classLister.objs).To(gomega.ConsistOf(tc.classes)) + }) + } +} + +type claimLister struct { + claims []*resourceapi.ResourceClaim + err error +} + +func (l claimLister) ListAllAllocated() ([]*resourceapi.ResourceClaim, error) { + return l.claims, l.err +} + +type informerLister[T any] struct { + objs []*T + err error +} + +func (l informerLister[T]) List(selector labels.Selector) (ret []*T, err error) { + if selector.String() != labels.Everything().String() { + return nil, errors.New("labels selector not implemented") + } + return l.objs, l.err +} + +func (l informerLister[T]) Get(name string) (*T, error) { + for _, obj := range l.objs { + accessor, err := meta.Accessor(obj) + if err != nil { + return nil, err + } + if accessor.GetName() == name { + return obj, nil + } + } + return nil, apierrors.NewNotFound(schema.GroupResource{}, "not found") +} + +func unmarshal[T any](t *testing.T, data string) *T { + t.Helper() + + var obj T + err := yaml.UnmarshalStrict([]byte(data), &obj) + gomega.NewWithT(t).Expect(err).NotTo(gomega.HaveOccurred(), "parse YAML:\n"+data) + return &obj +} + +// func marshal[T any](t *testing.T, obj *T) string { +// t.Helper() + +// data, err := yaml.Marshal(obj) +// gomega.NewWithT(t).Expect(err).NotTo(gomega.HaveOccurred(), "create YAML") +// return string(data) +// } + +// func replace[T any](t *testing.T, obj *T, pairs ...string) *T { +// t.Helper() + +// data := marshal(t, obj) +// for i := 0; i < len(pairs); i += 2 { +// data = strings.ReplaceAll(data, pairs[i], pairs[i+1]) +// } +// return unmarshal[T](t, data) +// } + +func objects[T any](objs ...T) []T { + return objs +} diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/doc.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/doc.go new file mode 100644 index 0000000000000..ed9a2ae7e0d2f --- /dev/null +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/doc.go @@ -0,0 +1,18 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package structured contains code for working with structured parameters. +package structured diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/pools.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/pools.go new file mode 100644 index 0000000000000..4c1f8e68bbb9f --- /dev/null +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/pools.go @@ -0,0 +1,131 @@ +/* +Copyright 2024 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package structured + +import ( + "context" + "fmt" + + v1 "k8s.io/api/core/v1" + resourceapi "k8s.io/api/resource/v1alpha3" + "k8s.io/apimachinery/pkg/labels" + resourcelisters "k8s.io/client-go/listers/resource/v1alpha3" + "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" +) + +// GatherPools collects information about all resource pools which provide +// devices that are accessible from the given node. +// +// Out-dated slices are silently ignored. Pools may be incomplete, which is +// recorded in the result. +func GatherPools(ctx context.Context, sliceLister resourcelisters.ResourceSliceLister, node *v1.Node) ([]*Pool, error) { + pools := make(map[PoolID]*Pool) + + // TODO (future): use a custom lister interface and implement it with + // and indexer on the node name field. Then here we can ask for only + // slices with the right node name and those with no node name. + slices, err := sliceLister.List(labels.Everything()) + if err != nil { + return nil, fmt.Errorf("list resource slices: %w", err) + } + for _, slice := range slices { + switch { + case slice.Spec.NodeName != "": + if slice.Spec.NodeName == node.Name { + addSlice(pools, slice) + } + case slice.Spec.AllNodes: + addSlice(pools, slice) + case slice.Spec.NodeSelector != nil: + selector, err := nodeaffinity.NewNodeSelector(slice.Spec.NodeSelector) + if err != nil { + return nil, fmt.Errorf("node selector in resource slice %s: %w", slice.Name, err) + } + if selector.Match(node) { + addSlice(pools, slice) + } + default: + // Nothing known was set. This must be some future, unknown extension, + // so we don't know how to handle it. We may still be able to allocated from + // other pools, so we continue. + // + // TODO (eventually): let caller decide how to report this to the user. Warning + // about it for every slice on each scheduling attempt would be too noisy, but + // perhaps once per run would be useful? + continue + } + + } + + // Find incomplete pools and flatten into a single slice. + result := make([]*Pool, 0, len(pools)) + for _, pool := range pools { + pool.IsIncomplete = int64(len(pool.Slices)) != pool.Slices[0].Spec.Pool.ResourceSliceCount + result = append(result, pool) + } + + return result, nil +} + +func addSlice(pools map[PoolID]*Pool, slice *resourceapi.ResourceSlice) { + id := PoolID{Driver: slice.Spec.Driver, Pool: slice.Spec.Pool.Name} + pool := pools[id] + if pool == nil { + // New pool. + pool = &Pool{ + PoolID: id, + Slices: []*resourceapi.ResourceSlice{slice}, + } + pools[id] = pool + return + } + + if slice.Spec.Pool.Generation < pool.Slices[0].Spec.Pool.Generation { + // Out-dated. + return + } + + if slice.Spec.Pool.Generation > pool.Slices[0].Spec.Pool.Generation { + // Newer, replaces all old slices. + pool.Slices = []*resourceapi.ResourceSlice{slice} + } + + // Add to pool. + pool.Slices = append(pool.Slices, slice) +} + +type Pool struct { + PoolID + IsIncomplete bool + Slices []*resourceapi.ResourceSlice +} + +type PoolID struct { + Driver, Pool string +} + +func (p PoolID) String() string { + return p.Driver + "/" + p.Pool +} + +type DeviceID struct { + Driver, Pool, Device string +} + +func (d DeviceID) String() string { + return d.Driver + "/" + d.Pool + "/" + d.Device +} diff --git a/test/integration/scheduler/scheduler_test.go b/test/integration/scheduler/scheduler_test.go index f47e64ad63f94..2e86191f4af31 100644 --- a/test/integration/scheduler/scheduler_test.go +++ b/test/integration/scheduler/scheduler_test.go @@ -678,28 +678,13 @@ func TestPodSchedulingContextSSA(t *testing.T) { } } - defer func() { - if err := testCtx.ClientSet.ResourceV1alpha3().ResourceClasses().DeleteCollection(testCtx.Ctx, metav1.DeleteOptions{}, metav1.ListOptions{}); err != nil { - t.Errorf("Unexpected error deleting ResourceClasses: %v", err) - } - }() - class := &resourceapi.ResourceClass{ - ObjectMeta: metav1.ObjectMeta{ - Name: "my-class", - }, - DriverName: "does-not-matter", - } - if _, err := testCtx.ClientSet.ResourceV1alpha3().ResourceClasses().Create(testCtx.Ctx, class, metav1.CreateOptions{}); err != nil { - t.Fatalf("Failed to create class: %v", err) - } - claim := &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "my-claim", Namespace: testCtx.NS.Name, }, Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: class.Name, + Controller: "dra.example.com", }, } if _, err := testCtx.ClientSet.ResourceV1alpha3().ResourceClaims(claim.Namespace).Create(testCtx.Ctx, claim, metav1.CreateOptions{}); err != nil { diff --git a/test/integration/scheduler_perf/config/dra/another-resourceclaimtemplate.yaml b/test/integration/scheduler_perf/config/dra/another-resourceclaimtemplate.yaml index f68127b67a8d8..9ac0b32715fd8 100644 --- a/test/integration/scheduler_perf/config/dra/another-resourceclaimtemplate.yaml +++ b/test/integration/scheduler_perf/config/dra/another-resourceclaimtemplate.yaml @@ -1,7 +1,11 @@ -apiVersion: resource.k8s.io/v1alpha1 +apiVersion: resource.k8s.io/v1alpha3 kind: ResourceClaimTemplate metadata: name: another-test-claim-template spec: spec: - resourceClassName: another-test-class + controller: another-test-driver.cdi.k8s.io + devices: + requests: + - name: req-0 + deviceClassName: test-class diff --git a/test/integration/scheduler_perf/config/dra/another-resourceclass.yaml b/test/integration/scheduler_perf/config/dra/another-resourceclass.yaml deleted file mode 100644 index 52eb55698b83b..0000000000000 --- a/test/integration/scheduler_perf/config/dra/another-resourceclass.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: resource.k8s.io/v1alpha1 -kind: ResourceClass -metadata: - name: another-test-class -driverName: another-test-driver.cdi.k8s.io diff --git a/test/integration/scheduler_perf/config/dra/claim-template.yaml b/test/integration/scheduler_perf/config/dra/claim-template.yaml deleted file mode 100644 index 2ccc57e478c08..0000000000000 --- a/test/integration/scheduler_perf/config/dra/claim-template.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: resource.k8s.io/v1alpha1 -kind: ResourceClaimTemplate -metadata: - name: claim-template -spec: - spec: - resourceClassName: scheduler-performance diff --git a/test/integration/scheduler_perf/config/dra/deviceclass-structured.yaml b/test/integration/scheduler_perf/config/dra/deviceclass-structured.yaml new file mode 100644 index 0000000000000..873fd282bd20e --- /dev/null +++ b/test/integration/scheduler_perf/config/dra/deviceclass-structured.yaml @@ -0,0 +1,8 @@ +apiVersion: resource.k8s.io/v1alpha3 +kind: DeviceClass +metadata: + name: test-class +spec: + selectors: + - cel: + expression: device.driver == "test-driver.cdi.k8s.io" diff --git a/test/integration/scheduler_perf/config/dra/resourceclass.yaml b/test/integration/scheduler_perf/config/dra/deviceclass.yaml similarity index 54% rename from test/integration/scheduler_perf/config/dra/resourceclass.yaml rename to test/integration/scheduler_perf/config/dra/deviceclass.yaml index 87801ed658497..62417231b9afb 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclass.yaml +++ b/test/integration/scheduler_perf/config/dra/deviceclass.yaml @@ -1,5 +1,4 @@ apiVersion: resource.k8s.io/v1alpha3 -kind: ResourceClass +kind: DeviceClass metadata: name: test-class -driverName: test-driver.cdi.k8s.io diff --git a/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml b/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml index 12b1af5f944ec..0207afc2a51e5 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaim-structured.yaml @@ -3,8 +3,7 @@ kind: ResourceClaim metadata: name: test-claim-{{.Index}} spec: - resourceClassName: test-class - parametersRef: - apiGroup: resource.k8s.io - kind: ResourceClaimParameters - name: test-claim-parameters + devices: + requests: + - name: req-0 + deviceClassName: test-class diff --git a/test/integration/scheduler_perf/config/dra/resourceclaim.yaml b/test/integration/scheduler_perf/config/dra/resourceclaim.yaml index 0f11096d29994..510a5a1ba2c26 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaim.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaim.yaml @@ -3,4 +3,8 @@ kind: ResourceClaim metadata: name: test-claim-{{.Index}} spec: - resourceClassName: test-class + controller: test-driver.cdi.k8s.io + devices: + requests: + - name: req-0 + deviceClassName: test-class diff --git a/test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml b/test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml deleted file mode 100644 index 0a99d52c62a58..0000000000000 --- a/test/integration/scheduler_perf/config/dra/resourceclaimparameters.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: resource.k8s.io/v1alpha3 -kind: ResourceClaimParameters -metadata: - name: test-claim-parameters -shareable: true -driverRequests: -- driverName: test-driver.cdi.k8s.io - requests: - - namedResources: - selector: "true" diff --git a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml index c98f320592fca..77aa178afa5b5 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate-structured.yaml @@ -4,8 +4,7 @@ metadata: name: test-claim-template spec: spec: - resourceClassName: test-class - parametersRef: - apiGroup: resource.k8s.io - kind: ResourceClaimParameters - name: test-claim-parameters + devices: + requests: + - name: req-0 + deviceClassName: test-class diff --git a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml index 79e66f49ee09a..9b94a70b9875d 100644 --- a/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml +++ b/test/integration/scheduler_perf/config/dra/resourceclaimtemplate.yaml @@ -4,4 +4,8 @@ metadata: name: test-claim-template spec: spec: - resourceClassName: test-class + controller: test-driver.cdi.k8s.io + devices: + requests: + - name: req-0 + deviceClassName: test-class diff --git a/test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml b/test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml deleted file mode 100644 index 8fd4a83267dc0..0000000000000 --- a/test/integration/scheduler_perf/config/dra/resourceclass-structured.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: resource.k8s.io/v1alpha3 -kind: ResourceClass -metadata: - name: test-class -driverName: test-driver.cdi.k8s.io -structuredParameters: true diff --git a/test/integration/scheduler_perf/config/performance-config.yaml b/test/integration/scheduler_perf/config/performance-config.yaml index 8c256a65fc237..4b6905a70ffa1 100644 --- a/test/integration/scheduler_perf/config/performance-config.yaml +++ b/test/integration/scheduler_perf/config/performance-config.yaml @@ -758,7 +758,7 @@ nodes: scheduler-perf-dra-* maxClaimsPerNodeParam: $maxClaimsPerNode - opcode: createAny - templatePath: config/dra/resourceclass.yaml + templatePath: config/dra/deviceclass.yaml - opcode: createAny templatePath: config/dra/resourceclaimtemplate.yaml namespace: init @@ -829,9 +829,7 @@ nodes: scheduler-perf-dra-* maxClaimsPerNodeParam: $maxClaimsPerNode - opcode: createAny - templatePath: config/dra/resourceclass.yaml - - opcode: createAny - templatePath: config/dra/another-resourceclass.yaml + templatePath: config/dra/deviceclass.yaml - opcode: createAny templatePath: config/dra/resourceclaimtemplate.yaml namespace: init @@ -855,6 +853,7 @@ collectMetrics: true workloads: - name: fast + labels: [integration-test, fast] params: # This testcase runs through all code paths without # taking too long overall. @@ -902,10 +901,7 @@ maxClaimsPerNodeParam: $maxClaimsPerNode structuredParameters: true - opcode: createAny - templatePath: config/dra/resourceclass-structured.yaml - - opcode: createAny - templatePath: config/dra/resourceclaimparameters.yaml - namespace: init + templatePath: config/dra/deviceclass-structured.yaml - opcode: createAny templatePath: config/dra/resourceclaimtemplate-structured.yaml namespace: init @@ -913,9 +909,6 @@ namespace: init countParam: $initPods podTemplatePath: config/dra/pod-with-claim-template.yaml - - opcode: createAny - templatePath: config/dra/resourceclaimparameters.yaml - namespace: test - opcode: createAny templatePath: config/dra/resourceclaimtemplate-structured.yaml namespace: test @@ -979,10 +972,7 @@ maxClaimsPerNodeParam: $maxClaimsPerNode structuredParameters: true - opcode: createAny - templatePath: config/dra/resourceclass-structured.yaml - - opcode: createAny - templatePath: config/dra/resourceclaimparameters.yaml - namespace: init + templatePath: config/dra/deviceclass-structured.yaml - opcode: createAny templatePath: config/dra/resourceclaim-structured.yaml namespace: init @@ -991,9 +981,6 @@ namespace: init countParam: $initPods podTemplatePath: config/dra/pod-with-claim-ref.yaml - - opcode: createAny - templatePath: config/dra/resourceclaimparameters.yaml - namespace: test - opcode: createAny templatePath: config/dra/resourceclaim-structured.yaml namespace: test @@ -1100,4 +1087,4 @@ labels: [performance, fast] params: gatedPods: 10000 - measurePods: 20000 \ No newline at end of file + measurePods: 20000 diff --git a/test/integration/scheduler_perf/dra.go b/test/integration/scheduler_perf/dra.go index 7f2ab2dcd2d81..d76cfd6b2ac2a 100644 --- a/test/integration/scheduler_perf/dra.go +++ b/test/integration/scheduler_perf/dra.go @@ -202,7 +202,7 @@ func (op *createResourceDriverOp) run(tCtx ktesting.TContext) { tCtx.CleanupCtx(func(tCtx ktesting.TContext) { err := tCtx.Client().ResourceV1alpha3().ResourceSlices().DeleteCollection(tCtx, metav1.DeleteOptions{}, - metav1.ListOptions{FieldSelector: "driverName=" + op.DriverName}, + metav1.ListOptions{FieldSelector: resourceapi.ResourceSliceSelectorDriver + "=" + op.DriverName}, ) tCtx.ExpectNoError(err, "delete node resource slices") }) @@ -234,18 +234,21 @@ func resourceSlice(driverName, nodeName string, capacity int) *resourceapi.Resou Name: nodeName, }, - NodeName: nodeName, - DriverName: driverName, - - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{}, + Spec: resourceapi.ResourceSliceSpec{ + Driver: driverName, + NodeName: nodeName, + Pool: resourceapi.ResourcePool{ + Name: nodeName, + ResourceSliceCount: 1, + }, }, } for i := 0; i < capacity; i++ { - slice.ResourceModel.NamedResources.Instances = append(slice.ResourceModel.NamedResources.Instances, - resourceapi.NamedResourcesInstance{ - Name: fmt.Sprintf("instance-%d", i), + slice.Spec.Devices = append(slice.Spec.Devices, + resourceapi.Device{ + Name: fmt.Sprintf("instance-%d", i), + Basic: &resourceapi.BasicDevice{}, }, ) } From a537356172a4b1f5d87fa215a4620dd0e471e5fe Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Thu, 11 Jul 2024 16:45:29 +0200 Subject: [PATCH 19/20] DRA E2E node: adapt to v1alpha3 API --- test/e2e_node/dra_test.go | 60 +++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/test/e2e_node/dra_test.go b/test/e2e_node/dra_test.go index 0d2dacef3c845..a737169e8ec8e 100644 --- a/test/e2e_node/dra_test.go +++ b/test/e2e_node/dra_test.go @@ -41,6 +41,7 @@ import ( resourceapi "k8s.io/api/resource/v1alpha3" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes" "k8s.io/klog/v2" draplugin "k8s.io/kubernetes/pkg/kubelet/cm/dra/plugin" @@ -74,7 +75,7 @@ var _ = framework.SIGDescribe("node")("DRA", feature.DynamicResourceAllocation, // When plugin and kubelet get killed at the end of the tests, they leave ResourceSlices behind. // Perhaps garbage collection would eventually remove them (not sure how the node instance // is managed), but this could take time. Let's clean up explicitly. - framework.ExpectNoError(f.ClientSet.ResourceV1alpha2().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{})) + framework.ExpectNoError(f.ClientSet.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{})) }) }) @@ -562,7 +563,7 @@ func newKubeletPlugin(ctx context.Context, clientSet kubernetes.Interface, nodeN ginkgo.DeferCleanup(func(ctx context.Context) { // kubelet should do this eventually, but better make sure. // A separate test checks this explicitly. - framework.ExpectNoError(clientSet.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: "driverName=" + driverName})) + framework.ExpectNoError(clientSet.ResourceV1alpha3().ResourceSlices().DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{FieldSelector: resourceapi.ResourceSliceSelectorDriver + "=" + driverName})) }) ginkgo.DeferCleanup(plugin.Stop) @@ -573,18 +574,17 @@ func newKubeletPlugin(ctx context.Context, clientSet kubernetes.Interface, nodeN // NOTE: as scheduler and controller manager are not running by the Node e2e, // the objects must contain all required data to be processed correctly by the API server // and placed on the node without involving the scheduler and the DRA controller -func createTestObjects(ctx context.Context, clientSet kubernetes.Interface, nodename, namespace, className, claimName, podName string, deferPodDeletion bool, pluginNames []string) *v1.Pod { - // ResourceClass - class := &resourceapi.ResourceClass{ +func createTestObjects(ctx context.Context, clientSet kubernetes.Interface, nodename, namespace, className, claimName, podName string, deferPodDeletion bool, driverNames []string) *v1.Pod { + // DeviceClass + class := &resourceapi.DeviceClass{ ObjectMeta: metav1.ObjectMeta{ Name: className, }, - DriverName: "controller", } - _, err := clientSet.ResourceV1alpha3().ResourceClasses().Create(ctx, class, metav1.CreateOptions{}) + _, err := clientSet.ResourceV1alpha3().DeviceClasses().Create(ctx, class, metav1.CreateOptions{}) framework.ExpectNoError(err) - ginkgo.DeferCleanup(clientSet.ResourceV1alpha3().ResourceClasses().Delete, className, metav1.DeleteOptions{}) + ginkgo.DeferCleanup(clientSet.ResourceV1alpha3().DeviceClasses().Delete, className, metav1.DeleteOptions{}) // ResourceClaim podClaimName := "resource-claim" @@ -593,7 +593,12 @@ func createTestObjects(ctx context.Context, clientSet kubernetes.Interface, node Name: claimName, }, Spec: resourceapi.ResourceClaimSpec{ - ResourceClassName: className, + Devices: resourceapi.DeviceClaim{ + Requests: []resourceapi.DeviceRequest{{ + Name: "my-request", + DeviceClassName: className, + }}, + }, }, } createdClaim, err := clientSet.ResourceV1alpha3().ResourceClaims(namespace).Create(ctx, claim, metav1.CreateOptions{}) @@ -637,21 +642,32 @@ func createTestObjects(ctx context.Context, clientSet kubernetes.Interface, node } // Update claim status: set ReservedFor and AllocationResult - // NOTE: This is usually done by the DRA controller - resourceHandlers := make([]resourceapi.ResourceHandle, len(pluginNames)) - for i, pluginName := range pluginNames { - resourceHandlers[i] = resourceapi.ResourceHandle{ - DriverName: pluginName, - Data: "{\"EnvVars\":{\"DRA_PARAM1\":\"PARAM1_VALUE\"},\"NodeName\":\"\"}", + // NOTE: This is usually done by the DRA controller or the scheduler. + results := make([]resourceapi.DeviceRequestAllocationResult, len(driverNames)) + for i, driverName := range driverNames { + results[i] = resourceapi.DeviceRequestAllocationResult{ + Driver: driverName, + Pool: "some-pool", + Device: "some-device", } } + createdClaim.Status = resourceapi.ResourceClaimStatus{ - DriverName: "controller", ReservedFor: []resourceapi.ResourceClaimConsumerReference{ {Resource: "pods", Name: podName, UID: createdPod.UID}, }, Allocation: &resourceapi.AllocationResult{ - ResourceHandles: resourceHandlers, + Devices: resourceapi.DeviceAllocationResult{ + Results: results, + Config: []resourceapi.DeviceAllocationConfiguration{{ + DeviceConfiguration: resourceapi.DeviceConfiguration{ + Opaque: &resourceapi.OpaqueDeviceConfiguration{ + Driver: driverName, + Parameters: runtime.RawExtension{Raw: []byte(`{"EnvVars":{"DRA_PARAM1":"PARAM1_VALUE"}}`)}, + }, + }, + }}, + }, }, } _, err = clientSet.ResourceV1alpha3().ResourceClaims(namespace).UpdateStatus(ctx, createdClaim, metav1.UpdateOptions{}) @@ -665,10 +681,12 @@ func createTestResourceSlice(ctx context.Context, clientSet kubernetes.Interface ObjectMeta: metav1.ObjectMeta{ Name: nodeName, }, - NodeName: nodeName, - DriverName: driverName, - ResourceModel: resourceapi.ResourceModel{ - NamedResources: &resourceapi.NamedResourcesResources{}, + Spec: resourceapi.ResourceSliceSpec{ + NodeName: nodeName, + Driver: driverName, + Pool: resourceapi.ResourcePool{ + Name: nodeName, + }, }, } From 09ac0cf20164dee4b0232a1a931b739b7022d9bf Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Thu, 11 Jul 2024 20:24:37 +0300 Subject: [PATCH 20/20] DRA: use object generators in allocator tests --- .../structured/allocator_test.go | 1455 ++++++----------- 1 file changed, 540 insertions(+), 915 deletions(-) diff --git a/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go index 7538651ed164d..4e90d8ff52b32 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/structured/allocator_test.go @@ -19,6 +19,7 @@ package structured import ( "errors" "flag" + "fmt" "testing" "github.com/onsi/gomega" @@ -28,794 +29,254 @@ import ( resourceapi "k8s.io/api/resource/v1alpha3" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/klog/v2/ktesting" - "sigs.k8s.io/yaml" + "k8s.io/utils/ptr" +) + +const ( + region1 = "west" + region2 = "east" + node1 = "node-1" + node2 = "node-2" + classA = "class-a" + classB = "class-b" + driverA = "driver-a" + driverB = "driver-b" + pool1 = "pool-1" + pool2 = "pool-2" + req0 = "req-0" + req1 = "req-1" + claim0 = "claim-0" + slice1 = "slice-1" + slice2 = "slice-2" + device1 = "device-1" + device2 = "device-2" ) func init() { ktesting.DefaultConfig.AddFlags(flag.CommandLine) } -func TestAllocator(t *testing.T) { - // Class with DeviceClassSpec.SuitableNodes selector. - driverA := "driver-a" - driverAClass := &resourceapi.DeviceClass{ +// Test objects generators + +// generate a node object given a name and a region +func node(name, region string) *v1.Node { + return &v1.Node{ ObjectMeta: metav1.ObjectMeta{ - Name: driverA, - }, - Spec: resourceapi.DeviceClassSpec{ - Selectors: []resourceapi.DeviceSelector{ - { - CEL: &resourceapi.CELDeviceSelector{ - Expression: `device.driver == "driver-a"`, - }, - }, - }, - SuitableNodes: &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{ - { - MatchExpressions: []v1.NodeSelectorRequirement{ - { - Key: "region", - Operator: v1.NodeSelectorOpIn, - Values: []string{"west", "east"}, - }, - }, - }, - }, + Name: name, + Labels: map[string]string{ + "region": region, }, }, } +} - driverAClassWithConfig := &resourceapi.DeviceClass{ +// generate a DeviceClass object with the given name and a driver CEL selector. +// driver name is assumed to be the same as the class name. +func class(name, driver string) *resourceapi.DeviceClass { + return &resourceapi.DeviceClass{ ObjectMeta: metav1.ObjectMeta{ - Name: driverA, + Name: name, }, Spec: resourceapi.DeviceClassSpec{ - Config: []resourceapi.DeviceClassConfiguration{ - { - DeviceConfiguration: resourceapi.DeviceConfiguration{ - Opaque: &resourceapi.OpaqueDeviceConfiguration{ - Driver: driverA, - Parameters: runtime.RawExtension{ - Raw: []byte(`{"classAttribute":"classAttributeValue"}`), - }, - }, - }, - }, - }, Selectors: []resourceapi.DeviceSelector{ { CEL: &resourceapi.CELDeviceSelector{ - Expression: `device.driver == "driver-a"`, + Expression: fmt.Sprintf(`device.driver == "%s"`, driver), }, }, }, - SuitableNodes: &v1.NodeSelector{ - NodeSelectorTerms: []v1.NodeSelectorTerm{ + }, + } +} + +// generate a DeviceConfiguration object with the given driver and attribute. +func deviceConfiguration(driver, attribute string) resourceapi.DeviceConfiguration { + return resourceapi.DeviceConfiguration{ + Opaque: &resourceapi.OpaqueDeviceConfiguration{ + Driver: driver, + Parameters: runtime.RawExtension{ + Raw: []byte(fmt.Sprintf("{\"%s\":\"%s\"}", attribute, attribute+"Value")), + }, + }, + } +} + +// generate a DeviceClass object with the given name and attribute. +// attribute is used to generate device configuration parameters in a form of JSON {atribute: attributeValue}. +func classWithConfig(name, driver, attribute string) *resourceapi.DeviceClass { + class := class(name, driver) + class.Spec.Config = []resourceapi.DeviceClassConfiguration{ + { + DeviceConfiguration: deviceConfiguration(driver, attribute), + }, + } + return class +} + +// generate a DeviceClass object with the given name and the node selector +// that selects nodes with the region label set to either "west" or "east". +func classWithSuitableNodes(name, driver string) *resourceapi.DeviceClass { + class := class(name, driver) + class.Spec.SuitableNodes = &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ { - MatchExpressions: []v1.NodeSelectorRequirement{ - { - Key: "region", - Operator: v1.NodeSelectorOpIn, - Values: []string{"west", "east"}, - }, - }, + Key: "region", + Operator: v1.NodeSelectorOpIn, + Values: []string{region1, region2}, }, }, }, }, } + return class +} - // Class without DeviceClassSpec.SuitableNodes selector. - driverB := "driver-b" - driverBClass := &resourceapi.DeviceClass{ +// generate a ResourceClaim object with the given name and device requests. +func claimWithRequests(name string, constraints []resourceapi.DeviceConstraint, requests ...resourceapi.DeviceRequest) *resourceapi.ResourceClaim { + return &resourceapi.ResourceClaim{ ObjectMeta: metav1.ObjectMeta{ - Name: driverB, + Name: name, }, - Spec: resourceapi.DeviceClassSpec{ - Selectors: []resourceapi.DeviceSelector{ - { - CEL: &resourceapi.CELDeviceSelector{ - Expression: `device.driver == "driver-b"`, - }, - }, + Spec: resourceapi.ResourceClaimSpec{ + Devices: resourceapi.DeviceClaim{ + Requests: requests, + Constraints: constraints, }, }, } - // device1 := "device-1" - // device2 := "device-2" - // driverVersion := "driverVersion" - // memory := "memory" - // oneGig := resource.NewQuantity(1024*1024, resource.BinarySI) - // numa := "numa" - // numa1 := ptr.To(int64(1)) - // numa2 := ptr.To(int64(2)) - node1 := &v1.Node{ +} + +// generate a DeviceRequest object with the given name, class and selectors. +func request(name, class string, count int64, selectors ...resourceapi.DeviceSelector) resourceapi.DeviceRequest { + return resourceapi.DeviceRequest{ + Name: name, + Count: count, + CountMode: resourceapi.DeviceCountModeExact, + DeviceClassName: class, + Selectors: selectors, + } +} + +// generate a ResourceClaim object with the given name, request and class. +func claim(name, req, class string, constraints ...resourceapi.DeviceConstraint) *resourceapi.ResourceClaim { + claim := claimWithRequests(name, constraints, request(req, class, 1)) + return claim +} + +// generate a ResourceClaim object with the given name, request, class, and attribute. +// attribute is used to generate parameters in a form of JSON {atribute: attributeValue}. +func claimWithDeviceConfig(name, request, class, driver, attribute string) *resourceapi.ResourceClaim { + claim := claim(name, request, class) + claim.Spec.Devices.Config = []resourceapi.DeviceClaimConfiguration{ + { + DeviceConfiguration: deviceConfiguration(driver, attribute), + }, + } + return claim +} + +// generate allocated ResourceClaim object +func allocatedClaim(name, request, class string, results ...resourceapi.DeviceRequestAllocationResult) *resourceapi.ResourceClaim { + claim := claim(name, request, class) + claim.Status.Allocation = &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: results, + }, + } + return claim +} + +// generate a Device object with the given name, capacity and attributes. +func device(name string, capacity map[resourceapi.QualifiedName]resource.Quantity, attributes map[resourceapi.QualifiedName]resourceapi.DeviceAttribute) resourceapi.Device { + return resourceapi.Device{ + Name: name, + Basic: &resourceapi.BasicDevice{ + Attributes: attributes, + Capacity: capacity, + }, + } +} + +// generate a ResourceSlice object with the given name, node, +// driver and pool names, generation and a list of devices +func slice(name, node, pool, driver string, generation, count int64, selector *v1.NodeSelector, devices []resourceapi.Device) *resourceapi.ResourceSlice { + return &resourceapi.ResourceSlice{ ObjectMeta: metav1.ObjectMeta{ - Name: "worker-1", - Labels: map[string]string{ - "region": "west", + Name: name, + }, + Spec: resourceapi.ResourceSliceSpec{ + NodeName: node, + Driver: driver, + Pool: resourceapi.ResourcePool{ + Name: pool, + ResourceSliceCount: count, + Generation: generation, }, + Devices: devices, + NodeSelector: selector, }, } - node2 := &v1.Node{ - ObjectMeta: metav1.ObjectMeta{ - Name: "worker-2", - Labels: map[string]string{ - "region": "east", +} + +func deviceAllocationResult(request, driver, pool, device string) resourceapi.DeviceRequestAllocationResult { + return resourceapi.DeviceRequestAllocationResult{ + Request: request, + Driver: driver, + Pool: pool, + Device: device, + } +} + +func allocationResults(results ...resourceapi.DeviceRequestAllocationResult) *resourceapi.AllocationResult { + return &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: results, + }, + } +} + +func allocationResultsWithConfig(driver string, source resourceapi.AllocationConfigSource, attribute string, results ...resourceapi.DeviceRequestAllocationResult) *resourceapi.AllocationResult { + return &resourceapi.AllocationResult{ + Devices: resourceapi.DeviceAllocationResult{ + Results: results, + Config: []resourceapi.DeviceAllocationConfiguration{ + { + Source: source, + DeviceConfiguration: deviceConfiguration(driver, attribute), + }, }, }, } - // regionWest := v1.NodeSelector{ - // NodeSelectorTerms: []v1.NodeSelectorTerm{{ - // MatchExpressions: []v1.NodeSelectorRequirement{{ - // Key: "region", - // Operator: v1.NodeSelectorOpIn, - // Values: []string{"west"}, - // }}, - // }}, - // } - // TODO: use Go to define objects or YAML? - // - // Go is very verbose, but surfaces errors at compile time. - // YAML is more compact and supports global search/replace - // to produce new objects that are derived from others. - // - // node1Slice := &resourceapi.ResourceSlice{ - // ObjectMeta: metav1.ObjectMeta{ - // Name: "node1Slice", - // }, - // Spec: resourceapi.ResourceSliceSpec{ - // NodeName: node1.Name, - // Driver: driverA, - // Pool: resourceapi.ResourcePool{ - // Name: node1.Name, - // ResourceSliceCount: 1, - // }, - // Devices: []resourceapi.Device{ - // { - // Name: device1, - // Attributes: []resourceapi.DeviceAttribute{ - // { - // Name: driverVersion, - // VersionValue: ptr.To("1.0.0"), - // }, - // { - // Name: numa, - // IntValue: numa1, - // }, - // }, - // Capacities: []resourceapi.DeviceCapacity{ - // { - // Name: memory, - // Quantity: oneGig, - // }, - // }, - // }, - // }, - // }, - // } - - // Slices - - node1slice := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-1-slice -spec: - nodeName: worker-1 - driver: driver-a - pool: - name: worker-1 - resourceSliceCount: 2 - generation: 2 - devices: - - name: device-1 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - stringAttribute: - string: stringAttributeValue - boolAttribute: - bool: true - capacity: - memory: 1Gi # small - - name: device-2 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - stringAttribute: - string: stringAttributeValue - boolAttribute: - bool: true - capacity: - memory: 2Gi # large -`) - - // Second slice on the same node, with different device names - // and attributes. - node1slice2 := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-1-2-slice -spec: - nodeName: worker-1 - driver: driver-a - pool: - name: worker-1 - generation: 2 # recent pool generation with 2 slices and 4 devices - resourceSliceCount: 1 - devices: - - name: device-5 - basic: - attributes: - driverVersion: - version: 2.0.0 - numa: - int: 2 - stringAttribute: - string: stringAttributeValue2 - boolAttribute: - bool: false - capacity: - memory: 1Gi # small - - name: device-6 - basic: - attributes: - driverVersion: - version: 2.0.0 - numa: - int: 2 - stringAttribute: - string: stringAttributeValue2 - boolAttribute: - bool: false - capacity: - memory: 2Gi # large -`) - - node1ObsoleteSlice := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-1-obsolete-slice -spec: - nodeName: worker-1 - driver: driver-a - pool: - name: worker-1 - generation: 1 - resourceSliceCount: 1 - devices: - - name: device-1 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 1Gi # small -`) - - node1IncompletePoolSlice := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-1-incomplete-slice -spec: - nodeName: worker-1 - driver: driver-a - pool: - name: worker-1 - generation: 2 - resourceSliceCount: 2 - devices: - - name: device-1 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 1Gi # small -`) - - networkAttachedSliceWest := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-1-slice -spec: - driver: driver-a - pool: - name: worker-1 - resourceSliceCount: 2 - generation: 2 - nodeSelector: - nodeSelectorTerms: - - matchExpressions: - - key: region - operator: In - values: [west] - devices: - - name: device-1 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 1Gi # small - - name: device-2 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 2Gi # large -`) - - networkAttachedSliceEast := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-2-slice -spec: - driver: driver-b - pool: - name: worker-2 - resourceSliceCount: 2 - generation: 2 - nodeSelector: - nodeSelectorTerms: - - matchExpressions: - - key: region - operator: In - values: [east] - devices: - - name: device-1 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 1Gi # small - - name: device-2 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 2Gi # large -`) - - node1DriverBslice := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-1-driverB-slice -spec: - nodeName: worker-1 - driver: driver-b - pool: - name: worker-1 - generation: 1 - resourceSliceCount: 1 - devices: - - name: device-1 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 1Gi # small - - name: device-2 - basic: - attributes: - driverVersion: - version: 1.0.0 - numa: - int: 1 - capacity: - memory: 2Gi # large -`) - - node2slice := unmarshal[resourceapi.ResourceSlice](t, ` -metadata: - name: worker-2-slice -spec: - nodeName: worker-2 - driver: driver-a - pool: - name: worker-2 - resourceSliceCount: 1 - devices: - - name: device-3 - basic: - attributes: - driverVersion: - version: 2.0.0 - numa: - int: 1 - capacity: - memory: 1Gi # small - - name: device-4 - basic: - attributes: - driverVersion: - version: 2.0.0 - numa: - int: 1 - capacity: - memory: 2Gi # large -`) - - // Claims - - simpleClaim := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: driver-a -`) - - simpleClaimDriverB := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: driver-b -`) - - simpleClaimWithConfig := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: driver-a - config: - - opaque: - driver: driver-a - parameters: {"deviceAttribute":"deviceAttributeValue"} -`) - - simpleClaimWithUnknownClassName := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: unknown-class -`) - - simpleClaimWithEmptyClassName := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: "" -`) - - allocatedSimpleClaim := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-1 -`) - - allocatedSimpleClaimWithClassConfig := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-1 - config: - - source: FromClass - opaque: - driver: driver-a - parameters: - classAttribute: classAttributeValue -`) - - allocatedSimpleClaimWithClaimConfig := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-1 - config: - - source: FromClaim - opaque: - driver: driver-a - parameters: - deviceAttribute: deviceAttributeValue -`) - - allocatedSimpleClaimDriverB := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-b - pool: worker-2 - device: device-1 -`) - - allocatedSimpleClaimDriverBWorker1 := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-b - pool: worker-1 - device: device-1 -`) - - allocatedSimpleClaimNode2 := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-a - pool: worker-2 - device: device-3 -`) - - allocated2DeviceClaim := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-5 - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-6 -`) - - allocatedClaim := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 2 - deviceClassName: driver-a -status: - allocation: - devices: - results: - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-1 - - request: req-1 - driver: driver-a - pool: worker-1 - device: device-2 -`) - - twoDeviceClaim := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: driver-a - selectors: - - cel: - # small - expression: device.capacity["driver-a"].memory.compareTo(quantity("1Gi")) >= 0 - - name: req-1 - countMode: Exact - count: 1 - deviceClassName: driver-a - selectors: - - cel: - # large - expression: device.capacity["driver-a"].memory.compareTo(quantity("2Gi")) >= 0 -`) - - twoDeviceClaimWithConstraint := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: driver-a - - name: req-1 - countMode: Exact - count: 1 - deviceClassName: driver-a - constraints: - - matchAttribute: numa - - matchAttribute: driverVersion - - matchAttribute: stringAttribute - - matchAttribute: boolAttribute -`) - - claimWithConstraintNotMatchingIntAttribute := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 3 - deviceClassName: driver-a - constraints: - - matchAttribute: numa -`) - - claimWithConstraintNotMatchingVersionAttribute := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 3 - deviceClassName: driver-a - constraints: - - matchAttribute: driverVersion -`) - - claimWithConstraintNotMatchingStringAttribute := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 3 - deviceClassName: driver-a - constraints: - - matchAttribute: stringAttribute -`) - - claimWithConstraintNotMatchingBoolAttribute := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 3 - deviceClassName: driver-a - constraints: - - matchAttribute: boolAttribute -`) - - fourDeviceClaim := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 2 - deviceClassName: driver-a - selectors: - - cel: - # small - expression: device.capacity["driver-a"].memory.compareTo(quantity("1Gi")) >= 0 - - name: req-1 - countMode: Exact - count: 2 - deviceClassName: driver-a - selectors: - - cel: - # large - expression: device.capacity["driver-a"].memory.compareTo(quantity("2Gi")) >= 0 -`) - - allDeviceClaim := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: All - deviceClassName: driver-a - selectors: - - cel: - # small - expression: device.capacity["driver-a"].memory.compareTo(quantity("1Gi")) >= 0 -`) - - simpleClaimWithConstraintNonExistentAttribute := unmarshal[resourceapi.ResourceClaim](t, ` -metadata: - name: claim -spec: - devices: - requests: - - name: req-0 - countMode: Exact - count: 1 - deviceClassName: driver-a - constraints: - - matchAttribute: NonExistentAttribute -`) - - allocatedTwoDeviceClaim := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-1 - - request: req-1 - driver: driver-a - pool: worker-1 - device: device-2 -`) - - allocatedFourDeviceClaim := unmarshal[resourceapi.AllocationResult](t, ` -devices: - results: - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-1 - - request: req-0 - driver: driver-a - pool: worker-1 - device: device-5 - - request: req-1 - driver: driver-a - pool: worker-1 - device: device-2 - - request: req-1 - driver: driver-a - pool: worker-1 - device: device-6 -`) +} + +// Helpers + +// convert a list of objects to a slice +func objects[T any](objs ...T) []T { + return objs +} + +// generate a ResourceSlice object with the given parameters and one device "device-1" +func sliceWithOneDevice(name, node, pool, driver string, generation, count int64) *resourceapi.ResourceSlice { + return slice(name, node, pool, driver, generation, count, nil, []resourceapi.Device{ + device(device1, nil, nil), + }) +} + +func TestAllocator(t *testing.T) { + nonExistentAttribute := resourceapi.FullyQualifiedName("NonExistentAttribute") + boolAttribute := resourceapi.FullyQualifiedName("boolAttribute") + stringAttribute := resourceapi.FullyQualifiedName("stringAttribute") + versionAttribute := resourceapi.FullyQualifiedName("driverVersion") + intAttribute := resourceapi.FullyQualifiedName("numa") testcases := map[string]struct { claimsToAllocate []*resourceapi.ResourceClaim @@ -830,240 +291,435 @@ devices: "empty": {}, "simple": { - claimsToAllocate: objects(simpleClaim), - classes: objects(driverAClass), - slices: objects(node1slice, node2slice), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), - expectResults: []any{allocatedSimpleClaim}, + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + )}, }, "other-node": { - claimsToAllocate: objects(simpleClaim), - classes: objects(driverAClass), - slices: objects(node1slice, node2slice), - node: node2, - - expectResults: []any{allocatedSimpleClaimNode2}, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(class(classA, driverA)), + slices: objects( + sliceWithOneDevice(slice1, node1, pool1, driverB, 1, 1), + sliceWithOneDevice(slice2, node2, pool2, driverA, 1, 1), + ), + node: node(node2, region2), + + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool2, device1), + )}, }, "small-and-large": { - claimsToAllocate: objects(twoDeviceClaim), - classes: objects(driverAClass), - slices: objects(node1slice, node2slice), - node: node1, - - expectResults: []any{allocatedTwoDeviceClaim}, + claimsToAllocate: objects(claimWithRequests( + claim0, + nil, + request(req0, classA, 1, resourceapi.DeviceSelector{ + CEL: &resourceapi.CELDeviceSelector{ + Expression: fmt.Sprintf(`device.capacity["%s"].memory.compareTo(quantity("1Gi")) >= 0`, driverA), + }}), + request(req1, classA, 1, resourceapi.DeviceSelector{ + CEL: &resourceapi.CELDeviceSelector{ + Expression: fmt.Sprintf(`device.capacity["%s"].memory.compareTo(quantity("2Gi")) >= 0`, driverA), + }}), + )), + classes: objects(class(classA, driverA)), + slices: objects(slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device1, map[resourceapi.QualifiedName]resource.Quantity{ + "memory": resource.MustParse("1Gi"), + }, nil), + device(device2, map[resourceapi.QualifiedName]resource.Quantity{ + "memory": resource.MustParse("2Gi"), + }, nil), + })), + node: node(node1, region1), + + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + deviceAllocationResult(req1, driverA, pool1, device2), + )}, }, "small-and-large-backtrack": { - claimsToAllocate: objects(twoDeviceClaim), - classes: objects(driverAClass), + claimsToAllocate: objects(claimWithRequests( + claim0, + nil, + request(req0, classA, 1, resourceapi.DeviceSelector{ + CEL: &resourceapi.CELDeviceSelector{ + Expression: fmt.Sprintf(`device.capacity["%s"].memory.compareTo(quantity("1Gi")) >= 0`, driverA), + }}), + request(req1, classA, 1, resourceapi.DeviceSelector{ + CEL: &resourceapi.CELDeviceSelector{ + Expression: fmt.Sprintf(`device.capacity["%s"].memory.compareTo(quantity("2Gi")) >= 0`, driverA), + }}), + )), + classes: objects(class(classA, driverA)), // Reversing the order in which the devices are listed causes the "large" device to // be allocated for the "small" request, leaving the "large" request unsatisfied. // The initial decision needs to be undone before a solution is found. - slices: objects(func() *resourceapi.ResourceSlice { - slice := node1slice.DeepCopy() - slice.Spec.Devices[0], slice.Spec.Devices[1] = slice.Spec.Devices[1], slice.Spec.Devices[0] - return slice - }()), - node: node1, - - expectResults: []any{allocatedTwoDeviceClaim}, + slices: objects(slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device2, map[resourceapi.QualifiedName]resource.Quantity{ + "memory": resource.MustParse("2Gi"), + }, nil), + device(device1, map[resourceapi.QualifiedName]resource.Quantity{ + "memory": resource.MustParse("1Gi"), + }, nil), + })), + node: node(node1, region1), + + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + deviceAllocationResult(req1, driverA, pool1, device2), + )}, }, "devices-split-across-different-slices": { - claimsToAllocate: objects(fourDeviceClaim), - classes: objects(driverAClass), - slices: objects(node1slice, node1slice2), - node: node1, - - expectResults: []any{allocatedFourDeviceClaim}, + claimsToAllocate: objects(claimWithRequests(claim0, nil, resourceapi.DeviceRequest{ + Name: req0, + Count: 2, + CountMode: resourceapi.DeviceCountModeExact, + DeviceClassName: classA, + })), + classes: objects(class(classA, driverA)), + slices: objects( + sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1), + sliceWithOneDevice(slice2, node1, pool2, driverA, 1, 1), + ), + node: node(node1, region1), + + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + deviceAllocationResult(req0, driverA, pool2, device1), + )}, }, "obsolete-slice": { - claimsToAllocate: objects(simpleClaim), - classes: objects(driverAClass), - slices: objects(node1ObsoleteSlice, node1slice), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(class(classA, driverA)), + slices: objects( + sliceWithOneDevice("slice-1-obsolete", node1, pool1, driverA, 1, 1), + sliceWithOneDevice(slice1, node1, pool1, driverA, 2, 1)), + node: node(node1, region1), - expectResults: []any{allocatedSimpleClaim}, + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + )}, }, "no-slices": { - claimsToAllocate: objects(simpleClaim), - classes: objects(driverAClass), + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(class(classA, driverA)), slices: nil, - node: node1, + node: node(node1, region1), expectResults: nil, }, "not-enough-suitable-devices": { - claimsToAllocate: objects(fourDeviceClaim), - classes: objects(driverAClass), - slices: objects(node1slice), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, classA), claim(claim0, req1, classA)), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + + node: node(node1, region1), expectResults: nil, }, "no-classes": { - claimsToAllocate: objects(simpleClaim), + claimsToAllocate: objects(claim(claim0, req0, classA)), classes: nil, - slices: objects(node1slice), - node: node1, + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), expectResults: nil, - expectError: gomega.MatchError(gomega.ContainSubstring("could not retrieve device class driver-a")), + expectError: gomega.MatchError(gomega.ContainSubstring("could not retrieve device class class-a")), }, "unknown-class": { - claimsToAllocate: objects(simpleClaimWithUnknownClassName), - classes: objects(driverAClass, driverBClass), - slices: objects(node1slice, node1DriverBslice), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, "unknown-class")), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), expectResults: nil, expectError: gomega.MatchError(gomega.ContainSubstring("could not retrieve device class unknown-class")), }, "empty-class": { - claimsToAllocate: objects(simpleClaimWithEmptyClassName), - classes: objects(driverAClass, driverBClass), - slices: objects(node1slice, node1DriverBslice), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, "")), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), expectResults: nil, - expectError: gomega.MatchError(gomega.ContainSubstring("claim claim, request req-0: unsupported request type")), + expectError: gomega.MatchError(gomega.ContainSubstring("claim claim-0, request req-0: unsupported request type")), }, "no-claims-to-allocate": { claimsToAllocate: nil, - classes: objects(driverAClass), - slices: objects(node1slice), - node: node1, + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), expectResults: nil, }, "all-devices": { - claimsToAllocate: objects(allDeviceClaim), - classes: objects(driverAClass), - slices: objects(node1slice2), - node: node1, - - expectResults: []any{allocated2DeviceClaim}, + claimsToAllocate: objects(claimWithRequests(claim0, nil, resourceapi.DeviceRequest{ + Name: req0, + CountMode: resourceapi.DeviceCountModeAll, + Count: 1, + DeviceClassName: classA, + })), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), + + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + )}, }, "all-devices-of-the-incomplete-pool": { - claimsToAllocate: objects(allDeviceClaim), - classes: objects(driverAClass), - slices: objects(node1IncompletePoolSlice), - node: node1, + claimsToAllocate: objects(claimWithRequests(claim0, nil, resourceapi.DeviceRequest{ + Name: req0, + CountMode: resourceapi.DeviceCountModeAll, + Count: 1, + DeviceClassName: classA, + })), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 2)), //node1IncompletePoolSlice), + node: node(node1, region1), expectResults: nil, - expectError: gomega.MatchError(gomega.ContainSubstring("claim claim, request req-0: asks for all devices, but resource pool driver-a/worker-1 is currently being updated")), + expectError: gomega.MatchError(gomega.ContainSubstring("claim claim-0, request req-0: asks for all devices, but resource pool driver-a/pool-1 is currently being updated")), }, "network-attached-device-with-class.SuitableNodes": { - claimsToAllocate: objects(simpleClaim), - classes: objects(driverAClass), - slices: objects(networkAttachedSliceWest), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(classWithSuitableNodes(classA, driverA)), + slices: objects(slice(slice1, "", pool1, driverA, 1, 1, + &v1.NodeSelector{ + NodeSelectorTerms: []v1.NodeSelectorTerm{ + { + MatchExpressions: []v1.NodeSelectorRequirement{ + { + Key: "region", + Operator: v1.NodeSelectorOpIn, + Values: []string{region1}, + }, + }, + }, + }, + }, + []resourceapi.Device{ + device(device1, nil, nil), + device(device2, nil, nil), + })), + node: node(node1, region1), - expectResults: []any{allocatedSimpleClaim}, + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + )}, }, "network-attached-device-without-class.SuitableNodes": { - claimsToAllocate: objects(simpleClaimDriverB), - classes: objects(driverBClass), - slices: objects(networkAttachedSliceEast), - node: node2, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), - expectResults: []any{allocatedSimpleClaimDriverB}, + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + )}, }, "unsuccessful-allocation-network-attached-device-with-class.SuitableNodes": { - claimsToAllocate: objects(simpleClaim), - classes: objects(driverAClass), - slices: objects(networkAttachedSliceEast), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(classWithSuitableNodes(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), expectResults: nil, }, "unsuccessful-allocation-network-attached-device-without-class.SuitableNodes": { - claimsToAllocate: objects(simpleClaimDriverB), - classes: objects(driverBClass), - slices: objects(networkAttachedSliceWest), - node: node2, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node2, region2), expectResults: nil, }, "several-different-drivers": { - claimsToAllocate: objects(simpleClaim, simpleClaimDriverB), - classes: objects(driverAClass, driverBClass), - slices: objects(node1slice, node1DriverBslice), - node: node1, - - expectResults: []any{allocatedSimpleClaim, allocatedSimpleClaimDriverBWorker1}, + claimsToAllocate: objects(claim(claim0, req0, classA), claim(claim0, req0, classB)), + classes: objects(class(classA, driverA), class(classB, driverB)), + slices: objects( + slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device1, nil, nil), + device(device2, nil, nil), + }), + sliceWithOneDevice(slice1, node1, pool1, driverB, 1, 1), + ), + node: node(node1, region1), + + expectResults: []any{ + allocationResults(deviceAllocationResult(req0, driverA, pool1, device1)), + allocationResults(deviceAllocationResult(req0, driverB, pool1, device1)), + }, }, "already-allocated-devices": { - claimsToAllocate: objects(simpleClaim), - allocatedClaims: objects(allocatedClaim), - classes: objects(driverAClass), - slices: objects(node1slice), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, classA)), + allocatedClaims: objects( + allocatedClaim(claim0, req0, classA, + deviceAllocationResult(req0, driverA, pool1, device1), + deviceAllocationResult(req1, driverA, pool1, device2), + ), + ), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), expectResults: nil, }, "with-constraint": { - claimsToAllocate: objects(twoDeviceClaimWithConstraint), - classes: objects(driverAClass), - slices: objects(node1slice), - node: node1, - - expectResults: []any{allocatedTwoDeviceClaim}, + claimsToAllocate: objects(claimWithRequests( + claim0, + []resourceapi.DeviceConstraint{ + {MatchAttribute: &intAttribute}, + {MatchAttribute: &versionAttribute}, + {MatchAttribute: &stringAttribute}, + {MatchAttribute: &boolAttribute}, + }, + request(req0, classA, 1), + request(req1, classA, 1), + ), + ), + classes: objects(class(classA, driverA)), + slices: objects(slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device1, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "driverVersion": {VersionValue: ptr.To("1.0.0")}, + "numa": {IntValue: ptr.To(int64(1))}, + "stringAttribute": {StringValue: ptr.To("stringAttributeValue")}, + "boolAttribute": {BoolValue: ptr.To(true)}, + }), + device(device2, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "driverVersion": {VersionValue: ptr.To("1.0.0")}, + "numa": {IntValue: ptr.To(int64(1))}, + "stringAttribute": {StringValue: ptr.To("stringAttributeValue")}, + "boolAttribute": {BoolValue: ptr.To(true)}, + }), + })), + node: node(node1, region1), + + expectResults: []any{allocationResults( + deviceAllocationResult(req0, driverA, pool1, device1), + deviceAllocationResult(req1, driverA, pool1, device2), + )}, }, "with-constraint-non-existent-attribute": { - claimsToAllocate: objects(simpleClaimWithConstraintNonExistentAttribute), - classes: objects(driverAClass), - slices: objects(node1slice), - node: node1, + claimsToAllocate: objects(claim(claim0, req0, classA, resourceapi.DeviceConstraint{ + MatchAttribute: &nonExistentAttribute, + })), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), expectResults: nil, }, "with-constraint-not-matching-int-attribute": { - claimsToAllocate: objects(claimWithConstraintNotMatchingIntAttribute), - classes: objects(driverAClass, driverBClass), - slices: objects(node1slice, node1slice2), - node: node1, + claimsToAllocate: objects(claimWithRequests( + claim0, + []resourceapi.DeviceConstraint{{MatchAttribute: &intAttribute}}, + request(req0, classA, 3)), + ), + classes: objects(class(classA, driverA), class(classB, driverB)), + slices: objects(slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device1, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "numa": {IntValue: ptr.To(int64(1))}, + }), + device(device2, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "numa": {IntValue: ptr.To(int64(2))}, + }), + })), + node: node(node1, region1), expectResults: nil, }, "with-constraint-not-matching-version-attribute": { - claimsToAllocate: objects(claimWithConstraintNotMatchingVersionAttribute), - classes: objects(driverAClass, driverBClass), - slices: objects(node1slice, node1slice2), - node: node1, + claimsToAllocate: objects(claimWithRequests( + claim0, + []resourceapi.DeviceConstraint{{MatchAttribute: &versionAttribute}}, + request(req0, classA, 3)), + ), + classes: objects(class(classA, driverA), class(classB, driverB)), + slices: objects(slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device1, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "driverVersion": {VersionValue: ptr.To("1.0.0")}, + }), + device(device2, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "driverVersion": {VersionValue: ptr.To("2.0.0")}, + }), + })), + node: node(node1, region1), expectResults: nil, }, "with-constraint-not-matching-string-attribute": { - claimsToAllocate: objects(claimWithConstraintNotMatchingStringAttribute), - classes: objects(driverAClass, driverBClass), - slices: objects(node1slice, node1slice2), - node: node1, + claimsToAllocate: objects(claimWithRequests( + claim0, + []resourceapi.DeviceConstraint{{MatchAttribute: &stringAttribute}}, + request(req0, classA, 3)), + ), + classes: objects(class(classA, driverA), class(classB, driverB)), + slices: objects(slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device1, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "stringAttribute": {StringValue: ptr.To("stringAttributeValue")}, + }), + device(device2, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "stringAttribute": {StringValue: ptr.To("stringAttributeValue2")}, + }), + })), + node: node(node1, region1), expectResults: nil, }, "with-constraint-not-matching-bool-attribute": { - claimsToAllocate: objects(claimWithConstraintNotMatchingBoolAttribute), - classes: objects(driverAClass, driverBClass), - slices: objects(node1slice, node1slice2), - node: node1, + claimsToAllocate: objects(claimWithRequests( + claim0, + []resourceapi.DeviceConstraint{{MatchAttribute: &boolAttribute}}, + request(req0, classA, 3)), + ), + classes: objects(class(classA, driverA), class(classB, driverB)), + slices: objects(slice(slice1, node1, pool1, driverA, 1, 1, nil, []resourceapi.Device{ + device(device1, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "boolAttribute": {BoolValue: ptr.To(true)}, + }), + device(device2, nil, map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{ + "boolAttribute": {BoolValue: ptr.To(false)}, + }), + })), + node: node(node1, region1), expectResults: nil, }, "with-class-device-config": { - claimsToAllocate: objects(simpleClaim), - classes: objects(driverAClassWithConfig), - slices: objects(node1slice), - node: node1, - - expectResults: []any{allocatedSimpleClaimWithClassConfig}, + claimsToAllocate: objects(claim(claim0, req0, classA)), + classes: objects(classWithConfig(classA, driverA, "classAttribute")), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), + + expectResults: []any{ + allocationResultsWithConfig( + driverA, + resourceapi.AllocationConfigSourceClass, + "classAttribute", + deviceAllocationResult(req0, driverA, pool1, device1), + ), + }, }, - "with-claim-device-config": { - claimsToAllocate: objects(simpleClaimWithConfig), - classes: objects(driverAClass), - slices: objects(node1slice), - node: node1, - - expectResults: []any{allocatedSimpleClaimWithClaimConfig}, + "claim-with-device-config": { + claimsToAllocate: objects(claimWithDeviceConfig(claim0, req0, classA, driverA, "deviceAttribute")), + classes: objects(class(classA, driverA)), + slices: objects(sliceWithOneDevice(slice1, node1, pool1, driverA, 1, 1)), + node: node(node1, region1), + + expectResults: []any{ + allocationResultsWithConfig( + driverA, + resourceapi.AllocationConfigSourceClaim, + "deviceAttribute", + deviceAllocationResult(req0, driverA, pool1, device1), + ), + }, }, } @@ -1144,34 +800,3 @@ func (l informerLister[T]) Get(name string) (*T, error) { } return nil, apierrors.NewNotFound(schema.GroupResource{}, "not found") } - -func unmarshal[T any](t *testing.T, data string) *T { - t.Helper() - - var obj T - err := yaml.UnmarshalStrict([]byte(data), &obj) - gomega.NewWithT(t).Expect(err).NotTo(gomega.HaveOccurred(), "parse YAML:\n"+data) - return &obj -} - -// func marshal[T any](t *testing.T, obj *T) string { -// t.Helper() - -// data, err := yaml.Marshal(obj) -// gomega.NewWithT(t).Expect(err).NotTo(gomega.HaveOccurred(), "create YAML") -// return string(data) -// } - -// func replace[T any](t *testing.T, obj *T, pairs ...string) *T { -// t.Helper() - -// data := marshal(t, obj) -// for i := 0; i < len(pairs); i += 2 { -// data = strings.ReplaceAll(data, pairs[i], pairs[i+1]) -// } -// return unmarshal[T](t, data) -// } - -func objects[T any](objs ...T) []T { - return objs -}