mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: bump k8s dependencies to v0.29.2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
45
vendor/k8s.io/client-go/kubernetes/clientset.go
generated
vendored
45
vendor/k8s.io/client-go/kubernetes/clientset.go
generated
vendored
@ -42,6 +42,7 @@ import (
|
||||
batchv1 "k8s.io/client-go/kubernetes/typed/batch/v1"
|
||||
batchv1beta1 "k8s.io/client-go/kubernetes/typed/batch/v1beta1"
|
||||
certificatesv1 "k8s.io/client-go/kubernetes/typed/certificates/v1"
|
||||
certificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1"
|
||||
certificatesv1beta1 "k8s.io/client-go/kubernetes/typed/certificates/v1beta1"
|
||||
coordinationv1 "k8s.io/client-go/kubernetes/typed/coordination/v1"
|
||||
coordinationv1beta1 "k8s.io/client-go/kubernetes/typed/coordination/v1beta1"
|
||||
@ -51,7 +52,7 @@ import (
|
||||
eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1"
|
||||
eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1"
|
||||
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||
flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1"
|
||||
flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1"
|
||||
flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1"
|
||||
flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2"
|
||||
flowcontrolv1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3"
|
||||
@ -66,7 +67,7 @@ import (
|
||||
rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
||||
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
|
||||
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"
|
||||
@ -99,6 +100,7 @@ type Interface interface {
|
||||
BatchV1beta1() batchv1beta1.BatchV1beta1Interface
|
||||
CertificatesV1() certificatesv1.CertificatesV1Interface
|
||||
CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta1Interface
|
||||
CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface
|
||||
CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface
|
||||
CoordinationV1() coordinationv1.CoordinationV1Interface
|
||||
CoreV1() corev1.CoreV1Interface
|
||||
@ -107,7 +109,7 @@ type Interface interface {
|
||||
EventsV1() eventsv1.EventsV1Interface
|
||||
EventsV1beta1() eventsv1beta1.EventsV1beta1Interface
|
||||
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||
FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface
|
||||
FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface
|
||||
FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1Interface
|
||||
FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2Interface
|
||||
FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3Interface
|
||||
@ -122,7 +124,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
|
||||
@ -154,6 +156,7 @@ type Clientset struct {
|
||||
batchV1beta1 *batchv1beta1.BatchV1beta1Client
|
||||
certificatesV1 *certificatesv1.CertificatesV1Client
|
||||
certificatesV1beta1 *certificatesv1beta1.CertificatesV1beta1Client
|
||||
certificatesV1alpha1 *certificatesv1alpha1.CertificatesV1alpha1Client
|
||||
coordinationV1beta1 *coordinationv1beta1.CoordinationV1beta1Client
|
||||
coordinationV1 *coordinationv1.CoordinationV1Client
|
||||
coreV1 *corev1.CoreV1Client
|
||||
@ -162,7 +165,7 @@ type Clientset struct {
|
||||
eventsV1 *eventsv1.EventsV1Client
|
||||
eventsV1beta1 *eventsv1beta1.EventsV1beta1Client
|
||||
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
||||
flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1Client
|
||||
flowcontrolV1 *flowcontrolv1.FlowcontrolV1Client
|
||||
flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1Client
|
||||
flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2Client
|
||||
flowcontrolV1beta3 *flowcontrolv1beta3.FlowcontrolV1beta3Client
|
||||
@ -177,7 +180,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
|
||||
@ -286,6 +289,11 @@ func (c *Clientset) CertificatesV1beta1() certificatesv1beta1.CertificatesV1beta
|
||||
return c.certificatesV1beta1
|
||||
}
|
||||
|
||||
// CertificatesV1alpha1 retrieves the CertificatesV1alpha1Client
|
||||
func (c *Clientset) CertificatesV1alpha1() certificatesv1alpha1.CertificatesV1alpha1Interface {
|
||||
return c.certificatesV1alpha1
|
||||
}
|
||||
|
||||
// CoordinationV1beta1 retrieves the CoordinationV1beta1Client
|
||||
func (c *Clientset) CoordinationV1beta1() coordinationv1beta1.CoordinationV1beta1Interface {
|
||||
return c.coordinationV1beta1
|
||||
@ -326,9 +334,9 @@ func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Inter
|
||||
return c.extensionsV1beta1
|
||||
}
|
||||
|
||||
// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client
|
||||
func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface {
|
||||
return c.flowcontrolV1alpha1
|
||||
// FlowcontrolV1 retrieves the FlowcontrolV1Client
|
||||
func (c *Clientset) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface {
|
||||
return c.flowcontrolV1
|
||||
}
|
||||
|
||||
// FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client
|
||||
@ -401,9 +409,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
|
||||
@ -560,6 +568,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.certificatesV1alpha1, err = certificatesv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.coordinationV1beta1, err = coordinationv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -592,7 +604,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.flowcontrolV1alpha1, err = flowcontrolv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
cs.flowcontrolV1, err = flowcontrolv1.NewForConfigAndClient(&configShallowCopy, httpClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -652,7 +664,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
|
||||
}
|
||||
@ -721,6 +733,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.batchV1beta1 = batchv1beta1.New(c)
|
||||
cs.certificatesV1 = certificatesv1.New(c)
|
||||
cs.certificatesV1beta1 = certificatesv1beta1.New(c)
|
||||
cs.certificatesV1alpha1 = certificatesv1alpha1.New(c)
|
||||
cs.coordinationV1beta1 = coordinationv1beta1.New(c)
|
||||
cs.coordinationV1 = coordinationv1.New(c)
|
||||
cs.coreV1 = corev1.New(c)
|
||||
@ -729,7 +742,7 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.eventsV1 = eventsv1.New(c)
|
||||
cs.eventsV1beta1 = eventsv1beta1.New(c)
|
||||
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
|
||||
cs.flowcontrolV1alpha1 = flowcontrolv1alpha1.New(c)
|
||||
cs.flowcontrolV1 = flowcontrolv1.New(c)
|
||||
cs.flowcontrolV1beta1 = flowcontrolv1beta1.New(c)
|
||||
cs.flowcontrolV1beta2 = flowcontrolv1beta2.New(c)
|
||||
cs.flowcontrolV1beta3 = flowcontrolv1beta3.New(c)
|
||||
@ -744,7 +757,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)
|
||||
|
7
vendor/k8s.io/client-go/kubernetes/doc.go
generated
vendored
7
vendor/k8s.io/client-go/kubernetes/doc.go
generated
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
Copyright 2023 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
// Package kubernetes holds packages which implement a clientset for Kubernetes
|
||||
// APIs.
|
||||
package kubernetes
|
||||
|
10
vendor/k8s.io/client-go/kubernetes/scheme/register.go
generated
vendored
10
vendor/k8s.io/client-go/kubernetes/scheme/register.go
generated
vendored
@ -38,6 +38,7 @@ import (
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
||||
certificatesv1 "k8s.io/api/certificates/v1"
|
||||
certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
coordinationv1 "k8s.io/api/coordination/v1"
|
||||
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
||||
@ -47,7 +48,7 @@ import (
|
||||
eventsv1 "k8s.io/api/events/v1"
|
||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||
flowcontrolv1 "k8s.io/api/flowcontrol/v1"
|
||||
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
||||
flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2"
|
||||
flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3"
|
||||
@ -62,7 +63,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"
|
||||
@ -100,6 +101,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
batchv1beta1.AddToScheme,
|
||||
certificatesv1.AddToScheme,
|
||||
certificatesv1beta1.AddToScheme,
|
||||
certificatesv1alpha1.AddToScheme,
|
||||
coordinationv1beta1.AddToScheme,
|
||||
coordinationv1.AddToScheme,
|
||||
corev1.AddToScheme,
|
||||
@ -108,7 +110,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
eventsv1.AddToScheme,
|
||||
eventsv1beta1.AddToScheme,
|
||||
extensionsv1beta1.AddToScheme,
|
||||
flowcontrolv1alpha1.AddToScheme,
|
||||
flowcontrolv1.AddToScheme,
|
||||
flowcontrolv1beta1.AddToScheme,
|
||||
flowcontrolv1beta2.AddToScheme,
|
||||
flowcontrolv1beta3.AddToScheme,
|
||||
@ -123,7 +125,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
rbacv1.AddToScheme,
|
||||
rbacv1beta1.AddToScheme,
|
||||
rbacv1alpha1.AddToScheme,
|
||||
resourcev1alpha1.AddToScheme,
|
||||
resourcev1alpha2.AddToScheme,
|
||||
schedulingv1alpha1.AddToScheme,
|
||||
schedulingv1beta1.AddToScheme,
|
||||
schedulingv1.AddToScheme,
|
||||
|
@ -43,6 +43,7 @@ type ValidatingAdmissionPoliciesGetter interface {
|
||||
type ValidatingAdmissionPolicyInterface interface {
|
||||
Create(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.CreateOptions) (*v1alpha1.ValidatingAdmissionPolicy, error)
|
||||
Update(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (*v1alpha1.ValidatingAdmissionPolicy, error)
|
||||
UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (*v1alpha1.ValidatingAdmissionPolicy, 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.ValidatingAdmissionPolicy, error)
|
||||
@ -50,6 +51,7 @@ type ValidatingAdmissionPolicyInterface interface {
|
||||
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.ValidatingAdmissionPolicy, err error)
|
||||
Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error)
|
||||
ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error)
|
||||
ValidatingAdmissionPolicyExpansion
|
||||
}
|
||||
|
||||
@ -132,6 +134,21 @@ func (c *validatingAdmissionPolicies) Update(ctx context.Context, validatingAdmi
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *validatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) {
|
||||
result = &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Put().
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(validatingAdmissionPolicy.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(validatingAdmissionPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the validatingAdmissionPolicy and deletes it. Returns an error if one occurs.
|
||||
func (c *validatingAdmissionPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
@ -195,3 +212,32 @@ func (c *validatingAdmissionPolicies) Apply(ctx context.Context, validatingAdmis
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *validatingAdmissionPolicies) ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1alpha1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) {
|
||||
if validatingAdmissionPolicy == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(validatingAdmissionPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := validatingAdmissionPolicy.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
@ -29,6 +29,8 @@ import (
|
||||
type AdmissionregistrationV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
MutatingWebhookConfigurationsGetter
|
||||
ValidatingAdmissionPoliciesGetter
|
||||
ValidatingAdmissionPolicyBindingsGetter
|
||||
ValidatingWebhookConfigurationsGetter
|
||||
}
|
||||
|
||||
@ -41,6 +43,14 @@ func (c *AdmissionregistrationV1beta1Client) MutatingWebhookConfigurations() Mut
|
||||
return newMutatingWebhookConfigurations(c)
|
||||
}
|
||||
|
||||
func (c *AdmissionregistrationV1beta1Client) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInterface {
|
||||
return newValidatingAdmissionPolicies(c)
|
||||
}
|
||||
|
||||
func (c *AdmissionregistrationV1beta1Client) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInterface {
|
||||
return newValidatingAdmissionPolicyBindings(c)
|
||||
}
|
||||
|
||||
func (c *AdmissionregistrationV1beta1Client) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationInterface {
|
||||
return newValidatingWebhookConfigurations(c)
|
||||
}
|
||||
|
@ -20,4 +20,8 @@ package v1beta1
|
||||
|
||||
type MutatingWebhookConfigurationExpansion interface{}
|
||||
|
||||
type ValidatingAdmissionPolicyExpansion interface{}
|
||||
|
||||
type ValidatingAdmissionPolicyBindingExpansion interface{}
|
||||
|
||||
type ValidatingWebhookConfigurationExpansion interface{}
|
||||
|
243
vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go
generated
vendored
Normal file
243
vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicy.go
generated
vendored
Normal file
@ -0,0 +1,243 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ValidatingAdmissionPoliciesGetter interface {
|
||||
ValidatingAdmissionPolicies() ValidatingAdmissionPolicyInterface
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicyInterface has methods to work with ValidatingAdmissionPolicy resources.
|
||||
type ValidatingAdmissionPolicyInterface interface {
|
||||
Create(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.CreateOptions) (*v1beta1.ValidatingAdmissionPolicy, error)
|
||||
Update(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (*v1beta1.ValidatingAdmissionPolicy, error)
|
||||
UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (*v1beta1.ValidatingAdmissionPolicy, 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) (*v1beta1.ValidatingAdmissionPolicy, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingAdmissionPolicyList, 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 *v1beta1.ValidatingAdmissionPolicy, err error)
|
||||
Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error)
|
||||
ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error)
|
||||
ValidatingAdmissionPolicyExpansion
|
||||
}
|
||||
|
||||
// validatingAdmissionPolicies implements ValidatingAdmissionPolicyInterface
|
||||
type validatingAdmissionPolicies struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newValidatingAdmissionPolicies returns a ValidatingAdmissionPolicies
|
||||
func newValidatingAdmissionPolicies(c *AdmissionregistrationV1beta1Client) *validatingAdmissionPolicies {
|
||||
return &validatingAdmissionPolicies{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any.
|
||||
func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *validatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ValidatingAdmissionPolicyList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies.
|
||||
func (c *validatingAdmissionPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("validatingadmissionpolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *validatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.CreateOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Post().
|
||||
Resource("validatingadmissionpolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(validatingAdmissionPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *validatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Put().
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(validatingAdmissionPolicy.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(validatingAdmissionPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *validatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Put().
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(validatingAdmissionPolicy.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(validatingAdmissionPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the validatingAdmissionPolicy and deletes it. Returns an error if one occurs.
|
||||
func (c *validatingAdmissionPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *validatingAdmissionPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("validatingadmissionpolicies").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicy.
|
||||
func (c *validatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicy.
|
||||
func (c *validatingAdmissionPolicies) Apply(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
if validatingAdmissionPolicy == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(validatingAdmissionPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := validatingAdmissionPolicy.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1beta1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *validatingAdmissionPolicies) ApplyStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1beta1.ValidatingAdmissionPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
if validatingAdmissionPolicy == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(validatingAdmissionPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := validatingAdmissionPolicy.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1beta1.ValidatingAdmissionPolicy{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("validatingadmissionpolicies").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
197
vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go
generated
vendored
Normal file
197
vendor/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/validatingadmissionpolicybinding.go
generated
vendored
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ValidatingAdmissionPolicyBindingsGetter interface {
|
||||
ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingInterface
|
||||
}
|
||||
|
||||
// ValidatingAdmissionPolicyBindingInterface has methods to work with ValidatingAdmissionPolicyBinding resources.
|
||||
type ValidatingAdmissionPolicyBindingInterface interface {
|
||||
Create(ctx context.Context, validatingAdmissionPolicyBinding *v1beta1.ValidatingAdmissionPolicyBinding, opts v1.CreateOptions) (*v1beta1.ValidatingAdmissionPolicyBinding, error)
|
||||
Update(ctx context.Context, validatingAdmissionPolicyBinding *v1beta1.ValidatingAdmissionPolicyBinding, opts v1.UpdateOptions) (*v1beta1.ValidatingAdmissionPolicyBinding, 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) (*v1beta1.ValidatingAdmissionPolicyBinding, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingAdmissionPolicyBindingList, 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 *v1beta1.ValidatingAdmissionPolicyBinding, err error)
|
||||
Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error)
|
||||
ValidatingAdmissionPolicyBindingExpansion
|
||||
}
|
||||
|
||||
// validatingAdmissionPolicyBindings implements ValidatingAdmissionPolicyBindingInterface
|
||||
type validatingAdmissionPolicyBindings struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindings
|
||||
func newValidatingAdmissionPolicyBindings(c *AdmissionregistrationV1beta1Client) *validatingAdmissionPolicyBindings {
|
||||
return &validatingAdmissionPolicyBindings{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any.
|
||||
func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ValidatingAdmissionPolicyBindingList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings.
|
||||
func (c *validatingAdmissionPolicyBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *validatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1beta1.ValidatingAdmissionPolicyBinding, opts v1.CreateOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
err = c.client.Post().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(validatingAdmissionPolicyBinding).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *validatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1beta1.ValidatingAdmissionPolicyBinding, opts v1.UpdateOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
err = c.client.Put().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
Name(validatingAdmissionPolicyBinding.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(validatingAdmissionPolicyBinding).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the validatingAdmissionPolicyBinding and deletes it. Returns an error if one occurs.
|
||||
func (c *validatingAdmissionPolicyBindings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *validatingAdmissionPolicyBindings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding.
|
||||
func (c *validatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
result = &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied validatingAdmissionPolicyBinding.
|
||||
func (c *validatingAdmissionPolicyBindings) Apply(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1beta1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
if validatingAdmissionPolicyBinding == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicyBinding provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(validatingAdmissionPolicyBinding)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := validatingAdmissionPolicyBinding.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
5
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go
generated
vendored
5
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/authentication_client.go
generated
vendored
@ -28,6 +28,7 @@ import (
|
||||
|
||||
type AuthenticationV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
SelfSubjectReviewsGetter
|
||||
TokenReviewsGetter
|
||||
}
|
||||
|
||||
@ -36,6 +37,10 @@ type AuthenticationV1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *AuthenticationV1Client) SelfSubjectReviews() SelfSubjectReviewInterface {
|
||||
return newSelfSubjectReviews(c)
|
||||
}
|
||||
|
||||
func (c *AuthenticationV1Client) TokenReviews() TokenReviewInterface {
|
||||
return newTokenReviews(c)
|
||||
}
|
||||
|
2
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go
generated
vendored
2
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/generated_expansion.go
generated
vendored
@ -18,4 +18,6 @@ limitations under the License.
|
||||
|
||||
package v1
|
||||
|
||||
type SelfSubjectReviewExpansion interface{}
|
||||
|
||||
type TokenReviewExpansion interface{}
|
||||
|
64
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/selfsubjectreview.go
generated
vendored
Normal file
64
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1/selfsubjectreview.go
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/api/authentication/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// SelfSubjectReviewsGetter has a method to return a SelfSubjectReviewInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SelfSubjectReviewsGetter interface {
|
||||
SelfSubjectReviews() SelfSubjectReviewInterface
|
||||
}
|
||||
|
||||
// SelfSubjectReviewInterface has methods to work with SelfSubjectReview resources.
|
||||
type SelfSubjectReviewInterface interface {
|
||||
Create(ctx context.Context, selfSubjectReview *v1.SelfSubjectReview, opts metav1.CreateOptions) (*v1.SelfSubjectReview, error)
|
||||
SelfSubjectReviewExpansion
|
||||
}
|
||||
|
||||
// selfSubjectReviews implements SelfSubjectReviewInterface
|
||||
type selfSubjectReviews struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newSelfSubjectReviews returns a SelfSubjectReviews
|
||||
func newSelfSubjectReviews(c *AuthenticationV1Client) *selfSubjectReviews {
|
||||
return &selfSubjectReviews{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Create takes the representation of a selfSubjectReview and creates it. Returns the server's representation of the selfSubjectReview, and an error, if there is any.
|
||||
func (c *selfSubjectReviews) Create(ctx context.Context, selfSubjectReview *v1.SelfSubjectReview, opts metav1.CreateOptions) (result *v1.SelfSubjectReview, err error) {
|
||||
result = &v1.SelfSubjectReview{}
|
||||
err = c.client.Post().
|
||||
Resource("selfsubjectreviews").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(selfSubjectReview).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -28,6 +28,7 @@ import (
|
||||
|
||||
type AuthenticationV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
SelfSubjectReviewsGetter
|
||||
TokenReviewsGetter
|
||||
}
|
||||
|
||||
@ -36,6 +37,10 @@ type AuthenticationV1beta1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *AuthenticationV1beta1Client) SelfSubjectReviews() SelfSubjectReviewInterface {
|
||||
return newSelfSubjectReviews(c)
|
||||
}
|
||||
|
||||
func (c *AuthenticationV1beta1Client) TokenReviews() TokenReviewInterface {
|
||||
return newTokenReviews(c)
|
||||
}
|
||||
|
@ -18,4 +18,6 @@ limitations under the License.
|
||||
|
||||
package v1beta1
|
||||
|
||||
type SelfSubjectReviewExpansion interface{}
|
||||
|
||||
type TokenReviewExpansion interface{}
|
||||
|
64
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/selfsubjectreview.go
generated
vendored
Normal file
64
vendor/k8s.io/client-go/kubernetes/typed/authentication/v1beta1/selfsubjectreview.go
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "k8s.io/api/authentication/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// SelfSubjectReviewsGetter has a method to return a SelfSubjectReviewInterface.
|
||||
// A group's client should implement this interface.
|
||||
type SelfSubjectReviewsGetter interface {
|
||||
SelfSubjectReviews() SelfSubjectReviewInterface
|
||||
}
|
||||
|
||||
// SelfSubjectReviewInterface has methods to work with SelfSubjectReview resources.
|
||||
type SelfSubjectReviewInterface interface {
|
||||
Create(ctx context.Context, selfSubjectReview *v1beta1.SelfSubjectReview, opts v1.CreateOptions) (*v1beta1.SelfSubjectReview, error)
|
||||
SelfSubjectReviewExpansion
|
||||
}
|
||||
|
||||
// selfSubjectReviews implements SelfSubjectReviewInterface
|
||||
type selfSubjectReviews struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newSelfSubjectReviews returns a SelfSubjectReviews
|
||||
func newSelfSubjectReviews(c *AuthenticationV1beta1Client) *selfSubjectReviews {
|
||||
return &selfSubjectReviews{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Create takes the representation of a selfSubjectReview and creates it. Returns the server's representation of the selfSubjectReview, and an error, if there is any.
|
||||
func (c *selfSubjectReviews) Create(ctx context.Context, selfSubjectReview *v1beta1.SelfSubjectReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectReview, err error) {
|
||||
result = &v1beta1.SelfSubjectReview{}
|
||||
err = c.client.Post().
|
||||
Resource("selfsubjectreviews").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(selfSubjectReview).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
107
vendor/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go
generated
vendored
Normal file
107
vendor/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
v1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type CertificatesV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ClusterTrustBundlesGetter
|
||||
}
|
||||
|
||||
// CertificatesV1alpha1Client is used to interact with features provided by the certificates.k8s.io group.
|
||||
type CertificatesV1alpha1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *CertificatesV1alpha1Client) ClusterTrustBundles() ClusterTrustBundleInterface {
|
||||
return newClusterTrustBundles(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new CertificatesV1alpha1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*CertificatesV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewForConfigAndClient(&config, httpClient)
|
||||
}
|
||||
|
||||
// NewForConfigAndClient creates a new CertificatesV1alpha1Client 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) (*CertificatesV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &CertificatesV1alpha1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new CertificatesV1alpha1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *CertificatesV1alpha1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new CertificatesV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *CertificatesV1alpha1Client {
|
||||
return &CertificatesV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *CertificatesV1alpha1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
197
vendor/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go
generated
vendored
Normal file
197
vendor/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/clustertrustbundle.go
generated
vendored
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/certificates/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
certificatesv1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ClusterTrustBundlesGetter has a method to return a ClusterTrustBundleInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ClusterTrustBundlesGetter interface {
|
||||
ClusterTrustBundles() ClusterTrustBundleInterface
|
||||
}
|
||||
|
||||
// ClusterTrustBundleInterface has methods to work with ClusterTrustBundle resources.
|
||||
type ClusterTrustBundleInterface interface {
|
||||
Create(ctx context.Context, clusterTrustBundle *v1alpha1.ClusterTrustBundle, opts v1.CreateOptions) (*v1alpha1.ClusterTrustBundle, error)
|
||||
Update(ctx context.Context, clusterTrustBundle *v1alpha1.ClusterTrustBundle, opts v1.UpdateOptions) (*v1alpha1.ClusterTrustBundle, 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.ClusterTrustBundle, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterTrustBundleList, 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.ClusterTrustBundle, err error)
|
||||
Apply(ctx context.Context, clusterTrustBundle *certificatesv1alpha1.ClusterTrustBundleApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterTrustBundle, err error)
|
||||
ClusterTrustBundleExpansion
|
||||
}
|
||||
|
||||
// clusterTrustBundles implements ClusterTrustBundleInterface
|
||||
type clusterTrustBundles struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newClusterTrustBundles returns a ClusterTrustBundles
|
||||
func newClusterTrustBundles(c *CertificatesV1alpha1Client) *clusterTrustBundles {
|
||||
return &clusterTrustBundles{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the clusterTrustBundle, and returns the corresponding clusterTrustBundle object, and an error if there is any.
|
||||
func (c *clusterTrustBundles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterTrustBundle, err error) {
|
||||
result = &v1alpha1.ClusterTrustBundle{}
|
||||
err = c.client.Get().
|
||||
Resource("clustertrustbundles").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterTrustBundles that match those selectors.
|
||||
func (c *clusterTrustBundles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterTrustBundleList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ClusterTrustBundleList{}
|
||||
err = c.client.Get().
|
||||
Resource("clustertrustbundles").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterTrustBundles.
|
||||
func (c *clusterTrustBundles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("clustertrustbundles").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a clusterTrustBundle and creates it. Returns the server's representation of the clusterTrustBundle, and an error, if there is any.
|
||||
func (c *clusterTrustBundles) Create(ctx context.Context, clusterTrustBundle *v1alpha1.ClusterTrustBundle, opts v1.CreateOptions) (result *v1alpha1.ClusterTrustBundle, err error) {
|
||||
result = &v1alpha1.ClusterTrustBundle{}
|
||||
err = c.client.Post().
|
||||
Resource("clustertrustbundles").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(clusterTrustBundle).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a clusterTrustBundle and updates it. Returns the server's representation of the clusterTrustBundle, and an error, if there is any.
|
||||
func (c *clusterTrustBundles) Update(ctx context.Context, clusterTrustBundle *v1alpha1.ClusterTrustBundle, opts v1.UpdateOptions) (result *v1alpha1.ClusterTrustBundle, err error) {
|
||||
result = &v1alpha1.ClusterTrustBundle{}
|
||||
err = c.client.Put().
|
||||
Resource("clustertrustbundles").
|
||||
Name(clusterTrustBundle.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(clusterTrustBundle).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the clusterTrustBundle and deletes it. Returns an error if one occurs.
|
||||
func (c *clusterTrustBundles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("clustertrustbundles").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusterTrustBundles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("clustertrustbundles").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched clusterTrustBundle.
|
||||
func (c *clusterTrustBundles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterTrustBundle, err error) {
|
||||
result = &v1alpha1.ClusterTrustBundle{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("clustertrustbundles").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied clusterTrustBundle.
|
||||
func (c *clusterTrustBundles) Apply(ctx context.Context, clusterTrustBundle *certificatesv1alpha1.ClusterTrustBundleApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterTrustBundle, err error) {
|
||||
if clusterTrustBundle == nil {
|
||||
return nil, fmt.Errorf("clusterTrustBundle provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(clusterTrustBundle)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := clusterTrustBundle.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("clusterTrustBundle.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.ClusterTrustBundle{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("clustertrustbundles").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
21
vendor/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go
generated
vendored
Normal file
21
vendor/k8s.io/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
type ClusterTrustBundleExpansion interface{}
|
3
vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event_expansion.go
generated
vendored
3
vendor/k8s.io/client-go/kubernetes/typed/events/v1beta1/event_expansion.go
generated
vendored
@ -82,8 +82,7 @@ func (e *events) UpdateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event,
|
||||
// It returns the copy of the event that the server returns, or an error.
|
||||
// The namespace and name of the target event is deduced from the event.
|
||||
// The namespace must either match this event client's namespace, or this event client must
|
||||
//
|
||||
// have been created with the "" namespace.
|
||||
// have been created with the "" namespace.
|
||||
func (e *events) PatchWithEventNamespace(event *v1beta1.Event, data []byte) (*v1beta1.Event, error) {
|
||||
if e.ns != "" && event.Namespace != e.ns {
|
||||
return nil, fmt.Errorf("can't patch an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns)
|
||||
|
5
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go
generated
vendored
5
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/extensions_client.go
generated
vendored
@ -32,7 +32,6 @@ type ExtensionsV1beta1Interface interface {
|
||||
DeploymentsGetter
|
||||
IngressesGetter
|
||||
NetworkPoliciesGetter
|
||||
PodSecurityPoliciesGetter
|
||||
ReplicaSetsGetter
|
||||
}
|
||||
|
||||
@ -57,10 +56,6 @@ func (c *ExtensionsV1beta1Client) NetworkPolicies(namespace string) NetworkPolic
|
||||
return newNetworkPolicies(c, namespace)
|
||||
}
|
||||
|
||||
func (c *ExtensionsV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
|
||||
return newPodSecurityPolicies(c)
|
||||
}
|
||||
|
||||
func (c *ExtensionsV1beta1Client) ReplicaSets(namespace string) ReplicaSetInterface {
|
||||
return newReplicaSets(c, namespace)
|
||||
}
|
||||
|
2
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go
generated
vendored
2
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/generated_expansion.go
generated
vendored
@ -24,6 +24,4 @@ type IngressExpansion interface{}
|
||||
|
||||
type NetworkPolicyExpansion interface{}
|
||||
|
||||
type PodSecurityPolicyExpansion interface{}
|
||||
|
||||
type ReplicaSetExpansion interface{}
|
||||
|
48
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go
generated
vendored
48
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/networkpolicy.go
generated
vendored
@ -43,7 +43,6 @@ type NetworkPoliciesGetter interface {
|
||||
type NetworkPolicyInterface interface {
|
||||
Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (*v1beta1.NetworkPolicy, error)
|
||||
Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error)
|
||||
UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, 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) (*v1beta1.NetworkPolicy, error)
|
||||
@ -51,7 +50,6 @@ type NetworkPolicyInterface interface {
|
||||
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 *v1beta1.NetworkPolicy, err error)
|
||||
Apply(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error)
|
||||
ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error)
|
||||
NetworkPolicyExpansion
|
||||
}
|
||||
|
||||
@ -141,22 +139,6 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.Net
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) {
|
||||
result = &v1beta1.NetworkPolicy{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("networkpolicies").
|
||||
Name(networkPolicy.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(networkPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
|
||||
func (c *networkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
@ -224,33 +206,3 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *extensionsv1
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *extensionsv1beta1.NetworkPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.NetworkPolicy, err error) {
|
||||
if networkPolicy == nil {
|
||||
return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(networkPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := networkPolicy.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1beta1.NetworkPolicy{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("networkpolicies").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
197
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go
generated
vendored
197
vendor/k8s.io/client-go/kubernetes/typed/extensions/v1beta1/podsecuritypolicy.go
generated
vendored
@ -1,197 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
extensionsv1beta1 "k8s.io/client-go/applyconfigurations/extensions/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PodSecurityPoliciesGetter interface {
|
||||
PodSecurityPolicies() PodSecurityPolicyInterface
|
||||
}
|
||||
|
||||
// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources.
|
||||
type PodSecurityPolicyInterface interface {
|
||||
Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (*v1beta1.PodSecurityPolicy, error)
|
||||
Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (*v1beta1.PodSecurityPolicy, 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) (*v1beta1.PodSecurityPolicy, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, 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 *v1beta1.PodSecurityPolicy, err error)
|
||||
Apply(ctx context.Context, podSecurityPolicy *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error)
|
||||
PodSecurityPolicyExpansion
|
||||
}
|
||||
|
||||
// podSecurityPolicies implements PodSecurityPolicyInterface
|
||||
type podSecurityPolicies struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newPodSecurityPolicies returns a PodSecurityPolicies
|
||||
func newPodSecurityPolicies(c *ExtensionsV1beta1Client) *podSecurityPolicies {
|
||||
return &podSecurityPolicies{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
|
||||
func (c *podSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Get().
|
||||
Resource("podsecuritypolicies").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
|
||||
func (c *podSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.PodSecurityPolicyList{}
|
||||
err = c.client.Get().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
|
||||
func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
||||
func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Post().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podSecurityPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
||||
func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Put().
|
||||
Resource("podsecuritypolicies").
|
||||
Name(podSecurityPolicy.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podSecurityPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
|
||||
func (c *podSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("podsecuritypolicies").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podSecurityPolicy.
|
||||
func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("podsecuritypolicies").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podSecurityPolicy.
|
||||
func (c *podSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *extensionsv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
if podSecurityPolicy == nil {
|
||||
return nil, fmt.Errorf("podSecurityPolicy provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(podSecurityPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := podSecurityPolicy.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podSecurityPolicy.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("podsecuritypolicies").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -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 v1
|
@ -16,39 +16,39 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||
v1 "k8s.io/api/flowcontrol/v1"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type FlowcontrolV1alpha1Interface interface {
|
||||
type FlowcontrolV1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
FlowSchemasGetter
|
||||
PriorityLevelConfigurationsGetter
|
||||
}
|
||||
|
||||
// FlowcontrolV1alpha1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group.
|
||||
type FlowcontrolV1alpha1Client struct {
|
||||
// FlowcontrolV1Client is used to interact with features provided by the flowcontrol.apiserver.k8s.io group.
|
||||
type FlowcontrolV1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *FlowcontrolV1alpha1Client) FlowSchemas() FlowSchemaInterface {
|
||||
func (c *FlowcontrolV1Client) FlowSchemas() FlowSchemaInterface {
|
||||
return newFlowSchemas(c)
|
||||
}
|
||||
|
||||
func (c *FlowcontrolV1alpha1Client) PriorityLevelConfigurations() PriorityLevelConfigurationInterface {
|
||||
func (c *FlowcontrolV1Client) PriorityLevelConfigurations() PriorityLevelConfigurationInterface {
|
||||
return newPriorityLevelConfigurations(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new FlowcontrolV1alpha1Client for the given config.
|
||||
// NewForConfig creates a new FlowcontrolV1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*FlowcontrolV1alpha1Client, error) {
|
||||
func NewForConfig(c *rest.Config) (*FlowcontrolV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
@ -60,9 +60,9 @@ func NewForConfig(c *rest.Config) (*FlowcontrolV1alpha1Client, error) {
|
||||
return NewForConfigAndClient(&config, httpClient)
|
||||
}
|
||||
|
||||
// NewForConfigAndClient creates a new FlowcontrolV1alpha1Client for the given config and http client.
|
||||
// NewForConfigAndClient creates a new FlowcontrolV1Client 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) (*FlowcontrolV1alpha1Client, error) {
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
@ -71,12 +71,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1alpha1
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &FlowcontrolV1alpha1Client{client}, nil
|
||||
return &FlowcontrolV1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new FlowcontrolV1alpha1Client for the given config and
|
||||
// NewForConfigOrDie creates a new FlowcontrolV1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1alpha1Client {
|
||||
func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
@ -84,13 +84,13 @@ func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1alpha1Client {
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new FlowcontrolV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *FlowcontrolV1alpha1Client {
|
||||
return &FlowcontrolV1alpha1Client{c}
|
||||
// New creates a new FlowcontrolV1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *FlowcontrolV1Client {
|
||||
return &FlowcontrolV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
gv := v1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
@ -104,7 +104,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 *FlowcontrolV1alpha1Client) RESTClient() rest.Interface {
|
||||
func (c *FlowcontrolV1Client) 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 v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -24,11 +24,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/api/flowcontrol/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1"
|
||||
flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@ -41,17 +41,17 @@ type FlowSchemasGetter interface {
|
||||
|
||||
// FlowSchemaInterface has methods to work with FlowSchema resources.
|
||||
type FlowSchemaInterface interface {
|
||||
Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (*v1alpha1.FlowSchema, error)
|
||||
Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, error)
|
||||
UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (*v1alpha1.FlowSchema, 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.FlowSchema, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FlowSchemaList, 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.FlowSchema, err error)
|
||||
Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error)
|
||||
ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error)
|
||||
Create(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.CreateOptions) (*v1.FlowSchema, error)
|
||||
Update(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.UpdateOptions) (*v1.FlowSchema, error)
|
||||
UpdateStatus(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.UpdateOptions) (*v1.FlowSchema, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.FlowSchema, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.FlowSchemaList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.FlowSchema, err error)
|
||||
Apply(ctx context.Context, flowSchema *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FlowSchema, err error)
|
||||
ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FlowSchema, err error)
|
||||
FlowSchemaExpansion
|
||||
}
|
||||
|
||||
@ -61,15 +61,15 @@ type flowSchemas struct {
|
||||
}
|
||||
|
||||
// newFlowSchemas returns a FlowSchemas
|
||||
func newFlowSchemas(c *FlowcontrolV1alpha1Client) *flowSchemas {
|
||||
func newFlowSchemas(c *FlowcontrolV1Client) *flowSchemas {
|
||||
return &flowSchemas{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the flowSchema, and returns the corresponding flowSchema object, and an error if there is any.
|
||||
func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FlowSchema, err error) {
|
||||
result = &v1alpha1.FlowSchema{}
|
||||
func (c *flowSchemas) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.FlowSchema, err error) {
|
||||
result = &v1.FlowSchema{}
|
||||
err = c.client.Get().
|
||||
Resource("flowschemas").
|
||||
Name(name).
|
||||
@ -80,12 +80,12 @@ func (c *flowSchemas) Get(ctx context.Context, name string, options v1.GetOption
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of FlowSchemas that match those selectors.
|
||||
func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FlowSchemaList, err error) {
|
||||
func (c *flowSchemas) List(ctx context.Context, opts metav1.ListOptions) (result *v1.FlowSchemaList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.FlowSchemaList{}
|
||||
result = &v1.FlowSchemaList{}
|
||||
err = c.client.Get().
|
||||
Resource("flowschemas").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@ -96,7 +96,7 @@ func (c *flowSchemas) List(ctx context.Context, opts v1.ListOptions) (result *v1
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested flowSchemas.
|
||||
func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *flowSchemas) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@ -110,8 +110,8 @@ func (c *flowSchemas) Watch(ctx context.Context, opts v1.ListOptions) (watch.Int
|
||||
}
|
||||
|
||||
// Create takes the representation of a flowSchema and creates it. Returns the server's representation of the flowSchema, and an error, if there is any.
|
||||
func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.CreateOptions) (result *v1alpha1.FlowSchema, err error) {
|
||||
result = &v1alpha1.FlowSchema{}
|
||||
func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.CreateOptions) (result *v1.FlowSchema, err error) {
|
||||
result = &v1.FlowSchema{}
|
||||
err = c.client.Post().
|
||||
Resource("flowschemas").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@ -122,8 +122,8 @@ func (c *flowSchemas) Create(ctx context.Context, flowSchema *v1alpha1.FlowSchem
|
||||
}
|
||||
|
||||
// Update takes the representation of a flowSchema and updates it. Returns the server's representation of the flowSchema, and an error, if there is any.
|
||||
func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) {
|
||||
result = &v1alpha1.FlowSchema{}
|
||||
func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.UpdateOptions) (result *v1.FlowSchema, err error) {
|
||||
result = &v1.FlowSchema{}
|
||||
err = c.client.Put().
|
||||
Resource("flowschemas").
|
||||
Name(flowSchema.Name).
|
||||
@ -136,8 +136,8 @@ func (c *flowSchemas) Update(ctx context.Context, flowSchema *v1alpha1.FlowSchem
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.FlowSchema, opts v1.UpdateOptions) (result *v1alpha1.FlowSchema, err error) {
|
||||
result = &v1alpha1.FlowSchema{}
|
||||
func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1.FlowSchema, opts metav1.UpdateOptions) (result *v1.FlowSchema, err error) {
|
||||
result = &v1.FlowSchema{}
|
||||
err = c.client.Put().
|
||||
Resource("flowschemas").
|
||||
Name(flowSchema.Name).
|
||||
@ -150,7 +150,7 @@ func (c *flowSchemas) UpdateStatus(ctx context.Context, flowSchema *v1alpha1.Flo
|
||||
}
|
||||
|
||||
// Delete takes name of the flowSchema and deletes it. Returns an error if one occurs.
|
||||
func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *flowSchemas) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("flowschemas").
|
||||
Name(name).
|
||||
@ -160,7 +160,7 @@ func (c *flowSchemas) Delete(ctx context.Context, name string, opts v1.DeleteOpt
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *flowSchemas) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
@ -175,8 +175,8 @@ func (c *flowSchemas) DeleteCollection(ctx context.Context, opts v1.DeleteOption
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched flowSchema.
|
||||
func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FlowSchema, err error) {
|
||||
result = &v1alpha1.FlowSchema{}
|
||||
func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.FlowSchema, err error) {
|
||||
result = &v1.FlowSchema{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("flowschemas").
|
||||
Name(name).
|
||||
@ -189,7 +189,7 @@ func (c *flowSchemas) Patch(ctx context.Context, name string, pt types.PatchType
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied flowSchema.
|
||||
func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) {
|
||||
func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FlowSchema, err error) {
|
||||
if flowSchema == nil {
|
||||
return nil, fmt.Errorf("flowSchema provided to Apply must not be nil")
|
||||
}
|
||||
@ -202,7 +202,7 @@ func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("flowSchema.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.FlowSchema{}
|
||||
result = &v1.FlowSchema{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("flowschemas").
|
||||
Name(*name).
|
||||
@ -215,7 +215,7 @@ func (c *flowSchemas) Apply(ctx context.Context, flowSchema *flowcontrolv1alpha1
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *flowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.FlowSchema, err error) {
|
||||
func (c *flowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (result *v1.FlowSchema, err error) {
|
||||
if flowSchema == nil {
|
||||
return nil, fmt.Errorf("flowSchema provided to Apply must not be nil")
|
||||
}
|
||||
@ -230,7 +230,7 @@ func (c *flowSchemas) ApplyStatus(ctx context.Context, flowSchema *flowcontrolv1
|
||||
return nil, fmt.Errorf("flowSchema.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha1.FlowSchema{}
|
||||
result = &v1.FlowSchema{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("flowschemas").
|
||||
Name(*name).
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
type FlowSchemaExpansion interface{}
|
||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -24,11 +24,11 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
v1 "k8s.io/api/flowcontrol/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
flowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1"
|
||||
flowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
@ -41,17 +41,17 @@ type PriorityLevelConfigurationsGetter interface {
|
||||
|
||||
// PriorityLevelConfigurationInterface has methods to work with PriorityLevelConfiguration resources.
|
||||
type PriorityLevelConfigurationInterface interface {
|
||||
Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (*v1alpha1.PriorityLevelConfiguration, error)
|
||||
Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, error)
|
||||
UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (*v1alpha1.PriorityLevelConfiguration, 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.PriorityLevelConfiguration, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PriorityLevelConfigurationList, 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.PriorityLevelConfiguration, err error)
|
||||
Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error)
|
||||
ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error)
|
||||
Create(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.CreateOptions) (*v1.PriorityLevelConfiguration, error)
|
||||
Update(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*v1.PriorityLevelConfiguration, error)
|
||||
UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*v1.PriorityLevelConfiguration, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.PriorityLevelConfiguration, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.PriorityLevelConfigurationList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityLevelConfiguration, err error)
|
||||
Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PriorityLevelConfiguration, err error)
|
||||
ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PriorityLevelConfiguration, err error)
|
||||
PriorityLevelConfigurationExpansion
|
||||
}
|
||||
|
||||
@ -61,15 +61,15 @@ type priorityLevelConfigurations struct {
|
||||
}
|
||||
|
||||
// newPriorityLevelConfigurations returns a PriorityLevelConfigurations
|
||||
func newPriorityLevelConfigurations(c *FlowcontrolV1alpha1Client) *priorityLevelConfigurations {
|
||||
func newPriorityLevelConfigurations(c *FlowcontrolV1Client) *priorityLevelConfigurations {
|
||||
return &priorityLevelConfigurations{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the priorityLevelConfiguration, and returns the corresponding priorityLevelConfiguration object, and an error if there is any.
|
||||
func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
||||
func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1.PriorityLevelConfiguration{}
|
||||
err = c.client.Get().
|
||||
Resource("prioritylevelconfigurations").
|
||||
Name(name).
|
||||
@ -80,12 +80,12 @@ func (c *priorityLevelConfigurations) Get(ctx context.Context, name string, opti
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors.
|
||||
func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PriorityLevelConfigurationList, err error) {
|
||||
func (c *priorityLevelConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.PriorityLevelConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.PriorityLevelConfigurationList{}
|
||||
result = &v1.PriorityLevelConfigurationList{}
|
||||
err = c.client.Get().
|
||||
Resource("prioritylevelconfigurations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@ -96,7 +96,7 @@ func (c *priorityLevelConfigurations) List(ctx context.Context, opts v1.ListOpti
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested priorityLevelConfigurations.
|
||||
func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@ -110,8 +110,8 @@ func (c *priorityLevelConfigurations) Watch(ctx context.Context, opts v1.ListOpt
|
||||
}
|
||||
|
||||
// Create takes the representation of a priorityLevelConfiguration and creates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
|
||||
func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.CreateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
||||
func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.CreateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1.PriorityLevelConfiguration{}
|
||||
err = c.client.Post().
|
||||
Resource("prioritylevelconfigurations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
@ -122,8 +122,8 @@ func (c *priorityLevelConfigurations) Create(ctx context.Context, priorityLevelC
|
||||
}
|
||||
|
||||
// Update takes the representation of a priorityLevelConfiguration and updates it. Returns the server's representation of the priorityLevelConfiguration, and an error, if there is any.
|
||||
func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
||||
func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1.PriorityLevelConfiguration{}
|
||||
err = c.client.Put().
|
||||
Resource("prioritylevelconfigurations").
|
||||
Name(priorityLevelConfiguration.Name).
|
||||
@ -136,8 +136,8 @@ func (c *priorityLevelConfigurations) Update(ctx context.Context, priorityLevelC
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1alpha1.PriorityLevelConfiguration, opts v1.UpdateOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
||||
func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priorityLevelConfiguration *v1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1.PriorityLevelConfiguration{}
|
||||
err = c.client.Put().
|
||||
Resource("prioritylevelconfigurations").
|
||||
Name(priorityLevelConfiguration.Name).
|
||||
@ -150,7 +150,7 @@ func (c *priorityLevelConfigurations) UpdateStatus(ctx context.Context, priority
|
||||
}
|
||||
|
||||
// Delete takes name of the priorityLevelConfiguration and deletes it. Returns an error if one occurs.
|
||||
func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("prioritylevelconfigurations").
|
||||
Name(name).
|
||||
@ -160,7 +160,7 @@ func (c *priorityLevelConfigurations) Delete(ctx context.Context, name string, o
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
@ -175,8 +175,8 @@ func (c *priorityLevelConfigurations) DeleteCollection(ctx context.Context, opts
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched priorityLevelConfiguration.
|
||||
func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
||||
func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.PriorityLevelConfiguration, err error) {
|
||||
result = &v1.PriorityLevelConfiguration{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("prioritylevelconfigurations").
|
||||
Name(name).
|
||||
@ -189,7 +189,7 @@ func (c *priorityLevelConfigurations) Patch(ctx context.Context, name string, pt
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied priorityLevelConfiguration.
|
||||
func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
||||
func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||
if priorityLevelConfiguration == nil {
|
||||
return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil")
|
||||
}
|
||||
@ -202,7 +202,7 @@ func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelCo
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
||||
result = &v1.PriorityLevelConfiguration{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("prioritylevelconfigurations").
|
||||
Name(*name).
|
||||
@ -215,7 +215,7 @@ func (c *priorityLevelConfigurations) Apply(ctx context.Context, priorityLevelCo
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *priorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.PriorityLevelConfiguration, err error) {
|
||||
func (c *priorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (result *v1.PriorityLevelConfiguration, err error) {
|
||||
if priorityLevelConfiguration == nil {
|
||||
return nil, fmt.Errorf("priorityLevelConfiguration provided to Apply must not be nil")
|
||||
}
|
||||
@ -230,7 +230,7 @@ func (c *priorityLevelConfigurations) ApplyStatus(ctx context.Context, priorityL
|
||||
return nil, fmt.Errorf("priorityLevelConfiguration.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha1.PriorityLevelConfiguration{}
|
||||
result = &v1.PriorityLevelConfiguration{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("prioritylevelconfigurations").
|
||||
Name(*name).
|
48
vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go
generated
vendored
48
vendor/k8s.io/client-go/kubernetes/typed/networking/v1/networkpolicy.go
generated
vendored
@ -43,7 +43,6 @@ type NetworkPoliciesGetter interface {
|
||||
type NetworkPolicyInterface interface {
|
||||
Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error)
|
||||
Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error)
|
||||
UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error)
|
||||
@ -51,7 +50,6 @@ type NetworkPolicyInterface interface {
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error)
|
||||
Apply(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error)
|
||||
ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error)
|
||||
NetworkPolicyExpansion
|
||||
}
|
||||
|
||||
@ -141,22 +139,6 @@ func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1.NetworkP
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *networkPolicies) UpdateStatus(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (result *v1.NetworkPolicy, err error) {
|
||||
result = &v1.NetworkPolicy{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("networkpolicies").
|
||||
Name(networkPolicy.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(networkPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
|
||||
func (c *networkPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
@ -224,33 +206,3 @@ func (c *networkPolicies) Apply(ctx context.Context, networkPolicy *networkingv1
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *networkPolicies) ApplyStatus(ctx context.Context, networkPolicy *networkingv1.NetworkPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *v1.NetworkPolicy, err error) {
|
||||
if networkPolicy == nil {
|
||||
return nil, fmt.Errorf("networkPolicy provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(networkPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := networkPolicy.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("networkPolicy.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1.NetworkPolicy{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("networkpolicies").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
197
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/clustercidr.go
generated
vendored
197
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/clustercidr.go
generated
vendored
@ -1,197 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/networking/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ClusterCIDRsGetter has a method to return a ClusterCIDRInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ClusterCIDRsGetter interface {
|
||||
ClusterCIDRs() ClusterCIDRInterface
|
||||
}
|
||||
|
||||
// ClusterCIDRInterface has methods to work with ClusterCIDR resources.
|
||||
type ClusterCIDRInterface interface {
|
||||
Create(ctx context.Context, clusterCIDR *v1alpha1.ClusterCIDR, opts v1.CreateOptions) (*v1alpha1.ClusterCIDR, error)
|
||||
Update(ctx context.Context, clusterCIDR *v1alpha1.ClusterCIDR, opts v1.UpdateOptions) (*v1alpha1.ClusterCIDR, 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.ClusterCIDR, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ClusterCIDRList, 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.ClusterCIDR, err error)
|
||||
Apply(ctx context.Context, clusterCIDR *networkingv1alpha1.ClusterCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDR, err error)
|
||||
ClusterCIDRExpansion
|
||||
}
|
||||
|
||||
// clusterCIDRs implements ClusterCIDRInterface
|
||||
type clusterCIDRs struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newClusterCIDRs returns a ClusterCIDRs
|
||||
func newClusterCIDRs(c *NetworkingV1alpha1Client) *clusterCIDRs {
|
||||
return &clusterCIDRs{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the clusterCIDR, and returns the corresponding clusterCIDR object, and an error if there is any.
|
||||
func (c *clusterCIDRs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterCIDR, err error) {
|
||||
result = &v1alpha1.ClusterCIDR{}
|
||||
err = c.client.Get().
|
||||
Resource("clustercidrs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterCIDRs that match those selectors.
|
||||
func (c *clusterCIDRs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ClusterCIDRList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ClusterCIDRList{}
|
||||
err = c.client.Get().
|
||||
Resource("clustercidrs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterCIDRs.
|
||||
func (c *clusterCIDRs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("clustercidrs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a clusterCIDR and creates it. Returns the server's representation of the clusterCIDR, and an error, if there is any.
|
||||
func (c *clusterCIDRs) Create(ctx context.Context, clusterCIDR *v1alpha1.ClusterCIDR, opts v1.CreateOptions) (result *v1alpha1.ClusterCIDR, err error) {
|
||||
result = &v1alpha1.ClusterCIDR{}
|
||||
err = c.client.Post().
|
||||
Resource("clustercidrs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(clusterCIDR).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a clusterCIDR and updates it. Returns the server's representation of the clusterCIDR, and an error, if there is any.
|
||||
func (c *clusterCIDRs) Update(ctx context.Context, clusterCIDR *v1alpha1.ClusterCIDR, opts v1.UpdateOptions) (result *v1alpha1.ClusterCIDR, err error) {
|
||||
result = &v1alpha1.ClusterCIDR{}
|
||||
err = c.client.Put().
|
||||
Resource("clustercidrs").
|
||||
Name(clusterCIDR.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(clusterCIDR).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the clusterCIDR and deletes it. Returns an error if one occurs.
|
||||
func (c *clusterCIDRs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("clustercidrs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *clusterCIDRs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("clustercidrs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched clusterCIDR.
|
||||
func (c *clusterCIDRs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ClusterCIDR, err error) {
|
||||
result = &v1alpha1.ClusterCIDR{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("clustercidrs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied clusterCIDR.
|
||||
func (c *clusterCIDRs) Apply(ctx context.Context, clusterCIDR *networkingv1alpha1.ClusterCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ClusterCIDR, err error) {
|
||||
if clusterCIDR == nil {
|
||||
return nil, fmt.Errorf("clusterCIDR provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(clusterCIDR)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := clusterCIDR.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("clusterCIDR.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.ClusterCIDR{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("clustercidrs").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
4
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/generated_expansion.go
generated
vendored
4
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/generated_expansion.go
generated
vendored
@ -18,4 +18,6 @@ limitations under the License.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
type ClusterCIDRExpansion interface{}
|
||||
type IPAddressExpansion interface{}
|
||||
|
||||
type ServiceCIDRExpansion interface{}
|
||||
|
197
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go
generated
vendored
Normal file
197
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go
generated
vendored
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/networking/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// IPAddressesGetter has a method to return a IPAddressInterface.
|
||||
// A group's client should implement this interface.
|
||||
type IPAddressesGetter interface {
|
||||
IPAddresses() IPAddressInterface
|
||||
}
|
||||
|
||||
// IPAddressInterface has methods to work with IPAddress resources.
|
||||
type IPAddressInterface interface {
|
||||
Create(ctx context.Context, iPAddress *v1alpha1.IPAddress, opts v1.CreateOptions) (*v1alpha1.IPAddress, error)
|
||||
Update(ctx context.Context, iPAddress *v1alpha1.IPAddress, opts v1.UpdateOptions) (*v1alpha1.IPAddress, 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.IPAddress, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.IPAddressList, 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.IPAddress, err error)
|
||||
Apply(ctx context.Context, iPAddress *networkingv1alpha1.IPAddressApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.IPAddress, err error)
|
||||
IPAddressExpansion
|
||||
}
|
||||
|
||||
// iPAddresses implements IPAddressInterface
|
||||
type iPAddresses struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newIPAddresses returns a IPAddresses
|
||||
func newIPAddresses(c *NetworkingV1alpha1Client) *iPAddresses {
|
||||
return &iPAddresses{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the iPAddress, and returns the corresponding iPAddress object, and an error if there is any.
|
||||
func (c *iPAddresses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.IPAddress, err error) {
|
||||
result = &v1alpha1.IPAddress{}
|
||||
err = c.client.Get().
|
||||
Resource("ipaddresses").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of IPAddresses that match those selectors.
|
||||
func (c *iPAddresses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.IPAddressList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.IPAddressList{}
|
||||
err = c.client.Get().
|
||||
Resource("ipaddresses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested iPAddresses.
|
||||
func (c *iPAddresses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("ipaddresses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a iPAddress and creates it. Returns the server's representation of the iPAddress, and an error, if there is any.
|
||||
func (c *iPAddresses) Create(ctx context.Context, iPAddress *v1alpha1.IPAddress, opts v1.CreateOptions) (result *v1alpha1.IPAddress, err error) {
|
||||
result = &v1alpha1.IPAddress{}
|
||||
err = c.client.Post().
|
||||
Resource("ipaddresses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(iPAddress).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a iPAddress and updates it. Returns the server's representation of the iPAddress, and an error, if there is any.
|
||||
func (c *iPAddresses) Update(ctx context.Context, iPAddress *v1alpha1.IPAddress, opts v1.UpdateOptions) (result *v1alpha1.IPAddress, err error) {
|
||||
result = &v1alpha1.IPAddress{}
|
||||
err = c.client.Put().
|
||||
Resource("ipaddresses").
|
||||
Name(iPAddress.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(iPAddress).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the iPAddress and deletes it. Returns an error if one occurs.
|
||||
func (c *iPAddresses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("ipaddresses").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *iPAddresses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("ipaddresses").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched iPAddress.
|
||||
func (c *iPAddresses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.IPAddress, err error) {
|
||||
result = &v1alpha1.IPAddress{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("ipaddresses").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied iPAddress.
|
||||
func (c *iPAddresses) Apply(ctx context.Context, iPAddress *networkingv1alpha1.IPAddressApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.IPAddress, err error) {
|
||||
if iPAddress == nil {
|
||||
return nil, fmt.Errorf("iPAddress provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(iPAddress)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := iPAddress.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("iPAddress.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.IPAddress{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("ipaddresses").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
11
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/networking_client.go
generated
vendored
11
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/networking_client.go
generated
vendored
@ -28,7 +28,8 @@ import (
|
||||
|
||||
type NetworkingV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ClusterCIDRsGetter
|
||||
IPAddressesGetter
|
||||
ServiceCIDRsGetter
|
||||
}
|
||||
|
||||
// NetworkingV1alpha1Client is used to interact with features provided by the networking.k8s.io group.
|
||||
@ -36,8 +37,12 @@ type NetworkingV1alpha1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha1Client) ClusterCIDRs() ClusterCIDRInterface {
|
||||
return newClusterCIDRs(c)
|
||||
func (c *NetworkingV1alpha1Client) IPAddresses() IPAddressInterface {
|
||||
return newIPAddresses(c)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha1Client) ServiceCIDRs() ServiceCIDRInterface {
|
||||
return newServiceCIDRs(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new NetworkingV1alpha1Client for the given config.
|
||||
|
243
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go
generated
vendored
Normal file
243
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go
generated
vendored
Normal file
@ -0,0 +1,243 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/networking/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
networkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// ServiceCIDRsGetter has a method to return a ServiceCIDRInterface.
|
||||
// A group's client should implement this interface.
|
||||
type ServiceCIDRsGetter interface {
|
||||
ServiceCIDRs() ServiceCIDRInterface
|
||||
}
|
||||
|
||||
// ServiceCIDRInterface has methods to work with ServiceCIDR resources.
|
||||
type ServiceCIDRInterface interface {
|
||||
Create(ctx context.Context, serviceCIDR *v1alpha1.ServiceCIDR, opts v1.CreateOptions) (*v1alpha1.ServiceCIDR, error)
|
||||
Update(ctx context.Context, serviceCIDR *v1alpha1.ServiceCIDR, opts v1.UpdateOptions) (*v1alpha1.ServiceCIDR, error)
|
||||
UpdateStatus(ctx context.Context, serviceCIDR *v1alpha1.ServiceCIDR, opts v1.UpdateOptions) (*v1alpha1.ServiceCIDR, 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.ServiceCIDR, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ServiceCIDRList, 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.ServiceCIDR, err error)
|
||||
Apply(ctx context.Context, serviceCIDR *networkingv1alpha1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCIDR, err error)
|
||||
ApplyStatus(ctx context.Context, serviceCIDR *networkingv1alpha1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCIDR, err error)
|
||||
ServiceCIDRExpansion
|
||||
}
|
||||
|
||||
// serviceCIDRs implements ServiceCIDRInterface
|
||||
type serviceCIDRs struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newServiceCIDRs returns a ServiceCIDRs
|
||||
func newServiceCIDRs(c *NetworkingV1alpha1Client) *serviceCIDRs {
|
||||
return &serviceCIDRs{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the serviceCIDR, and returns the corresponding serviceCIDR object, and an error if there is any.
|
||||
func (c *serviceCIDRs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ServiceCIDR, err error) {
|
||||
result = &v1alpha1.ServiceCIDR{}
|
||||
err = c.client.Get().
|
||||
Resource("servicecidrs").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ServiceCIDRs that match those selectors.
|
||||
func (c *serviceCIDRs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ServiceCIDRList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ServiceCIDRList{}
|
||||
err = c.client.Get().
|
||||
Resource("servicecidrs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested serviceCIDRs.
|
||||
func (c *serviceCIDRs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("servicecidrs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a serviceCIDR and creates it. Returns the server's representation of the serviceCIDR, and an error, if there is any.
|
||||
func (c *serviceCIDRs) Create(ctx context.Context, serviceCIDR *v1alpha1.ServiceCIDR, opts v1.CreateOptions) (result *v1alpha1.ServiceCIDR, err error) {
|
||||
result = &v1alpha1.ServiceCIDR{}
|
||||
err = c.client.Post().
|
||||
Resource("servicecidrs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(serviceCIDR).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a serviceCIDR and updates it. Returns the server's representation of the serviceCIDR, and an error, if there is any.
|
||||
func (c *serviceCIDRs) Update(ctx context.Context, serviceCIDR *v1alpha1.ServiceCIDR, opts v1.UpdateOptions) (result *v1alpha1.ServiceCIDR, err error) {
|
||||
result = &v1alpha1.ServiceCIDR{}
|
||||
err = c.client.Put().
|
||||
Resource("servicecidrs").
|
||||
Name(serviceCIDR.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(serviceCIDR).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *serviceCIDRs) UpdateStatus(ctx context.Context, serviceCIDR *v1alpha1.ServiceCIDR, opts v1.UpdateOptions) (result *v1alpha1.ServiceCIDR, err error) {
|
||||
result = &v1alpha1.ServiceCIDR{}
|
||||
err = c.client.Put().
|
||||
Resource("servicecidrs").
|
||||
Name(serviceCIDR.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(serviceCIDR).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the serviceCIDR and deletes it. Returns an error if one occurs.
|
||||
func (c *serviceCIDRs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("servicecidrs").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *serviceCIDRs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("servicecidrs").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched serviceCIDR.
|
||||
func (c *serviceCIDRs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ServiceCIDR, err error) {
|
||||
result = &v1alpha1.ServiceCIDR{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("servicecidrs").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied serviceCIDR.
|
||||
func (c *serviceCIDRs) Apply(ctx context.Context, serviceCIDR *networkingv1alpha1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCIDR, err error) {
|
||||
if serviceCIDR == nil {
|
||||
return nil, fmt.Errorf("serviceCIDR provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(serviceCIDR)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := serviceCIDR.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("serviceCIDR.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.ServiceCIDR{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("servicecidrs").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *serviceCIDRs) ApplyStatus(ctx context.Context, serviceCIDR *networkingv1alpha1.ServiceCIDRApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.ServiceCIDR, err error) {
|
||||
if serviceCIDR == nil {
|
||||
return nil, fmt.Errorf("serviceCIDR provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(serviceCIDR)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := serviceCIDR.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("serviceCIDR.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha1.ServiceCIDR{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("servicecidrs").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
2
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
generated
vendored
2
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/generated_expansion.go
generated
vendored
@ -19,5 +19,3 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
type PodDisruptionBudgetExpansion interface{}
|
||||
|
||||
type PodSecurityPolicyExpansion interface{}
|
||||
|
197
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go
generated
vendored
197
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go
generated
vendored
@ -1,197 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1beta1 "k8s.io/api/policy/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
policyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PodSecurityPoliciesGetter interface {
|
||||
PodSecurityPolicies() PodSecurityPolicyInterface
|
||||
}
|
||||
|
||||
// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources.
|
||||
type PodSecurityPolicyInterface interface {
|
||||
Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (*v1beta1.PodSecurityPolicy, error)
|
||||
Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (*v1beta1.PodSecurityPolicy, 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) (*v1beta1.PodSecurityPolicy, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, 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 *v1beta1.PodSecurityPolicy, err error)
|
||||
Apply(ctx context.Context, podSecurityPolicy *policyv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error)
|
||||
PodSecurityPolicyExpansion
|
||||
}
|
||||
|
||||
// podSecurityPolicies implements PodSecurityPolicyInterface
|
||||
type podSecurityPolicies struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newPodSecurityPolicies returns a PodSecurityPolicies
|
||||
func newPodSecurityPolicies(c *PolicyV1beta1Client) *podSecurityPolicies {
|
||||
return &podSecurityPolicies{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
|
||||
func (c *podSecurityPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Get().
|
||||
Resource("podsecuritypolicies").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
|
||||
func (c *podSecurityPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.PodSecurityPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.PodSecurityPolicyList{}
|
||||
err = c.client.Get().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
|
||||
func (c *podSecurityPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
||||
func (c *podSecurityPolicies) Create(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.CreateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Post().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podSecurityPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
|
||||
func (c *podSecurityPolicies) Update(ctx context.Context, podSecurityPolicy *v1beta1.PodSecurityPolicy, opts v1.UpdateOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Put().
|
||||
Resource("podsecuritypolicies").
|
||||
Name(podSecurityPolicy.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podSecurityPolicy).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
|
||||
func (c *podSecurityPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("podsecuritypolicies").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *podSecurityPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("podsecuritypolicies").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podSecurityPolicy.
|
||||
func (c *podSecurityPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("podsecuritypolicies").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podSecurityPolicy.
|
||||
func (c *podSecurityPolicies) Apply(ctx context.Context, podSecurityPolicy *policyv1beta1.PodSecurityPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.PodSecurityPolicy, err error) {
|
||||
if podSecurityPolicy == nil {
|
||||
return nil, fmt.Errorf("podSecurityPolicy provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(podSecurityPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := podSecurityPolicy.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podSecurityPolicy.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1beta1.PodSecurityPolicy{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("podsecuritypolicies").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
5
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
generated
vendored
5
vendor/k8s.io/client-go/kubernetes/typed/policy/v1beta1/policy_client.go
generated
vendored
@ -30,7 +30,6 @@ type PolicyV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
EvictionsGetter
|
||||
PodDisruptionBudgetsGetter
|
||||
PodSecurityPoliciesGetter
|
||||
}
|
||||
|
||||
// PolicyV1beta1Client is used to interact with features provided by the policy group.
|
||||
@ -46,10 +45,6 @@ func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) PodDisrupti
|
||||
return newPodDisruptionBudgets(c, namespace)
|
||||
}
|
||||
|
||||
func (c *PolicyV1beta1Client) PodSecurityPolicies() PodSecurityPolicyInterface {
|
||||
return newPodSecurityPolicies(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new PolicyV1beta1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
|
256
vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/podscheduling.go
generated
vendored
256
vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha1/podscheduling.go
generated
vendored
@ -1,256 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/resource/v1alpha1"
|
||||
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"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PodSchedulingsGetter has a method to return a PodSchedulingInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PodSchedulingsGetter interface {
|
||||
PodSchedulings(namespace string) PodSchedulingInterface
|
||||
}
|
||||
|
||||
// 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)
|
||||
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)
|
||||
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)
|
||||
PodSchedulingExpansion
|
||||
}
|
||||
|
||||
// podSchedulings implements PodSchedulingInterface
|
||||
type podSchedulings struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newPodSchedulings returns a PodSchedulings
|
||||
func newPodSchedulings(c *ResourceV1alpha1Client, namespace string) *podSchedulings {
|
||||
return &podSchedulings{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// 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{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// 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) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.PodSchedulingList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podSchedulings.
|
||||
func (c *podSchedulings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// 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{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podScheduling).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// 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{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
Name(podScheduling.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podScheduling).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// 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{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
Name(podScheduling.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podScheduling).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the podScheduling and deletes it. Returns an error if one occurs.
|
||||
func (c *podSchedulings) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *podSchedulings) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// 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{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// 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) {
|
||||
if podScheduling == nil {
|
||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(podScheduling)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := podScheduling.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// 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) {
|
||||
if podScheduling == nil {
|
||||
return nil, fmt.Errorf("podScheduling provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(podScheduling)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := podScheduling.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podScheduling.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha1.PodScheduling{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulings").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
20
vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha2
|
@ -16,9 +16,9 @@ limitations under the License.
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1alpha2
|
||||
|
||||
type PodSchedulingExpansion interface{}
|
||||
type PodSchedulingContextExpansion interface{}
|
||||
|
||||
type ResourceClaimExpansion interface{}
|
||||
|
256
vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go
generated
vendored
Normal file
256
vendor/k8s.io/client-go/kubernetes/typed/resource/v1alpha2/podschedulingcontext.go
generated
vendored
Normal file
@ -0,0 +1,256 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
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"
|
||||
resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// PodSchedulingContextsGetter has a method to return a PodSchedulingContextInterface.
|
||||
// A group's client should implement this interface.
|
||||
type PodSchedulingContextsGetter interface {
|
||||
PodSchedulingContexts(namespace string) PodSchedulingContextInterface
|
||||
}
|
||||
|
||||
// PodSchedulingContextInterface has methods to work with PodSchedulingContext resources.
|
||||
type PodSchedulingContextInterface interface {
|
||||
Create(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.CreateOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||
Update(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||
UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.PodSchedulingContext, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.PodSchedulingContextList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodSchedulingContext, err error)
|
||||
Apply(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error)
|
||||
ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error)
|
||||
PodSchedulingContextExpansion
|
||||
}
|
||||
|
||||
// podSchedulingContexts implements PodSchedulingContextInterface
|
||||
type podSchedulingContexts struct {
|
||||
client rest.Interface
|
||||
ns string
|
||||
}
|
||||
|
||||
// newPodSchedulingContexts returns a PodSchedulingContexts
|
||||
func newPodSchedulingContexts(c *ResourceV1alpha2Client, namespace string) *podSchedulingContexts {
|
||||
return &podSchedulingContexts{
|
||||
client: c.RESTClient(),
|
||||
ns: namespace,
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the podSchedulingContext, and returns the corresponding podSchedulingContext object, and an error if there is any.
|
||||
func (c *podSchedulingContexts) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||
result = &v1alpha2.PodSchedulingContext{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of PodSchedulingContexts that match those selectors.
|
||||
func (c *podSchedulingContexts) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.PodSchedulingContextList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha2.PodSchedulingContextList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested podSchedulingContexts.
|
||||
func (c *podSchedulingContexts) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a podSchedulingContext and creates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||
func (c *podSchedulingContexts) Create(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.CreateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||
result = &v1alpha2.PodSchedulingContext{}
|
||||
err = c.client.Post().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podSchedulingContext).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a podSchedulingContext and updates it. Returns the server's representation of the podSchedulingContext, and an error, if there is any.
|
||||
func (c *podSchedulingContexts) Update(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||
result = &v1alpha2.PodSchedulingContext{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
Name(podSchedulingContext.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podSchedulingContext).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *podSchedulingContexts) UpdateStatus(ctx context.Context, podSchedulingContext *v1alpha2.PodSchedulingContext, opts v1.UpdateOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||
result = &v1alpha2.PodSchedulingContext{}
|
||||
err = c.client.Put().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
Name(podSchedulingContext.Name).
|
||||
SubResource("status").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(podSchedulingContext).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the podSchedulingContext and deletes it. Returns an error if one occurs.
|
||||
func (c *podSchedulingContexts) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *podSchedulingContexts) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched podSchedulingContext.
|
||||
func (c *podSchedulingContexts) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||
result = &v1alpha2.PodSchedulingContext{}
|
||||
err = c.client.Patch(pt).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied podSchedulingContext.
|
||||
func (c *podSchedulingContexts) Apply(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||
if podSchedulingContext == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(podSchedulingContext)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := podSchedulingContext.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha2.PodSchedulingContext{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *podSchedulingContexts) ApplyStatus(ctx context.Context, podSchedulingContext *resourcev1alpha2.PodSchedulingContextApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.PodSchedulingContext, err error) {
|
||||
if podSchedulingContext == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(podSchedulingContext)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
name := podSchedulingContext.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("podSchedulingContext.Name must be provided to Apply")
|
||||
}
|
||||
|
||||
result = &v1alpha2.PodSchedulingContext{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Namespace(c.ns).
|
||||
Resource("podschedulingcontexts").
|
||||
Name(*name).
|
||||
SubResource("status").
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
@ -16,49 +16,49 @@ 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
|
||||
PodSchedulingContextsGetter
|
||||
ResourceClaimsGetter
|
||||
ResourceClaimTemplatesGetter
|
||||
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 {
|
||||
return newPodSchedulings(c, namespace)
|
||||
func (c *ResourceV1alpha2Client) PodSchedulingContexts(namespace string) PodSchedulingContextInterface {
|
||||
return newPodSchedulingContexts(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).
|
2
vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go
generated
vendored
2
vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/generated_expansion.go
generated
vendored
@ -21,3 +21,5 @@ package v1alpha1
|
||||
type CSIStorageCapacityExpansion interface{}
|
||||
|
||||
type VolumeAttachmentExpansion interface{}
|
||||
|
||||
type VolumeAttributesClassExpansion interface{}
|
||||
|
5
vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go
generated
vendored
5
vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/storage_client.go
generated
vendored
@ -30,6 +30,7 @@ type StorageV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
CSIStorageCapacitiesGetter
|
||||
VolumeAttachmentsGetter
|
||||
VolumeAttributesClassesGetter
|
||||
}
|
||||
|
||||
// StorageV1alpha1Client is used to interact with features provided by the storage.k8s.io group.
|
||||
@ -45,6 +46,10 @@ func (c *StorageV1alpha1Client) VolumeAttachments() VolumeAttachmentInterface {
|
||||
return newVolumeAttachments(c)
|
||||
}
|
||||
|
||||
func (c *StorageV1alpha1Client) VolumeAttributesClasses() VolumeAttributesClassInterface {
|
||||
return newVolumeAttributesClasses(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new StorageV1alpha1Client for the given config.
|
||||
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
|
197
vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go
generated
vendored
Normal file
197
vendor/k8s.io/client-go/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go
generated
vendored
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
storagev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// VolumeAttributesClassesGetter has a method to return a VolumeAttributesClassInterface.
|
||||
// A group's client should implement this interface.
|
||||
type VolumeAttributesClassesGetter interface {
|
||||
VolumeAttributesClasses() VolumeAttributesClassInterface
|
||||
}
|
||||
|
||||
// VolumeAttributesClassInterface has methods to work with VolumeAttributesClass resources.
|
||||
type VolumeAttributesClassInterface interface {
|
||||
Create(ctx context.Context, volumeAttributesClass *v1alpha1.VolumeAttributesClass, opts v1.CreateOptions) (*v1alpha1.VolumeAttributesClass, error)
|
||||
Update(ctx context.Context, volumeAttributesClass *v1alpha1.VolumeAttributesClass, opts v1.UpdateOptions) (*v1alpha1.VolumeAttributesClass, 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.VolumeAttributesClass, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.VolumeAttributesClassList, 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.VolumeAttributesClass, err error)
|
||||
Apply(ctx context.Context, volumeAttributesClass *storagev1alpha1.VolumeAttributesClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.VolumeAttributesClass, err error)
|
||||
VolumeAttributesClassExpansion
|
||||
}
|
||||
|
||||
// volumeAttributesClasses implements VolumeAttributesClassInterface
|
||||
type volumeAttributesClasses struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newVolumeAttributesClasses returns a VolumeAttributesClasses
|
||||
func newVolumeAttributesClasses(c *StorageV1alpha1Client) *volumeAttributesClasses {
|
||||
return &volumeAttributesClasses{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the volumeAttributesClass, and returns the corresponding volumeAttributesClass object, and an error if there is any.
|
||||
func (c *volumeAttributesClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.VolumeAttributesClass, err error) {
|
||||
result = &v1alpha1.VolumeAttributesClass{}
|
||||
err = c.client.Get().
|
||||
Resource("volumeattributesclasses").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VolumeAttributesClasses that match those selectors.
|
||||
func (c *volumeAttributesClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.VolumeAttributesClassList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.VolumeAttributesClassList{}
|
||||
err = c.client.Get().
|
||||
Resource("volumeattributesclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested volumeAttributesClasses.
|
||||
func (c *volumeAttributesClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("volumeattributesclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch(ctx)
|
||||
}
|
||||
|
||||
// Create takes the representation of a volumeAttributesClass and creates it. Returns the server's representation of the volumeAttributesClass, and an error, if there is any.
|
||||
func (c *volumeAttributesClasses) Create(ctx context.Context, volumeAttributesClass *v1alpha1.VolumeAttributesClass, opts v1.CreateOptions) (result *v1alpha1.VolumeAttributesClass, err error) {
|
||||
result = &v1alpha1.VolumeAttributesClass{}
|
||||
err = c.client.Post().
|
||||
Resource("volumeattributesclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(volumeAttributesClass).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a volumeAttributesClass and updates it. Returns the server's representation of the volumeAttributesClass, and an error, if there is any.
|
||||
func (c *volumeAttributesClasses) Update(ctx context.Context, volumeAttributesClass *v1alpha1.VolumeAttributesClass, opts v1.UpdateOptions) (result *v1alpha1.VolumeAttributesClass, err error) {
|
||||
result = &v1alpha1.VolumeAttributesClass{}
|
||||
err = c.client.Put().
|
||||
Resource("volumeattributesclasses").
|
||||
Name(volumeAttributesClass.Name).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(volumeAttributesClass).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the volumeAttributesClass and deletes it. Returns an error if one occurs.
|
||||
func (c *volumeAttributesClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("volumeattributesclasses").
|
||||
Name(name).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *volumeAttributesClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOpts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("volumeattributesclasses").
|
||||
VersionedParams(&listOpts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(&opts).
|
||||
Do(ctx).
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched volumeAttributesClass.
|
||||
func (c *volumeAttributesClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.VolumeAttributesClass, err error) {
|
||||
result = &v1alpha1.VolumeAttributesClass{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("volumeattributesclasses").
|
||||
Name(name).
|
||||
SubResource(subresources...).
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied volumeAttributesClass.
|
||||
func (c *volumeAttributesClasses) Apply(ctx context.Context, volumeAttributesClass *storagev1alpha1.VolumeAttributesClassApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.VolumeAttributesClass, err error) {
|
||||
if volumeAttributesClass == nil {
|
||||
return nil, fmt.Errorf("volumeAttributesClass provided to Apply must not be nil")
|
||||
}
|
||||
patchOpts := opts.ToPatchOptions()
|
||||
data, err := json.Marshal(volumeAttributesClass)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := volumeAttributesClass.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("volumeAttributesClass.Name must be provided to Apply")
|
||||
}
|
||||
result = &v1alpha1.VolumeAttributesClass{}
|
||||
err = c.client.Patch(types.ApplyPatchType).
|
||||
Resource("volumeattributesclasses").
|
||||
Name(*name).
|
||||
VersionedParams(&patchOpts, scheme.ParameterCodec).
|
||||
Body(data).
|
||||
Do(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
Reference in New Issue
Block a user