mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>
This commit is contained in:
parent
7313fec892
commit
13dfa4cbf5
@ -22,6 +22,7 @@ import (
|
|||||||
context "context"
|
context "context"
|
||||||
json "encoding/json"
|
json "encoding/json"
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
time "time"
|
||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
@ -32,6 +33,7 @@ import (
|
|||||||
extensionsv1 "k8s.io/code-generator/examples/crd/apis/extensions/v1"
|
extensionsv1 "k8s.io/code-generator/examples/crd/apis/extensions/v1"
|
||||||
applyconfigurationextensionsv1 "k8s.io/code-generator/examples/crd/applyconfiguration/extensions/v1"
|
applyconfigurationextensionsv1 "k8s.io/code-generator/examples/crd/applyconfiguration/extensions/v1"
|
||||||
scheme "k8s.io/code-generator/examples/crd/clientset/versioned/scheme"
|
scheme "k8s.io/code-generator/examples/crd/clientset/versioned/scheme"
|
||||||
|
v2 "k8s.io/klog/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestTypesGetter has a method to return a TestTypeInterface.
|
// TestTypesGetter has a method to return a TestTypeInterface.
|
||||||
@ -103,14 +105,14 @@ func (c *testTypes) GetExtended(ctx context.Context, name string, options metav1
|
|||||||
// ListExtended takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
// ListExtended takes label and field selectors, and returns the list of TestTypes that match those selectors.
|
||||||
func (c *testTypes) ListExtended(ctx context.Context, opts metav1.ListOptions) (*extensionsv1.TestTypeList, error) {
|
func (c *testTypes) ListExtended(ctx context.Context, opts metav1.ListOptions) (*extensionsv1.TestTypeList, error) {
|
||||||
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil {
|
||||||
klog.Warningf("Failed preparing watchlist options for testtypes, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
v2.Warningf("Failed preparing watchlist options for testtypes, falling back to the standard LIST semantics, err = %v", watchListOptionsErr)
|
||||||
} else if hasWatchListOptionsPrepared {
|
} else if hasWatchListOptionsPrepared {
|
||||||
result, err := c.watchList(ctx, watchListOptions)
|
result, err := c.watchList(ctx, watchListOptions)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for testtypes", c.list, opts, result)
|
consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, "watchlist request for testtypes", c.list, opts, result)
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
klog.Warningf("The watchlist request for testtypes ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
v2.Warningf("The watchlist request for testtypes ended with an error, falling back to the standard LIST semantics, err = %v", err)
|
||||||
}
|
}
|
||||||
result, err := c.list(ctx, opts)
|
result, err := c.list(ctx, opts)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@ -143,8 +145,8 @@ func (c *testTypes) watchList(ctx context.Context, opts metav1.ListOptions) (res
|
|||||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||||
}
|
}
|
||||||
result = &extensionsv1.TestTypeList{}
|
result = &extensionsv1.TestTypeList{}
|
||||||
err = c.client.Get().
|
err = c.GetClient().Get().
|
||||||
Namespace(c.ns).
|
Namespace(c.GetNamespace()).
|
||||||
Resource("testtypes").
|
Resource("testtypes").
|
||||||
VersionedParams(&opts, scheme.ParameterCodec).
|
VersionedParams(&opts, scheme.ParameterCodec).
|
||||||
Timeout(timeout).
|
Timeout(timeout).
|
||||||
|
@ -10,6 +10,7 @@ require (
|
|||||||
k8s.io/api v0.0.0
|
k8s.io/api v0.0.0
|
||||||
k8s.io/apimachinery v0.0.0
|
k8s.io/apimachinery v0.0.0
|
||||||
k8s.io/client-go v0.0.0
|
k8s.io/client-go v0.0.0
|
||||||
|
k8s.io/klog/v2 v2.130.1
|
||||||
k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2
|
k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
|
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
|
||||||
)
|
)
|
||||||
@ -47,7 +48,6 @@ require (
|
|||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
k8s.io/klog/v2 v2.130.1 // indirect
|
|
||||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
|
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
|
||||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||||
|
Loading…
Reference in New Issue
Block a user