mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-01 07:07:15 +00:00
api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes: - rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283) - extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802) We need to switch from v1alpha1 to v1alpha2 for that. Kubernetes-commit: 29941b8d3e7928244f48b05bf5bd453221fe7a9d
This commit is contained in:
committed by
Kubernetes Publisher
parent
362ffe4fcd
commit
324f43b974
@@ -66,7 +66,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"
|
||||
resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2"
|
||||
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"
|
||||
@@ -122,7 +122,7 @@ type Interface interface {
|
||||
RbacV1() rbacv1.RbacV1Interface
|
||||
RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
|
||||
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
|
||||
ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface
|
||||
ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface
|
||||
SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
|
||||
SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface
|
||||
SchedulingV1() schedulingv1.SchedulingV1Interface
|
||||
@@ -177,7 +177,7 @@ type Clientset struct {
|
||||
rbacV1 *rbacv1.RbacV1Client
|
||||
rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
|
||||
rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
|
||||
resourceV1alpha1 *resourcev1alpha1.ResourceV1alpha1Client
|
||||
resourceV1alpha2 *resourcev1alpha2.ResourceV1alpha2Client
|
||||
schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
|
||||
schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client
|
||||
schedulingV1 *schedulingv1.SchedulingV1Client
|
||||
@@ -401,9 +401,9 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
|
||||
return c.rbacV1alpha1
|
||||
}
|
||||
|
||||
// ResourceV1alpha1 retrieves the ResourceV1alpha1Client
|
||||
func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface {
|
||||
return c.resourceV1alpha1
|
||||
// ResourceV1alpha2 retrieves the ResourceV1alpha2Client
|
||||
func (c *Clientset) ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface {
|
||||
return c.resourceV1alpha2
|
||||
}
|
||||
|
||||
// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
|
||||
@@ -652,7 +652,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.resourceV1alpha1, err = resourcev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
cs.resourceV1alpha2, err = resourcev1alpha2.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -744,7 +744,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.rbacV1 = rbacv1.New(c)
|
||||
cs.rbacV1beta1 = rbacv1beta1.New(c)
|
||||
cs.rbacV1alpha1 = rbacv1alpha1.New(c)
|
||||
cs.resourceV1alpha1 = resourcev1alpha1.New(c)
|
||||
cs.resourceV1alpha2 = resourcev1alpha2.New(c)
|
||||
cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
|
||||
cs.schedulingV1beta1 = schedulingv1beta1.New(c)
|
||||
cs.schedulingV1 = schedulingv1.New(c)
|
||||
|
@@ -110,8 +110,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"
|
||||
resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1"
|
||||
fakeresourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1/fake"
|
||||
resourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2"
|
||||
fakeresourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2/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"
|
||||
@@ -392,9 +392,9 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
|
||||
return &fakerbacv1alpha1.FakeRbacV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// ResourceV1alpha1 retrieves the ResourceV1alpha1Client
|
||||
func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface {
|
||||
return &fakeresourcev1alpha1.FakeResourceV1alpha1{Fake: &c.Fake}
|
||||
// ResourceV1alpha2 retrieves the ResourceV1alpha2Client
|
||||
func (c *Clientset) ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface {
|
||||
return &fakeresourcev1alpha2.FakeResourceV1alpha2{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
|
||||
|
@@ -62,7 +62,7 @@ import (
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
schedulingv1 "k8s.io/api/scheduling/v1"
|
||||
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
|
||||
@@ -123,7 +123,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
rbacv1.AddToScheme,
|
||||
rbacv1beta1.AddToScheme,
|
||||
rbacv1alpha1.AddToScheme,
|
||||
resourcev1alpha1.AddToScheme,
|
||||
resourcev1alpha2.AddToScheme,
|
||||
schedulingv1alpha1.AddToScheme,
|
||||
schedulingv1beta1.AddToScheme,
|
||||
schedulingv1.AddToScheme,
|
||||
|
@@ -62,7 +62,7 @@ import (
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
resourcev1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
schedulingv1 "k8s.io/api/scheduling/v1"
|
||||
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
|
||||
@@ -123,7 +123,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
rbacv1.AddToScheme,
|
||||
rbacv1beta1.AddToScheme,
|
||||
rbacv1alpha1.AddToScheme,
|
||||
resourcev1alpha1.AddToScheme,
|
||||
resourcev1alpha2.AddToScheme,
|
||||
schedulingv1alpha1.AddToScheme,
|
||||
schedulingv1beta1.AddToScheme,
|
||||
schedulingv1.AddToScheme,
|
||||
|
@@ -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 v1alpha1
|
||||
package v1alpha2
|
@@ -23,40 +23,40 @@ import (
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakePodSchedulings implements PodSchedulingInterface
|
||||
type FakePodSchedulings struct {
|
||||
Fake *FakeResourceV1alpha1
|
||||
Fake *FakeResourceV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var podschedulingsResource = v1alpha1.SchemeGroupVersion.WithResource("podschedulings")
|
||||
var podschedulingsResource = v1alpha2.SchemeGroupVersion.WithResource("podschedulings")
|
||||
|
||||
var podschedulingsKind = v1alpha1.SchemeGroupVersion.WithKind("PodScheduling")
|
||||
var podschedulingsKind = v1alpha2.SchemeGroupVersion.WithKind("PodScheduling")
|
||||
|
||||
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
|
||||
func (c *FakePodSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *FakePodSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(podschedulingsResource, c.ns, name), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewGetAction(podschedulingsResource, c.ns, name), &v1alpha2.PodScheduling{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.PodScheduling), err
|
||||
return obj.(*v1alpha2.PodScheduling), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
|
||||
func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodSchedulingList, err error) {
|
||||
func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(podschedulingsResource, podschedulingsKind, c.ns, opts), &v1alpha1.PodSchedulingList{})
|
||||
Invokes(testing.NewListAction(podschedulingsResource, podschedulingsKind, c.ns, opts), &v1alpha2.PodSchedulingList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -66,8 +66,8 @@ func (c *FakePodSchedulings) List(ctx context.Context, opts v1.ListOptions) (res
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.PodSchedulingList{ListMeta: obj.(*v1alpha1.PodSchedulingList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.PodSchedulingList).Items {
|
||||
list := &v1alpha2.PodSchedulingList{ListMeta: obj.(*v1alpha2.PodSchedulingList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.PodSchedulingList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -83,43 +83,43 @@ func (c *FakePodSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (wa
|
||||
}
|
||||
|
||||
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
||||
func (c *FakePodSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *FakePodSchedulings) Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewCreateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha2.PodScheduling{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.PodScheduling), err
|
||||
return obj.(*v1alpha2.PodScheduling), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
||||
func (c *FakePodSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *FakePodSchedulings) Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewUpdateAction(podschedulingsResource, c.ns, podScheduling), &v1alpha2.PodScheduling{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.PodScheduling), err
|
||||
return obj.(*v1alpha2.PodScheduling), 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 *FakePodSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error) {
|
||||
func (c *FakePodSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(podschedulingsResource, "status", c.ns, podScheduling), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(podschedulingsResource, "status", c.ns, podScheduling), &v1alpha2.PodScheduling{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.PodScheduling), err
|
||||
return obj.(*v1alpha2.PodScheduling), err
|
||||
}
|
||||
|
||||
// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs.
|
||||
func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(podschedulingsResource, c.ns, name, opts), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(podschedulingsResource, c.ns, name, opts), &v1alpha2.PodScheduling{})
|
||||
|
||||
return err
|
||||
}
|
||||
@@ -128,23 +128,23 @@ func (c *FakePodSchedulings) Delete(ctx context.Context, name string, opts v1.De
|
||||
func (c *FakePodSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(podschedulingsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.PodSchedulingList{})
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.PodSchedulingList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podScheduling.
|
||||
func (c *FakePodSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *FakePodSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, name, pt, data, subresources...), &v1alpha2.PodScheduling{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.PodScheduling), err
|
||||
return obj.(*v1alpha2.PodScheduling), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
|
||||
func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
if podScheduling == nil {
|
||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
||||
}
|
||||
@@ -157,17 +157,17 @@ func (c *FakePodSchedulings) Apply(ctx context.Context, podScheduling *resourcev
|
||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.PodScheduling{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.PodScheduling), err
|
||||
return obj.(*v1alpha2.PodScheduling), 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 *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
if podScheduling == nil {
|
||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
||||
}
|
||||
@@ -180,10 +180,10 @@ func (c *FakePodSchedulings) ApplyStatus(ctx context.Context, podScheduling *res
|
||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.PodScheduling{})
|
||||
Invokes(testing.NewPatchSubresourceAction(podschedulingsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.PodScheduling{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.PodScheduling), err
|
||||
return obj.(*v1alpha2.PodScheduling), err
|
||||
}
|
@@ -19,34 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeResourceV1alpha1 struct {
|
||||
type FakeResourceV1alpha2 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha1) PodSchedulings(namespace string) v1alpha1.PodSchedulingInterface {
|
||||
func (c *FakeResourceV1alpha2) PodSchedulings(namespace string) v1alpha2.PodSchedulingInterface {
|
||||
return &FakePodSchedulings{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha1) ResourceClaims(namespace string) v1alpha1.ResourceClaimInterface {
|
||||
func (c *FakeResourceV1alpha2) ResourceClaims(namespace string) v1alpha2.ResourceClaimInterface {
|
||||
return &FakeResourceClaims{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha1) ResourceClaimTemplates(namespace string) v1alpha1.ResourceClaimTemplateInterface {
|
||||
func (c *FakeResourceV1alpha2) ResourceClaimTemplates(namespace string) v1alpha2.ResourceClaimTemplateInterface {
|
||||
return &FakeResourceClaimTemplates{c, namespace}
|
||||
}
|
||||
|
||||
func (c *FakeResourceV1alpha1) ResourceClasses() v1alpha1.ResourceClassInterface {
|
||||
func (c *FakeResourceV1alpha2) ResourceClasses() v1alpha2.ResourceClassInterface {
|
||||
return &FakeResourceClasses{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeResourceV1alpha1) RESTClient() rest.Interface {
|
||||
func (c *FakeResourceV1alpha2) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
@@ -23,40 +23,40 @@ import (
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResourceClaims implements ResourceClaimInterface
|
||||
type FakeResourceClaims struct {
|
||||
Fake *FakeResourceV1alpha1
|
||||
Fake *FakeResourceV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var resourceclaimsResource = v1alpha1.SchemeGroupVersion.WithResource("resourceclaims")
|
||||
var resourceclaimsResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaims")
|
||||
|
||||
var resourceclaimsKind = v1alpha1.SchemeGroupVersion.WithKind("ResourceClaim")
|
||||
var resourceclaimsKind = v1alpha2.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 *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *FakeResourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(resourceclaimsResource, c.ns, name), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewGetAction(resourceclaimsResource, c.ns, name), &v1alpha2.ResourceClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaim), err
|
||||
return obj.(*v1alpha2.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 *v1alpha1.ResourceClaimList, err error) {
|
||||
func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(resourceclaimsResource, resourceclaimsKind, c.ns, opts), &v1alpha1.ResourceClaimList{})
|
||||
Invokes(testing.NewListAction(resourceclaimsResource, resourceclaimsKind, c.ns, opts), &v1alpha2.ResourceClaimList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -66,8 +66,8 @@ func (c *FakeResourceClaims) List(ctx context.Context, opts v1.ListOptions) (res
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ResourceClaimList{ListMeta: obj.(*v1alpha1.ResourceClaimList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ResourceClaimList).Items {
|
||||
list := &v1alpha2.ResourceClaimList{ListMeta: obj.(*v1alpha2.ResourceClaimList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ResourceClaimList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -83,43 +83,43 @@ 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 *v1alpha1.ResourceClaim, opts v1.CreateOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *FakeResourceClaims) Create(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.CreateOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewCreateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha2.ResourceClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaim), err
|
||||
return obj.(*v1alpha2.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 *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *FakeResourceClaims) Update(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewUpdateAction(resourceclaimsResource, c.ns, resourceClaim), &v1alpha2.ResourceClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaim), err
|
||||
return obj.(*v1alpha2.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 *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error) {
|
||||
func (c *FakeResourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (*v1alpha2.ResourceClaim, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(resourceclaimsResource, "status", c.ns, resourceClaim), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(resourceclaimsResource, "status", c.ns, resourceClaim), &v1alpha2.ResourceClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaim), err
|
||||
return obj.(*v1alpha2.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), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(resourceclaimsResource, c.ns, name, opts), &v1alpha2.ResourceClaim{})
|
||||
|
||||
return err
|
||||
}
|
||||
@@ -128,23 +128,23 @@ 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.NewDeleteCollectionAction(resourceclaimsResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimList{})
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.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 *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *FakeResourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaim), err
|
||||
return obj.(*v1alpha2.ResourceClaim), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim.
|
||||
func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
if resourceClaim == nil {
|
||||
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
|
||||
}
|
||||
@@ -157,17 +157,17 @@ func (c *FakeResourceClaims) Apply(ctx context.Context, resourceClaim *resourcev
|
||||
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaim), err
|
||||
return obj.(*v1alpha2.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 *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
if resourceClaim == nil {
|
||||
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
|
||||
}
|
||||
@@ -180,10 +180,10 @@ func (c *FakeResourceClaims) ApplyStatus(ctx context.Context, resourceClaim *res
|
||||
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ResourceClaim{})
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.ResourceClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaim), err
|
||||
return obj.(*v1alpha2.ResourceClaim), err
|
||||
}
|
@@ -23,40 +23,40 @@ import (
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResourceClaimTemplates implements ResourceClaimTemplateInterface
|
||||
type FakeResourceClaimTemplates struct {
|
||||
Fake *FakeResourceV1alpha1
|
||||
Fake *FakeResourceV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var resourceclaimtemplatesResource = v1alpha1.SchemeGroupVersion.WithResource("resourceclaimtemplates")
|
||||
var resourceclaimtemplatesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates")
|
||||
|
||||
var resourceclaimtemplatesKind = v1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplate")
|
||||
var resourceclaimtemplatesKind = v1alpha2.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 *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
func (c *FakeResourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(resourceclaimtemplatesResource, c.ns, name), &v1alpha1.ResourceClaimTemplate{})
|
||||
Invokes(testing.NewGetAction(resourceclaimtemplatesResource, c.ns, name), &v1alpha2.ResourceClaimTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaimTemplate), err
|
||||
return obj.(*v1alpha2.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 *v1alpha1.ResourceClaimTemplateList, err error) {
|
||||
func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimTemplateList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), &v1alpha1.ResourceClaimTemplateList{})
|
||||
Invokes(testing.NewListAction(resourceclaimtemplatesResource, resourceclaimtemplatesKind, c.ns, opts), &v1alpha2.ResourceClaimTemplateList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -66,8 +66,8 @@ func (c *FakeResourceClaimTemplates) List(ctx context.Context, opts v1.ListOptio
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha1.ResourceClaimTemplateList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ResourceClaimTemplateList).Items {
|
||||
list := &v1alpha2.ResourceClaimTemplateList{ListMeta: obj.(*v1alpha2.ResourceClaimTemplateList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ResourceClaimTemplateList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -83,31 +83,31 @@ 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 *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
func (c *FakeResourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{})
|
||||
Invokes(testing.NewCreateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha2.ResourceClaimTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaimTemplate), err
|
||||
return obj.(*v1alpha2.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 *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
func (c *FakeResourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha1.ResourceClaimTemplate{})
|
||||
Invokes(testing.NewUpdateAction(resourceclaimtemplatesResource, c.ns, resourceClaimTemplate), &v1alpha2.ResourceClaimTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaimTemplate), err
|
||||
return obj.(*v1alpha2.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), &v1alpha1.ResourceClaimTemplate{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(resourceclaimtemplatesResource, c.ns, name, opts), &v1alpha2.ResourceClaimTemplate{})
|
||||
|
||||
return err
|
||||
}
|
||||
@@ -116,23 +116,23 @@ 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.NewDeleteCollectionAction(resourceclaimtemplatesResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClaimTemplateList{})
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.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 *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
func (c *FakeResourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ResourceClaimTemplate{})
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, name, pt, data, subresources...), &v1alpha2.ResourceClaimTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaimTemplate), err
|
||||
return obj.(*v1alpha2.ResourceClaimTemplate), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate.
|
||||
func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
if resourceClaimTemplate == nil {
|
||||
return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil")
|
||||
}
|
||||
@@ -145,10 +145,10 @@ func (c *FakeResourceClaimTemplates) Apply(ctx context.Context, resourceClaimTem
|
||||
return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClaimTemplate{})
|
||||
Invokes(testing.NewPatchSubresourceAction(resourceclaimtemplatesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClaimTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClaimTemplate), err
|
||||
return obj.(*v1alpha2.ResourceClaimTemplate), err
|
||||
}
|
@@ -23,38 +23,38 @@ import (
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
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"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeResourceClasses implements ResourceClassInterface
|
||||
type FakeResourceClasses struct {
|
||||
Fake *FakeResourceV1alpha1
|
||||
Fake *FakeResourceV1alpha2
|
||||
}
|
||||
|
||||
var resourceclassesResource = v1alpha1.SchemeGroupVersion.WithResource("resourceclasses")
|
||||
var resourceclassesResource = v1alpha2.SchemeGroupVersion.WithResource("resourceclasses")
|
||||
|
||||
var resourceclassesKind = v1alpha1.SchemeGroupVersion.WithKind("ResourceClass")
|
||||
var resourceclassesKind = v1alpha2.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 *v1alpha1.ResourceClass, err error) {
|
||||
func (c *FakeResourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(resourceclassesResource, name), &v1alpha1.ResourceClass{})
|
||||
Invokes(testing.NewRootGetAction(resourceclassesResource, name), &v1alpha2.ResourceClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClass), err
|
||||
return obj.(*v1alpha2.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 *v1alpha1.ResourceClassList, err error) {
|
||||
func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(resourceclassesResource, resourceclassesKind, opts), &v1alpha1.ResourceClassList{})
|
||||
Invokes(testing.NewRootListAction(resourceclassesResource, resourceclassesKind, opts), &v1alpha2.ResourceClassList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -63,8 +63,8 @@ func (c *FakeResourceClasses) List(ctx context.Context, opts v1.ListOptions) (re
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ResourceClassList{ListMeta: obj.(*v1alpha1.ResourceClassList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ResourceClassList).Items {
|
||||
list := &v1alpha2.ResourceClassList{ListMeta: obj.(*v1alpha2.ResourceClassList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.ResourceClassList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -79,29 +79,29 @@ 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 *v1alpha1.ResourceClass, opts v1.CreateOptions) (result *v1alpha1.ResourceClass, err error) {
|
||||
func (c *FakeResourceClasses) Create(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.CreateOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{})
|
||||
Invokes(testing.NewRootCreateAction(resourceclassesResource, resourceClass), &v1alpha2.ResourceClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClass), err
|
||||
return obj.(*v1alpha2.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 *v1alpha1.ResourceClass, opts v1.UpdateOptions) (result *v1alpha1.ResourceClass, err error) {
|
||||
func (c *FakeResourceClasses) Update(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.UpdateOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(resourceclassesResource, resourceClass), &v1alpha1.ResourceClass{})
|
||||
Invokes(testing.NewRootUpdateAction(resourceclassesResource, resourceClass), &v1alpha2.ResourceClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClass), err
|
||||
return obj.(*v1alpha2.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), &v1alpha1.ResourceClass{})
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(resourceclassesResource, name, opts), &v1alpha2.ResourceClass{})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -109,22 +109,22 @@ 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.NewRootDeleteCollectionAction(resourceclassesResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceClassList{})
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.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 *v1alpha1.ResourceClass, err error) {
|
||||
func (c *FakeResourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, name, pt, data, subresources...), &v1alpha1.ResourceClass{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, name, pt, data, subresources...), &v1alpha2.ResourceClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClass), err
|
||||
return obj.(*v1alpha2.ResourceClass), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass.
|
||||
func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) {
|
||||
func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha2.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
if resourceClass == nil {
|
||||
return nil, fmt.Errorf("resourceClass provided to Apply must not be nil")
|
||||
}
|
||||
@@ -137,9 +137,9 @@ func (c *FakeResourceClasses) Apply(ctx context.Context, resourceClass *resource
|
||||
return nil, fmt.Errorf("resourceClass.Name must be provided to Apply")
|
||||
}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, *name, types.ApplyPatchType, data), &v1alpha1.ResourceClass{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(resourceclassesResource, *name, types.ApplyPatchType, data), &v1alpha2.ResourceClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ResourceClass), err
|
||||
return obj.(*v1alpha2.ResourceClass), err
|
||||
}
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
type PodSchedulingExpansion interface{}
|
||||
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -24,11 +24,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -41,17 +41,17 @@ type PodSchedulingsGetter interface {
|
||||
|
||||
// PodSchedulingInterface has methods to work with PodScheduling resources.
|
||||
type PodSchedulingInterface interface {
|
||||
Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (*v1alpha1.PodScheduling, error)
|
||||
Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error)
|
||||
UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (*v1alpha1.PodScheduling, error)
|
||||
Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (*v1alpha2.PodScheduling, error)
|
||||
Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, error)
|
||||
UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (*v1alpha2.PodScheduling, 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) (*v1alpha1.PodScheduling, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodSchedulingList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.PodScheduling, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.PodSchedulingList, 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 *v1alpha1.PodScheduling, err error)
|
||||
Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error)
|
||||
ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error)
|
||||
Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error)
|
||||
ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error)
|
||||
PodSchedulingExpansion
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ type podSchedulings struct {
|
||||
}
|
||||
|
||||
// newPodSchedulings returns a PodSchedulings
|
||||
func newPodSchedulings(c *ResourceV1alpha1Client, namespace string) *podSchedulings {
|
||||
func newPodSchedulings(c *ResourceV1alpha2Client, namespace string) *podSchedulings {
|
||||
return &podSchedulings{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
@@ -70,8 +70,8 @@ func newPodSchedulings(c *ResourceV1alpha1Client, namespace string) *podScheduli
|
||||
}
|
||||
|
||||
// Get takes name of the podScheduling, and returns the corresponding podScheduling object, and an error if there is any.
|
||||
func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
result = &v1alpha2.PodScheduling{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
@@ -83,12 +83,12 @@ func (c *podSchedulings) Get(ctx context.Context, name string, options v1.GetOpt
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodSchedulings that match those selectors.
|
||||
func (c *podSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodSchedulingList, err error) {
|
||||
func (c *podSchedulings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.PodSchedulingList{}
|
||||
result = &v1alpha2.PodSchedulingList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
@@ -115,8 +115,8 @@ func (c *podSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (watch.
|
||||
}
|
||||
|
||||
// Create takes the representation of a podScheduling and creates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
||||
func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.CreateOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.CreateOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
result = &v1alpha2.PodScheduling{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
@@ -128,8 +128,8 @@ func (c *podSchedulings) Create(ctx context.Context, podScheduling *v1alpha1.Pod
|
||||
}
|
||||
|
||||
// Update takes the representation of a podScheduling and updates it. Returns the server's representation of the podScheduling, and an error, if there is any.
|
||||
func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
result = &v1alpha2.PodScheduling{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
@@ -143,8 +143,8 @@ func (c *podSchedulings) Update(ctx context.Context, podScheduling *v1alpha1.Pod
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *podSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha1.PodScheduling, opts v1.UpdateOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
func (c *podSchedulings) UpdateStatus(ctx context.Context, podScheduling *v1alpha2.PodScheduling, opts v1.UpdateOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
result = &v1alpha2.PodScheduling{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
@@ -185,8 +185,8 @@ func (c *podSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podScheduling.
|
||||
func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodScheduling, err error) {
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodScheduling, err error) {
|
||||
result = &v1alpha2.PodScheduling{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
@@ -200,7 +200,7 @@ func (c *podSchedulings) Patch(ctx context.Context, name string, pt types.PatchT
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podScheduling.
|
||||
func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
if podScheduling == nil {
|
||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
||||
}
|
||||
@@ -213,7 +213,7 @@ func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alp
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
result = &v1alpha2.PodScheduling{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
@@ -227,7 +227,7 @@ func (c *podSchedulings) Apply(ctx context.Context, podScheduling *resourcev1alp
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha1.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PodScheduling, err error) {
|
||||
func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourcev1alpha2.PodSchedulingApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodScheduling, err error) {
|
||||
if podScheduling == nil {
|
||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
||||
}
|
||||
@@ -242,7 +242,7 @@ func (c *podSchedulings) ApplyStatus(ctx context.Context, podScheduling *resourc
|
||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
result = &v1alpha2.PodScheduling{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
@@ -16,17 +16,17 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type ResourceV1alpha1Interface interface {
|
||||
type ResourceV1alpha2Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
PodSchedulingsGetter
|
||||
ResourceClaimsGetter
|
||||
@@ -34,31 +34,31 @@ type ResourceV1alpha1Interface interface {
|
||||
ResourceClassesGetter
|
||||
}
|
||||
|
||||
// ResourceV1alpha1Client is used to interact with features provided by the resource.k8s.io group.
|
||||
type ResourceV1alpha1Client struct {
|
||||
// ResourceV1alpha2Client is used to interact with features provided by the resource.k8s.io group.
|
||||
type ResourceV1alpha2Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha1Client) PodSchedulings(namespace string) PodSchedulingInterface {
|
||||
func (c *ResourceV1alpha2Client) PodSchedulings(namespace string) PodSchedulingInterface {
|
||||
return newPodSchedulings(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha1Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
||||
func (c *ResourceV1alpha2Client) ResourceClaims(namespace string) ResourceClaimInterface {
|
||||
return newResourceClaims(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha1Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
|
||||
func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) ResourceClaimTemplateInterface {
|
||||
return newResourceClaimTemplates(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ResourceV1alpha1Client) ResourceClasses() ResourceClassInterface {
|
||||
func (c *ResourceV1alpha2Client) ResourceClasses() ResourceClassInterface {
|
||||
return newResourceClasses(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new ResourceV1alpha1Client for the given config.
|
||||
// NewForConfig creates a new ResourceV1alpha2Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*ResourceV1alpha1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*ResourceV1alpha2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
@@ -70,9 +70,9 @@ func NewForConfig(c *rest.Config) (*ResourceV1alpha1Client, error) {
|
||||
return NewForConfigAndClient(&config, httpClient)
|
||||
}
|
||||
|
||||
// NewForConfigAndClient creates a new ResourceV1alpha1Client for the given config and http client.
|
||||
// NewForConfigAndClient creates a new ResourceV1alpha2Client 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) (*ResourceV1alpha1Client, error) {
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
@@ -81,12 +81,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1alpha1Cli
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ResourceV1alpha1Client{client}, nil
|
||||
return &ResourceV1alpha2Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new ResourceV1alpha1Client for the given config and
|
||||
// NewForConfigOrDie creates a new ResourceV1alpha2Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha2Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@@ -94,13 +94,13 @@ func NewForConfigOrDie(c *rest.Config) *ResourceV1alpha1Client {
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new ResourceV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ResourceV1alpha1Client {
|
||||
return &ResourceV1alpha1Client{c}
|
||||
// New creates a new ResourceV1alpha2Client for the given RESTClient.
|
||||
func New(c rest.Interface) *ResourceV1alpha2Client {
|
||||
return &ResourceV1alpha2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
gv := v1alpha2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
@@ -114,7 +114,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 *ResourceV1alpha1Client) RESTClient() rest.Interface {
|
||||
func (c *ResourceV1alpha2Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -24,11 +24,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -41,17 +41,17 @@ type ResourceClaimsGetter interface {
|
||||
|
||||
// ResourceClaimInterface has methods to work with ResourceClaim resources.
|
||||
type ResourceClaimInterface interface {
|
||||
Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (*v1alpha1.ResourceClaim, error)
|
||||
Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error)
|
||||
UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (*v1alpha1.ResourceClaim, error)
|
||||
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)
|
||||
UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (*v1alpha2.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) (*v1alpha1.ResourceClaim, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClaimList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaim, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.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 *v1alpha1.ResourceClaim, err error)
|
||||
Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error)
|
||||
ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err 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)
|
||||
ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error)
|
||||
ResourceClaimExpansion
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ type resourceClaims struct {
|
||||
}
|
||||
|
||||
// newResourceClaims returns a ResourceClaims
|
||||
func newResourceClaims(c *ResourceV1alpha1Client, namespace string) *resourceClaims {
|
||||
func newResourceClaims(c *ResourceV1alpha2Client, namespace string) *resourceClaims {
|
||||
return &resourceClaims{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
@@ -70,8 +70,8 @@ func newResourceClaims(c *ResourceV1alpha1Client, namespace string) *resourceCla
|
||||
}
|
||||
|
||||
// Get takes name of the resourceClaim, and returns the corresponding resourceClaim object, and an error if there is any.
|
||||
func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
result = &v1alpha1.ResourceClaim{}
|
||||
func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
result = &v1alpha2.ResourceClaim{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
||||
@@ -83,12 +83,12 @@ func (c *resourceClaims) Get(ctx context.Context, name string, options v1.GetOpt
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceClaims that match those selectors.
|
||||
func (c *resourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimList, err error) {
|
||||
func (c *resourceClaims) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ResourceClaimList{}
|
||||
result = &v1alpha2.ResourceClaimList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
||||
@@ -115,8 +115,8 @@ func (c *resourceClaims) Watch(ctx context.Context, opts v1.ListOptions) (watch.
|
||||
}
|
||||
|
||||
// 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 *resourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.CreateOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
result = &v1alpha1.ResourceClaim{}
|
||||
func (c *resourceClaims) Create(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.CreateOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
result = &v1alpha2.ResourceClaim{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
||||
@@ -128,8 +128,8 @@ func (c *resourceClaims) Create(ctx context.Context, resourceClaim *v1alpha1.Res
|
||||
}
|
||||
|
||||
// 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 *resourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
result = &v1alpha1.ResourceClaim{}
|
||||
func (c *resourceClaims) Update(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
result = &v1alpha2.ResourceClaim{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
||||
@@ -143,8 +143,8 @@ func (c *resourceClaims) Update(ctx context.Context, resourceClaim *v1alpha1.Res
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *resourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha1.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
result = &v1alpha1.ResourceClaim{}
|
||||
func (c *resourceClaims) UpdateStatus(ctx context.Context, resourceClaim *v1alpha2.ResourceClaim, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
result = &v1alpha2.ResourceClaim{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
||||
@@ -185,8 +185,8 @@ func (c *resourceClaims) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceClaim.
|
||||
func (c *resourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaim, err error) {
|
||||
result = &v1alpha1.ResourceClaim{}
|
||||
func (c *resourceClaims) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaim, err error) {
|
||||
result = &v1alpha2.ResourceClaim{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
||||
@@ -200,7 +200,7 @@ func (c *resourceClaims) Patch(ctx context.Context, name string, pt types.PatchT
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaim.
|
||||
func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
if resourceClaim == nil {
|
||||
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
|
||||
}
|
||||
@@ -213,7 +213,7 @@ func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alp
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.ResourceClaim{}
|
||||
result = &v1alpha2.ResourceClaim{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
||||
@@ -227,7 +227,7 @@ func (c *resourceClaims) Apply(ctx context.Context, resourceClaim *resourcev1alp
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *resourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha1.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaim, err error) {
|
||||
func (c *resourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourcev1alpha2.ResourceClaimApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaim, err error) {
|
||||
if resourceClaim == nil {
|
||||
return nil, fmt.Errorf("resourceClaim provided to Apply must not be nil")
|
||||
}
|
||||
@@ -242,7 +242,7 @@ func (c *resourceClaims) ApplyStatus(ctx context.Context, resourceClaim *resourc
|
||||
return nil, fmt.Errorf("resourceClaim.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha1.ResourceClaim{}
|
||||
result = &v1alpha2.ResourceClaim{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaims").
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -24,11 +24,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -41,15 +41,15 @@ type ResourceClaimTemplatesGetter interface {
|
||||
|
||||
// ResourceClaimTemplateInterface has methods to work with ResourceClaimTemplate resources.
|
||||
type ResourceClaimTemplateInterface interface {
|
||||
Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (*v1alpha1.ResourceClaimTemplate, error)
|
||||
Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (*v1alpha1.ResourceClaimTemplate, error)
|
||||
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)
|
||||
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) (*v1alpha1.ResourceClaimTemplate, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClaimTemplateList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClaimTemplate, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.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 *v1alpha1.ResourceClaimTemplate, err error)
|
||||
Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err 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)
|
||||
ResourceClaimTemplateExpansion
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ type resourceClaimTemplates struct {
|
||||
}
|
||||
|
||||
// newResourceClaimTemplates returns a ResourceClaimTemplates
|
||||
func newResourceClaimTemplates(c *ResourceV1alpha1Client, namespace string) *resourceClaimTemplates {
|
||||
func newResourceClaimTemplates(c *ResourceV1alpha2Client, namespace string) *resourceClaimTemplates {
|
||||
return &resourceClaimTemplates{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
@@ -68,8 +68,8 @@ func newResourceClaimTemplates(c *ResourceV1alpha1Client, namespace string) *res
|
||||
}
|
||||
|
||||
// Get takes name of the resourceClaimTemplate, and returns the corresponding resourceClaimTemplate object, and an error if there is any.
|
||||
func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha1.ResourceClaimTemplate{}
|
||||
func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha2.ResourceClaimTemplate{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimtemplates").
|
||||
@@ -81,12 +81,12 @@ func (c *resourceClaimTemplates) Get(ctx context.Context, name string, options v
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceClaimTemplates that match those selectors.
|
||||
func (c *resourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClaimTemplateList, err error) {
|
||||
func (c *resourceClaimTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClaimTemplateList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ResourceClaimTemplateList{}
|
||||
result = &v1alpha2.ResourceClaimTemplateList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimtemplates").
|
||||
@@ -113,8 +113,8 @@ func (c *resourceClaimTemplates) Watch(ctx context.Context, opts v1.ListOptions)
|
||||
}
|
||||
|
||||
// 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 *resourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha1.ResourceClaimTemplate{}
|
||||
func (c *resourceClaimTemplates) Create(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.CreateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha2.ResourceClaimTemplate{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimtemplates").
|
||||
@@ -126,8 +126,8 @@ func (c *resourceClaimTemplates) Create(ctx context.Context, resourceClaimTempla
|
||||
}
|
||||
|
||||
// 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 *resourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha1.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha1.ResourceClaimTemplate{}
|
||||
func (c *resourceClaimTemplates) Update(ctx context.Context, resourceClaimTemplate *v1alpha2.ResourceClaimTemplate, opts v1.UpdateOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha2.ResourceClaimTemplate{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimtemplates").
|
||||
@@ -167,8 +167,8 @@ func (c *resourceClaimTemplates) DeleteCollection(ctx context.Context, opts v1.D
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceClaimTemplate.
|
||||
func (c *resourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha1.ResourceClaimTemplate{}
|
||||
func (c *resourceClaimTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
result = &v1alpha2.ResourceClaimTemplate{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimtemplates").
|
||||
@@ -182,7 +182,7 @@ func (c *resourceClaimTemplates) Patch(ctx context.Context, name string, pt type
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClaimTemplate.
|
||||
func (c *resourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClaimTemplate, err error) {
|
||||
func (c *resourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplateApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClaimTemplate, err error) {
|
||||
if resourceClaimTemplate == nil {
|
||||
return nil, fmt.Errorf("resourceClaimTemplate provided to Apply must not be nil")
|
||||
}
|
||||
@@ -195,7 +195,7 @@ func (c *resourceClaimTemplates) Apply(ctx context.Context, resourceClaimTemplat
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceClaimTemplate.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.ResourceClaimTemplate{}
|
||||
result = &v1alpha2.ResourceClaimTemplate{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("resourceclaimtemplates").
|
@@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
@@ -24,11 +24,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
v1alpha2 "k8s.io/api/resource/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
resourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@@ -41,15 +41,15 @@ type ResourceClassesGetter interface {
|
||||
|
||||
// ResourceClassInterface has methods to work with ResourceClass resources.
|
||||
type ResourceClassInterface interface {
|
||||
Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (*v1alpha1.ResourceClass, error)
|
||||
Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (*v1alpha1.ResourceClass, error)
|
||||
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)
|
||||
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) (*v1alpha1.ResourceClass, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceClassList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.ResourceClass, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.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 *v1alpha1.ResourceClass, err error)
|
||||
Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err 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)
|
||||
ResourceClassExpansion
|
||||
}
|
||||
|
||||
@@ -59,15 +59,15 @@ type resourceClasses struct {
|
||||
}
|
||||
|
||||
// newResourceClasses returns a ResourceClasses
|
||||
func newResourceClasses(c *ResourceV1alpha1Client) *resourceClasses {
|
||||
func newResourceClasses(c *ResourceV1alpha2Client) *resourceClasses {
|
||||
return &resourceClasses{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the resourceClass, and returns the corresponding resourceClass object, and an error if there is any.
|
||||
func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceClass, err error) {
|
||||
result = &v1alpha1.ResourceClass{}
|
||||
func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
result = &v1alpha2.ResourceClass{}
|
||||
err = c.client.Get().
|
||||
Resource("resourceclasses").
|
||||
Name(name).
|
||||
@@ -78,12 +78,12 @@ func (c *resourceClasses) Get(ctx context.Context, name string, options v1.GetOp
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ResourceClasses that match those selectors.
|
||||
func (c *resourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceClassList, err error) {
|
||||
func (c *resourceClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ResourceClassList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ResourceClassList{}
|
||||
result = &v1alpha2.ResourceClassList{}
|
||||
err = c.client.Get().
|
||||
Resource("resourceclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@@ -108,8 +108,8 @@ func (c *resourceClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch
|
||||
}
|
||||
|
||||
// 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 *resourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.CreateOptions) (result *v1alpha1.ResourceClass, err error) {
|
||||
result = &v1alpha1.ResourceClass{}
|
||||
func (c *resourceClasses) Create(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.CreateOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
result = &v1alpha2.ResourceClass{}
|
||||
err = c.client.Post().
|
||||
Resource("resourceclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@@ -120,8 +120,8 @@ func (c *resourceClasses) Create(ctx context.Context, resourceClass *v1alpha1.Re
|
||||
}
|
||||
|
||||
// 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 *resourceClasses) Update(ctx context.Context, resourceClass *v1alpha1.ResourceClass, opts v1.UpdateOptions) (result *v1alpha1.ResourceClass, err error) {
|
||||
result = &v1alpha1.ResourceClass{}
|
||||
func (c *resourceClasses) Update(ctx context.Context, resourceClass *v1alpha2.ResourceClass, opts v1.UpdateOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
result = &v1alpha2.ResourceClass{}
|
||||
err = c.client.Put().
|
||||
Resource("resourceclasses").
|
||||
Name(resourceClass.Name).
|
||||
@@ -158,8 +158,8 @@ func (c *resourceClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOp
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resourceClass.
|
||||
func (c *resourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceClass, err error) {
|
||||
result = &v1alpha1.ResourceClass{}
|
||||
func (c *resourceClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ResourceClass, err error) {
|
||||
result = &v1alpha2.ResourceClass{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("resourceclasses").
|
||||
Name(name).
|
||||
@@ -172,7 +172,7 @@ func (c *resourceClasses) Patch(ctx context.Context, name string, pt types.Patch
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied resourceClass.
|
||||
func (c *resourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha1.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ResourceClass, err error) {
|
||||
func (c *resourceClasses) Apply(ctx context.Context, resourceClass *resourcev1alpha2.ResourceClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ResourceClass, err error) {
|
||||
if resourceClass == nil {
|
||||
return nil, fmt.Errorf("resourceClass provided to Apply must not be nil")
|
||||
}
|
||||
@@ -185,7 +185,7 @@ func (c *resourceClasses) Apply(ctx context.Context, resourceClass *resourcev1al
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("resourceClass.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.ResourceClass{}
|
||||
result = &v1alpha2.ResourceClass{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("resourceclasses").
|
||||
Name(*name).
|
Reference in New Issue
Block a user