mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update all k8s packages to 0.27.2
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
07b05616a0
commit
2551a0b05f
29
vendor/k8s.io/client-go/kubernetes/clientset.go
generated
vendored
29
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"
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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)
|
||||
@ -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
|
||||
|
6
vendor/k8s.io/client-go/kubernetes/scheme/register.go
generated
vendored
6
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"
|
||||
@ -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,
|
||||
@ -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
|
||||
}
|
||||
|
@ -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{}
|
||||
|
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
|
||||
}
|
2
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/generated_expansion.go
generated
vendored
2
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/generated_expansion.go
generated
vendored
@ -19,3 +19,5 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
type ClusterCIDRExpansion interface{}
|
||||
|
||||
type IPAddressExpansion 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
|
||||
}
|
5
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/networking_client.go
generated
vendored
5
vendor/k8s.io/client-go/kubernetes/typed/networking/v1alpha1/networking_client.go
generated
vendored
@ -29,6 +29,7 @@ import (
|
||||
type NetworkingV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
ClusterCIDRsGetter
|
||||
IPAddressesGetter
|
||||
}
|
||||
|
||||
// NetworkingV1alpha1Client is used to interact with features provided by the networking.k8s.io group.
|
||||
@ -40,6 +41,10 @@ func (c *NetworkingV1alpha1Client) ClusterCIDRs() ClusterCIDRInterface {
|
||||
return newClusterCIDRs(c)
|
||||
}
|
||||
|
||||
func (c *NetworkingV1alpha1Client) IPAddresses() IPAddressInterface {
|
||||
return newIPAddresses(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new NetworkingV1alpha1Client 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).
|
Reference in New Issue
Block a user