mirror of
https://github.com/kubernetes/client-go.git
synced 2026-06-15 06:20:08 +00:00
Compare commits
6 Commits
v0.31.0-al
...
v0.30.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
592d891671 | ||
|
|
4e1652b143 | ||
|
|
2daa31e071 | ||
|
|
2df4de16d4 | ||
|
|
ade2ae2228 | ||
|
|
b4632b75ff |
@@ -37,7 +37,6 @@ type ContainerStatusApplyConfiguration struct {
|
||||
AllocatedResources *corev1.ResourceList `json:"allocatedResources,omitempty"`
|
||||
Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`
|
||||
VolumeMounts []VolumeMountStatusApplyConfiguration `json:"volumeMounts,omitempty"`
|
||||
User *ContainerUserApplyConfiguration `json:"user,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerStatusApplyConfiguration constructs an declarative configuration of the ContainerStatus type for use with
|
||||
@@ -146,11 +145,3 @@ func (b *ContainerStatusApplyConfiguration) WithVolumeMounts(values ...*VolumeMo
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// WithUser sets the User field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the User field is set to the value of the last call.
|
||||
func (b *ContainerStatusApplyConfiguration) WithUser(value *ContainerUserApplyConfiguration) *ContainerStatusApplyConfiguration {
|
||||
b.User = value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// ContainerUserApplyConfiguration represents an declarative configuration of the ContainerUser type for use
|
||||
// with apply.
|
||||
type ContainerUserApplyConfiguration struct {
|
||||
Linux *LinuxContainerUserApplyConfiguration `json:"linux,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerUserApplyConfiguration constructs an declarative configuration of the ContainerUser type for use with
|
||||
// apply.
|
||||
func ContainerUser() *ContainerUserApplyConfiguration {
|
||||
return &ContainerUserApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithLinux sets the Linux field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Linux field is set to the value of the last call.
|
||||
func (b *ContainerUserApplyConfiguration) WithLinux(value *LinuxContainerUserApplyConfiguration) *ContainerUserApplyConfiguration {
|
||||
b.Linux = value
|
||||
return b
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
// LinuxContainerUserApplyConfiguration represents an declarative configuration of the LinuxContainerUser type for use
|
||||
// with apply.
|
||||
type LinuxContainerUserApplyConfiguration struct {
|
||||
UID *int64 `json:"uid,omitempty"`
|
||||
GID *int64 `json:"gid,omitempty"`
|
||||
SupplementalGroups []int64 `json:"supplementalGroups,omitempty"`
|
||||
}
|
||||
|
||||
// LinuxContainerUserApplyConfiguration constructs an declarative configuration of the LinuxContainerUser type for use with
|
||||
// apply.
|
||||
func LinuxContainerUser() *LinuxContainerUserApplyConfiguration {
|
||||
return &LinuxContainerUserApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithUID sets the UID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *LinuxContainerUserApplyConfiguration) WithUID(value int64) *LinuxContainerUserApplyConfiguration {
|
||||
b.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithGID sets the GID field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the GID field is set to the value of the last call.
|
||||
func (b *LinuxContainerUserApplyConfiguration) WithGID(value int64) *LinuxContainerUserApplyConfiguration {
|
||||
b.GID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSupplementalGroups adds the given value to the SupplementalGroups field in the declarative configuration
|
||||
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
||||
// If called multiple times, values provided by each call will be appended to the SupplementalGroups field.
|
||||
func (b *LinuxContainerUserApplyConfiguration) WithSupplementalGroups(values ...int64) *LinuxContainerUserApplyConfiguration {
|
||||
for i := range values {
|
||||
b.SupplementalGroups = append(b.SupplementalGroups, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -25,18 +25,17 @@ import (
|
||||
// PodSecurityContextApplyConfiguration represents an declarative configuration of the PodSecurityContext type for use
|
||||
// with apply.
|
||||
type PodSecurityContextApplyConfiguration struct {
|
||||
SELinuxOptions *SELinuxOptionsApplyConfiguration `json:"seLinuxOptions,omitempty"`
|
||||
WindowsOptions *WindowsSecurityContextOptionsApplyConfiguration `json:"windowsOptions,omitempty"`
|
||||
RunAsUser *int64 `json:"runAsUser,omitempty"`
|
||||
RunAsGroup *int64 `json:"runAsGroup,omitempty"`
|
||||
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
|
||||
SupplementalGroups []int64 `json:"supplementalGroups,omitempty"`
|
||||
SupplementalGroupsPolicy *corev1.SupplementalGroupsPolicy `json:"supplementalGroupsPolicy,omitempty"`
|
||||
FSGroup *int64 `json:"fsGroup,omitempty"`
|
||||
Sysctls []SysctlApplyConfiguration `json:"sysctls,omitempty"`
|
||||
FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"`
|
||||
SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"`
|
||||
AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"`
|
||||
SELinuxOptions *SELinuxOptionsApplyConfiguration `json:"seLinuxOptions,omitempty"`
|
||||
WindowsOptions *WindowsSecurityContextOptionsApplyConfiguration `json:"windowsOptions,omitempty"`
|
||||
RunAsUser *int64 `json:"runAsUser,omitempty"`
|
||||
RunAsGroup *int64 `json:"runAsGroup,omitempty"`
|
||||
RunAsNonRoot *bool `json:"runAsNonRoot,omitempty"`
|
||||
SupplementalGroups []int64 `json:"supplementalGroups,omitempty"`
|
||||
FSGroup *int64 `json:"fsGroup,omitempty"`
|
||||
Sysctls []SysctlApplyConfiguration `json:"sysctls,omitempty"`
|
||||
FSGroupChangePolicy *corev1.PodFSGroupChangePolicy `json:"fsGroupChangePolicy,omitempty"`
|
||||
SeccompProfile *SeccompProfileApplyConfiguration `json:"seccompProfile,omitempty"`
|
||||
AppArmorProfile *AppArmorProfileApplyConfiguration `json:"appArmorProfile,omitempty"`
|
||||
}
|
||||
|
||||
// PodSecurityContextApplyConfiguration constructs an declarative configuration of the PodSecurityContext type for use with
|
||||
@@ -95,14 +94,6 @@ func (b *PodSecurityContextApplyConfiguration) WithSupplementalGroups(values ...
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSupplementalGroupsPolicy sets the SupplementalGroupsPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the SupplementalGroupsPolicy field is set to the value of the last call.
|
||||
func (b *PodSecurityContextApplyConfiguration) WithSupplementalGroupsPolicy(value corev1.SupplementalGroupsPolicy) *PodSecurityContextApplyConfiguration {
|
||||
b.SupplementalGroupsPolicy = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithFSGroup sets the FSGroup field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the FSGroup field is set to the value of the last call.
|
||||
|
||||
@@ -5084,9 +5084,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ContainerState
|
||||
default: {}
|
||||
- name: user
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ContainerUser
|
||||
- name: volumeMounts
|
||||
type:
|
||||
list:
|
||||
@@ -5095,12 +5092,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementRelationship: associative
|
||||
keys:
|
||||
- mountPath
|
||||
- name: io.k8s.api.core.v1.ContainerUser
|
||||
map:
|
||||
fields:
|
||||
- name: linux
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.LinuxContainerUser
|
||||
- name: io.k8s.api.core.v1.DaemonEndpoint
|
||||
map:
|
||||
fields:
|
||||
@@ -5860,23 +5851,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
namedType: io.k8s.api.core.v1.LimitRangeItem
|
||||
elementRelationship: atomic
|
||||
- name: io.k8s.api.core.v1.LinuxContainerUser
|
||||
map:
|
||||
fields:
|
||||
- name: gid
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: supplementalGroups
|
||||
type:
|
||||
list:
|
||||
elementType:
|
||||
scalar: numeric
|
||||
elementRelationship: atomic
|
||||
- name: uid
|
||||
type:
|
||||
scalar: numeric
|
||||
default: 0
|
||||
- name: io.k8s.api.core.v1.LoadBalancerIngress
|
||||
map:
|
||||
fields:
|
||||
@@ -6848,9 +6822,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
elementType:
|
||||
scalar: numeric
|
||||
elementRelationship: atomic
|
||||
- name: supplementalGroupsPolicy
|
||||
type:
|
||||
scalar: string
|
||||
- name: sysctls
|
||||
type:
|
||||
list:
|
||||
@@ -12451,7 +12422,6 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: driverName
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: structuredData
|
||||
type:
|
||||
namedType: io.k8s.api.resource.v1alpha2.StructuredResourceHandle
|
||||
|
||||
@@ -681,8 +681,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.ContainerStateWaitingApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ContainerStatus"):
|
||||
return &applyconfigurationscorev1.ContainerStatusApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ContainerUser"):
|
||||
return &applyconfigurationscorev1.ContainerUserApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("CSIPersistentVolumeSource"):
|
||||
return &applyconfigurationscorev1.CSIPersistentVolumeSourceApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("CSIVolumeSource"):
|
||||
@@ -769,8 +767,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.LimitRangeItemApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("LimitRangeSpec"):
|
||||
return &applyconfigurationscorev1.LimitRangeSpecApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("LinuxContainerUser"):
|
||||
return &applyconfigurationscorev1.LinuxContainerUserApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("LoadBalancerIngress"):
|
||||
return &applyconfigurationscorev1.LoadBalancerIngressApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("LoadBalancerStatus"):
|
||||
|
||||
@@ -1,248 +0,0 @@
|
||||
/*
|
||||
Copyright 2024 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package dynamic_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/client-go/dynamic"
|
||||
"k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
func TestGoldenRequest(t *testing.T) {
|
||||
for _, tc := range []struct {
|
||||
name string
|
||||
do func(context.Context, dynamic.Interface) error
|
||||
}{
|
||||
{
|
||||
name: "create",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").Create(
|
||||
ctx,
|
||||
&unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{"name": "mips"},
|
||||
}},
|
||||
metav1.CreateOptions{FieldValidation: "warn"},
|
||||
"fin",
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "update",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").Update(
|
||||
ctx,
|
||||
&unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{"name": "mips"},
|
||||
}},
|
||||
metav1.UpdateOptions{FieldValidation: "warn"},
|
||||
"fin",
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "updatestatus",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").UpdateStatus(
|
||||
ctx,
|
||||
&unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{"name": "mips"},
|
||||
}},
|
||||
metav1.UpdateOptions{FieldValidation: "warn"},
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "delete",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
return client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").Delete(
|
||||
ctx,
|
||||
"mips",
|
||||
metav1.DeleteOptions{DryRun: []string{metav1.DryRunAll}},
|
||||
"fin",
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "deletecollection",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
return client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").DeleteCollection(
|
||||
ctx,
|
||||
metav1.DeleteOptions{DryRun: []string{metav1.DryRunAll}},
|
||||
metav1.ListOptions{ResourceVersion: "42"},
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "get",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").Get(
|
||||
ctx,
|
||||
"mips",
|
||||
metav1.GetOptions{ResourceVersion: "42"},
|
||||
"fin",
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "list",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").List(
|
||||
ctx,
|
||||
metav1.ListOptions{ResourceVersion: "42"},
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "watch",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").Watch(
|
||||
ctx,
|
||||
metav1.ListOptions{ResourceVersion: "42"},
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "patch",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").Patch(
|
||||
ctx,
|
||||
"mips",
|
||||
types.StrategicMergePatchType,
|
||||
[]byte("{\"foo\":\"bar\"}\n"),
|
||||
metav1.PatchOptions{FieldManager: "baz"},
|
||||
"fin",
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "apply",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").Apply(
|
||||
ctx,
|
||||
"mips",
|
||||
&unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{"name": "mips"},
|
||||
}},
|
||||
metav1.ApplyOptions{Force: true},
|
||||
"fin",
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "applystatus",
|
||||
do: func(ctx context.Context, client dynamic.Interface) error {
|
||||
_, err := client.Resource(schema.GroupVersionResource{Group: "flops", Version: "v1alpha1", Resource: "flips"}).Namespace("mops").ApplyStatus(
|
||||
ctx,
|
||||
"mips",
|
||||
&unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"metadata": map[string]interface{}{"name": "mips"},
|
||||
}},
|
||||
metav1.ApplyOptions{Force: true},
|
||||
)
|
||||
return err
|
||||
},
|
||||
},
|
||||
} {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
handled := make(chan struct{})
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
defer close(handled)
|
||||
|
||||
got, err := httputil.DumpRequest(r, true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
path := filepath.Join("testdata", filepath.FromSlash(t.Name()))
|
||||
|
||||
if os.Getenv("UPDATE_DYNAMIC_CLIENT_FIXTURES") == "true" {
|
||||
err := os.WriteFile(path, got, os.FileMode(0755))
|
||||
if err != nil {
|
||||
t.Fatalf("failed to update fixture: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
want, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to load fixture: %v", err)
|
||||
}
|
||||
if diff := cmp.Diff(got, want); diff != "" {
|
||||
t.Errorf("unexpected difference from expected bytes:\n%s", diff)
|
||||
}
|
||||
}))
|
||||
defer srv.Close()
|
||||
|
||||
client, err := dynamic.NewForConfig(&rest.Config{
|
||||
Host: "example.com",
|
||||
UserAgent: "TestGoldenRequest",
|
||||
Transport: &http.Transport{
|
||||
// The client will send a static Host header while always
|
||||
// connecting to the test server.
|
||||
DialContext: func(ctx context.Context, network string, addr string) (net.Conn, error) {
|
||||
u, err := url.Parse(srv.URL)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse test server url: %w", err)
|
||||
}
|
||||
return (&net.Dialer{}).DialContext(ctx, "tcp", u.Host)
|
||||
},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
|
||||
defer cancel()
|
||||
if err := tc.do(ctx, client); err != nil {
|
||||
// This test detects server-perceptible changes to the request. As
|
||||
// long as the server receives the expected request, a non-nil error
|
||||
// returned from a client method is not a failure.
|
||||
t.Logf("client returned non-nil error: %v", err)
|
||||
}
|
||||
|
||||
select {
|
||||
case <-handled:
|
||||
default:
|
||||
t.Fatal("no request received")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/util/consistencydetector"
|
||||
)
|
||||
|
||||
type DynamicClient struct {
|
||||
@@ -293,16 +292,7 @@ func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav
|
||||
return uncastObj.(*unstructured.Unstructured), nil
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (result *unstructured.UnstructuredList, err error) {
|
||||
defer func() {
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, fmt.Sprintf("list request for %v", c.resource), c.list, opts, result)
|
||||
}
|
||||
}()
|
||||
return c.list(ctx, opts)
|
||||
}
|
||||
|
||||
func (c *dynamicResourceClient) list(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) {
|
||||
func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) {
|
||||
if err := validateNamespaceWithOptionalName(c.namespace); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
9
dynamic/testdata/TestGoldenRequest/apply
vendored
9
dynamic/testdata/TestGoldenRequest/apply
vendored
@@ -1,9 +0,0 @@
|
||||
PATCH /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?force=true HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 29
|
||||
Content-Type: application/apply-patch+yaml
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"metadata":{"name":"mips"}}
|
||||
@@ -1,9 +0,0 @@
|
||||
PATCH /apis/flops/v1alpha1/namespaces/mops/flips/mips/status?force=true HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 29
|
||||
Content-Type: application/apply-patch+yaml
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"metadata":{"name":"mips"}}
|
||||
9
dynamic/testdata/TestGoldenRequest/create
vendored
9
dynamic/testdata/TestGoldenRequest/create
vendored
@@ -1,9 +0,0 @@
|
||||
POST /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?fieldValidation=warn HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 29
|
||||
Content-Type: application/json
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"metadata":{"name":"mips"}}
|
||||
9
dynamic/testdata/TestGoldenRequest/delete
vendored
9
dynamic/testdata/TestGoldenRequest/delete
vendored
@@ -1,9 +0,0 @@
|
||||
DELETE /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 60
|
||||
Content-Type: application/json
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"kind":"DeleteOptions","apiVersion":"v1","dryRun":["All"]}
|
||||
@@ -1,9 +0,0 @@
|
||||
DELETE /apis/flops/v1alpha1/namespaces/mops/flips?resourceVersion=42 HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 60
|
||||
Content-Type: application/json
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"kind":"DeleteOptions","apiVersion":"v1","dryRun":["All"]}
|
||||
6
dynamic/testdata/TestGoldenRequest/get
vendored
6
dynamic/testdata/TestGoldenRequest/get
vendored
@@ -1,6 +0,0 @@
|
||||
GET /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?resourceVersion=42 HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
6
dynamic/testdata/TestGoldenRequest/list
vendored
6
dynamic/testdata/TestGoldenRequest/list
vendored
@@ -1,6 +0,0 @@
|
||||
GET /apis/flops/v1alpha1/namespaces/mops/flips?resourceVersion=42 HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
9
dynamic/testdata/TestGoldenRequest/patch
vendored
9
dynamic/testdata/TestGoldenRequest/patch
vendored
@@ -1,9 +0,0 @@
|
||||
PATCH /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?fieldManager=baz HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 14
|
||||
Content-Type: application/strategic-merge-patch+json
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"foo":"bar"}
|
||||
9
dynamic/testdata/TestGoldenRequest/update
vendored
9
dynamic/testdata/TestGoldenRequest/update
vendored
@@ -1,9 +0,0 @@
|
||||
PUT /apis/flops/v1alpha1/namespaces/mops/flips/mips/fin?fieldValidation=warn HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 29
|
||||
Content-Type: application/json
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"metadata":{"name":"mips"}}
|
||||
@@ -1,9 +0,0 @@
|
||||
PUT /apis/flops/v1alpha1/namespaces/mops/flips/mips/status?fieldValidation=warn HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
Content-Length: 29
|
||||
Content-Type: application/json
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
{"metadata":{"name":"mips"}}
|
||||
6
dynamic/testdata/TestGoldenRequest/watch
vendored
6
dynamic/testdata/TestGoldenRequest/watch
vendored
@@ -1,6 +0,0 @@
|
||||
GET /apis/flops/v1alpha1/namespaces/mops/flips?resourceVersion=42&watch=true HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
Accept-Encoding: gzip
|
||||
User-Agent: TestGoldenRequest
|
||||
|
||||
@@ -37,12 +37,12 @@ import (
|
||||
// Controller demonstrates how to implement a controller with client-go.
|
||||
type Controller struct {
|
||||
indexer cache.Indexer
|
||||
queue workqueue.TypedRateLimitingInterface[string]
|
||||
queue workqueue.RateLimitingInterface
|
||||
informer cache.Controller
|
||||
}
|
||||
|
||||
// NewController creates a new Controller.
|
||||
func NewController(queue workqueue.TypedRateLimitingInterface[string], indexer cache.Indexer, informer cache.Controller) *Controller {
|
||||
func NewController(queue workqueue.RateLimitingInterface, indexer cache.Indexer, informer cache.Controller) *Controller {
|
||||
return &Controller{
|
||||
informer: informer,
|
||||
indexer: indexer,
|
||||
@@ -62,7 +62,7 @@ func (c *Controller) processNextItem() bool {
|
||||
defer c.queue.Done(key)
|
||||
|
||||
// Invoke the method containing the business logic
|
||||
err := c.syncToStdout(key)
|
||||
err := c.syncToStdout(key.(string))
|
||||
// Handle the error if something went wrong during the execution of the business logic
|
||||
c.handleErr(err, key)
|
||||
return true
|
||||
@@ -90,7 +90,7 @@ func (c *Controller) syncToStdout(key string) error {
|
||||
}
|
||||
|
||||
// handleErr checks if an error happened and makes sure we will retry later.
|
||||
func (c *Controller) handleErr(err error, key string) {
|
||||
func (c *Controller) handleErr(err error, key interface{}) {
|
||||
if err == nil {
|
||||
// Forget about the #AddRateLimited history of the key on every successful synchronization.
|
||||
// This ensures that future processing of updates for this key is not delayed because of
|
||||
@@ -168,7 +168,7 @@ func main() {
|
||||
podListWatcher := cache.NewListWatchFromClient(clientset.CoreV1().RESTClient(), "pods", v1.NamespaceDefault, fields.Everything())
|
||||
|
||||
// create the workqueue
|
||||
queue := workqueue.NewTypedRateLimitingQueue(workqueue.DefaultTypedControllerRateLimiter[string]())
|
||||
queue := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter())
|
||||
|
||||
// Bind the workqueue to a cache with the help of an informer. This way we make sure that
|
||||
// whenever the cache is updated, the pod key is added to the workqueue.
|
||||
|
||||
@@ -47,10 +47,6 @@ var _ Gates = &envVarFeatureGates{}
|
||||
//
|
||||
// Please note that environmental variables can only be set to the boolean value.
|
||||
// Incorrect values will be ignored and logged.
|
||||
//
|
||||
// Features can also be set directly via the Set method.
|
||||
// In that case, these features take precedence over
|
||||
// features set via environmental variables.
|
||||
func newEnvVarFeatureGates(features map[Feature]FeatureSpec) *envVarFeatureGates {
|
||||
known := map[Feature]FeatureSpec{}
|
||||
for name, spec := range features {
|
||||
@@ -61,8 +57,7 @@ func newEnvVarFeatureGates(features map[Feature]FeatureSpec) *envVarFeatureGates
|
||||
callSiteName: naming.GetNameFromCallsite(internalPackages...),
|
||||
known: known,
|
||||
}
|
||||
fg.enabledViaEnvVar.Store(map[Feature]bool{})
|
||||
fg.enabledViaSetMethod = map[Feature]bool{}
|
||||
fg.enabled.Store(map[Feature]bool{})
|
||||
|
||||
return fg
|
||||
}
|
||||
@@ -79,34 +74,17 @@ type envVarFeatureGates struct {
|
||||
// known holds known feature gates
|
||||
known map[Feature]FeatureSpec
|
||||
|
||||
// enabledViaEnvVar holds a map[Feature]bool
|
||||
// enabled holds a map[Feature]bool
|
||||
// with values explicitly set via env var
|
||||
enabledViaEnvVar atomic.Value
|
||||
|
||||
// lockEnabledViaSetMethod protects enabledViaSetMethod
|
||||
lockEnabledViaSetMethod sync.RWMutex
|
||||
|
||||
// enabledViaSetMethod holds values explicitly set
|
||||
// via Set method, features stored in this map take
|
||||
// precedence over features stored in enabledViaEnvVar
|
||||
enabledViaSetMethod map[Feature]bool
|
||||
enabled atomic.Value
|
||||
|
||||
// readEnvVars holds the boolean value which
|
||||
// indicates whether readEnvVarsOnce has been called.
|
||||
readEnvVars atomic.Bool
|
||||
}
|
||||
|
||||
// Enabled returns true if the key is enabled. If the key is not known, this call will panic.
|
||||
// Enabled returns true if the key is enabled. If the key is not known, this call will panic.
|
||||
func (f *envVarFeatureGates) Enabled(key Feature) bool {
|
||||
if v, ok := f.wasFeatureEnabledViaSetMethod(key); ok {
|
||||
// ensue that the state of all known features
|
||||
// is loaded from environment variables
|
||||
// on the first call to Enabled method.
|
||||
if !f.hasAlreadyReadEnvVar() {
|
||||
_ = f.getEnabledMapFromEnvVar()
|
||||
}
|
||||
return v
|
||||
}
|
||||
if v, ok := f.getEnabledMapFromEnvVar()[key]; ok {
|
||||
return v
|
||||
}
|
||||
@@ -116,26 +94,6 @@ func (f *envVarFeatureGates) Enabled(key Feature) bool {
|
||||
panic(fmt.Errorf("feature %q is not registered in FeatureGates %q", key, f.callSiteName))
|
||||
}
|
||||
|
||||
// Set sets the given feature to the given value.
|
||||
//
|
||||
// Features set via this method take precedence over
|
||||
// the features set via environment variables.
|
||||
func (f *envVarFeatureGates) Set(featureName Feature, featureValue bool) error {
|
||||
feature, ok := f.known[featureName]
|
||||
if !ok {
|
||||
return fmt.Errorf("feature %q is not registered in FeatureGates %q", featureName, f.callSiteName)
|
||||
}
|
||||
if feature.LockToDefault && feature.Default != featureValue {
|
||||
return fmt.Errorf("cannot set feature gate %q to %v, feature is locked to %v", featureName, featureValue, feature.Default)
|
||||
}
|
||||
|
||||
f.lockEnabledViaSetMethod.Lock()
|
||||
defer f.lockEnabledViaSetMethod.Unlock()
|
||||
f.enabledViaSetMethod[featureName] = featureValue
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// getEnabledMapFromEnvVar will fill the enabled map on the first call.
|
||||
// This is the only time a known feature can be set to a value
|
||||
// read from the corresponding environmental variable.
|
||||
@@ -161,7 +119,7 @@ func (f *envVarFeatureGates) getEnabledMapFromEnvVar() map[Feature]bool {
|
||||
featureGatesState[feature] = boolVal
|
||||
}
|
||||
}
|
||||
f.enabledViaEnvVar.Store(featureGatesState)
|
||||
f.enabled.Store(featureGatesState)
|
||||
f.readEnvVars.Store(true)
|
||||
|
||||
for feature, featureSpec := range f.known {
|
||||
@@ -172,15 +130,7 @@ func (f *envVarFeatureGates) getEnabledMapFromEnvVar() map[Feature]bool {
|
||||
klog.V(1).InfoS("Feature gate default state", "feature", feature, "enabled", featureSpec.Default)
|
||||
}
|
||||
})
|
||||
return f.enabledViaEnvVar.Load().(map[Feature]bool)
|
||||
}
|
||||
|
||||
func (f *envVarFeatureGates) wasFeatureEnabledViaSetMethod(key Feature) (bool, bool) {
|
||||
f.lockEnabledViaSetMethod.RLock()
|
||||
defer f.lockEnabledViaSetMethod.RUnlock()
|
||||
|
||||
value, found := f.enabledViaSetMethod[key]
|
||||
return value, found
|
||||
return f.enabled.Load().(map[Feature]bool)
|
||||
}
|
||||
|
||||
func (f *envVarFeatureGates) hasAlreadyReadEnvVar() bool {
|
||||
|
||||
@@ -23,21 +23,21 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var defaultTestFeatures = map[Feature]FeatureSpec{
|
||||
"TestAlpha": {
|
||||
Default: false,
|
||||
LockToDefault: false,
|
||||
PreRelease: "Alpha",
|
||||
},
|
||||
"TestBeta": {
|
||||
Default: true,
|
||||
LockToDefault: false,
|
||||
PreRelease: "Beta",
|
||||
},
|
||||
}
|
||||
|
||||
func TestEnvVarFeatureGates(t *testing.T) {
|
||||
defaultTestFeatures := map[Feature]FeatureSpec{
|
||||
"TestAlpha": {
|
||||
Default: false,
|
||||
LockToDefault: false,
|
||||
PreRelease: "Alpha",
|
||||
},
|
||||
"TestBeta": {
|
||||
Default: true,
|
||||
LockToDefault: false,
|
||||
PreRelease: "Beta",
|
||||
},
|
||||
}
|
||||
expectedDefaultFeaturesState := map[Feature]bool{"TestAlpha": false, "TestBeta": true}
|
||||
|
||||
copyExpectedStateMap := func(toCopy map[Feature]bool) map[Feature]bool {
|
||||
m := map[Feature]bool{}
|
||||
for k, v := range toCopy {
|
||||
@@ -47,14 +47,11 @@ func TestEnvVarFeatureGates(t *testing.T) {
|
||||
}
|
||||
|
||||
scenarios := []struct {
|
||||
name string
|
||||
features map[Feature]FeatureSpec
|
||||
envVariables map[string]string
|
||||
setMethodFeatures map[Feature]bool
|
||||
|
||||
expectedFeaturesState map[Feature]bool
|
||||
expectedInternalEnabledViaEnvVarFeatureState map[Feature]bool
|
||||
expectedInternalEnabledViaSetMethodFeatureState map[Feature]bool
|
||||
name string
|
||||
features map[Feature]FeatureSpec
|
||||
envVariables map[string]string
|
||||
expectedFeaturesState map[Feature]bool
|
||||
expectedInternalEnabledFeatureState map[Feature]bool
|
||||
}{
|
||||
{
|
||||
name: "can add empty features",
|
||||
@@ -79,7 +76,7 @@ func TestEnvVarFeatureGates(t *testing.T) {
|
||||
expectedDefaultFeaturesStateCopy["TestAlpha"] = true
|
||||
return expectedDefaultFeaturesStateCopy
|
||||
}(),
|
||||
expectedInternalEnabledViaEnvVarFeatureState: map[Feature]bool{"TestAlpha": true},
|
||||
expectedInternalEnabledFeatureState: map[Feature]bool{"TestAlpha": true},
|
||||
},
|
||||
{
|
||||
name: "incorrect env var value gets ignored",
|
||||
@@ -114,25 +111,9 @@ func TestEnvVarFeatureGates(t *testing.T) {
|
||||
PreRelease: "Alpha",
|
||||
},
|
||||
},
|
||||
envVariables: map[string]string{"KUBE_FEATURE_TestAlpha": "True"},
|
||||
expectedFeaturesState: map[Feature]bool{"TestAlpha": true},
|
||||
expectedInternalEnabledViaEnvVarFeatureState: map[Feature]bool{"TestAlpha": true},
|
||||
},
|
||||
{
|
||||
name: "setting a feature via the Set method works",
|
||||
features: defaultTestFeatures,
|
||||
setMethodFeatures: map[Feature]bool{"TestAlpha": true},
|
||||
expectedFeaturesState: map[Feature]bool{"TestAlpha": true},
|
||||
expectedInternalEnabledViaSetMethodFeatureState: map[Feature]bool{"TestAlpha": true},
|
||||
},
|
||||
{
|
||||
name: "setting a feature via the Set method wins",
|
||||
features: defaultTestFeatures,
|
||||
setMethodFeatures: map[Feature]bool{"TestAlpha": false},
|
||||
envVariables: map[string]string{"KUBE_FEATURE_TestAlpha": "True"},
|
||||
expectedFeaturesState: map[Feature]bool{"TestAlpha": false},
|
||||
expectedInternalEnabledViaEnvVarFeatureState: map[Feature]bool{"TestAlpha": true},
|
||||
expectedInternalEnabledViaSetMethodFeatureState: map[Feature]bool{"TestAlpha": false},
|
||||
envVariables: map[string]string{"KUBE_FEATURE_TestAlpha": "True"},
|
||||
expectedFeaturesState: map[Feature]bool{"TestAlpha": true},
|
||||
expectedInternalEnabledFeatureState: map[Feature]bool{"TestAlpha": true},
|
||||
},
|
||||
}
|
||||
for _, scenario := range scenarios {
|
||||
@@ -142,33 +123,20 @@ func TestEnvVarFeatureGates(t *testing.T) {
|
||||
}
|
||||
target := newEnvVarFeatureGates(scenario.features)
|
||||
|
||||
for k, v := range scenario.setMethodFeatures {
|
||||
err := target.Set(k, v)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
for expectedFeature, expectedValue := range scenario.expectedFeaturesState {
|
||||
actualValue := target.Enabled(expectedFeature)
|
||||
require.Equal(t, actualValue, expectedValue, "expected feature=%v, to be=%v, not=%v", expectedFeature, expectedValue, actualValue)
|
||||
}
|
||||
|
||||
enabledViaEnvVarInternalMap := target.enabledViaEnvVar.Load().(map[Feature]bool)
|
||||
require.Len(t, enabledViaEnvVarInternalMap, len(scenario.expectedInternalEnabledViaEnvVarFeatureState))
|
||||
for expectedFeatureName, expectedFeatureValue := range scenario.expectedInternalEnabledViaEnvVarFeatureState {
|
||||
actualFeatureValue, wasExpectedFeatureFound := enabledViaEnvVarInternalMap[expectedFeatureName]
|
||||
if !wasExpectedFeatureFound {
|
||||
t.Errorf("feature %v has not been found in enabledViaEnvVarInternalMap", expectedFeatureName)
|
||||
}
|
||||
require.Equal(t, expectedFeatureValue, actualFeatureValue, "feature %v has incorrect value = %v, expected = %v", expectedFeatureName, actualFeatureValue, expectedFeatureValue)
|
||||
}
|
||||
enabledInternalMap := target.enabled.Load().(map[Feature]bool)
|
||||
require.Len(t, enabledInternalMap, len(scenario.expectedInternalEnabledFeatureState))
|
||||
|
||||
enabledViaSetMethodInternalMap := target.enabledViaSetMethod
|
||||
require.Len(t, enabledViaSetMethodInternalMap, len(scenario.expectedInternalEnabledViaSetMethodFeatureState))
|
||||
for expectedFeatureName, expectedFeatureValue := range scenario.expectedInternalEnabledViaSetMethodFeatureState {
|
||||
actualFeatureValue, wasExpectedFeatureFound := enabledViaSetMethodInternalMap[expectedFeatureName]
|
||||
if !wasExpectedFeatureFound {
|
||||
t.Errorf("feature %v has not been found in enabledViaSetMethod", expectedFeatureName)
|
||||
}
|
||||
require.Equal(t, expectedFeatureValue, actualFeatureValue, "feature %v has incorrect value = %v, expected = %v", expectedFeatureName, actualFeatureValue, expectedFeatureValue)
|
||||
for expectedFeature, expectedInternalPresence := range scenario.expectedInternalEnabledFeatureState {
|
||||
featureInternalValue, featureSet := enabledInternalMap[expectedFeature]
|
||||
require.Equal(t, expectedInternalPresence, featureSet, "feature %v present = %v, expected = %v", expectedFeature, featureSet, expectedInternalPresence)
|
||||
|
||||
expectedFeatureInternalValue := scenario.expectedFeaturesState[expectedFeature]
|
||||
require.Equal(t, expectedFeatureInternalValue, featureInternalValue)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -186,48 +154,3 @@ func TestHasAlreadyReadEnvVar(t *testing.T) {
|
||||
_ = target.getEnabledMapFromEnvVar()
|
||||
require.True(t, target.hasAlreadyReadEnvVar())
|
||||
}
|
||||
|
||||
func TestEnvVarFeatureGatesSetNegative(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
name string
|
||||
features map[Feature]FeatureSpec
|
||||
featureName Feature
|
||||
featureValue bool
|
||||
|
||||
expectedErr func(string) error
|
||||
}{
|
||||
{
|
||||
name: "empty feature name returns an error",
|
||||
features: defaultTestFeatures,
|
||||
expectedErr: func(callSiteName string) error {
|
||||
return fmt.Errorf("feature %q is not registered in FeatureGates %q", "", callSiteName)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "setting unknown feature returns an error",
|
||||
features: defaultTestFeatures,
|
||||
featureName: "Unknown",
|
||||
expectedErr: func(callSiteName string) error {
|
||||
return fmt.Errorf("feature %q is not registered in FeatureGates %q", "Unknown", callSiteName)
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "setting locked feature returns an error",
|
||||
features: map[Feature]FeatureSpec{"LockedFeature": {LockToDefault: true, Default: true}},
|
||||
featureName: "LockedFeature",
|
||||
featureValue: false,
|
||||
expectedErr: func(_ string) error {
|
||||
return fmt.Errorf("cannot set feature gate %q to %v, feature is locked to %v", "LockedFeature", false, true)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, scenario := range scenarios {
|
||||
t.Run(scenario.name, func(t *testing.T) {
|
||||
target := newEnvVarFeatureGates(scenario.features)
|
||||
|
||||
err := target.Set(scenario.featureName, scenario.featureValue)
|
||||
require.Equal(t, scenario.expectedErr(target.callSiteName), err)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,15 +30,6 @@ func TestAddFeaturesToExistingFeatureGates(t *testing.T) {
|
||||
require.Equal(t, defaultKubernetesFeatureGates, fakeFeatureGates.specs)
|
||||
}
|
||||
|
||||
func TestReplaceFeatureGatesWithWarningIndicator(t *testing.T) {
|
||||
defaultFeatureGates := FeatureGates()
|
||||
require.Panics(t, func() { defaultFeatureGates.Enabled("Foo") }, "reading an unregistered feature gate Foo should panic")
|
||||
|
||||
if !replaceFeatureGatesWithWarningIndicator(defaultFeatureGates) {
|
||||
t.Error("replacing the default feature gates after reading a value hasn't produced a warning")
|
||||
}
|
||||
}
|
||||
|
||||
type fakeRegistry struct {
|
||||
specs map[Feature]FeatureSpec
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
Copyright 2024 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package testing
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
clientfeatures "k8s.io/client-go/features"
|
||||
)
|
||||
|
||||
var (
|
||||
overriddenFeaturesLock sync.Mutex
|
||||
overriddenFeatures map[clientfeatures.Feature]string
|
||||
)
|
||||
|
||||
func init() {
|
||||
overriddenFeatures = map[clientfeatures.Feature]string{}
|
||||
}
|
||||
|
||||
type featureGatesSetter interface {
|
||||
clientfeatures.Gates
|
||||
|
||||
Set(clientfeatures.Feature, bool) error
|
||||
}
|
||||
|
||||
// SetFeatureDuringTest sets the specified feature to the specified value for the duration of the test.
|
||||
//
|
||||
// Example use:
|
||||
//
|
||||
// clientfeaturestesting.SetFeatureDuringTest(t, clientfeatures.WatchListClient, true)
|
||||
func SetFeatureDuringTest(tb testing.TB, feature clientfeatures.Feature, featureValue bool) {
|
||||
if err := setFeatureDuringTestInternal(tb, feature, featureValue); err != nil {
|
||||
tb.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func setFeatureDuringTestInternal(tb testing.TB, feature clientfeatures.Feature, featureValue bool) error {
|
||||
overriddenFeaturesLock.Lock()
|
||||
defer overriddenFeaturesLock.Unlock()
|
||||
|
||||
currentFeatureGates := clientfeatures.FeatureGates()
|
||||
featureGates, ok := currentFeatureGates.(featureGatesSetter)
|
||||
if !ok {
|
||||
panic(fmt.Errorf("clientfeatures.FeatureGates(): %T does not implement featureGatesSetter interface", currentFeatureGates))
|
||||
}
|
||||
|
||||
originalFeatureValue := featureGates.Enabled(feature)
|
||||
if overridingTestName, ok := overriddenFeatures[feature]; ok {
|
||||
if !sameTestOrSubtest(tb, overridingTestName) {
|
||||
return fmt.Errorf("client-go feature %q is currently overridden by %q test and cannot be also modified by %q", feature, overridingTestName, tb.Name())
|
||||
}
|
||||
}
|
||||
|
||||
if err := featureGates.Set(feature, featureValue); err != nil {
|
||||
return err
|
||||
}
|
||||
overriddenFeatures[feature] = tb.Name()
|
||||
|
||||
tb.Cleanup(func() {
|
||||
overriddenFeaturesLock.Lock()
|
||||
defer overriddenFeaturesLock.Unlock()
|
||||
delete(overriddenFeatures, feature)
|
||||
if err := featureGates.Set(feature, originalFeatureValue); err != nil {
|
||||
tb.Errorf("failed restoring client-go feature: %v to its original value: %v, err: %v", feature, originalFeatureValue, err)
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
// copied from component-base/featuregate/testing
|
||||
func sameTestOrSubtest(tb testing.TB, testName string) bool {
|
||||
return tb.Name() == testName || strings.HasPrefix(tb.Name(), testName+"/")
|
||||
}
|
||||
@@ -30,123 +30,24 @@ func TestDriveInitDefaultFeatureGates(t *testing.T) {
|
||||
featureGates := features.FeatureGates()
|
||||
assertFunctionPanicsWithMessage(t, func() { featureGates.Enabled("FakeFeatureGate") }, "features.FeatureGates().Enabled", fmt.Sprintf("feature %q is not registered in FeatureGate", "FakeFeatureGate"))
|
||||
|
||||
fakeGates := &fakeFeatureGates{features: map[features.Feature]bool{"FakeFeatureGate": true}}
|
||||
require.True(t, fakeGates.Enabled("FakeFeatureGate"))
|
||||
fakeFeatureGates := &alwaysEnabledFakeGates{}
|
||||
require.True(t, fakeFeatureGates.Enabled("FakeFeatureGate"))
|
||||
|
||||
features.ReplaceFeatureGates(fakeGates)
|
||||
features.ReplaceFeatureGates(fakeFeatureGates)
|
||||
featureGates = features.FeatureGates()
|
||||
|
||||
assertFeatureGatesType(t, featureGates)
|
||||
require.True(t, featureGates.Enabled("FakeFeatureGate"))
|
||||
}
|
||||
|
||||
func TestSetFeatureGatesDuringTest(t *testing.T) {
|
||||
featureA := features.Feature("FeatureA")
|
||||
featureB := features.Feature("FeatureB")
|
||||
fakeGates := &fakeFeatureGates{map[features.Feature]bool{featureA: true, featureB: true}}
|
||||
features.ReplaceFeatureGates(fakeGates)
|
||||
t.Cleanup(func() {
|
||||
// since cleanup functions will be called in last added, first called order.
|
||||
// check if the original feature wasn't restored
|
||||
require.True(t, features.FeatureGates().Enabled(featureA), "the original feature = %v wasn't restored", featureA)
|
||||
})
|
||||
type alwaysEnabledFakeGates struct{}
|
||||
|
||||
SetFeatureDuringTest(t, featureA, false)
|
||||
|
||||
require.False(t, features.FeatureGates().Enabled(featureA))
|
||||
require.True(t, features.FeatureGates().Enabled(featureB))
|
||||
}
|
||||
|
||||
func TestSetFeatureGatesDuringTestPanics(t *testing.T) {
|
||||
fakeGates := &fakeFeatureGates{features: map[features.Feature]bool{"FakeFeatureGate": true}}
|
||||
|
||||
features.ReplaceFeatureGates(fakeGates)
|
||||
assertFunctionPanicsWithMessage(t, func() { SetFeatureDuringTest(t, "UnknownFeature", false) }, "SetFeatureDuringTest", fmt.Sprintf("feature %q is not registered in featureGates", "UnknownFeature"))
|
||||
|
||||
readOnlyGates := &readOnlyAlwaysDisabledFeatureGates{}
|
||||
features.ReplaceFeatureGates(readOnlyGates)
|
||||
assertFunctionPanicsWithMessage(t, func() { SetFeatureDuringTest(t, "FakeFeature", false) }, "SetFeatureDuringTest", fmt.Sprintf("clientfeatures.FeatureGates(): %T does not implement featureGatesSetter interface", readOnlyGates))
|
||||
}
|
||||
|
||||
func TestOverridesForSetFeatureGatesDuringTest(t *testing.T) {
|
||||
scenarios := []struct {
|
||||
name string
|
||||
firstTestName string
|
||||
secondTestName string
|
||||
expectError bool
|
||||
}{
|
||||
{
|
||||
name: "concurrent tests setting the same feature fail",
|
||||
firstTestName: "fooTest",
|
||||
secondTestName: "barTest",
|
||||
expectError: true,
|
||||
},
|
||||
|
||||
{
|
||||
name: "same test setting the same feature does not fail",
|
||||
firstTestName: "fooTest",
|
||||
secondTestName: "fooTest",
|
||||
expectError: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "subtests setting the same feature don't not fail",
|
||||
firstTestName: "fooTest",
|
||||
secondTestName: "fooTest/scenario1",
|
||||
expectError: false,
|
||||
},
|
||||
}
|
||||
for _, scenario := range scenarios {
|
||||
t.Run(scenario.name, func(t *testing.T) {
|
||||
featureA := features.Feature("FeatureA")
|
||||
fakeGates := &fakeFeatureGates{map[features.Feature]bool{featureA: true}}
|
||||
fakeTesting := &fakeT{fakeTestName: scenario.firstTestName, TB: t}
|
||||
|
||||
features.ReplaceFeatureGates(fakeGates)
|
||||
require.NoError(t, setFeatureDuringTestInternal(fakeTesting, featureA, true))
|
||||
require.True(t, features.FeatureGates().Enabled(featureA))
|
||||
|
||||
fakeTesting.fakeTestName = scenario.secondTestName
|
||||
err := setFeatureDuringTestInternal(fakeTesting, featureA, false)
|
||||
require.Equal(t, scenario.expectError, err != nil)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
type fakeFeatureGates struct {
|
||||
features map[features.Feature]bool
|
||||
}
|
||||
|
||||
func (f *fakeFeatureGates) Enabled(feature features.Feature) bool {
|
||||
featureValue, ok := f.features[feature]
|
||||
if !ok {
|
||||
panic(fmt.Errorf("feature %q is not registered in featureGates", feature))
|
||||
}
|
||||
return featureValue
|
||||
}
|
||||
|
||||
func (f *fakeFeatureGates) Set(feature features.Feature, value bool) error {
|
||||
f.features[feature] = value
|
||||
return nil
|
||||
}
|
||||
|
||||
type readOnlyAlwaysDisabledFeatureGates struct{}
|
||||
|
||||
func (f *readOnlyAlwaysDisabledFeatureGates) Enabled(feature features.Feature) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type fakeT struct {
|
||||
fakeTestName string
|
||||
testing.TB
|
||||
}
|
||||
|
||||
func (t *fakeT) Name() string {
|
||||
return t.fakeTestName
|
||||
func (f *alwaysEnabledFakeGates) Enabled(features.Feature) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func assertFeatureGatesType(t *testing.T, fg features.Gates) {
|
||||
_, ok := fg.(*fakeFeatureGates)
|
||||
_, ok := fg.(*alwaysEnabledFakeGates)
|
||||
if !ok {
|
||||
t.Fatalf("passed features.FeatureGates() is NOT of type *alwaysEnabledFakeGates, it is of type = %T", fg)
|
||||
}
|
||||
|
||||
31
go.mod
31
go.mod
@@ -5,44 +5,42 @@ module k8s.io/client-go
|
||||
go 1.22.0
|
||||
|
||||
require (
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
|
||||
github.com/golang/protobuf v1.5.4
|
||||
github.com/google/gnostic-models v0.6.8
|
||||
github.com/google/go-cmp v0.6.0
|
||||
github.com/google/gofuzz v1.2.0
|
||||
github.com/google/uuid v1.3.1
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7
|
||||
github.com/imdario/mergo v0.3.6
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible
|
||||
github.com/spf13/pflag v1.0.5
|
||||
github.com/stretchr/testify v1.8.4
|
||||
go.uber.org/goleak v1.3.0
|
||||
golang.org/x/net v0.25.0
|
||||
golang.org/x/oauth2 v0.20.0
|
||||
golang.org/x/term v0.20.0
|
||||
golang.org/x/net v0.23.0
|
||||
golang.org/x/oauth2 v0.10.0
|
||||
golang.org/x/term v0.18.0
|
||||
golang.org/x/time v0.3.0
|
||||
google.golang.org/protobuf v1.33.0
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0
|
||||
k8s.io/api v0.31.0-alpha.2
|
||||
k8s.io/apimachinery v0.31.0-alpha.2
|
||||
k8s.io/api v0.30.2
|
||||
k8s.io/apimachinery v0.30.2
|
||||
k8s.io/klog/v2 v2.120.1
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.7.0-beta // indirect
|
||||
github.com/go-logr/logr v1.4.1 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.22.4 // indirect
|
||||
github.com/go-openapi/swag v0.22.3 // indirect
|
||||
github.com/google/btree v1.0.1 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
@@ -52,12 +50,11 @@ require (
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
|
||||
github.com/onsi/gomega v1.33.1 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
golang.org/x/sys v0.20.0 // indirect
|
||||
golang.org/x/text v0.15.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
||||
84
go.sum
84
go.sum
@@ -2,28 +2,27 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
|
||||
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/fxamacker/cbor/v2 v2.7.0-beta h1:m5bO941uTVpSms26QjzEJxUZaC3S/h1pSJexBCu4wAA=
|
||||
github.com/fxamacker/cbor/v2 v2.7.0-beta/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84=
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
|
||||
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
|
||||
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
|
||||
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
|
||||
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
|
||||
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
|
||||
github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU=
|
||||
github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
|
||||
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
|
||||
@@ -36,10 +35,10 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM=
|
||||
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
|
||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
|
||||
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
@@ -73,19 +72,18 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
|
||||
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
|
||||
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
|
||||
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
||||
github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY=
|
||||
github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM=
|
||||
github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE=
|
||||
github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
|
||||
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
@@ -97,58 +95,56 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
|
||||
golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8=
|
||||
golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw=
|
||||
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
|
||||
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw=
|
||||
golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
|
||||
golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=
|
||||
golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
|
||||
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
@@ -157,10 +153,10 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.31.0-alpha.2 h1:azMbpAFERqtGmgDtg/f7efnxgPBW+8ieyHNKxT97EMI=
|
||||
k8s.io/api v0.31.0-alpha.2/go.mod h1:S1X5UjUV8NZmR1vmKIkUpruhr0AWAvocZVZ5zxKMvi4=
|
||||
k8s.io/apimachinery v0.31.0-alpha.2 h1:jya7Ax6yRLH+CSW/osUEO+hxe4rVNrXU8lNB0fZcGkk=
|
||||
k8s.io/apimachinery v0.31.0-alpha.2/go.mod h1:3nAExNh3CrzC6eKT9a32j/rv+uJ8Zod87oOmgUjZNAY=
|
||||
k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI=
|
||||
k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI=
|
||||
k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg=
|
||||
k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
|
||||
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
|
||||
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
|
||||
@@ -171,5 +167,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
|
||||
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
|
||||
@@ -43,22 +43,20 @@ var mutatingwebhookconfigurationsKind = v1.SchemeGroupVersion.WithKind("Mutating
|
||||
|
||||
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
|
||||
func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||
func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) {
|
||||
emptyResult := &v1.MutatingWebhookConfigurationList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1.MutatingWebhookConfigurationList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,22 +80,20 @@ func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts meta
|
||||
|
||||
// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1.MutatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -119,11 +115,10 @@ func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context
|
||||
|
||||
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
|
||||
func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -141,11 +136,10 @@ func (c *FakeMutatingWebhookConfigurations) Apply(ctx context.Context, mutatingW
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("mutatingWebhookConfiguration.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &v1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingadmissionpoliciesKind = v1.SchemeGroupVersion.WithKind("Validating
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), &v1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *FakeValidatingAdmissionPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicyList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), &v1.ValidatingAdmissionPolicyList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,34 +80,31 @@ func (c *FakeValidatingAdmissionPolicies) Watch(ctx context.Context, opts metav1
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeValidatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicy{}
|
||||
func (c *FakeValidatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*v1.ValidatingAdmissionPolicy, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(validatingadmissionpoliciesResource, "status", validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(validatingadmissionpoliciesResource, "status", validatingAdmissionPolicy), &v1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -131,11 +126,10 @@ func (c *FakeValidatingAdmissionPolicies) DeleteCollection(ctx context.Context,
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicy.
|
||||
func (c *FakeValidatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), &v1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -153,11 +147,10 @@ func (c *FakeValidatingAdmissionPolicies) Apply(ctx context.Context, validatingA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), &v1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -176,11 +169,10 @@ func (c *FakeValidatingAdmissionPolicies) ApplyStatus(ctx context.Context, valid
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data, "status"), &v1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingadmissionpolicybindingsKind = v1.SchemeGroupVersion.WithKind("Vali
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), &v1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicyBindingList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), &v1.ValidatingAdmissionPolicyBindingList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,22 +80,20 @@ func (c *FakeValidatingAdmissionPolicyBindings) Watch(ctx context.Context, opts
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.CreateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (result *v1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
@@ -119,11 +115,10 @@ func (c *FakeValidatingAdmissionPolicyBindings) DeleteCollection(ctx context.Con
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), &v1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
@@ -141,11 +136,10 @@ func (c *FakeValidatingAdmissionPolicyBindings) Apply(ctx context.Context, valid
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), &v1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingwebhookconfigurationsKind = v1.SchemeGroupVersion.WithKind("Valida
|
||||
|
||||
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
|
||||
func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &v1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||
func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) {
|
||||
emptyResult := &v1.ValidatingWebhookConfigurationList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &v1.ValidatingWebhookConfigurationList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,22 +80,20 @@ func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts me
|
||||
|
||||
// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.CreateOptions) (result *v1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1.ValidatingWebhookConfiguration, opts metav1.UpdateOptions) (result *v1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -119,11 +115,10 @@ func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Conte
|
||||
|
||||
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
|
||||
func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -141,11 +136,10 @@ func (c *FakeValidatingWebhookConfigurations) Apply(ctx context.Context, validat
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingWebhookConfiguration.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &v1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// MutatingWebhookConfigurationsGetter has a method to return a MutatingWebhookConfigurationInterface.
|
||||
@@ -81,26 +78,7 @@ func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, op
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||
func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (*v1.MutatingWebhookConfigurationList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for mutatingwebhookconfigurations, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for mutatingwebhookconfigurations", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for mutatingwebhookconfigurations ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for mutatingwebhookconfigurations", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||
func (c *mutatingWebhookConfigurations) list(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) {
|
||||
func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -115,22 +93,6 @@ func (c *mutatingWebhookConfigurations) list(ctx context.Context, opts metav1.Li
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of MutatingWebhookConfigurations
|
||||
func (c *mutatingWebhookConfigurations) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.MutatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.MutatingWebhookConfigurationList{}
|
||||
err = c.client.Get().
|
||||
Resource("mutatingwebhookconfigurations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
|
||||
func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface.
|
||||
@@ -83,26 +80,7 @@ func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, opti
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *validatingAdmissionPolicies) List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingAdmissionPolicyList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingadmissionpolicies, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingadmissionpolicies", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingadmissionpolicies ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicies", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *validatingAdmissionPolicies) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) {
|
||||
func (c *validatingAdmissionPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -117,22 +95,6 @@ func (c *validatingAdmissionPolicies) list(ctx context.Context, opts metav1.List
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingAdmissionPolicies
|
||||
func (c *validatingAdmissionPolicies) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ValidatingAdmissionPolicyList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies.
|
||||
func (c *validatingAdmissionPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface.
|
||||
@@ -81,26 +78,7 @@ func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingAdmissionPolicyBindingList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingadmissionpolicybindings, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingadmissionpolicybindings", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingadmissionpolicybindings ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicybindings", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -115,22 +93,6 @@ func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts metav
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingAdmissionPolicyBindings
|
||||
func (c *validatingAdmissionPolicyBindings) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ValidatingAdmissionPolicyBindingList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings.
|
||||
func (c *validatingAdmissionPolicyBindings) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface.
|
||||
@@ -81,26 +78,7 @@ func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string,
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||
func (c *validatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (*v1.ValidatingWebhookConfigurationList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingwebhookconfigurations, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingwebhookconfigurations", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingwebhookconfigurations ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingwebhookconfigurations", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||
func (c *validatingWebhookConfigurations) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) {
|
||||
func (c *validatingWebhookConfigurations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -115,22 +93,6 @@ func (c *validatingWebhookConfigurations) list(ctx context.Context, opts metav1.
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingWebhookConfigurations
|
||||
func (c *validatingWebhookConfigurations) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.ValidatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ValidatingWebhookConfigurationList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingwebhookconfigurations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
|
||||
func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingadmissionpoliciesKind = v1alpha1.SchemeGroupVersion.WithKind("Vali
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), &v1alpha1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *FakeValidatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyList, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicyList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), &v1alpha1.ValidatingAdmissionPolicyList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,34 +80,31 @@ func (c *FakeValidatingAdmissionPolicies) Watch(ctx context.Context, opts v1.Lis
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.CreateOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1alpha1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1alpha1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeValidatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1alpha1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
func (c *FakeValidatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1alpha1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (*v1alpha1.ValidatingAdmissionPolicy, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(validatingadmissionpoliciesResource, "status", validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(validatingadmissionpoliciesResource, "status", validatingAdmissionPolicy), &v1alpha1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -131,11 +126,10 @@ func (c *FakeValidatingAdmissionPolicies) DeleteCollection(ctx context.Context,
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicy.
|
||||
func (c *FakeValidatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), &v1alpha1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -153,11 +147,10 @@ func (c *FakeValidatingAdmissionPolicies) Apply(ctx context.Context, validatingA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), &v1alpha1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -176,11 +169,10 @@ func (c *FakeValidatingAdmissionPolicies) ApplyStatus(ctx context.Context, valid
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingadmissionpolicybindingsKind = v1alpha1.SchemeGroupVersion.WithKind
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), &v1alpha1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicyBindingList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), &v1alpha1.ValidatingAdmissionPolicyBindingList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,22 +80,20 @@ func (c *FakeValidatingAdmissionPolicyBindings) Watch(ctx context.Context, opts
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1alpha1.ValidatingAdmissionPolicyBinding, opts v1.CreateOptions) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1alpha1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1alpha1.ValidatingAdmissionPolicyBinding, opts v1.UpdateOptions) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1alpha1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
@@ -119,11 +115,10 @@ func (c *FakeValidatingAdmissionPolicyBindings) DeleteCollection(ctx context.Con
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), &v1alpha1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
@@ -141,11 +136,10 @@ func (c *FakeValidatingAdmissionPolicyBindings) Apply(ctx context.Context, valid
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1alpha1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), &v1alpha1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1alpha1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface.
|
||||
@@ -83,26 +80,7 @@ func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, opti
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *validatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ValidatingAdmissionPolicyList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingadmissionpolicies, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingadmissionpolicies", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingadmissionpolicies ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicies", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *validatingAdmissionPolicies) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyList, err error) {
|
||||
func (c *validatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -117,22 +95,6 @@ func (c *validatingAdmissionPolicies) list(ctx context.Context, opts v1.ListOpti
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingAdmissionPolicies
|
||||
func (c *validatingAdmissionPolicies) watchList(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ValidatingAdmissionPolicyList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies.
|
||||
func (c *validatingAdmissionPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1alpha1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface.
|
||||
@@ -81,26 +78,7 @@ func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ValidatingAdmissionPolicyBindingList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingadmissionpolicybindings, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingadmissionpolicybindings", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingadmissionpolicybindings ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicybindings", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -115,22 +93,6 @@ func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts v1.Li
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingAdmissionPolicyBindings
|
||||
func (c *validatingAdmissionPolicyBindings) watchList(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.ValidatingAdmissionPolicyBindingList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings.
|
||||
func (c *validatingAdmissionPolicyBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -43,22 +43,20 @@ var mutatingwebhookconfigurationsKind = v1beta1.SchemeGroupVersion.WithKind("Mut
|
||||
|
||||
// Get takes name of the mutatingWebhookConfiguration, and returns the corresponding mutatingWebhookConfiguration object, and an error if there is any.
|
||||
func (c *FakeMutatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(mutatingwebhookconfigurationsResource, name), &v1beta1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||
func (c *FakeMutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
|
||||
emptyResult := &v1beta1.MutatingWebhookConfigurationList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(mutatingwebhookconfigurationsResource, mutatingwebhookconfigurationsKind, opts), &v1beta1.MutatingWebhookConfigurationList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,22 +80,20 @@ func (c *FakeMutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.L
|
||||
|
||||
// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeMutatingWebhookConfigurations) Create(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a mutatingWebhookConfiguration and updates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeMutatingWebhookConfigurations) Update(ctx context.Context, mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -119,11 +115,10 @@ func (c *FakeMutatingWebhookConfigurations) DeleteCollection(ctx context.Context
|
||||
|
||||
// Patch applies the patch and returns the patched mutatingWebhookConfiguration.
|
||||
func (c *FakeMutatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MutatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -141,11 +136,10 @@ func (c *FakeMutatingWebhookConfigurations) Apply(ctx context.Context, mutatingW
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("mutatingWebhookConfiguration.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.MutatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(mutatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &v1beta1.MutatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.MutatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingadmissionpoliciesKind = v1beta1.SchemeGroupVersion.WithKind("Valid
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicy, and returns the corresponding validatingAdmissionPolicy object, and an error if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpoliciesResource, name), &v1beta1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *FakeValidatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyList, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicyList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpoliciesResource, validatingadmissionpoliciesKind, opts), &v1beta1.ValidatingAdmissionPolicyList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,34 +80,31 @@ func (c *FakeValidatingAdmissionPolicies) Watch(ctx context.Context, opts v1.Lis
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicy and creates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Create(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.CreateOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1beta1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicy and updates it. Returns the server's representation of the validatingAdmissionPolicy, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicies) Update(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpoliciesResource, validatingAdmissionPolicy), &v1beta1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeValidatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicy{}
|
||||
func (c *FakeValidatingAdmissionPolicies) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *v1beta1.ValidatingAdmissionPolicy, opts v1.UpdateOptions) (*v1beta1.ValidatingAdmissionPolicy, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(validatingadmissionpoliciesResource, "status", validatingAdmissionPolicy), emptyResult)
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(validatingadmissionpoliciesResource, "status", validatingAdmissionPolicy), &v1beta1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -131,11 +126,10 @@ func (c *FakeValidatingAdmissionPolicies) DeleteCollection(ctx context.Context,
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicy.
|
||||
func (c *FakeValidatingAdmissionPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingAdmissionPolicy, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, name, pt, data, subresources...), &v1beta1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -153,11 +147,10 @@ func (c *FakeValidatingAdmissionPolicies) Apply(ctx context.Context, validatingA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data), &v1beta1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
@@ -176,11 +169,10 @@ func (c *FakeValidatingAdmissionPolicies) ApplyStatus(ctx context.Context, valid
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicy.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpoliciesResource, *name, types.ApplyPatchType, data, "status"), &v1beta1.ValidatingAdmissionPolicy{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicy), err
|
||||
}
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingadmissionpolicybindingsKind = v1beta1.SchemeGroupVersion.WithKind(
|
||||
|
||||
// Get takes name of the validatingAdmissionPolicyBinding, and returns the corresponding validatingAdmissionPolicyBinding object, and an error if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingadmissionpolicybindingsResource, name), &v1beta1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicyBindingList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingadmissionpolicybindingsResource, validatingadmissionpolicybindingsKind, opts), &v1beta1.ValidatingAdmissionPolicyBindingList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,22 +80,20 @@ func (c *FakeValidatingAdmissionPolicyBindings) Watch(ctx context.Context, opts
|
||||
|
||||
// Create takes the representation of a validatingAdmissionPolicyBinding and creates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Create(ctx context.Context, validatingAdmissionPolicyBinding *v1beta1.ValidatingAdmissionPolicyBinding, opts v1.CreateOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1beta1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingAdmissionPolicyBinding and updates it. Returns the server's representation of the validatingAdmissionPolicyBinding, and an error, if there is any.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Update(ctx context.Context, validatingAdmissionPolicyBinding *v1beta1.ValidatingAdmissionPolicyBinding, opts v1.UpdateOptions) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingadmissionpolicybindingsResource, validatingAdmissionPolicyBinding), &v1beta1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
@@ -119,11 +115,10 @@ func (c *FakeValidatingAdmissionPolicyBindings) DeleteCollection(ctx context.Con
|
||||
|
||||
// Patch applies the patch and returns the patched validatingAdmissionPolicyBinding.
|
||||
func (c *FakeValidatingAdmissionPolicyBindings) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingAdmissionPolicyBinding, err error) {
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, name, pt, data, subresources...), &v1beta1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
@@ -141,11 +136,10 @@ func (c *FakeValidatingAdmissionPolicyBindings) Apply(ctx context.Context, valid
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingAdmissionPolicyBinding.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.ValidatingAdmissionPolicyBinding{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingadmissionpolicybindingsResource, *name, types.ApplyPatchType, data), &v1beta1.ValidatingAdmissionPolicyBinding{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingAdmissionPolicyBinding), err
|
||||
}
|
||||
|
||||
@@ -43,22 +43,20 @@ var validatingwebhookconfigurationsKind = v1beta1.SchemeGroupVersion.WithKind("V
|
||||
|
||||
// Get takes name of the validatingWebhookConfiguration, and returns the corresponding validatingWebhookConfiguration object, and an error if there is any.
|
||||
func (c *FakeValidatingWebhookConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(validatingwebhookconfigurationsResource, name), &v1beta1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||
func (c *FakeValidatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
|
||||
emptyResult := &v1beta1.ValidatingWebhookConfigurationList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(validatingwebhookconfigurationsResource, validatingwebhookconfigurationsKind, opts), &v1beta1.ValidatingWebhookConfigurationList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,22 +80,20 @@ func (c *FakeValidatingWebhookConfigurations) Watch(ctx context.Context, opts v1
|
||||
|
||||
// Create takes the representation of a validatingWebhookConfiguration and creates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeValidatingWebhookConfigurations) Create(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.CreateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a validatingWebhookConfiguration and updates it. Returns the server's representation of the validatingWebhookConfiguration, and an error, if there is any.
|
||||
func (c *FakeValidatingWebhookConfigurations) Update(ctx context.Context, validatingWebhookConfiguration *v1beta1.ValidatingWebhookConfiguration, opts v1.UpdateOptions) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(validatingwebhookconfigurationsResource, validatingWebhookConfiguration), &v1beta1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -119,11 +115,10 @@ func (c *FakeValidatingWebhookConfigurations) DeleteCollection(ctx context.Conte
|
||||
|
||||
// Patch applies the patch and returns the patched validatingWebhookConfiguration.
|
||||
func (c *FakeValidatingWebhookConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ValidatingWebhookConfiguration, err error) {
|
||||
emptyResult := &v1beta1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, name, pt, data, subresources...), &v1beta1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
@@ -141,11 +136,10 @@ func (c *FakeValidatingWebhookConfigurations) Apply(ctx context.Context, validat
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("validatingWebhookConfiguration.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.ValidatingWebhookConfiguration{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(validatingwebhookconfigurationsResource, *name, types.ApplyPatchType, data), &v1beta1.ValidatingWebhookConfiguration{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ValidatingWebhookConfiguration), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// MutatingWebhookConfigurationsGetter has a method to return a MutatingWebhookConfigurationInterface.
|
||||
@@ -81,26 +78,7 @@ func (c *mutatingWebhookConfigurations) Get(ctx context.Context, name string, op
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||
func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MutatingWebhookConfigurationList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for mutatingwebhookconfigurations, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for mutatingwebhookconfigurations", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for mutatingwebhookconfigurations ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for mutatingwebhookconfigurations", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of MutatingWebhookConfigurations that match those selectors.
|
||||
func (c *mutatingWebhookConfigurations) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
|
||||
func (c *mutatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -115,22 +93,6 @@ func (c *mutatingWebhookConfigurations) list(ctx context.Context, opts v1.ListOp
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of MutatingWebhookConfigurations
|
||||
func (c *mutatingWebhookConfigurations) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MutatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.MutatingWebhookConfigurationList{}
|
||||
err = c.client.Get().
|
||||
Resource("mutatingwebhookconfigurations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested mutatingWebhookConfigurations.
|
||||
func (c *mutatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPoliciesGetter has a method to return a ValidatingAdmissionPolicyInterface.
|
||||
@@ -83,26 +80,7 @@ func (c *validatingAdmissionPolicies) Get(ctx context.Context, name string, opti
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *validatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingAdmissionPolicyList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingadmissionpolicies, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingadmissionpolicies", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingadmissionpolicies ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicies", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors.
|
||||
func (c *validatingAdmissionPolicies) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyList, err error) {
|
||||
func (c *validatingAdmissionPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -117,22 +95,6 @@ func (c *validatingAdmissionPolicies) list(ctx context.Context, opts v1.ListOpti
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingAdmissionPolicies
|
||||
func (c *validatingAdmissionPolicies) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ValidatingAdmissionPolicyList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicies").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicies.
|
||||
func (c *validatingAdmissionPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingAdmissionPolicyBindingsGetter has a method to return a ValidatingAdmissionPolicyBindingInterface.
|
||||
@@ -81,26 +78,7 @@ func (c *validatingAdmissionPolicyBindings) Get(ctx context.Context, name string
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingAdmissionPolicyBindingList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingadmissionpolicybindings, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingadmissionpolicybindings", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingadmissionpolicybindings ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingadmissionpolicybindings", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors.
|
||||
func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
func (c *validatingAdmissionPolicyBindings) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -115,22 +93,6 @@ func (c *validatingAdmissionPolicyBindings) list(ctx context.Context, opts v1.Li
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingAdmissionPolicyBindings
|
||||
func (c *validatingAdmissionPolicyBindings) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingAdmissionPolicyBindingList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ValidatingAdmissionPolicyBindingList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingadmissionpolicybindings").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingAdmissionPolicyBindings.
|
||||
func (c *validatingAdmissionPolicyBindings) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
admissionregistrationv1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ValidatingWebhookConfigurationsGetter has a method to return a ValidatingWebhookConfigurationInterface.
|
||||
@@ -81,26 +78,7 @@ func (c *validatingWebhookConfigurations) Get(ctx context.Context, name string,
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||
func (c *validatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ValidatingWebhookConfigurationList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for validatingwebhookconfigurations, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for validatingwebhookconfigurations", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for validatingwebhookconfigurations ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for validatingwebhookconfigurations", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ValidatingWebhookConfigurations that match those selectors.
|
||||
func (c *validatingWebhookConfigurations) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
|
||||
func (c *validatingWebhookConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -115,22 +93,6 @@ func (c *validatingWebhookConfigurations) list(ctx context.Context, opts v1.List
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ValidatingWebhookConfigurations
|
||||
func (c *validatingWebhookConfigurations) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ValidatingWebhookConfigurationList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ValidatingWebhookConfigurationList{}
|
||||
err = c.client.Get().
|
||||
Resource("validatingwebhookconfigurations").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested validatingWebhookConfigurations.
|
||||
func (c *validatingWebhookConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -43,22 +43,20 @@ var storageversionsKind = v1alpha1.SchemeGroupVersion.WithKind("StorageVersion")
|
||||
|
||||
// Get takes name of the storageVersion, and returns the corresponding storageVersion object, and an error if there is any.
|
||||
func (c *FakeStorageVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageVersion, err error) {
|
||||
emptyResult := &v1alpha1.StorageVersion{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(storageversionsResource, name), emptyResult)
|
||||
Invokes(testing.NewRootGetAction(storageversionsResource, name), &v1alpha1.StorageVersion{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.StorageVersion), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StorageVersions that match those selectors.
|
||||
func (c *FakeStorageVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionList, err error) {
|
||||
emptyResult := &v1alpha1.StorageVersionList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(storageversionsResource, storageversionsKind, opts), emptyResult)
|
||||
Invokes(testing.NewRootListAction(storageversionsResource, storageversionsKind, opts), &v1alpha1.StorageVersionList{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -82,34 +80,31 @@ func (c *FakeStorageVersions) Watch(ctx context.Context, opts v1.ListOptions) (w
|
||||
|
||||
// Create takes the representation of a storageVersion and creates it. Returns the server's representation of the storageVersion, and an error, if there is any.
|
||||
func (c *FakeStorageVersions) Create(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.CreateOptions) (result *v1alpha1.StorageVersion, err error) {
|
||||
emptyResult := &v1alpha1.StorageVersion{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(storageversionsResource, storageVersion), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(storageversionsResource, storageVersion), &v1alpha1.StorageVersion{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.StorageVersion), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a storageVersion and updates it. Returns the server's representation of the storageVersion, and an error, if there is any.
|
||||
func (c *FakeStorageVersions) Update(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.UpdateOptions) (result *v1alpha1.StorageVersion, err error) {
|
||||
emptyResult := &v1alpha1.StorageVersion{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(storageversionsResource, storageVersion), emptyResult)
|
||||
Invokes(testing.NewRootUpdateAction(storageversionsResource, storageVersion), &v1alpha1.StorageVersion{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.StorageVersion), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeStorageVersions) UpdateStatus(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.UpdateOptions) (result *v1alpha1.StorageVersion, err error) {
|
||||
emptyResult := &v1alpha1.StorageVersion{}
|
||||
func (c *FakeStorageVersions) UpdateStatus(ctx context.Context, storageVersion *v1alpha1.StorageVersion, opts v1.UpdateOptions) (*v1alpha1.StorageVersion, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(storageversionsResource, "status", storageVersion), emptyResult)
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(storageversionsResource, "status", storageVersion), &v1alpha1.StorageVersion{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.StorageVersion), err
|
||||
}
|
||||
@@ -131,11 +126,10 @@ func (c *FakeStorageVersions) DeleteCollection(ctx context.Context, opts v1.Dele
|
||||
|
||||
// Patch applies the patch and returns the patched storageVersion.
|
||||
func (c *FakeStorageVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersion, err error) {
|
||||
emptyResult := &v1alpha1.StorageVersion{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, name, pt, data, subresources...), &v1alpha1.StorageVersion{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.StorageVersion), err
|
||||
}
|
||||
@@ -153,11 +147,10 @@ func (c *FakeStorageVersions) Apply(ctx context.Context, storageVersion *apiserv
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("storageVersion.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1alpha1.StorageVersion{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, *name, types.ApplyPatchType, data), &v1alpha1.StorageVersion{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.StorageVersion), err
|
||||
}
|
||||
@@ -176,11 +169,10 @@ func (c *FakeStorageVersions) ApplyStatus(ctx context.Context, storageVersion *a
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("storageVersion.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1alpha1.StorageVersion{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewRootPatchSubresourceAction(storageversionsResource, *name, types.ApplyPatchType, data, "status"), &v1alpha1.StorageVersion{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.StorageVersion), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
apiserverinternalv1alpha1 "k8s.io/client-go/applyconfigurations/apiserverinternal/v1alpha1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// StorageVersionsGetter has a method to return a StorageVersionInterface.
|
||||
@@ -83,26 +80,7 @@ func (c *storageVersions) Get(ctx context.Context, name string, options v1.GetOp
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StorageVersions that match those selectors.
|
||||
func (c *storageVersions) List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StorageVersionList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for storageversions, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for storageversions", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for storageversions ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for storageversions", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of StorageVersions that match those selectors.
|
||||
func (c *storageVersions) list(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionList, err error) {
|
||||
func (c *storageVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -117,22 +95,6 @@ func (c *storageVersions) list(ctx context.Context, opts v1.ListOptions) (result
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of StorageVersions
|
||||
func (c *storageVersions) watchList(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.StorageVersionList{}
|
||||
err = c.client.Get().
|
||||
Resource("storageversions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested storageVersions.
|
||||
func (c *storageVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1 "k8s.io/client-go/applyconfigurations/apps/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
|
||||
@@ -84,26 +81,7 @@ func (c *controllerRevisions) Get(ctx context.Context, name string, options meta
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *controllerRevisions) List(ctx context.Context, opts metav1.ListOptions) (*v1.ControllerRevisionList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for controllerrevisions, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for controllerrevisions", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for controllerrevisions ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for controllerrevisions", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *controllerRevisions) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) {
|
||||
func (c *controllerRevisions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -119,23 +97,6 @@ func (c *controllerRevisions) list(ctx context.Context, opts metav1.ListOptions)
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ControllerRevisions
|
||||
func (c *controllerRevisions) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ControllerRevisionList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested controllerRevisions.
|
||||
func (c *controllerRevisions) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1 "k8s.io/client-go/applyconfigurations/apps/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// DaemonSetsGetter has a method to return a DaemonSetInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *daemonSets) Get(ctx context.Context, name string, options metav1.GetOpt
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
|
||||
func (c *daemonSets) List(ctx context.Context, opts metav1.ListOptions) (*v1.DaemonSetList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for daemonsets, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for daemonsets", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for daemonsets ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for daemonsets", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of DaemonSets that match those selectors.
|
||||
func (c *daemonSets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) {
|
||||
func (c *daemonSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *daemonSets) list(ctx context.Context, opts metav1.ListOptions) (result
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of DaemonSets
|
||||
func (c *daemonSets) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.DaemonSetList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("daemonsets").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested daemonSets.
|
||||
func (c *daemonSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -33,9 +33,6 @@ import (
|
||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// DeploymentsGetter has a method to return a DeploymentInterface.
|
||||
@@ -92,26 +89,7 @@ func (c *deployments) Get(ctx context.Context, name string, options metav1.GetOp
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *deployments) List(ctx context.Context, opts metav1.ListOptions) (*v1.DeploymentList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for deployments, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for deployments", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for deployments ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for deployments", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *deployments) list(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) {
|
||||
func (c *deployments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -127,23 +105,6 @@ func (c *deployments) list(ctx context.Context, opts metav1.ListOptions) (result
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of Deployments
|
||||
func (c *deployments) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.DeploymentList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested deployments.
|
||||
func (c *deployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -44,24 +44,22 @@ var controllerrevisionsKind = v1.SchemeGroupVersion.WithKind("ControllerRevision
|
||||
|
||||
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
|
||||
func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ControllerRevision, err error) {
|
||||
emptyResult := &v1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ControllerRevision), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *FakeControllerRevisions) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ControllerRevisionList, err error) {
|
||||
emptyResult := &v1.ControllerRevisionList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1.ControllerRevisionList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,24 +84,22 @@ func (c *FakeControllerRevisions) Watch(ctx context.Context, opts metav1.ListOpt
|
||||
|
||||
// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||
func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.CreateOptions) (result *v1.ControllerRevision, err error) {
|
||||
emptyResult := &v1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), emptyResult)
|
||||
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ControllerRevision), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||
func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1.ControllerRevision, opts metav1.UpdateOptions) (result *v1.ControllerRevision, err error) {
|
||||
emptyResult := &v1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ControllerRevision), err
|
||||
}
|
||||
@@ -126,12 +122,11 @@ func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts met
|
||||
|
||||
// Patch applies the patch and returns the patched controllerRevision.
|
||||
func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ControllerRevision, err error) {
|
||||
emptyResult := &v1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ControllerRevision), err
|
||||
}
|
||||
@@ -149,12 +144,11 @@ func (c *FakeControllerRevisions) Apply(ctx context.Context, controllerRevision
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("controllerRevision.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), &v1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ControllerRevision), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var daemonsetsKind = v1.SchemeGroupVersion.WithKind("DaemonSet")
|
||||
|
||||
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
|
||||
func (c *FakeDaemonSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.DaemonSet, err error) {
|
||||
emptyResult := &v1.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.DaemonSet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
|
||||
func (c *FakeDaemonSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DaemonSetList, err error) {
|
||||
emptyResult := &v1.DaemonSetList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1.DaemonSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeDaemonSets) Watch(ctx context.Context, opts metav1.ListOptions) (wa
|
||||
|
||||
// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
|
||||
func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.CreateOptions) (result *v1.DaemonSet, err error) {
|
||||
emptyResult := &v1.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), emptyResult)
|
||||
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.DaemonSet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
|
||||
func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) {
|
||||
emptyResult := &v1.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.DaemonSet), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (result *v1.DaemonSet, err error) {
|
||||
emptyResult := &v1.DaemonSet{}
|
||||
func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1.DaemonSet, opts metav1.UpdateOptions) (*v1.DaemonSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.DaemonSet), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts metav1.Delet
|
||||
|
||||
// Patch applies the patch and returns the patched daemonSet.
|
||||
func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.DaemonSet, err error) {
|
||||
emptyResult := &v1.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.DaemonSet), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeDaemonSets) Apply(ctx context.Context, daemonSet *appsv1.DaemonSetA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("daemonSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.DaemonSet), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeDaemonSets) ApplyStatus(ctx context.Context, daemonSet *appsv1.Daem
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("daemonSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.DaemonSet), err
|
||||
}
|
||||
|
||||
@@ -46,24 +46,22 @@ var deploymentsKind = v1.SchemeGroupVersion.WithKind("Deployment")
|
||||
|
||||
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
|
||||
func (c *FakeDeployments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Deployment, err error) {
|
||||
emptyResult := &v1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Deployment), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *FakeDeployments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.DeploymentList, err error) {
|
||||
emptyResult := &v1.DeploymentList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1.DeploymentList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -88,37 +86,34 @@ func (c *FakeDeployments) Watch(ctx context.Context, opts metav1.ListOptions) (w
|
||||
|
||||
// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *FakeDeployments) Create(ctx context.Context, deployment *v1.Deployment, opts metav1.CreateOptions) (result *v1.Deployment, err error) {
|
||||
emptyResult := &v1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Deployment), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *FakeDeployments) Update(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) {
|
||||
emptyResult := &v1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Deployment), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (result *v1.Deployment, err error) {
|
||||
emptyResult := &v1.Deployment{}
|
||||
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1.Deployment, opts metav1.UpdateOptions) (*v1.Deployment, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Deployment), err
|
||||
}
|
||||
@@ -141,12 +136,11 @@ func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts metav1.Dele
|
||||
|
||||
// Patch applies the patch and returns the patched deployment.
|
||||
func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Deployment, err error) {
|
||||
emptyResult := &v1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Deployment), err
|
||||
}
|
||||
@@ -164,12 +158,11 @@ func (c *FakeDeployments) Apply(ctx context.Context, deployment *appsv1.Deployme
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("deployment.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), &v1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Deployment), err
|
||||
}
|
||||
@@ -188,36 +181,33 @@ func (c *FakeDeployments) ApplyStatus(ctx context.Context, deployment *appsv1.De
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("deployment.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Deployment), err
|
||||
}
|
||||
|
||||
// GetScale takes name of the deployment, and returns the corresponding scale object, and an error if there is any.
|
||||
func (c *FakeDeployments) GetScale(ctx context.Context, deploymentName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), emptyResult)
|
||||
Invokes(testing.NewGetSubresourceAction(deploymentsResource, c.ns, "scale", deploymentName), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
|
||||
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
|
||||
func (c *FakeDeployments) UpdateScale(ctx context.Context, deploymentName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
@@ -232,12 +222,11 @@ func (c *FakeDeployments) ApplyScale(ctx context.Context, deploymentName string,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, deploymentName, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, deploymentName, types.ApplyPatchType, data, "status"), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
|
||||
@@ -46,24 +46,22 @@ var replicasetsKind = v1.SchemeGroupVersion.WithKind("ReplicaSet")
|
||||
|
||||
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
|
||||
func (c *FakeReplicaSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ReplicaSet, err error) {
|
||||
emptyResult := &v1.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ReplicaSet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
|
||||
func (c *FakeReplicaSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) {
|
||||
emptyResult := &v1.ReplicaSetList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &v1.ReplicaSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -88,37 +86,34 @@ func (c *FakeReplicaSets) Watch(ctx context.Context, opts metav1.ListOptions) (w
|
||||
|
||||
// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
|
||||
func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.CreateOptions) (result *v1.ReplicaSet, err error) {
|
||||
emptyResult := &v1.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), emptyResult)
|
||||
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ReplicaSet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
|
||||
func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) {
|
||||
emptyResult := &v1.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ReplicaSet), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (result *v1.ReplicaSet, err error) {
|
||||
emptyResult := &v1.ReplicaSet{}
|
||||
func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1.ReplicaSet, opts metav1.UpdateOptions) (*v1.ReplicaSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ReplicaSet), err
|
||||
}
|
||||
@@ -141,12 +136,11 @@ func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts metav1.Dele
|
||||
|
||||
// Patch applies the patch and returns the patched replicaSet.
|
||||
func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ReplicaSet, err error) {
|
||||
emptyResult := &v1.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ReplicaSet), err
|
||||
}
|
||||
@@ -164,12 +158,11 @@ func (c *FakeReplicaSets) Apply(ctx context.Context, replicaSet *appsv1.ReplicaS
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("replicaSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data), &v1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ReplicaSet), err
|
||||
}
|
||||
@@ -188,36 +181,33 @@ func (c *FakeReplicaSets) ApplyStatus(ctx context.Context, replicaSet *appsv1.Re
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("replicaSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.ReplicaSet), err
|
||||
}
|
||||
|
||||
// GetScale takes name of the replicaSet, and returns the corresponding scale object, and an error if there is any.
|
||||
func (c *FakeReplicaSets) GetScale(ctx context.Context, replicaSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), emptyResult)
|
||||
Invokes(testing.NewGetSubresourceAction(replicasetsResource, c.ns, "scale", replicaSetName), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
|
||||
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
|
||||
func (c *FakeReplicaSets) UpdateScale(ctx context.Context, replicaSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
@@ -232,12 +222,11 @@ func (c *FakeReplicaSets) ApplyScale(ctx context.Context, replicaSetName string,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, replicaSetName, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, replicaSetName, types.ApplyPatchType, data, "status"), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
|
||||
@@ -46,24 +46,22 @@ var statefulsetsKind = v1.SchemeGroupVersion.WithKind("StatefulSet")
|
||||
|
||||
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
|
||||
func (c *FakeStatefulSets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.StatefulSet, err error) {
|
||||
emptyResult := &v1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.StatefulSet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *FakeStatefulSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) {
|
||||
emptyResult := &v1.StatefulSetList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1.StatefulSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -88,37 +86,34 @@ func (c *FakeStatefulSets) Watch(ctx context.Context, opts metav1.ListOptions) (
|
||||
|
||||
// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.CreateOptions) (result *v1.StatefulSet, err error) {
|
||||
emptyResult := &v1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.StatefulSet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) {
|
||||
emptyResult := &v1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.StatefulSet), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (result *v1.StatefulSet, err error) {
|
||||
emptyResult := &v1.StatefulSet{}
|
||||
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1.StatefulSet, opts metav1.UpdateOptions) (*v1.StatefulSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.StatefulSet), err
|
||||
}
|
||||
@@ -141,12 +136,11 @@ func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts metav1.Del
|
||||
|
||||
// Patch applies the patch and returns the patched statefulSet.
|
||||
func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.StatefulSet, err error) {
|
||||
emptyResult := &v1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.StatefulSet), err
|
||||
}
|
||||
@@ -164,12 +158,11 @@ func (c *FakeStatefulSets) Apply(ctx context.Context, statefulSet *appsv1.Statef
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("statefulSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.StatefulSet), err
|
||||
}
|
||||
@@ -188,36 +181,33 @@ func (c *FakeStatefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1.
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("statefulSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.StatefulSet), err
|
||||
}
|
||||
|
||||
// GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any.
|
||||
func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options metav1.GetOptions) (result *autoscalingv1.Scale, err error) {
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), emptyResult)
|
||||
Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
|
||||
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts metav1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
@@ -232,12 +222,11 @@ func (c *FakeStatefulSets) ApplyScale(ctx context.Context, statefulSetName strin
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
emptyResult := &autoscalingv1.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, statefulSetName, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, statefulSetName, types.ApplyPatchType, data, "status"), &autoscalingv1.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*autoscalingv1.Scale), err
|
||||
}
|
||||
|
||||
@@ -33,9 +33,6 @@ import (
|
||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
|
||||
@@ -92,26 +89,7 @@ func (c *replicaSets) Get(ctx context.Context, name string, options metav1.GetOp
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
|
||||
func (c *replicaSets) List(ctx context.Context, opts metav1.ListOptions) (*v1.ReplicaSetList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for replicasets, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for replicasets", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for replicasets ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for replicasets", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
|
||||
func (c *replicaSets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) {
|
||||
func (c *replicaSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -127,23 +105,6 @@ func (c *replicaSets) list(ctx context.Context, opts metav1.ListOptions) (result
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ReplicaSets
|
||||
func (c *replicaSets) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.ReplicaSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.ReplicaSetList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("replicasets").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested replicaSets.
|
||||
func (c *replicaSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -33,9 +33,6 @@ import (
|
||||
applyconfigurationsautoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
||||
@@ -92,26 +89,7 @@ func (c *statefulSets) Get(ctx context.Context, name string, options metav1.GetO
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *statefulSets) List(ctx context.Context, opts metav1.ListOptions) (*v1.StatefulSetList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for statefulsets, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for statefulsets", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for statefulsets ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for statefulsets", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *statefulSets) list(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) {
|
||||
func (c *statefulSets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -127,23 +105,6 @@ func (c *statefulSets) list(ctx context.Context, opts metav1.ListOptions) (resul
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of StatefulSets
|
||||
func (c *statefulSets) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.StatefulSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.StatefulSetList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested statefulSets.
|
||||
func (c *statefulSets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
|
||||
@@ -84,26 +81,7 @@ func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.G
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ControllerRevisionList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for controllerrevisions, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for controllerrevisions", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for controllerrevisions ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for controllerrevisions", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *controllerRevisions) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
|
||||
func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -119,23 +97,6 @@ func (c *controllerRevisions) list(ctx context.Context, opts v1.ListOptions) (re
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ControllerRevisions
|
||||
func (c *controllerRevisions) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ControllerRevisionList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested controllerRevisions.
|
||||
func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// DeploymentsGetter has a method to return a DeploymentInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *deployments) Get(ctx context.Context, name string, options v1.GetOption
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DeploymentList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for deployments, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for deployments", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for deployments ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for deployments", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *deployments) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||
func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *deployments) list(ctx context.Context, opts v1.ListOptions) (result *v1
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of Deployments
|
||||
func (c *deployments) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.DeploymentList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested deployments.
|
||||
func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -44,24 +44,22 @@ var controllerrevisionsKind = v1beta1.SchemeGroupVersion.WithKind("ControllerRev
|
||||
|
||||
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
|
||||
func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ControllerRevision), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ControllerRevisionList, err error) {
|
||||
emptyResult := &v1beta1.ControllerRevisionList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta1.ControllerRevisionList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,24 +84,22 @@ func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions
|
||||
|
||||
// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||
func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.CreateOptions) (result *v1beta1.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), emptyResult)
|
||||
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ControllerRevision), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||
func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta1.ControllerRevision, opts v1.UpdateOptions) (result *v1beta1.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ControllerRevision), err
|
||||
}
|
||||
@@ -126,12 +122,11 @@ func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.
|
||||
|
||||
// Patch applies the patch and returns the patched controllerRevision.
|
||||
func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ControllerRevision), err
|
||||
}
|
||||
@@ -149,12 +144,11 @@ func (c *FakeControllerRevisions) Apply(ctx context.Context, controllerRevision
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("controllerRevision.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.ControllerRevision), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var deploymentsKind = v1beta1.SchemeGroupVersion.WithKind("Deployment")
|
||||
|
||||
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
|
||||
func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Deployment, err error) {
|
||||
emptyResult := &v1beta1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.Deployment), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||
emptyResult := &v1beta1.DeploymentList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta1.DeploymentList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch
|
||||
|
||||
// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta1.Deployment, opts v1.CreateOptions) (result *v1beta1.Deployment, err error) {
|
||||
emptyResult := &v1beta1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.Deployment), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) {
|
||||
emptyResult := &v1beta1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.Deployment), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (result *v1beta1.Deployment, err error) {
|
||||
emptyResult := &v1beta1.Deployment{}
|
||||
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta1.Deployment, opts v1.UpdateOptions) (*v1beta1.Deployment, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.Deployment), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOp
|
||||
|
||||
// Patch applies the patch and returns the patched deployment.
|
||||
func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Deployment, err error) {
|
||||
emptyResult := &v1beta1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.Deployment), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeDeployments) Apply(ctx context.Context, deployment *appsv1beta1.Dep
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("deployment.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.Deployment), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeDeployments) ApplyStatus(ctx context.Context, deployment *appsv1bet
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("deployment.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.Deployment), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var statefulsetsKind = v1beta1.SchemeGroupVersion.WithKind("StatefulSet")
|
||||
|
||||
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
|
||||
func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
emptyResult := &v1beta1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.StatefulSet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
|
||||
emptyResult := &v1beta1.StatefulSetList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta1.StatefulSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watc
|
||||
|
||||
// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.CreateOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
emptyResult := &v1beta1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.StatefulSet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
emptyResult := &v1beta1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.StatefulSet), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (result *v1beta1.StatefulSet, err error) {
|
||||
emptyResult := &v1beta1.StatefulSet{}
|
||||
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta1.StatefulSet, opts v1.UpdateOptions) (*v1beta1.StatefulSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.StatefulSet), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteO
|
||||
|
||||
// Patch applies the patch and returns the patched statefulSet.
|
||||
func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.StatefulSet, err error) {
|
||||
emptyResult := &v1beta1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.StatefulSet), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeStatefulSets) Apply(ctx context.Context, statefulSet *appsv1beta1.S
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("statefulSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.StatefulSet), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeStatefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1b
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("statefulSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta1.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.StatefulSet), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta1 "k8s.io/client-go/applyconfigurations/apps/v1beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptio
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (*v1beta1.StatefulSetList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for statefulsets, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for statefulsets", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for statefulsets ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for statefulsets", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *statefulSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
|
||||
func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *statefulSets) list(ctx context.Context, opts v1.ListOptions) (result *v
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of StatefulSets
|
||||
func (c *statefulSets) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta1.StatefulSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.StatefulSetList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested statefulSets.
|
||||
func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ControllerRevisionsGetter has a method to return a ControllerRevisionInterface.
|
||||
@@ -84,26 +81,7 @@ func (c *controllerRevisions) Get(ctx context.Context, name string, options v1.G
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ControllerRevisionList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for controllerrevisions, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for controllerrevisions", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for controllerrevisions ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for controllerrevisions", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *controllerRevisions) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
|
||||
func (c *controllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -119,23 +97,6 @@ func (c *controllerRevisions) list(ctx context.Context, opts v1.ListOptions) (re
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ControllerRevisions
|
||||
func (c *controllerRevisions) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta2.ControllerRevisionList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("controllerrevisions").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested controllerRevisions.
|
||||
func (c *controllerRevisions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// DaemonSetsGetter has a method to return a DaemonSetInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
|
||||
func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DaemonSetList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for daemonsets, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for daemonsets", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for daemonsets ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for daemonsets", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of DaemonSets that match those selectors.
|
||||
func (c *daemonSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
|
||||
func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *daemonSets) list(ctx context.Context, opts v1.ListOptions) (result *v1b
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of DaemonSets
|
||||
func (c *daemonSets) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta2.DaemonSetList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("daemonsets").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested daemonSets.
|
||||
func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// DeploymentsGetter has a method to return a DeploymentInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *deployments) Get(ctx context.Context, name string, options v1.GetOption
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.DeploymentList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for deployments, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for deployments", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for deployments ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for deployments", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *deployments) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
|
||||
func (c *deployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *deployments) list(ctx context.Context, opts v1.ListOptions) (result *v1
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of Deployments
|
||||
func (c *deployments) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta2.DeploymentList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("deployments").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested deployments.
|
||||
func (c *deployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -44,24 +44,22 @@ var controllerrevisionsKind = v1beta2.SchemeGroupVersion.WithKind("ControllerRev
|
||||
|
||||
// Get takes name of the controllerRevision, and returns the corresponding controllerRevision object, and an error if there is any.
|
||||
func (c *FakeControllerRevisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta2.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(controllerrevisionsResource, c.ns, name), &v1beta2.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ControllerRevision), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ControllerRevisions that match those selectors.
|
||||
func (c *FakeControllerRevisions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ControllerRevisionList, err error) {
|
||||
emptyResult := &v1beta2.ControllerRevisionList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(controllerrevisionsResource, controllerrevisionsKind, c.ns, opts), &v1beta2.ControllerRevisionList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,24 +84,22 @@ func (c *FakeControllerRevisions) Watch(ctx context.Context, opts v1.ListOptions
|
||||
|
||||
// Create takes the representation of a controllerRevision and creates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||
func (c *FakeControllerRevisions) Create(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.CreateOptions) (result *v1beta2.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta2.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), emptyResult)
|
||||
Invokes(testing.NewCreateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ControllerRevision), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a controllerRevision and updates it. Returns the server's representation of the controllerRevision, and an error, if there is any.
|
||||
func (c *FakeControllerRevisions) Update(ctx context.Context, controllerRevision *v1beta2.ControllerRevision, opts v1.UpdateOptions) (result *v1beta2.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta2.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(controllerrevisionsResource, c.ns, controllerRevision), &v1beta2.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ControllerRevision), err
|
||||
}
|
||||
@@ -126,12 +122,11 @@ func (c *FakeControllerRevisions) DeleteCollection(ctx context.Context, opts v1.
|
||||
|
||||
// Patch applies the patch and returns the patched controllerRevision.
|
||||
func (c *FakeControllerRevisions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ControllerRevision, err error) {
|
||||
emptyResult := &v1beta2.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, name, pt, data, subresources...), &v1beta2.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ControllerRevision), err
|
||||
}
|
||||
@@ -149,12 +144,11 @@ func (c *FakeControllerRevisions) Apply(ctx context.Context, controllerRevision
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("controllerRevision.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.ControllerRevision{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(controllerrevisionsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.ControllerRevision{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ControllerRevision), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var daemonsetsKind = v1beta2.SchemeGroupVersion.WithKind("DaemonSet")
|
||||
|
||||
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
|
||||
func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.DaemonSet, err error) {
|
||||
emptyResult := &v1beta2.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1beta2.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.DaemonSet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
|
||||
func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DaemonSetList, err error) {
|
||||
emptyResult := &v1beta2.DaemonSetList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1beta2.DaemonSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.
|
||||
|
||||
// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
|
||||
func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.CreateOptions) (result *v1beta2.DaemonSet, err error) {
|
||||
emptyResult := &v1beta2.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), emptyResult)
|
||||
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.DaemonSet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
|
||||
func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) {
|
||||
emptyResult := &v1beta2.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.DaemonSet), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (result *v1beta2.DaemonSet, err error) {
|
||||
emptyResult := &v1beta2.DaemonSet{}
|
||||
func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1beta2.DaemonSet, opts v1.UpdateOptions) (*v1beta2.DaemonSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta2.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.DaemonSet), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
|
||||
|
||||
// Patch applies the patch and returns the patched daemonSet.
|
||||
func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.DaemonSet, err error) {
|
||||
emptyResult := &v1beta2.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.DaemonSet), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeDaemonSets) Apply(ctx context.Context, daemonSet *appsv1beta2.Daemo
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("daemonSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.DaemonSet), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeDaemonSets) ApplyStatus(ctx context.Context, daemonSet *appsv1beta2
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("daemonSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.DaemonSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.DaemonSet), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var deploymentsKind = v1beta2.SchemeGroupVersion.WithKind("Deployment")
|
||||
|
||||
// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
|
||||
func (c *FakeDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.Deployment, err error) {
|
||||
emptyResult := &v1beta2.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(deploymentsResource, c.ns, name), &v1beta2.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Deployment), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Deployments that match those selectors.
|
||||
func (c *FakeDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.DeploymentList, err error) {
|
||||
emptyResult := &v1beta2.DeploymentList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(deploymentsResource, deploymentsKind, c.ns, opts), &v1beta2.DeploymentList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch
|
||||
|
||||
// Create takes the representation of a deployment and creates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *FakeDeployments) Create(ctx context.Context, deployment *v1beta2.Deployment, opts v1.CreateOptions) (result *v1beta2.Deployment, err error) {
|
||||
emptyResult := &v1beta2.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Deployment), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
|
||||
func (c *FakeDeployments) Update(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) {
|
||||
emptyResult := &v1beta2.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta2.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Deployment), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (result *v1beta2.Deployment, err error) {
|
||||
emptyResult := &v1beta2.Deployment{}
|
||||
func (c *FakeDeployments) UpdateStatus(ctx context.Context, deployment *v1beta2.Deployment, opts v1.UpdateOptions) (*v1beta2.Deployment, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta2.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Deployment), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOp
|
||||
|
||||
// Patch applies the patch and returns the patched deployment.
|
||||
func (c *FakeDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.Deployment, err error) {
|
||||
emptyResult := &v1beta2.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, name, pt, data, subresources...), &v1beta2.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Deployment), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeDeployments) Apply(ctx context.Context, deployment *appsv1beta2.Dep
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("deployment.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Deployment), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeDeployments) ApplyStatus(ctx context.Context, deployment *appsv1bet
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("deployment.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.Deployment{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(deploymentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Deployment), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var replicasetsKind = v1beta2.SchemeGroupVersion.WithKind("ReplicaSet")
|
||||
|
||||
// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
|
||||
func (c *FakeReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ReplicaSet, err error) {
|
||||
emptyResult := &v1beta2.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(replicasetsResource, c.ns, name), &v1beta2.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ReplicaSet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
|
||||
func (c *FakeReplicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
|
||||
emptyResult := &v1beta2.ReplicaSetList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(replicasetsResource, replicasetsKind, c.ns, opts), &v1beta2.ReplicaSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeReplicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch
|
||||
|
||||
// Create takes the representation of a replicaSet and creates it. Returns the server's representation of the replicaSet, and an error, if there is any.
|
||||
func (c *FakeReplicaSets) Create(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.CreateOptions) (result *v1beta2.ReplicaSet, err error) {
|
||||
emptyResult := &v1beta2.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), emptyResult)
|
||||
Invokes(testing.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ReplicaSet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
|
||||
func (c *FakeReplicaSets) Update(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) {
|
||||
emptyResult := &v1beta2.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta2.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ReplicaSet), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (result *v1beta2.ReplicaSet, err error) {
|
||||
emptyResult := &v1beta2.ReplicaSet{}
|
||||
func (c *FakeReplicaSets) UpdateStatus(ctx context.Context, replicaSet *v1beta2.ReplicaSet, opts v1.UpdateOptions) (*v1beta2.ReplicaSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta2.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ReplicaSet), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeReplicaSets) DeleteCollection(ctx context.Context, opts v1.DeleteOp
|
||||
|
||||
// Patch applies the patch and returns the patched replicaSet.
|
||||
func (c *FakeReplicaSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.ReplicaSet, err error) {
|
||||
emptyResult := &v1beta2.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, name, pt, data, subresources...), &v1beta2.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ReplicaSet), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeReplicaSets) Apply(ctx context.Context, replicaSet *appsv1beta2.Rep
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("replicaSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ReplicaSet), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeReplicaSets) ApplyStatus(ctx context.Context, replicaSet *appsv1bet
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("replicaSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.ReplicaSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(replicasetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.ReplicaSet), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var statefulsetsKind = v1beta2.SchemeGroupVersion.WithKind("StatefulSet")
|
||||
|
||||
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
|
||||
func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.StatefulSet, err error) {
|
||||
emptyResult := &v1beta2.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1beta2.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.StatefulSet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
|
||||
emptyResult := &v1beta2.StatefulSetList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1beta2.StatefulSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watc
|
||||
|
||||
// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.CreateOptions) (result *v1beta2.StatefulSet, err error) {
|
||||
emptyResult := &v1beta2.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.StatefulSet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) {
|
||||
emptyResult := &v1beta2.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1beta2.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.StatefulSet), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (result *v1beta2.StatefulSet, err error) {
|
||||
emptyResult := &v1beta2.StatefulSet{}
|
||||
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1beta2.StatefulSet, opts v1.UpdateOptions) (*v1beta2.StatefulSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1beta2.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.StatefulSet), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteO
|
||||
|
||||
// Patch applies the patch and returns the patched statefulSet.
|
||||
func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.StatefulSet, err error) {
|
||||
emptyResult := &v1beta2.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1beta2.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.StatefulSet), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeStatefulSets) Apply(ctx context.Context, statefulSet *appsv1beta2.S
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("statefulSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta2.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.StatefulSet), err
|
||||
}
|
||||
@@ -186,36 +179,33 @@ func (c *FakeStatefulSets) ApplyStatus(ctx context.Context, statefulSet *appsv1b
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("statefulSet.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1beta2.StatefulSet{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta2.StatefulSet{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.StatefulSet), err
|
||||
}
|
||||
|
||||
// GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any.
|
||||
func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *v1beta2.Scale, err error) {
|
||||
emptyResult := &v1beta2.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), emptyResult)
|
||||
Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &v1beta2.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Scale), err
|
||||
}
|
||||
|
||||
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
|
||||
func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *v1beta2.Scale, opts v1.UpdateOptions) (result *v1beta2.Scale, err error) {
|
||||
emptyResult := &v1beta2.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &v1beta2.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Scale), err
|
||||
}
|
||||
@@ -230,12 +220,11 @@ func (c *FakeStatefulSets) ApplyScale(ctx context.Context, statefulSetName strin
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
emptyResult := &v1beta2.Scale{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, statefulSetName, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, statefulSetName, types.ApplyPatchType, data, "status"), &v1beta2.Scale{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta2.Scale), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *replicaSets) Get(ctx context.Context, name string, options v1.GetOption
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
|
||||
func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.ReplicaSetList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for replicasets, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for replicasets", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for replicasets ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for replicasets", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
|
||||
func (c *replicaSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
|
||||
func (c *replicaSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *replicaSets) list(ctx context.Context, opts v1.ListOptions) (result *v1
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of ReplicaSets
|
||||
func (c *replicaSets) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta2.ReplicaSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta2.ReplicaSetList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("replicasets").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested replicaSets.
|
||||
func (c *replicaSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
appsv1beta2 "k8s.io/client-go/applyconfigurations/apps/v1beta2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// StatefulSetsGetter has a method to return a StatefulSetInterface.
|
||||
@@ -90,26 +87,7 @@ func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptio
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (*v1beta2.StatefulSetList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for statefulsets, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for statefulsets", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for statefulsets ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for statefulsets", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of StatefulSets that match those selectors.
|
||||
func (c *statefulSets) list(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
|
||||
func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -125,23 +103,6 @@ func (c *statefulSets) list(ctx context.Context, opts v1.ListOptions) (result *v
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of StatefulSets
|
||||
func (c *statefulSets) watchList(ctx context.Context, opts v1.ListOptions) (result *v1beta2.StatefulSetList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta2.StatefulSetList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("statefulsets").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested statefulSets.
|
||||
func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -37,11 +37,10 @@ var selfsubjectreviewsKind = v1.SchemeGroupVersion.WithKind("SelfSubjectReview")
|
||||
|
||||
// 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 *FakeSelfSubjectReviews) Create(ctx context.Context, selfSubjectReview *v1.SelfSubjectReview, opts metav1.CreateOptions) (result *v1.SelfSubjectReview, err error) {
|
||||
emptyResult := &v1.SelfSubjectReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectreviewsResource, selfSubjectReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectreviewsResource, selfSubjectReview), &v1.SelfSubjectReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.SelfSubjectReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var tokenreviewsKind = v1.SchemeGroupVersion.WithKind("TokenReview")
|
||||
|
||||
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
|
||||
func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1.TokenReview, opts metav1.CreateOptions) (result *v1.TokenReview, err error) {
|
||||
emptyResult := &v1.TokenReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1.TokenReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.TokenReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var selfsubjectreviewsKind = v1alpha1.SchemeGroupVersion.WithKind("SelfSubjectRe
|
||||
|
||||
// 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 *FakeSelfSubjectReviews) Create(ctx context.Context, selfSubjectReview *v1alpha1.SelfSubjectReview, opts v1.CreateOptions) (result *v1alpha1.SelfSubjectReview, err error) {
|
||||
emptyResult := &v1alpha1.SelfSubjectReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectreviewsResource, selfSubjectReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectreviewsResource, selfSubjectReview), &v1alpha1.SelfSubjectReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.SelfSubjectReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var selfsubjectreviewsKind = v1beta1.SchemeGroupVersion.WithKind("SelfSubjectRev
|
||||
|
||||
// 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 *FakeSelfSubjectReviews) Create(ctx context.Context, selfSubjectReview *v1beta1.SelfSubjectReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectReview, err error) {
|
||||
emptyResult := &v1beta1.SelfSubjectReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectreviewsResource, selfSubjectReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectreviewsResource, selfSubjectReview), &v1beta1.SelfSubjectReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.SelfSubjectReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var tokenreviewsKind = v1beta1.SchemeGroupVersion.WithKind("TokenReview")
|
||||
|
||||
// Create takes the representation of a tokenReview and creates it. Returns the server's representation of the tokenReview, and an error, if there is any.
|
||||
func (c *FakeTokenReviews) Create(ctx context.Context, tokenReview *v1beta1.TokenReview, opts v1.CreateOptions) (result *v1beta1.TokenReview, err error) {
|
||||
emptyResult := &v1beta1.TokenReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(tokenreviewsResource, tokenReview), &v1beta1.TokenReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.TokenReview), err
|
||||
}
|
||||
|
||||
@@ -38,12 +38,11 @@ var localsubjectaccessreviewsKind = v1.SchemeGroupVersion.WithKind("LocalSubject
|
||||
|
||||
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
|
||||
func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1.LocalSubjectAccessReview, opts metav1.CreateOptions) (result *v1.LocalSubjectAccessReview, err error) {
|
||||
emptyResult := &v1.LocalSubjectAccessReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), emptyResult)
|
||||
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1.LocalSubjectAccessReview{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.LocalSubjectAccessReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var selfsubjectaccessreviewsKind = v1.SchemeGroupVersion.WithKind("SelfSubjectAc
|
||||
|
||||
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
|
||||
func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1.SelfSubjectAccessReview, opts metav1.CreateOptions) (result *v1.SelfSubjectAccessReview, err error) {
|
||||
emptyResult := &v1.SelfSubjectAccessReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1.SelfSubjectAccessReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.SelfSubjectAccessReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var selfsubjectrulesreviewsKind = v1.SchemeGroupVersion.WithKind("SelfSubjectRul
|
||||
|
||||
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
|
||||
func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1.SelfSubjectRulesReview, opts metav1.CreateOptions) (result *v1.SelfSubjectRulesReview, err error) {
|
||||
emptyResult := &v1.SelfSubjectRulesReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1.SelfSubjectRulesReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.SelfSubjectRulesReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var subjectaccessreviewsKind = v1.SchemeGroupVersion.WithKind("SubjectAccessRevi
|
||||
|
||||
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
|
||||
func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1.SubjectAccessReview, opts metav1.CreateOptions) (result *v1.SubjectAccessReview, err error) {
|
||||
emptyResult := &v1.SubjectAccessReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1.SubjectAccessReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.SubjectAccessReview), err
|
||||
}
|
||||
|
||||
@@ -38,12 +38,11 @@ var localsubjectaccessreviewsKind = v1beta1.SchemeGroupVersion.WithKind("LocalSu
|
||||
|
||||
// Create takes the representation of a localSubjectAccessReview and creates it. Returns the server's representation of the localSubjectAccessReview, and an error, if there is any.
|
||||
func (c *FakeLocalSubjectAccessReviews) Create(ctx context.Context, localSubjectAccessReview *v1beta1.LocalSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.LocalSubjectAccessReview, err error) {
|
||||
emptyResult := &v1beta1.LocalSubjectAccessReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), emptyResult)
|
||||
Invokes(testing.NewCreateAction(localsubjectaccessreviewsResource, c.ns, localSubjectAccessReview), &v1beta1.LocalSubjectAccessReview{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.LocalSubjectAccessReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var selfsubjectaccessreviewsKind = v1beta1.SchemeGroupVersion.WithKind("SelfSubj
|
||||
|
||||
// Create takes the representation of a selfSubjectAccessReview and creates it. Returns the server's representation of the selfSubjectAccessReview, and an error, if there is any.
|
||||
func (c *FakeSelfSubjectAccessReviews) Create(ctx context.Context, selfSubjectAccessReview *v1beta1.SelfSubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectAccessReview, err error) {
|
||||
emptyResult := &v1beta1.SelfSubjectAccessReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectaccessreviewsResource, selfSubjectAccessReview), &v1beta1.SelfSubjectAccessReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.SelfSubjectAccessReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var selfsubjectrulesreviewsKind = v1beta1.SchemeGroupVersion.WithKind("SelfSubje
|
||||
|
||||
// Create takes the representation of a selfSubjectRulesReview and creates it. Returns the server's representation of the selfSubjectRulesReview, and an error, if there is any.
|
||||
func (c *FakeSelfSubjectRulesReviews) Create(ctx context.Context, selfSubjectRulesReview *v1beta1.SelfSubjectRulesReview, opts v1.CreateOptions) (result *v1beta1.SelfSubjectRulesReview, err error) {
|
||||
emptyResult := &v1beta1.SelfSubjectRulesReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(selfsubjectrulesreviewsResource, selfSubjectRulesReview), &v1beta1.SelfSubjectRulesReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.SelfSubjectRulesReview), err
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ var subjectaccessreviewsKind = v1beta1.SchemeGroupVersion.WithKind("SubjectAcces
|
||||
|
||||
// Create takes the representation of a subjectAccessReview and creates it. Returns the server's representation of the subjectAccessReview, and an error, if there is any.
|
||||
func (c *FakeSubjectAccessReviews) Create(ctx context.Context, subjectAccessReview *v1beta1.SubjectAccessReview, opts v1.CreateOptions) (result *v1beta1.SubjectAccessReview, err error) {
|
||||
emptyResult := &v1beta1.SubjectAccessReview{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), emptyResult)
|
||||
Invokes(testing.NewRootCreateAction(subjectaccessreviewsResource, subjectAccessReview), &v1beta1.SubjectAccessReview{})
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.SubjectAccessReview), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var horizontalpodautoscalersKind = v1.SchemeGroupVersion.WithKind("HorizontalPod
|
||||
|
||||
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
emptyResult := &v1.HorizontalPodAutoscalerList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v1.HorizontalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts metav1.Li
|
||||
|
||||
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.CreateOptions) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v1.HorizontalPodAutoscaler{}
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v1.HorizontalPodAutoscaler, opts metav1.UpdateOptions) (*v1.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opt
|
||||
|
||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||
func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizont
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
autoscalingv1 "k8s.io/client-go/applyconfigurations/autoscaling/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts metav1.ListOptions) (*v1.HorizontalPodAutoscalerList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for horizontalpodautoscalers, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for horizontalpodautoscalers", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for horizontalpodautoscalers ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) list(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *horizontalPodAutoscalers) list(ctx context.Context, opts metav1.ListOpt
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of HorizontalPodAutoscalers
|
||||
func (c *horizontalPodAutoscalers) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.HorizontalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -44,24 +44,22 @@ var horizontalpodautoscalersKind = v2.SchemeGroupVersion.WithKind("HorizontalPod
|
||||
|
||||
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) {
|
||||
emptyResult := &v2.HorizontalPodAutoscalerList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2.HorizontalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOp
|
||||
|
||||
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2.HorizontalPodAutoscaler{}
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opt
|
||||
|
||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||
func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizont
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
autoscalingv2 "k8s.io/client-go/applyconfigurations/autoscaling/v2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (*v2.HorizontalPodAutoscalerList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for horizontalpodautoscalers, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for horizontalpodautoscalers", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for horizontalpodautoscalers ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) {
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of HorizontalPodAutoscalers
|
||||
func (c *horizontalPodAutoscalers) watchList(ctx context.Context, opts v1.ListOptions) (result *v2.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2.HorizontalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -44,24 +44,22 @@ var horizontalpodautoscalersKind = v2beta1.SchemeGroupVersion.WithKind("Horizont
|
||||
|
||||
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscalerList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta1.HorizontalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOp
|
||||
|
||||
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscaler{}
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta1.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta1.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opt
|
||||
|
||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||
func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta1.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v2beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizont
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v2beta1.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta1.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
autoscalingv2beta1 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (*v2beta1.HorizontalPodAutoscalerList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for horizontalpodautoscalers, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for horizontalpodautoscalers", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for horizontalpodautoscalers ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of HorizontalPodAutoscalers
|
||||
func (c *horizontalPodAutoscalers) watchList(ctx context.Context, opts v1.ListOptions) (result *v2beta1.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2beta1.HorizontalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -44,24 +44,22 @@ var horizontalpodautoscalersKind = v2beta2.SchemeGroupVersion.WithKind("Horizont
|
||||
|
||||
// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v2beta2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *FakeHorizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscalerList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(horizontalpodautoscalersResource, horizontalpodautoscalersKind, c.ns, opts), &v2beta2.HorizontalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeHorizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOp
|
||||
|
||||
// Create takes the representation of a horizontalPodAutoscaler and creates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.CreateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (result *v2beta2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscaler{}
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(ctx context.Context, horizontalPodAutoscaler *v2beta2.HorizontalPodAutoscaler, opts v1.UpdateOptions) (*v2beta2.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v2beta2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(ctx context.Context, opt
|
||||
|
||||
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
|
||||
func (c *FakeHorizontalPodAutoscalers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2beta2.HorizontalPodAutoscaler, err error) {
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, pt, data, subresources...), &v2beta2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeHorizontalPodAutoscalers) Apply(ctx context.Context, horizontalPodA
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data), &v2beta2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeHorizontalPodAutoscalers) ApplyStatus(ctx context.Context, horizont
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("horizontalPodAutoscaler.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v2beta2.HorizontalPodAutoscaler{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v2beta2.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v2beta2.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
autoscalingv2beta2 "k8s.io/client-go/applyconfigurations/autoscaling/v2beta2"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *horizontalPodAutoscalers) Get(ctx context.Context, name string, options
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for horizontalpodautoscalers, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for horizontalpodautoscalers", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for horizontalpodautoscalers ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for horizontalpodautoscalers", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
|
||||
func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
|
||||
func (c *horizontalPodAutoscalers) List(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *horizontalPodAutoscalers) list(ctx context.Context, opts v1.ListOptions
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of HorizontalPodAutoscalers
|
||||
func (c *horizontalPodAutoscalers) watchList(ctx context.Context, opts v1.ListOptions) (result *v2beta2.HorizontalPodAutoscalerList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v2beta2.HorizontalPodAutoscalerList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("horizontalpodautoscalers").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *horizontalPodAutoscalers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
batchv1 "k8s.io/client-go/applyconfigurations/batch/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// CronJobsGetter has a method to return a CronJobInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *cronJobs) Get(ctx context.Context, name string, options metav1.GetOptio
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
||||
func (c *cronJobs) List(ctx context.Context, opts metav1.ListOptions) (*v1.CronJobList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for cronjobs, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for cronjobs", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for cronjobs ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for cronjobs", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
||||
func (c *cronJobs) list(ctx context.Context, opts metav1.ListOptions) (result *v1.CronJobList, err error) {
|
||||
func (c *cronJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CronJobList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *cronJobs) list(ctx context.Context, opts metav1.ListOptions) (result *v
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of CronJobs
|
||||
func (c *cronJobs) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.CronJobList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.CronJobList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("cronjobs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested cronJobs.
|
||||
func (c *cronJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
@@ -44,24 +44,22 @@ var cronjobsKind = v1.SchemeGroupVersion.WithKind("CronJob")
|
||||
|
||||
// Get takes name of the cronJob, and returns the corresponding cronJob object, and an error if there is any.
|
||||
func (c *FakeCronJobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.CronJob, err error) {
|
||||
emptyResult := &v1.CronJob{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(cronjobsResource, c.ns, name), &v1.CronJob{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CronJob), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of CronJobs that match those selectors.
|
||||
func (c *FakeCronJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.CronJobList, err error) {
|
||||
emptyResult := &v1.CronJobList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(cronjobsResource, cronjobsKind, c.ns, opts), &v1.CronJobList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeCronJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watc
|
||||
|
||||
// Create takes the representation of a cronJob and creates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
||||
func (c *FakeCronJobs) Create(ctx context.Context, cronJob *v1.CronJob, opts metav1.CreateOptions) (result *v1.CronJob, err error) {
|
||||
emptyResult := &v1.CronJob{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), emptyResult)
|
||||
Invokes(testing.NewCreateAction(cronjobsResource, c.ns, cronJob), &v1.CronJob{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CronJob), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a cronJob and updates it. Returns the server's representation of the cronJob, and an error, if there is any.
|
||||
func (c *FakeCronJobs) Update(ctx context.Context, cronJob *v1.CronJob, opts metav1.UpdateOptions) (result *v1.CronJob, err error) {
|
||||
emptyResult := &v1.CronJob{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(cronjobsResource, c.ns, cronJob), &v1.CronJob{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CronJob), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1.CronJob, opts metav1.UpdateOptions) (result *v1.CronJob, err error) {
|
||||
emptyResult := &v1.CronJob{}
|
||||
func (c *FakeCronJobs) UpdateStatus(ctx context.Context, cronJob *v1.CronJob, opts metav1.UpdateOptions) (*v1.CronJob, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(cronjobsResource, "status", c.ns, cronJob), &v1.CronJob{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CronJob), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeCronJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteO
|
||||
|
||||
// Patch applies the patch and returns the patched cronJob.
|
||||
func (c *FakeCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CronJob, err error) {
|
||||
emptyResult := &v1.CronJob{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, name, pt, data, subresources...), &v1.CronJob{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CronJob), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeCronJobs) Apply(ctx context.Context, cronJob *batchv1.CronJobApplyC
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("cronJob.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.CronJob{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data), &v1.CronJob{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CronJob), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeCronJobs) ApplyStatus(ctx context.Context, cronJob *batchv1.CronJob
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("cronJob.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.CronJob{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(cronjobsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.CronJob{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.CronJob), err
|
||||
}
|
||||
|
||||
@@ -44,24 +44,22 @@ var jobsKind = v1.SchemeGroupVersion.WithKind("Job")
|
||||
|
||||
// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
|
||||
func (c *FakeJobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Job, err error) {
|
||||
emptyResult := &v1.Job{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(jobsResource, c.ns, name), emptyResult)
|
||||
Invokes(testing.NewGetAction(jobsResource, c.ns, name), &v1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||
func (c *FakeJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) {
|
||||
emptyResult := &v1.JobList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), emptyResult)
|
||||
Invokes(testing.NewListAction(jobsResource, jobsKind, c.ns, opts), &v1.JobList{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
@@ -86,37 +84,34 @@ func (c *FakeJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.In
|
||||
|
||||
// Create takes the representation of a job and creates it. Returns the server's representation of the job, and an error, if there is any.
|
||||
func (c *FakeJobs) Create(ctx context.Context, job *v1.Job, opts metav1.CreateOptions) (result *v1.Job, err error) {
|
||||
emptyResult := &v1.Job{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(jobsResource, c.ns, job), emptyResult)
|
||||
Invokes(testing.NewCreateAction(jobsResource, c.ns, job), &v1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
|
||||
func (c *FakeJobs) Update(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) {
|
||||
emptyResult := &v1.Job{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), emptyResult)
|
||||
Invokes(testing.NewUpdateAction(jobsResource, c.ns, job), &v1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeJobs) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (result *v1.Job, err error) {
|
||||
emptyResult := &v1.Job{}
|
||||
func (c *FakeJobs) UpdateStatus(ctx context.Context, job *v1.Job, opts metav1.UpdateOptions) (*v1.Job, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), emptyResult)
|
||||
Invokes(testing.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &v1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
@@ -139,12 +134,11 @@ func (c *FakeJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptio
|
||||
|
||||
// Patch applies the patch and returns the patched job.
|
||||
func (c *FakeJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Job, err error) {
|
||||
emptyResult := &v1.Job{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, pt, data, subresources...), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, name, pt, data, subresources...), &v1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
@@ -162,12 +156,11 @@ func (c *FakeJobs) Apply(ctx context.Context, job *batchv1.JobApplyConfiguration
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("job.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.Job{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, *name, types.ApplyPatchType, data), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, *name, types.ApplyPatchType, data), &v1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
@@ -186,12 +179,11 @@ func (c *FakeJobs) ApplyStatus(ctx context.Context, job *batchv1.JobApplyConfigu
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("job.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v1.Job{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, *name, types.ApplyPatchType, data, "status"), emptyResult)
|
||||
Invokes(testing.NewPatchSubresourceAction(jobsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1.Job), err
|
||||
}
|
||||
|
||||
@@ -31,9 +31,6 @@ import (
|
||||
batchv1 "k8s.io/client-go/applyconfigurations/batch/v1"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
consistencydetector "k8s.io/client-go/util/consistencydetector"
|
||||
watchlist "k8s.io/client-go/util/watchlist"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// JobsGetter has a method to return a JobInterface.
|
||||
@@ -86,26 +83,7 @@ func (c *jobs) Get(ctx context.Context, name string, options metav1.GetOptions)
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||
func (c *jobs) List(ctx context.Context, opts metav1.ListOptions) (*v1.JobList, error) {
|
||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||
klog.Warningf("Failed preparing watchlist options for jobs, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||
} else if hasWatchListOptionsPrepared {
|
||||
result, err := c.watchList(ctx, watchListOptions)
|
||||
if err == nil {
|
||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for jobs", c.list, opts, result)
|
||||
return result, nil
|
||||
}
|
||||
klog.Warningf("The watchlist request for jobs ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||
}
|
||||
result, err := c.list(ctx, opts)
|
||||
if err == nil {
|
||||
consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, "list request for jobs", c.list, opts, result)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
// list takes label and field selectors, and returns the list of Jobs that match those selectors.
|
||||
func (c *jobs) list(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) {
|
||||
func (c *jobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
@@ -121,23 +99,6 @@ func (c *jobs) list(ctx context.Context, opts metav1.ListOptions) (result *v1.Jo
|
||||
return
|
||||
}
|
||||
|
||||
// watchList establishes a watch stream with the server and returns the list of Jobs
|
||||
func (c *jobs) watchList(ctx context.Context, opts metav1.ListOptions) (result *v1.JobList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1.JobList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("jobs").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
WatchList(ctx).
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *jobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user