DRA API: remove obsolete types from v1alpha3

The v1alpha3 version is still needed for DeviceTaintRule, but the rest of the
types and most structs became obsolete in v1.32 when we introduced v1beta1 and
bumped the storage version to v1beta1.

Removing them now simplifies adding new features because new fields don't need
to be added to these obsolete types. This could have been done already in 1.33,
but wasn't to minimize disrupting on-going work.

Kubernetes-commit: 10de6780cf6b24d5115e508606334b81d6634ba6
This commit is contained in:
Patrick Ohly
2025-05-28 12:03:25 +02:00
committed by Kubernetes Publisher
parent d33a6ba860
commit d267bacbd5
56 changed files with 0 additions and 4889 deletions

View File

@@ -1,71 +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 "context"
resourcev1alpha3 "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"
applyconfigurationsresourcev1alpha3 "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 *resourcev1alpha3.DeviceClass, opts v1.CreateOptions) (*resourcev1alpha3.DeviceClass, error)
Update(ctx context.Context, deviceClass *resourcev1alpha3.DeviceClass, opts v1.UpdateOptions) (*resourcev1alpha3.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) (*resourcev1alpha3.DeviceClass, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.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 *resourcev1alpha3.DeviceClass, err error)
Apply(ctx context.Context, deviceClass *applyconfigurationsresourcev1alpha3.DeviceClassApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.DeviceClass, err error)
DeviceClassExpansion
}
// deviceClasses implements DeviceClassInterface
type deviceClasses struct {
*gentype.ClientWithListAndApply[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList, *applyconfigurationsresourcev1alpha3.DeviceClassApplyConfiguration]
}
// newDeviceClasses returns a DeviceClasses
func newDeviceClasses(c *ResourceV1alpha3Client) *deviceClasses {
return &deviceClasses{
gentype.NewClientWithListAndApply[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList, *applyconfigurationsresourcev1alpha3.DeviceClassApplyConfiguration](
"deviceclasses",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *resourcev1alpha3.DeviceClass { return &resourcev1alpha3.DeviceClass{} },
func() *resourcev1alpha3.DeviceClassList { return &resourcev1alpha3.DeviceClassList{} },
gentype.PrefersProtobuf[*resourcev1alpha3.DeviceClass](),
),
}
}

View File

@@ -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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
)
// fakeDeviceClasses implements DeviceClassInterface
type fakeDeviceClasses struct {
*gentype.FakeClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration]
Fake *FakeResourceV1alpha3
}
func newFakeDeviceClasses(fake *FakeResourceV1alpha3) typedresourcev1alpha3.DeviceClassInterface {
return &fakeDeviceClasses{
gentype.NewFakeClientWithListAndApply[*v1alpha3.DeviceClass, *v1alpha3.DeviceClassList, *resourcev1alpha3.DeviceClassApplyConfiguration](
fake.Fake,
"",
v1alpha3.SchemeGroupVersion.WithResource("deviceclasses"),
v1alpha3.SchemeGroupVersion.WithKind("DeviceClass"),
func() *v1alpha3.DeviceClass { return &v1alpha3.DeviceClass{} },
func() *v1alpha3.DeviceClassList { return &v1alpha3.DeviceClassList{} },
func(dst, src *v1alpha3.DeviceClassList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha3.DeviceClassList) []*v1alpha3.DeviceClass {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha3.DeviceClassList, items []*v1alpha3.DeviceClass) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -28,26 +28,10 @@ type FakeResourceV1alpha3 struct {
*testing.Fake
}
func (c *FakeResourceV1alpha3) DeviceClasses() v1alpha3.DeviceClassInterface {
return newFakeDeviceClasses(c)
}
func (c *FakeResourceV1alpha3) DeviceTaintRules() v1alpha3.DeviceTaintRuleInterface {
return newFakeDeviceTaintRules(c)
}
func (c *FakeResourceV1alpha3) ResourceClaims(namespace string) v1alpha3.ResourceClaimInterface {
return newFakeResourceClaims(c, namespace)
}
func (c *FakeResourceV1alpha3) ResourceClaimTemplates(namespace string) v1alpha3.ResourceClaimTemplateInterface {
return newFakeResourceClaimTemplates(c, namespace)
}
func (c *FakeResourceV1alpha3) ResourceSlices() v1alpha3.ResourceSliceInterface {
return newFakeResourceSlices(c)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeResourceV1alpha3) RESTClient() rest.Interface {

View File

@@ -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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
)
// fakeResourceClaims implements ResourceClaimInterface
type fakeResourceClaims struct {
*gentype.FakeClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration]
Fake *FakeResourceV1alpha3
}
func newFakeResourceClaims(fake *FakeResourceV1alpha3, namespace string) typedresourcev1alpha3.ResourceClaimInterface {
return &fakeResourceClaims{
gentype.NewFakeClientWithListAndApply[*v1alpha3.ResourceClaim, *v1alpha3.ResourceClaimList, *resourcev1alpha3.ResourceClaimApplyConfiguration](
fake.Fake,
namespace,
v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"),
v1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"),
func() *v1alpha3.ResourceClaim { return &v1alpha3.ResourceClaim{} },
func() *v1alpha3.ResourceClaimList { return &v1alpha3.ResourceClaimList{} },
func(dst, src *v1alpha3.ResourceClaimList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha3.ResourceClaimList) []*v1alpha3.ResourceClaim {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha3.ResourceClaimList, items []*v1alpha3.ResourceClaim) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
)
// fakeResourceClaimTemplates implements ResourceClaimTemplateInterface
type fakeResourceClaimTemplates struct {
*gentype.FakeClientWithListAndApply[*v1alpha3.ResourceClaimTemplate, *v1alpha3.ResourceClaimTemplateList, *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration]
Fake *FakeResourceV1alpha3
}
func newFakeResourceClaimTemplates(fake *FakeResourceV1alpha3, namespace string) typedresourcev1alpha3.ResourceClaimTemplateInterface {
return &fakeResourceClaimTemplates{
gentype.NewFakeClientWithListAndApply[*v1alpha3.ResourceClaimTemplate, *v1alpha3.ResourceClaimTemplateList, *resourcev1alpha3.ResourceClaimTemplateApplyConfiguration](
fake.Fake,
namespace,
v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"),
v1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplate"),
func() *v1alpha3.ResourceClaimTemplate { return &v1alpha3.ResourceClaimTemplate{} },
func() *v1alpha3.ResourceClaimTemplateList { return &v1alpha3.ResourceClaimTemplateList{} },
func(dst, src *v1alpha3.ResourceClaimTemplateList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha3.ResourceClaimTemplateList) []*v1alpha3.ResourceClaimTemplate {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha3.ResourceClaimTemplateList, items []*v1alpha3.ResourceClaimTemplate) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -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 client-gen. DO NOT EDIT.
package fake
import (
v1alpha3 "k8s.io/api/resource/v1alpha3"
resourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3"
)
// fakeResourceSlices implements ResourceSliceInterface
type fakeResourceSlices struct {
*gentype.FakeClientWithListAndApply[*v1alpha3.ResourceSlice, *v1alpha3.ResourceSliceList, *resourcev1alpha3.ResourceSliceApplyConfiguration]
Fake *FakeResourceV1alpha3
}
func newFakeResourceSlices(fake *FakeResourceV1alpha3) typedresourcev1alpha3.ResourceSliceInterface {
return &fakeResourceSlices{
gentype.NewFakeClientWithListAndApply[*v1alpha3.ResourceSlice, *v1alpha3.ResourceSliceList, *resourcev1alpha3.ResourceSliceApplyConfiguration](
fake.Fake,
"",
v1alpha3.SchemeGroupVersion.WithResource("resourceslices"),
v1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"),
func() *v1alpha3.ResourceSlice { return &v1alpha3.ResourceSlice{} },
func() *v1alpha3.ResourceSliceList { return &v1alpha3.ResourceSliceList{} },
func(dst, src *v1alpha3.ResourceSliceList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha3.ResourceSliceList) []*v1alpha3.ResourceSlice {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha3.ResourceSliceList, items []*v1alpha3.ResourceSlice) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
}
}

View File

@@ -18,12 +18,4 @@ limitations under the License.
package v1alpha3
type DeviceClassExpansion interface{}
type DeviceTaintRuleExpansion interface{}
type ResourceClaimExpansion interface{}
type ResourceClaimTemplateExpansion interface{}
type ResourceSliceExpansion interface{}

View File

@@ -28,11 +28,7 @@ import (
type ResourceV1alpha3Interface interface {
RESTClient() rest.Interface
DeviceClassesGetter
DeviceTaintRulesGetter
ResourceClaimsGetter
ResourceClaimTemplatesGetter
ResourceSlicesGetter
}
// ResourceV1alpha3Client is used to interact with features provided by the resource.k8s.io group.
@@ -40,26 +36,10 @@ type ResourceV1alpha3Client struct {
restClient rest.Interface
}
func (c *ResourceV1alpha3Client) DeviceClasses() DeviceClassInterface {
return newDeviceClasses(c)
}
func (c *ResourceV1alpha3Client) DeviceTaintRules() DeviceTaintRuleInterface {
return newDeviceTaintRules(c)
}
func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) ResourceClaimInterface {
return newResourceClaims(c, namespace)
}
func (c *ResourceV1alpha3Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
return newResourceClaimTemplates(c, namespace)
}
func (c *ResourceV1alpha3Client) ResourceSlices() ResourceSliceInterface {
return newResourceSlices(c)
}
// NewForConfig creates a new ResourceV1alpha3Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).

View File

@@ -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 client-gen. DO NOT EDIT.
package v1alpha3
import (
context "context"
resourcev1alpha3 "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"
applyconfigurationsresourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceClaimsGetter has a method to return a ResourceClaimInterface.
// A group's client should implement this interface.
type ResourceClaimsGetter interface {
ResourceClaims(namespace string) ResourceClaimInterface
}
// ResourceClaimInterface has methods to work with ResourceClaim resources.
type ResourceClaimInterface interface {
Create(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaim, opts v1.CreateOptions) (*resourcev1alpha3.ResourceClaim, error)
Update(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaim, opts v1.UpdateOptions) (*resourcev1alpha3.ResourceClaim, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, resourceClaim *resourcev1alpha3.ResourceClaim, opts v1.UpdateOptions) (*resourcev1alpha3.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) (*resourcev1alpha3.ResourceClaim, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.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 *resourcev1alpha3.ResourceClaim, err error)
Apply(ctx context.Context, resourceClaim *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceClaim, err error)
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, resourceClaim *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceClaim, err error)
ResourceClaimExpansion
}
// resourceClaims implements ResourceClaimInterface
type resourceClaims struct {
*gentype.ClientWithListAndApply[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList, *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration]
}
// newResourceClaims returns a ResourceClaims
func newResourceClaims(c *ResourceV1alpha3Client, namespace string) *resourceClaims {
return &resourceClaims{
gentype.NewClientWithListAndApply[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList, *applyconfigurationsresourcev1alpha3.ResourceClaimApplyConfiguration](
"resourceclaims",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *resourcev1alpha3.ResourceClaim { return &resourcev1alpha3.ResourceClaim{} },
func() *resourcev1alpha3.ResourceClaimList { return &resourcev1alpha3.ResourceClaimList{} },
gentype.PrefersProtobuf[*resourcev1alpha3.ResourceClaim](),
),
}
}

View File

@@ -1,73 +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 "context"
resourcev1alpha3 "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"
applyconfigurationsresourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceClaimTemplatesGetter has a method to return a ResourceClaimTemplateInterface.
// A group's client should implement this interface.
type ResourceClaimTemplatesGetter interface {
ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface
}
// ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources.
type ResourceClaimTemplateInterface interface {
Create(ctx context.Context, resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, opts v1.CreateOptions) (*resourcev1alpha3.ResourceClaimTemplate, error)
Update(ctx context.Context, resourceClaimTemplate *resourcev1alpha3.ResourceClaimTemplate, opts v1.UpdateOptions) (*resourcev1alpha3.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) (*resourcev1alpha3.ResourceClaimTemplate, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.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 *resourcev1alpha3.ResourceClaimTemplate, err error)
Apply(ctx context.Context, resourceClaimTemplate *applyconfigurationsresourcev1alpha3.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceClaimTemplate, err error)
ResourceClaimTemplateExpansion
}
// resourceClaimTemplates implements ResourceClaimTemplateInterface
type resourceClaimTemplates struct {
*gentype.ClientWithListAndApply[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList, *applyconfigurationsresourcev1alpha3.ResourceClaimTemplateApplyConfiguration]
}
// newResourceClaimTemplates returns a ResourceClaimTemplates
func newResourceClaimTemplates(c *ResourceV1alpha3Client, namespace string) *resourceClaimTemplates {
return &resourceClaimTemplates{
gentype.NewClientWithListAndApply[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList, *applyconfigurationsresourcev1alpha3.ResourceClaimTemplateApplyConfiguration](
"resourceclaimtemplates",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *resourcev1alpha3.ResourceClaimTemplate { return &resourcev1alpha3.ResourceClaimTemplate{} },
func() *resourcev1alpha3.ResourceClaimTemplateList {
return &resourcev1alpha3.ResourceClaimTemplateList{}
},
gentype.PrefersProtobuf[*resourcev1alpha3.ResourceClaimTemplate](),
),
}
}

View File

@@ -1,71 +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 "context"
resourcev1alpha3 "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"
applyconfigurationsresourcev1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3"
gentype "k8s.io/client-go/gentype"
scheme "k8s.io/client-go/kubernetes/scheme"
)
// ResourceSlicesGetter has a method to return a ResourceSliceInterface.
// A group's client should implement this interface.
type ResourceSlicesGetter interface {
ResourceSlices() ResourceSliceInterface
}
// ResourceSliceInterface has methods to work with ResourceSlice resources.
type ResourceSliceInterface interface {
Create(ctx context.Context, resourceSlice *resourcev1alpha3.ResourceSlice, opts v1.CreateOptions) (*resourcev1alpha3.ResourceSlice, error)
Update(ctx context.Context, resourceSlice *resourcev1alpha3.ResourceSlice, opts v1.UpdateOptions) (*resourcev1alpha3.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) (*resourcev1alpha3.ResourceSlice, error)
List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.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 *resourcev1alpha3.ResourceSlice, err error)
Apply(ctx context.Context, resourceSlice *applyconfigurationsresourcev1alpha3.ResourceSliceApplyConfiguration, opts v1.ApplyOptions) (result *resourcev1alpha3.ResourceSlice, err error)
ResourceSliceExpansion
}
// resourceSlices implements ResourceSliceInterface
type resourceSlices struct {
*gentype.ClientWithListAndApply[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList, *applyconfigurationsresourcev1alpha3.ResourceSliceApplyConfiguration]
}
// newResourceSlices returns a ResourceSlices
func newResourceSlices(c *ResourceV1alpha3Client) *resourceSlices {
return &resourceSlices{
gentype.NewClientWithListAndApply[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList, *applyconfigurationsresourcev1alpha3.ResourceSliceApplyConfiguration](
"resourceslices",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *resourcev1alpha3.ResourceSlice { return &resourcev1alpha3.ResourceSlice{} },
func() *resourcev1alpha3.ResourceSliceList { return &resourcev1alpha3.ResourceSliceList{} },
gentype.PrefersProtobuf[*resourcev1alpha3.ResourceSlice](),
),
}
}