From 6ca0f77a12fcf0971a972bdaa13ef03c47a62a91 Mon Sep 17 00:00:00 2001 From: Tam Mach Date: Fri, 20 Sep 2024 18:59:16 +0700 Subject: [PATCH] golang: Enable type alias again for go 1.13 All files are re-generated again as there is change in generation tools. Relates: https://github.com/kubernetes/kubernetes/pull/127271 Relates: https://github.com/cilium/deepequal-gen/pull/6 Relates: 1d9d51f40f3e9ef5d82ec03f8f5a92e2a2697f5d Signed-off-by: Tam Mach --- Makefile.defs | 5 - go.mod | 12 +- go.sum | 24 +-- .../client/clientset/versioned/clientset.go | 4 +- .../typed/cilium.io/v2/cilium.io_client.go | 8 +- .../v2/ciliumclusterwideenvoyconfig.go | 24 +-- .../v2/ciliumclusterwidenetworkpolicy.go | 26 +-- .../cilium.io/v2/ciliumegressgatewaypolicy.go | 22 +-- .../typed/cilium.io/v2/ciliumendpoint.go | 24 +-- .../typed/cilium.io/v2/ciliumenvoyconfig.go | 22 +-- .../cilium.io/v2/ciliumexternalworkload.go | 24 +-- .../typed/cilium.io/v2/ciliumidentity.go | 22 +-- .../cilium.io/v2/ciliumlocalredirectpolicy.go | 24 +-- .../typed/cilium.io/v2/ciliumnetworkpolicy.go | 24 +-- .../typed/cilium.io/v2/ciliumnode.go | 24 +-- .../typed/cilium.io/v2/ciliumnodeconfig.go | 22 +-- .../fake/fake_ciliumclusterwideenvoyconfig.go | 2 +- .../fake_ciliumclusterwidenetworkpolicy.go | 2 +- .../v2/fake/fake_ciliumegressgatewaypolicy.go | 2 +- .../cilium.io/v2/fake/fake_ciliumendpoint.go | 2 +- .../v2/fake/fake_ciliumenvoyconfig.go | 2 +- .../v2/fake/fake_ciliumexternalworkload.go | 2 +- .../cilium.io/v2/fake/fake_ciliumidentity.go | 2 +- .../v2/fake/fake_ciliumlocalredirectpolicy.go | 2 +- .../v2/fake/fake_ciliumnetworkpolicy.go | 2 +- .../cilium.io/v2/fake/fake_ciliumnode.go | 2 +- .../v2/fake/fake_ciliumnodeconfig.go | 2 +- .../cilium.io/v2alpha1/cilium.io_client.go | 8 +- .../v2alpha1/ciliumbgpadvertisement.go | 24 +-- .../v2alpha1/ciliumbgpclusterconfig.go | 24 +-- .../cilium.io/v2alpha1/ciliumbgpnodeconfig.go | 24 +-- .../v2alpha1/ciliumbgpnodeconfigoverride.go | 26 +-- .../cilium.io/v2alpha1/ciliumbgppeerconfig.go | 22 +-- .../v2alpha1/ciliumbgppeeringpolicy.go | 24 +-- .../cilium.io/v2alpha1/ciliumcidrgroup.go | 22 +-- .../cilium.io/v2alpha1/ciliumendpointslice.go | 22 +-- .../v2alpha1/ciliuml2announcementpolicy.go | 28 +-- .../v2alpha1/ciliumloadbalancerippool.go | 26 +-- .../cilium.io/v2alpha1/ciliumnodeconfig.go | 22 +-- .../cilium.io/v2alpha1/ciliumpodippool.go | 22 +-- .../fake/fake_ciliumbgpadvertisement.go | 2 +- .../fake/fake_ciliumbgpclusterconfig.go | 2 +- .../v2alpha1/fake/fake_ciliumbgpnodeconfig.go | 2 +- .../fake/fake_ciliumbgpnodeconfigoverride.go | 2 +- .../v2alpha1/fake/fake_ciliumbgppeerconfig.go | 2 +- .../fake/fake_ciliumbgppeeringpolicy.go | 2 +- .../v2alpha1/fake/fake_ciliumcidrgroup.go | 2 +- .../v2alpha1/fake/fake_ciliumendpointslice.go | 2 +- .../fake/fake_ciliuml2announcementpolicy.go | 2 +- .../fake/fake_ciliumloadbalancerippool.go | 2 +- .../v2alpha1/fake/fake_ciliumnodeconfig.go | 2 +- .../v2alpha1/fake/fake_ciliumpodippool.go | 2 +- .../v2/ciliumclusterwideenvoyconfig.go | 16 +- .../v2/ciliumclusterwidenetworkpolicy.go | 16 +- .../cilium.io/v2/ciliumegressgatewaypolicy.go | 16 +- .../cilium.io/v2/ciliumendpoint.go | 16 +- .../cilium.io/v2/ciliumenvoyconfig.go | 16 +- .../cilium.io/v2/ciliumexternalworkload.go | 16 +- .../cilium.io/v2/ciliumidentity.go | 16 +- .../cilium.io/v2/ciliumlocalredirectpolicy.go | 16 +- .../cilium.io/v2/ciliumnetworkpolicy.go | 16 +- .../cilium.io/v2/ciliumnode.go | 16 +- .../cilium.io/v2/ciliumnodeconfig.go | 16 +- .../v2alpha1/ciliumbgpadvertisement.go | 16 +- .../v2alpha1/ciliumbgpclusterconfig.go | 16 +- .../cilium.io/v2alpha1/ciliumbgpnodeconfig.go | 16 +- .../v2alpha1/ciliumbgpnodeconfigoverride.go | 16 +- .../cilium.io/v2alpha1/ciliumbgppeerconfig.go | 16 +- .../v2alpha1/ciliumbgppeeringpolicy.go | 16 +- .../cilium.io/v2alpha1/ciliumcidrgroup.go | 16 +- .../cilium.io/v2alpha1/ciliumendpointslice.go | 16 +- .../v2alpha1/ciliuml2announcementpolicy.go | 16 +- .../v2alpha1/ciliumloadbalancerippool.go | 16 +- .../cilium.io/v2alpha1/ciliumnodeconfig.go | 16 +- .../cilium.io/v2alpha1/ciliumpodippool.go | 16 +- .../informers/externalversions/generic.go | 2 +- .../v2/ciliumclusterwideenvoyconfig.go | 16 +- .../v2/ciliumclusterwidenetworkpolicy.go | 16 +- .../cilium.io/v2/ciliumegressgatewaypolicy.go | 16 +- .../listers/cilium.io/v2/ciliumendpoint.go | 22 +-- .../listers/cilium.io/v2/ciliumenvoyconfig.go | 22 +-- .../cilium.io/v2/ciliumexternalworkload.go | 16 +- .../listers/cilium.io/v2/ciliumidentity.go | 16 +- .../cilium.io/v2/ciliumlocalredirectpolicy.go | 22 +-- .../cilium.io/v2/ciliumnetworkpolicy.go | 22 +-- .../client/listers/cilium.io/v2/ciliumnode.go | 16 +- .../listers/cilium.io/v2/ciliumnodeconfig.go | 22 +-- .../v2alpha1/ciliumbgpadvertisement.go | 16 +- .../v2alpha1/ciliumbgpclusterconfig.go | 16 +- .../cilium.io/v2alpha1/ciliumbgpnodeconfig.go | 16 +- .../v2alpha1/ciliumbgpnodeconfigoverride.go | 16 +- .../cilium.io/v2alpha1/ciliumbgppeerconfig.go | 16 +- .../v2alpha1/ciliumbgppeeringpolicy.go | 16 +- .../cilium.io/v2alpha1/ciliumcidrgroup.go | 16 +- .../cilium.io/v2alpha1/ciliumendpointslice.go | 16 +- .../v2alpha1/ciliuml2announcementpolicy.go | 16 +- .../v2alpha1/ciliumloadbalancerippool.go | 16 +- .../cilium.io/v2alpha1/ciliumnodeconfig.go | 22 +-- .../cilium.io/v2alpha1/ciliumpodippool.go | 16 +- .../clientset/versioned/clientset.go | 4 +- .../apiextensions/v1/apiextensions_client.go | 8 +- .../v1/customresourcedefinition.go | 24 +-- .../v1/fake/fake_customresourcedefinition.go | 2 +- .../v1/customresourcedefinition.go | 16 +- .../informers/externalversions/generic.go | 2 +- .../v1/customresourcedefinition.go | 16 +- .../client/clientset/versioned/clientset.go | 4 +- .../versioned/typed/core/v1/core_client.go | 8 +- .../versioned/typed/core/v1/endpoints.go | 22 +-- .../typed/core/v1/fake/fake_endpoints.go | 2 +- .../typed/core/v1/fake/fake_namespace.go | 2 +- .../versioned/typed/core/v1/fake/fake_node.go | 2 +- .../versioned/typed/core/v1/fake/fake_pod.go | 2 +- .../typed/core/v1/fake/fake_secret.go | 2 +- .../typed/core/v1/fake/fake_service.go | 2 +- .../versioned/typed/core/v1/namespace.go | 22 +-- .../clientset/versioned/typed/core/v1/node.go | 24 +-- .../clientset/versioned/typed/core/v1/pod.go | 30 +-- .../versioned/typed/core/v1/secret.go | 22 +-- .../versioned/typed/core/v1/service.go | 24 +-- .../typed/discovery/v1/discovery_client.go | 8 +- .../typed/discovery/v1/endpointslice.go | 22 +-- .../discovery/v1/fake/fake_endpointslice.go | 2 +- .../discovery/v1beta1/discovery_client.go | 8 +- .../typed/discovery/v1beta1/endpointslice.go | 22 +-- .../v1beta1/fake/fake_endpointslice.go | 2 +- .../networking/v1/fake/fake_networkpolicy.go | 2 +- .../typed/networking/v1/networking_client.go | 8 +- .../typed/networking/v1/networkpolicy.go | 22 +-- .../externalversions/core/v1/endpoints.go | 16 +- .../externalversions/core/v1/namespace.go | 16 +- .../externalversions/core/v1/node.go | 16 +- .../informers/externalversions/core/v1/pod.go | 16 +- .../externalversions/core/v1/secret.go | 16 +- .../externalversions/core/v1/service.go | 16 +- .../discovery/v1/endpointslice.go | 16 +- .../discovery/v1beta1/endpointslice.go | 16 +- .../informers/externalversions/generic.go | 2 +- .../networking/v1/networkpolicy.go | 16 +- .../k8s/client/listers/core/v1/endpoints.go | 22 +-- .../k8s/client/listers/core/v1/namespace.go | 16 +- .../slim/k8s/client/listers/core/v1/node.go | 16 +- .../slim/k8s/client/listers/core/v1/pod.go | 22 +-- .../slim/k8s/client/listers/core/v1/secret.go | 22 +-- .../k8s/client/listers/core/v1/service.go | 22 +-- .../listers/discovery/v1/endpointslice.go | 22 +-- .../discovery/v1beta1/endpointslice.go | 22 +-- .../listers/networking/v1/networkpolicy.go | 22 +-- .../generators/applyconfiguration.go | 33 ++-- .../generators/internal.go | 6 +- .../generators/targets.go | 6 +- .../generators/types.go | 2 + .../client-gen/generators/client_generator.go | 8 +- .../generators/fake/fake_client_generator.go | 8 +- .../fake/generator_fake_for_clientset.go | 1 - .../fake/generator_fake_for_type.go | 44 +++-- .../generators/generator_for_clientset.go | 6 +- .../generators/generator_for_group.go | 47 ++--- .../generators/generator_for_type.go | 136 +++++++------ .../conversion-gen/generators/conversion.go | 10 +- .../cmd/deepcopy-gen/generators/deepcopy.go | 14 +- .../cmd/defaulter-gen/generators/defaulter.go | 38 ++-- .../cmd/informer-gen/generators/generic.go | 4 +- .../cmd/informer-gen/generators/informer.go | 5 +- .../cmd/informer-gen/generators/targets.go | 12 +- .../cmd/informer-gen/generators/types.go | 2 + .../cmd/lister-gen/generators/lister.go | 34 ++-- .../cmd/register-gen/generators/targets.go | 2 +- vendor/k8s.io/gengo/args/args.go | 5 +- vendor/k8s.io/gengo/namer/import_tracker.go | 2 +- vendor/k8s.io/gengo/parser/parse.go | 9 +- vendor/k8s.io/gengo/parser/parse_122.go | 33 ++++ vendor/k8s.io/gengo/parser/parse_pre_122.go | 30 +++ vendor/k8s.io/gengo/v2/Makefile | 14 ++ vendor/k8s.io/gengo/v2/generator/execute.go | 9 +- .../gengo/v2/generator/import_tracker.go | 15 +- .../gengo/v2/generator/snippet_writer.go | 38 ++-- vendor/k8s.io/gengo/v2/namer/namer.go | 16 +- vendor/k8s.io/gengo/v2/parser/parse.go | 65 +++++- vendor/k8s.io/gengo/v2/parser/parse_122.go | 33 ++++ .../k8s.io/gengo/v2/parser/parse_pre_122.go | 30 +++ vendor/k8s.io/gengo/v2/types/types.go | 20 +- .../kube-openapi/pkg/generators/markers.go | 187 ++++++++++++++++-- .../kube-openapi/pkg/generators/openapi.go | 119 ++++++++++- vendor/modules.txt | 16 +- 185 files changed, 1854 insertions(+), 1298 deletions(-) create mode 100644 vendor/k8s.io/gengo/parser/parse_122.go create mode 100644 vendor/k8s.io/gengo/parser/parse_pre_122.go create mode 100644 vendor/k8s.io/gengo/v2/Makefile create mode 100644 vendor/k8s.io/gengo/v2/parser/parse_122.go create mode 100644 vendor/k8s.io/gengo/v2/parser/parse_pre_122.go diff --git a/Makefile.defs b/Makefile.defs index a69376a51fb49..2dc15496d021a 100644 --- a/Makefile.defs +++ b/Makefile.defs @@ -84,11 +84,6 @@ GO_BUILD_LDFLAGS ?= # go build/test -tags values GO_TAGS_FLAGS += osusergo -# Keep the Go <=1.22 semantics for parsing type aliases. -# This is needed for code generation (k8s protobuf, deep*) until 'gengo' has been fixed. -GODEBUG += gotypesalias=0 -export GODEBUG - # This is declared here as it is needed to change the covermode depending on if # RACE is specified. GOTEST_COVER_OPTS = diff --git a/go.mod b/go.mod index 20feb36b1966e..d7d2152e2d33c 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/bombsimon/logrusr/v4 v4.1.0 github.com/cilium/charts v0.0.0-20240905132853-a346c1504556 github.com/cilium/coverbee v0.3.3-0.20240723084546-664438750fce - github.com/cilium/deepequal-gen v0.0.0-20231116094812-0d6c075c335f + github.com/cilium/deepequal-gen v0.0.0-20240920134030-fe070c611b00 github.com/cilium/dns v1.1.51-0.20240603182237-af788769786a github.com/cilium/ebpf v0.16.0 github.com/cilium/endpointslice-controller v0.0.0-20240409203012-75cb5d61db1b @@ -319,9 +319,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gotest.tools/v3 v3.5.0 // indirect k8s.io/apiserver v0.31.1 // indirect - k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect - k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect - k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 // indirect + k8s.io/gengo v0.0.0-20240911193312-2b36238f13e9 // indirect + k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect + k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 // indirect k8s.io/kubectl v0.31.0 // indirect oras.land/oras-go v1.2.5 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect @@ -333,6 +333,10 @@ require ( replace ( go.universe.tf/metallb => github.com/cilium/metallb v0.1.1-0.20220829170633-5d7dfb1129f7 + k8s.io/code-generator => k8s.io/code-generator v0.30.0-alpha.3.0.20240920005538-61df8a8f0355 + + k8s.io/gengo => github.com/sayboras/gengo v0.0.0-20240920133050-8cd674ebf6a9 + // Using private fork of controller-tools. See commit msg for more context // as to why we are using a private fork. sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.16.1-1 diff --git a/go.sum b/go.sum index 8dccd24aaf139..2644521d3fc9d 100644 --- a/go.sum +++ b/go.sum @@ -149,8 +149,8 @@ github.com/cilium/controller-tools v0.16.1-1 h1:ICJKl0ci+ZG41BZwL1axxh5Ji7hielbE github.com/cilium/controller-tools v0.16.1-1/go.mod h1:0I0xqjR65YTfoO12iR+mZR6s6UAVcUARgXRlsu0ljB0= github.com/cilium/coverbee v0.3.3-0.20240723084546-664438750fce h1:gqzXY3NuHllVVDw9vD49mlXx+9bYFPlg23rdrkQNFDM= github.com/cilium/coverbee v0.3.3-0.20240723084546-664438750fce/go.mod h1:6RGqSqaXtkBGjm7na2bKFi52BeeGUuiT3178zeje4Ik= -github.com/cilium/deepequal-gen v0.0.0-20231116094812-0d6c075c335f h1:t1A8nGkbZcjLACtNGIkfhfnKgG7V83+Tzr1pMeoPuA8= -github.com/cilium/deepequal-gen v0.0.0-20231116094812-0d6c075c335f/go.mod h1:O4ERd4TTIfE/EKtiqESR2OQEiLwkDwBTW3zrbcQ4S3M= +github.com/cilium/deepequal-gen v0.0.0-20240920134030-fe070c611b00 h1:ZNzY5VEr+EvR8T8YnNMj5YK7wyIuciXUG2JY4q3iMkc= +github.com/cilium/deepequal-gen v0.0.0-20240920134030-fe070c611b00/go.mod h1:nnkeYLHcAIlqC4f+PHloXQM+49UvSYahXiEbrbgJSws= github.com/cilium/dns v1.1.51-0.20240603182237-af788769786a h1:PRGN7B+72mj3OtLL2DM3F/9jp+ItgqgNS7mecgCmwsQ= github.com/cilium/dns v1.1.51-0.20240603182237-af788769786a/go.mod h1:/7LC2GOgyXJ7maupZlaVIumYQiGPIgllSf6mA9sg6RU= github.com/cilium/ebpf v0.16.0 h1:+BiEnHL6Z7lXnlGUsXQPPAE7+kenAd4ES8MQ5min0Ok= @@ -412,8 +412,8 @@ github.com/google/licenseclassifier/v2 v2.0.0 h1:1Y57HHILNf4m0ABuMVb6xk4vAJYEUO0 github.com/google/licenseclassifier/v2 v2.0.0/go.mod h1:cOjbdH0kyC9R22sdQbYsFkto4NGCAc+ZSwbeThazEtM= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -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/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 h1:SJ+NtwL6QaZ21U+IrK7d0gGgpjGGvd2kz+FzTHVzdqI= @@ -689,6 +689,8 @@ github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/sayboras/gengo v0.0.0-20240920133050-8cd674ebf6a9 h1:znIRqILe4Uh18cyKHqGcG8gdh1pP+/gEwxOFPbanIeM= +github.com/sayboras/gengo v0.0.0-20240920133050-8cd674ebf6a9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= @@ -1106,21 +1108,19 @@ k8s.io/cli-runtime v0.31.1 h1:/ZmKhmZ6hNqDM+yf9s3Y4KEYakNXUn5sod2LWGGwCuk= k8s.io/cli-runtime v0.31.1/go.mod h1:pKv1cDIaq7ehWGuXQ+A//1OIF+7DI+xudXtExMCbe9U= k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= -k8s.io/code-generator v0.31.1 h1:GvkRZEP2g2UnB2QKT2Dgc/kYxIkDxCHENv2Q1itioVs= -k8s.io/code-generator v0.31.1/go.mod h1:oL2ky46L48osNqqZAeOcWWy0S5BXj50vVdwOtTefqIs= +k8s.io/code-generator v0.30.0-alpha.3.0.20240920005538-61df8a8f0355 h1:SQN+BXQKTpySN1sfv4XDMTLX7mTNI8WZRubtGpdY80w= +k8s.io/code-generator v0.30.0-alpha.3.0.20240920005538-61df8a8f0355/go.mod h1:2HXQ0xA0yPH06uoIjaZfcHSXIsyk8B63QfiQJD+fM50= k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= k8s.io/endpointslice v0.31.1 h1:bCzN47Fd+hei2mjwarMMBnFjRa7Sbth/zGnxBFI+/ik= k8s.io/endpointslice v0.31.1/go.mod h1:L+6WZHF9A8DV4T5146E5nR+quxAOYGZ6X0Vlofdkxw8= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= -k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 h1:Q8Z7VlGhcJgBHJHYugJ/K/7iB8a2eSxCyxdVjJp+lLY= -k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 h1:GKE9U8BH16uynoxQii0auTjmmmuZ3O0LFMN6S0lPPhI= +k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= k8s.io/kubectl v0.31.0 h1:kANwAAPVY02r4U4jARP/C+Q1sssCcN/1p9Nk+7BQKVg= k8s.io/kubectl v0.31.0/go.mod h1:pB47hhFypGsaHAPjlwrNbvhXgmuAr01ZBvAIIUaI8d4= k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 h1:b2FmK8YH+QEwq/Sy2uAEhmqL5nPfGYbJOcaqjeYYZoA= diff --git a/pkg/k8s/client/clientset/versioned/clientset.go b/pkg/k8s/client/clientset/versioned/clientset.go index 720686010ac90..bd6b644e13d05 100644 --- a/pkg/k8s/client/clientset/versioned/clientset.go +++ b/pkg/k8s/client/clientset/versioned/clientset.go @@ -6,8 +6,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" ciliumv2 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2" ciliumv2alpha1 "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go index cb6567440ebd6..c19b3f1dbcf30 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/cilium.io_client.go @@ -6,10 +6,10 @@ package v2 import ( - "net/http" + http "net/http" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -122,7 +122,7 @@ func New(c rest.Interface) *CiliumV2Client { } func setConfigDefaults(config *rest.Config) error { - gv := v2.SchemeGroupVersion + gv := ciliumiov2.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go index b5903aef732dd..5e8ff1656182e 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwideenvoyconfig.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,33 @@ type CiliumClusterwideEnvoyConfigsGetter interface { // CiliumClusterwideEnvoyConfigInterface has methods to work with CiliumClusterwideEnvoyConfig resources. type CiliumClusterwideEnvoyConfigInterface interface { - Create(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.CreateOptions) (*v2.CiliumClusterwideEnvoyConfig, error) - Update(ctx context.Context, ciliumClusterwideEnvoyConfig *v2.CiliumClusterwideEnvoyConfig, opts v1.UpdateOptions) (*v2.CiliumClusterwideEnvoyConfig, error) + Create(ctx context.Context, ciliumClusterwideEnvoyConfig *ciliumiov2.CiliumClusterwideEnvoyConfig, opts v1.CreateOptions) (*ciliumiov2.CiliumClusterwideEnvoyConfig, error) + Update(ctx context.Context, ciliumClusterwideEnvoyConfig *ciliumiov2.CiliumClusterwideEnvoyConfig, opts v1.UpdateOptions) (*ciliumiov2.CiliumClusterwideEnvoyConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumClusterwideEnvoyConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumClusterwideEnvoyConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumClusterwideEnvoyConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumClusterwideEnvoyConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideEnvoyConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumClusterwideEnvoyConfig, err error) CiliumClusterwideEnvoyConfigExpansion } // ciliumClusterwideEnvoyConfigs implements CiliumClusterwideEnvoyConfigInterface type ciliumClusterwideEnvoyConfigs struct { - *gentype.ClientWithList[*v2.CiliumClusterwideEnvoyConfig, *v2.CiliumClusterwideEnvoyConfigList] + *gentype.ClientWithList[*ciliumiov2.CiliumClusterwideEnvoyConfig, *ciliumiov2.CiliumClusterwideEnvoyConfigList] } // newCiliumClusterwideEnvoyConfigs returns a CiliumClusterwideEnvoyConfigs func newCiliumClusterwideEnvoyConfigs(c *CiliumV2Client) *ciliumClusterwideEnvoyConfigs { return &ciliumClusterwideEnvoyConfigs{ - gentype.NewClientWithList[*v2.CiliumClusterwideEnvoyConfig, *v2.CiliumClusterwideEnvoyConfigList]( + gentype.NewClientWithList[*ciliumiov2.CiliumClusterwideEnvoyConfig, *ciliumiov2.CiliumClusterwideEnvoyConfigList]( "ciliumclusterwideenvoyconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2.CiliumClusterwideEnvoyConfig { return &v2.CiliumClusterwideEnvoyConfig{} }, - func() *v2.CiliumClusterwideEnvoyConfigList { return &v2.CiliumClusterwideEnvoyConfigList{} }), + func() *ciliumiov2.CiliumClusterwideEnvoyConfig { return &ciliumiov2.CiliumClusterwideEnvoyConfig{} }, + func() *ciliumiov2.CiliumClusterwideEnvoyConfigList { + return &ciliumiov2.CiliumClusterwideEnvoyConfigList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go index c39e8cfc2b236..837b26354f8db 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumclusterwidenetworkpolicy.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,35 @@ type CiliumClusterwideNetworkPoliciesGetter interface { // CiliumClusterwideNetworkPolicyInterface has methods to work with CiliumClusterwideNetworkPolicy resources. type CiliumClusterwideNetworkPolicyInterface interface { - Create(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.CreateOptions) (*v2.CiliumClusterwideNetworkPolicy, error) - Update(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumClusterwideNetworkPolicy, error) + Create(ctx context.Context, ciliumClusterwideNetworkPolicy *ciliumiov2.CiliumClusterwideNetworkPolicy, opts v1.CreateOptions) (*ciliumiov2.CiliumClusterwideNetworkPolicy, error) + Update(ctx context.Context, ciliumClusterwideNetworkPolicy *ciliumiov2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (*ciliumiov2.CiliumClusterwideNetworkPolicy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumClusterwideNetworkPolicy *v2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumClusterwideNetworkPolicy, error) + UpdateStatus(ctx context.Context, ciliumClusterwideNetworkPolicy *ciliumiov2.CiliumClusterwideNetworkPolicy, opts v1.UpdateOptions) (*ciliumiov2.CiliumClusterwideNetworkPolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumClusterwideNetworkPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumClusterwideNetworkPolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumClusterwideNetworkPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumClusterwideNetworkPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumClusterwideNetworkPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumClusterwideNetworkPolicy, err error) CiliumClusterwideNetworkPolicyExpansion } // ciliumClusterwideNetworkPolicies implements CiliumClusterwideNetworkPolicyInterface type ciliumClusterwideNetworkPolicies struct { - *gentype.ClientWithList[*v2.CiliumClusterwideNetworkPolicy, *v2.CiliumClusterwideNetworkPolicyList] + *gentype.ClientWithList[*ciliumiov2.CiliumClusterwideNetworkPolicy, *ciliumiov2.CiliumClusterwideNetworkPolicyList] } // newCiliumClusterwideNetworkPolicies returns a CiliumClusterwideNetworkPolicies func newCiliumClusterwideNetworkPolicies(c *CiliumV2Client) *ciliumClusterwideNetworkPolicies { return &ciliumClusterwideNetworkPolicies{ - gentype.NewClientWithList[*v2.CiliumClusterwideNetworkPolicy, *v2.CiliumClusterwideNetworkPolicyList]( + gentype.NewClientWithList[*ciliumiov2.CiliumClusterwideNetworkPolicy, *ciliumiov2.CiliumClusterwideNetworkPolicyList]( "ciliumclusterwidenetworkpolicies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2.CiliumClusterwideNetworkPolicy { return &v2.CiliumClusterwideNetworkPolicy{} }, - func() *v2.CiliumClusterwideNetworkPolicyList { return &v2.CiliumClusterwideNetworkPolicyList{} }), + func() *ciliumiov2.CiliumClusterwideNetworkPolicy { return &ciliumiov2.CiliumClusterwideNetworkPolicy{} }, + func() *ciliumiov2.CiliumClusterwideNetworkPolicyList { + return &ciliumiov2.CiliumClusterwideNetworkPolicyList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go index b7ce13b0a68fe..72678522e7a24 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumegressgatewaypolicy.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumEgressGatewayPoliciesGetter interface { // CiliumEgressGatewayPolicyInterface has methods to work with CiliumEgressGatewayPolicy resources. type CiliumEgressGatewayPolicyInterface interface { - Create(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.CreateOptions) (*v2.CiliumEgressGatewayPolicy, error) - Update(ctx context.Context, ciliumEgressGatewayPolicy *v2.CiliumEgressGatewayPolicy, opts v1.UpdateOptions) (*v2.CiliumEgressGatewayPolicy, error) + Create(ctx context.Context, ciliumEgressGatewayPolicy *ciliumiov2.CiliumEgressGatewayPolicy, opts v1.CreateOptions) (*ciliumiov2.CiliumEgressGatewayPolicy, error) + Update(ctx context.Context, ciliumEgressGatewayPolicy *ciliumiov2.CiliumEgressGatewayPolicy, opts v1.UpdateOptions) (*ciliumiov2.CiliumEgressGatewayPolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumEgressGatewayPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumEgressGatewayPolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumEgressGatewayPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumEgressGatewayPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEgressGatewayPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumEgressGatewayPolicy, err error) CiliumEgressGatewayPolicyExpansion } // ciliumEgressGatewayPolicies implements CiliumEgressGatewayPolicyInterface type ciliumEgressGatewayPolicies struct { - *gentype.ClientWithList[*v2.CiliumEgressGatewayPolicy, *v2.CiliumEgressGatewayPolicyList] + *gentype.ClientWithList[*ciliumiov2.CiliumEgressGatewayPolicy, *ciliumiov2.CiliumEgressGatewayPolicyList] } // newCiliumEgressGatewayPolicies returns a CiliumEgressGatewayPolicies func newCiliumEgressGatewayPolicies(c *CiliumV2Client) *ciliumEgressGatewayPolicies { return &ciliumEgressGatewayPolicies{ - gentype.NewClientWithList[*v2.CiliumEgressGatewayPolicy, *v2.CiliumEgressGatewayPolicyList]( + gentype.NewClientWithList[*ciliumiov2.CiliumEgressGatewayPolicy, *ciliumiov2.CiliumEgressGatewayPolicyList]( "ciliumegressgatewaypolicies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2.CiliumEgressGatewayPolicy { return &v2.CiliumEgressGatewayPolicy{} }, - func() *v2.CiliumEgressGatewayPolicyList { return &v2.CiliumEgressGatewayPolicyList{} }), + func() *ciliumiov2.CiliumEgressGatewayPolicy { return &ciliumiov2.CiliumEgressGatewayPolicy{} }, + func() *ciliumiov2.CiliumEgressGatewayPolicyList { return &ciliumiov2.CiliumEgressGatewayPolicyList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go index 69aecf1f97333..465fbcb313b36 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumendpoint.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,33 @@ type CiliumEndpointsGetter interface { // CiliumEndpointInterface has methods to work with CiliumEndpoint resources. type CiliumEndpointInterface interface { - Create(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.CreateOptions) (*v2.CiliumEndpoint, error) - Update(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (*v2.CiliumEndpoint, error) + Create(ctx context.Context, ciliumEndpoint *ciliumiov2.CiliumEndpoint, opts v1.CreateOptions) (*ciliumiov2.CiliumEndpoint, error) + Update(ctx context.Context, ciliumEndpoint *ciliumiov2.CiliumEndpoint, opts v1.UpdateOptions) (*ciliumiov2.CiliumEndpoint, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumEndpoint *v2.CiliumEndpoint, opts v1.UpdateOptions) (*v2.CiliumEndpoint, error) + UpdateStatus(ctx context.Context, ciliumEndpoint *ciliumiov2.CiliumEndpoint, opts v1.UpdateOptions) (*ciliumiov2.CiliumEndpoint, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumEndpoint, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumEndpointList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumEndpoint, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumEndpointList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEndpoint, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumEndpoint, err error) CiliumEndpointExpansion } // ciliumEndpoints implements CiliumEndpointInterface type ciliumEndpoints struct { - *gentype.ClientWithList[*v2.CiliumEndpoint, *v2.CiliumEndpointList] + *gentype.ClientWithList[*ciliumiov2.CiliumEndpoint, *ciliumiov2.CiliumEndpointList] } // newCiliumEndpoints returns a CiliumEndpoints func newCiliumEndpoints(c *CiliumV2Client, namespace string) *ciliumEndpoints { return &ciliumEndpoints{ - gentype.NewClientWithList[*v2.CiliumEndpoint, *v2.CiliumEndpointList]( + gentype.NewClientWithList[*ciliumiov2.CiliumEndpoint, *ciliumiov2.CiliumEndpointList]( "ciliumendpoints", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v2.CiliumEndpoint { return &v2.CiliumEndpoint{} }, - func() *v2.CiliumEndpointList { return &v2.CiliumEndpointList{} }), + func() *ciliumiov2.CiliumEndpoint { return &ciliumiov2.CiliumEndpoint{} }, + func() *ciliumiov2.CiliumEndpointList { return &ciliumiov2.CiliumEndpointList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go index 17ff408629d08..0689645fb3123 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumenvoyconfig.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumEnvoyConfigsGetter interface { // CiliumEnvoyConfigInterface has methods to work with CiliumEnvoyConfig resources. type CiliumEnvoyConfigInterface interface { - Create(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.CreateOptions) (*v2.CiliumEnvoyConfig, error) - Update(ctx context.Context, ciliumEnvoyConfig *v2.CiliumEnvoyConfig, opts v1.UpdateOptions) (*v2.CiliumEnvoyConfig, error) + Create(ctx context.Context, ciliumEnvoyConfig *ciliumiov2.CiliumEnvoyConfig, opts v1.CreateOptions) (*ciliumiov2.CiliumEnvoyConfig, error) + Update(ctx context.Context, ciliumEnvoyConfig *ciliumiov2.CiliumEnvoyConfig, opts v1.UpdateOptions) (*ciliumiov2.CiliumEnvoyConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumEnvoyConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumEnvoyConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumEnvoyConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumEnvoyConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumEnvoyConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumEnvoyConfig, err error) CiliumEnvoyConfigExpansion } // ciliumEnvoyConfigs implements CiliumEnvoyConfigInterface type ciliumEnvoyConfigs struct { - *gentype.ClientWithList[*v2.CiliumEnvoyConfig, *v2.CiliumEnvoyConfigList] + *gentype.ClientWithList[*ciliumiov2.CiliumEnvoyConfig, *ciliumiov2.CiliumEnvoyConfigList] } // newCiliumEnvoyConfigs returns a CiliumEnvoyConfigs func newCiliumEnvoyConfigs(c *CiliumV2Client, namespace string) *ciliumEnvoyConfigs { return &ciliumEnvoyConfigs{ - gentype.NewClientWithList[*v2.CiliumEnvoyConfig, *v2.CiliumEnvoyConfigList]( + gentype.NewClientWithList[*ciliumiov2.CiliumEnvoyConfig, *ciliumiov2.CiliumEnvoyConfigList]( "ciliumenvoyconfigs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v2.CiliumEnvoyConfig { return &v2.CiliumEnvoyConfig{} }, - func() *v2.CiliumEnvoyConfigList { return &v2.CiliumEnvoyConfigList{} }), + func() *ciliumiov2.CiliumEnvoyConfig { return &ciliumiov2.CiliumEnvoyConfig{} }, + func() *ciliumiov2.CiliumEnvoyConfigList { return &ciliumiov2.CiliumEnvoyConfigList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go index 17e04520c94eb..a6accef90d806 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumexternalworkload.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,33 @@ type CiliumExternalWorkloadsGetter interface { // CiliumExternalWorkloadInterface has methods to work with CiliumExternalWorkload resources. type CiliumExternalWorkloadInterface interface { - Create(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.CreateOptions) (*v2.CiliumExternalWorkload, error) - Update(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (*v2.CiliumExternalWorkload, error) + Create(ctx context.Context, ciliumExternalWorkload *ciliumiov2.CiliumExternalWorkload, opts v1.CreateOptions) (*ciliumiov2.CiliumExternalWorkload, error) + Update(ctx context.Context, ciliumExternalWorkload *ciliumiov2.CiliumExternalWorkload, opts v1.UpdateOptions) (*ciliumiov2.CiliumExternalWorkload, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumExternalWorkload *v2.CiliumExternalWorkload, opts v1.UpdateOptions) (*v2.CiliumExternalWorkload, error) + UpdateStatus(ctx context.Context, ciliumExternalWorkload *ciliumiov2.CiliumExternalWorkload, opts v1.UpdateOptions) (*ciliumiov2.CiliumExternalWorkload, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumExternalWorkload, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumExternalWorkloadList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumExternalWorkload, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumExternalWorkloadList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumExternalWorkload, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumExternalWorkload, err error) CiliumExternalWorkloadExpansion } // ciliumExternalWorkloads implements CiliumExternalWorkloadInterface type ciliumExternalWorkloads struct { - *gentype.ClientWithList[*v2.CiliumExternalWorkload, *v2.CiliumExternalWorkloadList] + *gentype.ClientWithList[*ciliumiov2.CiliumExternalWorkload, *ciliumiov2.CiliumExternalWorkloadList] } // newCiliumExternalWorkloads returns a CiliumExternalWorkloads func newCiliumExternalWorkloads(c *CiliumV2Client) *ciliumExternalWorkloads { return &ciliumExternalWorkloads{ - gentype.NewClientWithList[*v2.CiliumExternalWorkload, *v2.CiliumExternalWorkloadList]( + gentype.NewClientWithList[*ciliumiov2.CiliumExternalWorkload, *ciliumiov2.CiliumExternalWorkloadList]( "ciliumexternalworkloads", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2.CiliumExternalWorkload { return &v2.CiliumExternalWorkload{} }, - func() *v2.CiliumExternalWorkloadList { return &v2.CiliumExternalWorkloadList{} }), + func() *ciliumiov2.CiliumExternalWorkload { return &ciliumiov2.CiliumExternalWorkload{} }, + func() *ciliumiov2.CiliumExternalWorkloadList { return &ciliumiov2.CiliumExternalWorkloadList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go index a57453fa1bdfa..be8706d3b9c82 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumidentity.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumIdentitiesGetter interface { // CiliumIdentityInterface has methods to work with CiliumIdentity resources. type CiliumIdentityInterface interface { - Create(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.CreateOptions) (*v2.CiliumIdentity, error) - Update(ctx context.Context, ciliumIdentity *v2.CiliumIdentity, opts v1.UpdateOptions) (*v2.CiliumIdentity, error) + Create(ctx context.Context, ciliumIdentity *ciliumiov2.CiliumIdentity, opts v1.CreateOptions) (*ciliumiov2.CiliumIdentity, error) + Update(ctx context.Context, ciliumIdentity *ciliumiov2.CiliumIdentity, opts v1.UpdateOptions) (*ciliumiov2.CiliumIdentity, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumIdentity, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumIdentityList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumIdentity, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumIdentityList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumIdentity, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumIdentity, err error) CiliumIdentityExpansion } // ciliumIdentities implements CiliumIdentityInterface type ciliumIdentities struct { - *gentype.ClientWithList[*v2.CiliumIdentity, *v2.CiliumIdentityList] + *gentype.ClientWithList[*ciliumiov2.CiliumIdentity, *ciliumiov2.CiliumIdentityList] } // newCiliumIdentities returns a CiliumIdentities func newCiliumIdentities(c *CiliumV2Client) *ciliumIdentities { return &ciliumIdentities{ - gentype.NewClientWithList[*v2.CiliumIdentity, *v2.CiliumIdentityList]( + gentype.NewClientWithList[*ciliumiov2.CiliumIdentity, *ciliumiov2.CiliumIdentityList]( "ciliumidentities", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2.CiliumIdentity { return &v2.CiliumIdentity{} }, - func() *v2.CiliumIdentityList { return &v2.CiliumIdentityList{} }), + func() *ciliumiov2.CiliumIdentity { return &ciliumiov2.CiliumIdentity{} }, + func() *ciliumiov2.CiliumIdentityList { return &ciliumiov2.CiliumIdentityList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go index df1fe7c13ef01..9f5667fa9eb61 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumlocalredirectpolicy.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,33 @@ type CiliumLocalRedirectPoliciesGetter interface { // CiliumLocalRedirectPolicyInterface has methods to work with CiliumLocalRedirectPolicy resources. type CiliumLocalRedirectPolicyInterface interface { - Create(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.CreateOptions) (*v2.CiliumLocalRedirectPolicy, error) - Update(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (*v2.CiliumLocalRedirectPolicy, error) + Create(ctx context.Context, ciliumLocalRedirectPolicy *ciliumiov2.CiliumLocalRedirectPolicy, opts v1.CreateOptions) (*ciliumiov2.CiliumLocalRedirectPolicy, error) + Update(ctx context.Context, ciliumLocalRedirectPolicy *ciliumiov2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (*ciliumiov2.CiliumLocalRedirectPolicy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumLocalRedirectPolicy *v2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (*v2.CiliumLocalRedirectPolicy, error) + UpdateStatus(ctx context.Context, ciliumLocalRedirectPolicy *ciliumiov2.CiliumLocalRedirectPolicy, opts v1.UpdateOptions) (*ciliumiov2.CiliumLocalRedirectPolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumLocalRedirectPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumLocalRedirectPolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumLocalRedirectPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumLocalRedirectPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumLocalRedirectPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumLocalRedirectPolicy, err error) CiliumLocalRedirectPolicyExpansion } // ciliumLocalRedirectPolicies implements CiliumLocalRedirectPolicyInterface type ciliumLocalRedirectPolicies struct { - *gentype.ClientWithList[*v2.CiliumLocalRedirectPolicy, *v2.CiliumLocalRedirectPolicyList] + *gentype.ClientWithList[*ciliumiov2.CiliumLocalRedirectPolicy, *ciliumiov2.CiliumLocalRedirectPolicyList] } // newCiliumLocalRedirectPolicies returns a CiliumLocalRedirectPolicies func newCiliumLocalRedirectPolicies(c *CiliumV2Client, namespace string) *ciliumLocalRedirectPolicies { return &ciliumLocalRedirectPolicies{ - gentype.NewClientWithList[*v2.CiliumLocalRedirectPolicy, *v2.CiliumLocalRedirectPolicyList]( + gentype.NewClientWithList[*ciliumiov2.CiliumLocalRedirectPolicy, *ciliumiov2.CiliumLocalRedirectPolicyList]( "ciliumlocalredirectpolicies", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v2.CiliumLocalRedirectPolicy { return &v2.CiliumLocalRedirectPolicy{} }, - func() *v2.CiliumLocalRedirectPolicyList { return &v2.CiliumLocalRedirectPolicyList{} }), + func() *ciliumiov2.CiliumLocalRedirectPolicy { return &ciliumiov2.CiliumLocalRedirectPolicy{} }, + func() *ciliumiov2.CiliumLocalRedirectPolicyList { return &ciliumiov2.CiliumLocalRedirectPolicyList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go index dc955aad0e67a..465f8e5485586 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnetworkpolicy.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,33 @@ type CiliumNetworkPoliciesGetter interface { // CiliumNetworkPolicyInterface has methods to work with CiliumNetworkPolicy resources. type CiliumNetworkPolicyInterface interface { - Create(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.CreateOptions) (*v2.CiliumNetworkPolicy, error) - Update(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumNetworkPolicy, error) + Create(ctx context.Context, ciliumNetworkPolicy *ciliumiov2.CiliumNetworkPolicy, opts v1.CreateOptions) (*ciliumiov2.CiliumNetworkPolicy, error) + Update(ctx context.Context, ciliumNetworkPolicy *ciliumiov2.CiliumNetworkPolicy, opts v1.UpdateOptions) (*ciliumiov2.CiliumNetworkPolicy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumNetworkPolicy *v2.CiliumNetworkPolicy, opts v1.UpdateOptions) (*v2.CiliumNetworkPolicy, error) + UpdateStatus(ctx context.Context, ciliumNetworkPolicy *ciliumiov2.CiliumNetworkPolicy, opts v1.UpdateOptions) (*ciliumiov2.CiliumNetworkPolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumNetworkPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumNetworkPolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumNetworkPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumNetworkPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNetworkPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumNetworkPolicy, err error) CiliumNetworkPolicyExpansion } // ciliumNetworkPolicies implements CiliumNetworkPolicyInterface type ciliumNetworkPolicies struct { - *gentype.ClientWithList[*v2.CiliumNetworkPolicy, *v2.CiliumNetworkPolicyList] + *gentype.ClientWithList[*ciliumiov2.CiliumNetworkPolicy, *ciliumiov2.CiliumNetworkPolicyList] } // newCiliumNetworkPolicies returns a CiliumNetworkPolicies func newCiliumNetworkPolicies(c *CiliumV2Client, namespace string) *ciliumNetworkPolicies { return &ciliumNetworkPolicies{ - gentype.NewClientWithList[*v2.CiliumNetworkPolicy, *v2.CiliumNetworkPolicyList]( + gentype.NewClientWithList[*ciliumiov2.CiliumNetworkPolicy, *ciliumiov2.CiliumNetworkPolicyList]( "ciliumnetworkpolicies", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v2.CiliumNetworkPolicy { return &v2.CiliumNetworkPolicy{} }, - func() *v2.CiliumNetworkPolicyList { return &v2.CiliumNetworkPolicyList{} }), + func() *ciliumiov2.CiliumNetworkPolicy { return &ciliumiov2.CiliumNetworkPolicy{} }, + func() *ciliumiov2.CiliumNetworkPolicyList { return &ciliumiov2.CiliumNetworkPolicyList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go index 7b4efd08c2ce1..c0137acc0adf9 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnode.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,33 @@ type CiliumNodesGetter interface { // CiliumNodeInterface has methods to work with CiliumNode resources. type CiliumNodeInterface interface { - Create(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.CreateOptions) (*v2.CiliumNode, error) - Update(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (*v2.CiliumNode, error) + Create(ctx context.Context, ciliumNode *ciliumiov2.CiliumNode, opts v1.CreateOptions) (*ciliumiov2.CiliumNode, error) + Update(ctx context.Context, ciliumNode *ciliumiov2.CiliumNode, opts v1.UpdateOptions) (*ciliumiov2.CiliumNode, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumNode *v2.CiliumNode, opts v1.UpdateOptions) (*v2.CiliumNode, error) + UpdateStatus(ctx context.Context, ciliumNode *ciliumiov2.CiliumNode, opts v1.UpdateOptions) (*ciliumiov2.CiliumNode, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumNode, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumNodeList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumNode, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumNodeList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNode, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumNode, err error) CiliumNodeExpansion } // ciliumNodes implements CiliumNodeInterface type ciliumNodes struct { - *gentype.ClientWithList[*v2.CiliumNode, *v2.CiliumNodeList] + *gentype.ClientWithList[*ciliumiov2.CiliumNode, *ciliumiov2.CiliumNodeList] } // newCiliumNodes returns a CiliumNodes func newCiliumNodes(c *CiliumV2Client) *ciliumNodes { return &ciliumNodes{ - gentype.NewClientWithList[*v2.CiliumNode, *v2.CiliumNodeList]( + gentype.NewClientWithList[*ciliumiov2.CiliumNode, *ciliumiov2.CiliumNodeList]( "ciliumnodes", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2.CiliumNode { return &v2.CiliumNode{} }, - func() *v2.CiliumNodeList { return &v2.CiliumNodeList{} }), + func() *ciliumiov2.CiliumNode { return &ciliumiov2.CiliumNode{} }, + func() *ciliumiov2.CiliumNodeList { return &ciliumiov2.CiliumNodeList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnodeconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnodeconfig.go index 41352afcd1849..bade390b810e7 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnodeconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/ciliumnodeconfig.go @@ -6,9 +6,9 @@ package v2 import ( - "context" + context "context" - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumNodeConfigsGetter interface { // CiliumNodeConfigInterface has methods to work with CiliumNodeConfig resources. type CiliumNodeConfigInterface interface { - Create(ctx context.Context, ciliumNodeConfig *v2.CiliumNodeConfig, opts v1.CreateOptions) (*v2.CiliumNodeConfig, error) - Update(ctx context.Context, ciliumNodeConfig *v2.CiliumNodeConfig, opts v1.UpdateOptions) (*v2.CiliumNodeConfig, error) + Create(ctx context.Context, ciliumNodeConfig *ciliumiov2.CiliumNodeConfig, opts v1.CreateOptions) (*ciliumiov2.CiliumNodeConfig, error) + Update(ctx context.Context, ciliumNodeConfig *ciliumiov2.CiliumNodeConfig, opts v1.UpdateOptions) (*ciliumiov2.CiliumNodeConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.CiliumNodeConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2.CiliumNodeConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2.CiliumNodeConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2.CiliumNodeConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.CiliumNodeConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2.CiliumNodeConfig, err error) CiliumNodeConfigExpansion } // ciliumNodeConfigs implements CiliumNodeConfigInterface type ciliumNodeConfigs struct { - *gentype.ClientWithList[*v2.CiliumNodeConfig, *v2.CiliumNodeConfigList] + *gentype.ClientWithList[*ciliumiov2.CiliumNodeConfig, *ciliumiov2.CiliumNodeConfigList] } // newCiliumNodeConfigs returns a CiliumNodeConfigs func newCiliumNodeConfigs(c *CiliumV2Client, namespace string) *ciliumNodeConfigs { return &ciliumNodeConfigs{ - gentype.NewClientWithList[*v2.CiliumNodeConfig, *v2.CiliumNodeConfigList]( + gentype.NewClientWithList[*ciliumiov2.CiliumNodeConfig, *ciliumiov2.CiliumNodeConfigList]( "ciliumnodeconfigs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v2.CiliumNodeConfig { return &v2.CiliumNodeConfig{} }, - func() *v2.CiliumNodeConfigList { return &v2.CiliumNodeConfigList{} }), + func() *ciliumiov2.CiliumNodeConfig { return &ciliumiov2.CiliumNodeConfig{} }, + func() *ciliumiov2.CiliumNodeConfigList { return &ciliumiov2.CiliumNodeConfigList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go index 118437894283f..1011b0b23ec11 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwideenvoyconfig.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go index d01302fc9b952..33f2d414c9f44 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumclusterwidenetworkpolicy.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go index c764e1bbc2c7d..516906ba67441 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumegressgatewaypolicy.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go index 8e03928026b4a..bac3a8c083e8f 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumendpoint.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go index dbc7e396c121f..503a36d38a03c 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumenvoyconfig.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go index d025ad416f851..36f78eb5720b3 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumexternalworkload.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go index e809859c57802..26eeca5e3fb95 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumidentity.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go index 1942cf4dd4662..065593df5f9e6 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumlocalredirectpolicy.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go index 27b29b2d6dbe0..fc348be7961a7 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnetworkpolicy.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go index 8e9f2b84fc14a..0f31a4834390a 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnode.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnodeconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnodeconfig.go index 9a12d89a081b5..28693ed0e401f 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnodeconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2/fake/fake_ciliumnodeconfig.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go index a217d05b8e0da..0a1b9b796bdd0 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/cilium.io_client.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - "net/http" + http "net/http" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -127,7 +127,7 @@ func New(c rest.Interface) *CiliumV2alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v2alpha1.SchemeGroupVersion + gv := ciliumiov2alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go index 67901294880f0..4b0569a824b5a 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpadvertisement.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,33 @@ type CiliumBGPAdvertisementsGetter interface { // CiliumBGPAdvertisementInterface has methods to work with CiliumBGPAdvertisement resources. type CiliumBGPAdvertisementInterface interface { - Create(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.CreateOptions) (*v2alpha1.CiliumBGPAdvertisement, error) - Update(ctx context.Context, ciliumBGPAdvertisement *v2alpha1.CiliumBGPAdvertisement, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPAdvertisement, error) + Create(ctx context.Context, ciliumBGPAdvertisement *ciliumiov2alpha1.CiliumBGPAdvertisement, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumBGPAdvertisement, error) + Update(ctx context.Context, ciliumBGPAdvertisement *ciliumiov2alpha1.CiliumBGPAdvertisement, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumBGPAdvertisement, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPAdvertisement, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPAdvertisementList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumBGPAdvertisement, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumBGPAdvertisementList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPAdvertisement, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumBGPAdvertisement, err error) CiliumBGPAdvertisementExpansion } // ciliumBGPAdvertisements implements CiliumBGPAdvertisementInterface type ciliumBGPAdvertisements struct { - *gentype.ClientWithList[*v2alpha1.CiliumBGPAdvertisement, *v2alpha1.CiliumBGPAdvertisementList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumBGPAdvertisement, *ciliumiov2alpha1.CiliumBGPAdvertisementList] } // newCiliumBGPAdvertisements returns a CiliumBGPAdvertisements func newCiliumBGPAdvertisements(c *CiliumV2alpha1Client) *ciliumBGPAdvertisements { return &ciliumBGPAdvertisements{ - gentype.NewClientWithList[*v2alpha1.CiliumBGPAdvertisement, *v2alpha1.CiliumBGPAdvertisementList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumBGPAdvertisement, *ciliumiov2alpha1.CiliumBGPAdvertisementList]( "ciliumbgpadvertisements", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumBGPAdvertisement { return &v2alpha1.CiliumBGPAdvertisement{} }, - func() *v2alpha1.CiliumBGPAdvertisementList { return &v2alpha1.CiliumBGPAdvertisementList{} }), + func() *ciliumiov2alpha1.CiliumBGPAdvertisement { return &ciliumiov2alpha1.CiliumBGPAdvertisement{} }, + func() *ciliumiov2alpha1.CiliumBGPAdvertisementList { + return &ciliumiov2alpha1.CiliumBGPAdvertisementList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go index 95fe53344f8c9..7e93f0ca88826 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpclusterconfig.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,33 @@ type CiliumBGPClusterConfigsGetter interface { // CiliumBGPClusterConfigInterface has methods to work with CiliumBGPClusterConfig resources. type CiliumBGPClusterConfigInterface interface { - Create(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.CreateOptions) (*v2alpha1.CiliumBGPClusterConfig, error) - Update(ctx context.Context, ciliumBGPClusterConfig *v2alpha1.CiliumBGPClusterConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPClusterConfig, error) + Create(ctx context.Context, ciliumBGPClusterConfig *ciliumiov2alpha1.CiliumBGPClusterConfig, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumBGPClusterConfig, error) + Update(ctx context.Context, ciliumBGPClusterConfig *ciliumiov2alpha1.CiliumBGPClusterConfig, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumBGPClusterConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPClusterConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPClusterConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumBGPClusterConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumBGPClusterConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPClusterConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumBGPClusterConfig, err error) CiliumBGPClusterConfigExpansion } // ciliumBGPClusterConfigs implements CiliumBGPClusterConfigInterface type ciliumBGPClusterConfigs struct { - *gentype.ClientWithList[*v2alpha1.CiliumBGPClusterConfig, *v2alpha1.CiliumBGPClusterConfigList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumBGPClusterConfig, *ciliumiov2alpha1.CiliumBGPClusterConfigList] } // newCiliumBGPClusterConfigs returns a CiliumBGPClusterConfigs func newCiliumBGPClusterConfigs(c *CiliumV2alpha1Client) *ciliumBGPClusterConfigs { return &ciliumBGPClusterConfigs{ - gentype.NewClientWithList[*v2alpha1.CiliumBGPClusterConfig, *v2alpha1.CiliumBGPClusterConfigList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumBGPClusterConfig, *ciliumiov2alpha1.CiliumBGPClusterConfigList]( "ciliumbgpclusterconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumBGPClusterConfig { return &v2alpha1.CiliumBGPClusterConfig{} }, - func() *v2alpha1.CiliumBGPClusterConfigList { return &v2alpha1.CiliumBGPClusterConfigList{} }), + func() *ciliumiov2alpha1.CiliumBGPClusterConfig { return &ciliumiov2alpha1.CiliumBGPClusterConfig{} }, + func() *ciliumiov2alpha1.CiliumBGPClusterConfigList { + return &ciliumiov2alpha1.CiliumBGPClusterConfigList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go index 15b1aa0337efb..64f715676c3f4 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfig.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,33 @@ type CiliumBGPNodeConfigsGetter interface { // CiliumBGPNodeConfigInterface has methods to work with CiliumBGPNodeConfig resources. type CiliumBGPNodeConfigInterface interface { - Create(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.CreateOptions) (*v2alpha1.CiliumBGPNodeConfig, error) - Update(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPNodeConfig, error) + Create(ctx context.Context, ciliumBGPNodeConfig *ciliumiov2alpha1.CiliumBGPNodeConfig, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfig, error) + Update(ctx context.Context, ciliumBGPNodeConfig *ciliumiov2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumBGPNodeConfig *v2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPNodeConfig, error) + UpdateStatus(ctx context.Context, ciliumBGPNodeConfig *ciliumiov2alpha1.CiliumBGPNodeConfig, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPNodeConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPNodeConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumBGPNodeConfig, err error) CiliumBGPNodeConfigExpansion } // ciliumBGPNodeConfigs implements CiliumBGPNodeConfigInterface type ciliumBGPNodeConfigs struct { - *gentype.ClientWithList[*v2alpha1.CiliumBGPNodeConfig, *v2alpha1.CiliumBGPNodeConfigList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumBGPNodeConfig, *ciliumiov2alpha1.CiliumBGPNodeConfigList] } // newCiliumBGPNodeConfigs returns a CiliumBGPNodeConfigs func newCiliumBGPNodeConfigs(c *CiliumV2alpha1Client) *ciliumBGPNodeConfigs { return &ciliumBGPNodeConfigs{ - gentype.NewClientWithList[*v2alpha1.CiliumBGPNodeConfig, *v2alpha1.CiliumBGPNodeConfigList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumBGPNodeConfig, *ciliumiov2alpha1.CiliumBGPNodeConfigList]( "ciliumbgpnodeconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumBGPNodeConfig { return &v2alpha1.CiliumBGPNodeConfig{} }, - func() *v2alpha1.CiliumBGPNodeConfigList { return &v2alpha1.CiliumBGPNodeConfigList{} }), + func() *ciliumiov2alpha1.CiliumBGPNodeConfig { return &ciliumiov2alpha1.CiliumBGPNodeConfig{} }, + func() *ciliumiov2alpha1.CiliumBGPNodeConfigList { return &ciliumiov2alpha1.CiliumBGPNodeConfigList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go index eb9bfa1b01b90..6c01aea7da820 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,35 @@ type CiliumBGPNodeConfigOverridesGetter interface { // CiliumBGPNodeConfigOverrideInterface has methods to work with CiliumBGPNodeConfigOverride resources. type CiliumBGPNodeConfigOverrideInterface interface { - Create(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.CreateOptions) (*v2alpha1.CiliumBGPNodeConfigOverride, error) - Update(ctx context.Context, ciliumBGPNodeConfigOverride *v2alpha1.CiliumBGPNodeConfigOverride, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPNodeConfigOverride, error) + Create(ctx context.Context, ciliumBGPNodeConfigOverride *ciliumiov2alpha1.CiliumBGPNodeConfigOverride, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfigOverride, error) + Update(ctx context.Context, ciliumBGPNodeConfigOverride *ciliumiov2alpha1.CiliumBGPNodeConfigOverride, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfigOverride, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPNodeConfigOverride, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPNodeConfigOverrideList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfigOverride, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumBGPNodeConfigOverrideList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPNodeConfigOverride, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumBGPNodeConfigOverride, err error) CiliumBGPNodeConfigOverrideExpansion } // ciliumBGPNodeConfigOverrides implements CiliumBGPNodeConfigOverrideInterface type ciliumBGPNodeConfigOverrides struct { - *gentype.ClientWithList[*v2alpha1.CiliumBGPNodeConfigOverride, *v2alpha1.CiliumBGPNodeConfigOverrideList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumBGPNodeConfigOverride, *ciliumiov2alpha1.CiliumBGPNodeConfigOverrideList] } // newCiliumBGPNodeConfigOverrides returns a CiliumBGPNodeConfigOverrides func newCiliumBGPNodeConfigOverrides(c *CiliumV2alpha1Client) *ciliumBGPNodeConfigOverrides { return &ciliumBGPNodeConfigOverrides{ - gentype.NewClientWithList[*v2alpha1.CiliumBGPNodeConfigOverride, *v2alpha1.CiliumBGPNodeConfigOverrideList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumBGPNodeConfigOverride, *ciliumiov2alpha1.CiliumBGPNodeConfigOverrideList]( "ciliumbgpnodeconfigoverrides", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumBGPNodeConfigOverride { return &v2alpha1.CiliumBGPNodeConfigOverride{} }, - func() *v2alpha1.CiliumBGPNodeConfigOverrideList { return &v2alpha1.CiliumBGPNodeConfigOverrideList{} }), + func() *ciliumiov2alpha1.CiliumBGPNodeConfigOverride { + return &ciliumiov2alpha1.CiliumBGPNodeConfigOverride{} + }, + func() *ciliumiov2alpha1.CiliumBGPNodeConfigOverrideList { + return &ciliumiov2alpha1.CiliumBGPNodeConfigOverrideList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go index 8b5c9f3ce9fca..d3c60bdcb47fe 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeerconfig.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumBGPPeerConfigsGetter interface { // CiliumBGPPeerConfigInterface has methods to work with CiliumBGPPeerConfig resources. type CiliumBGPPeerConfigInterface interface { - Create(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.CreateOptions) (*v2alpha1.CiliumBGPPeerConfig, error) - Update(ctx context.Context, ciliumBGPPeerConfig *v2alpha1.CiliumBGPPeerConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPPeerConfig, error) + Create(ctx context.Context, ciliumBGPPeerConfig *ciliumiov2alpha1.CiliumBGPPeerConfig, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumBGPPeerConfig, error) + Update(ctx context.Context, ciliumBGPPeerConfig *ciliumiov2alpha1.CiliumBGPPeerConfig, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumBGPPeerConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPPeerConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPPeerConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumBGPPeerConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumBGPPeerConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeerConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumBGPPeerConfig, err error) CiliumBGPPeerConfigExpansion } // ciliumBGPPeerConfigs implements CiliumBGPPeerConfigInterface type ciliumBGPPeerConfigs struct { - *gentype.ClientWithList[*v2alpha1.CiliumBGPPeerConfig, *v2alpha1.CiliumBGPPeerConfigList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumBGPPeerConfig, *ciliumiov2alpha1.CiliumBGPPeerConfigList] } // newCiliumBGPPeerConfigs returns a CiliumBGPPeerConfigs func newCiliumBGPPeerConfigs(c *CiliumV2alpha1Client) *ciliumBGPPeerConfigs { return &ciliumBGPPeerConfigs{ - gentype.NewClientWithList[*v2alpha1.CiliumBGPPeerConfig, *v2alpha1.CiliumBGPPeerConfigList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumBGPPeerConfig, *ciliumiov2alpha1.CiliumBGPPeerConfigList]( "ciliumbgppeerconfigs", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumBGPPeerConfig { return &v2alpha1.CiliumBGPPeerConfig{} }, - func() *v2alpha1.CiliumBGPPeerConfigList { return &v2alpha1.CiliumBGPPeerConfigList{} }), + func() *ciliumiov2alpha1.CiliumBGPPeerConfig { return &ciliumiov2alpha1.CiliumBGPPeerConfig{} }, + func() *ciliumiov2alpha1.CiliumBGPPeerConfigList { return &ciliumiov2alpha1.CiliumBGPPeerConfigList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go index 38810278854a9..13c96bbcc4a41 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,33 @@ type CiliumBGPPeeringPoliciesGetter interface { // CiliumBGPPeeringPolicyInterface has methods to work with CiliumBGPPeeringPolicy resources. type CiliumBGPPeeringPolicyInterface interface { - Create(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.CreateOptions) (*v2alpha1.CiliumBGPPeeringPolicy, error) - Update(ctx context.Context, ciliumBGPPeeringPolicy *v2alpha1.CiliumBGPPeeringPolicy, opts v1.UpdateOptions) (*v2alpha1.CiliumBGPPeeringPolicy, error) + Create(ctx context.Context, ciliumBGPPeeringPolicy *ciliumiov2alpha1.CiliumBGPPeeringPolicy, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumBGPPeeringPolicy, error) + Update(ctx context.Context, ciliumBGPPeeringPolicy *ciliumiov2alpha1.CiliumBGPPeeringPolicy, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumBGPPeeringPolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumBGPPeeringPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumBGPPeeringPolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumBGPPeeringPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumBGPPeeringPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumBGPPeeringPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumBGPPeeringPolicy, err error) CiliumBGPPeeringPolicyExpansion } // ciliumBGPPeeringPolicies implements CiliumBGPPeeringPolicyInterface type ciliumBGPPeeringPolicies struct { - *gentype.ClientWithList[*v2alpha1.CiliumBGPPeeringPolicy, *v2alpha1.CiliumBGPPeeringPolicyList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumBGPPeeringPolicy, *ciliumiov2alpha1.CiliumBGPPeeringPolicyList] } // newCiliumBGPPeeringPolicies returns a CiliumBGPPeeringPolicies func newCiliumBGPPeeringPolicies(c *CiliumV2alpha1Client) *ciliumBGPPeeringPolicies { return &ciliumBGPPeeringPolicies{ - gentype.NewClientWithList[*v2alpha1.CiliumBGPPeeringPolicy, *v2alpha1.CiliumBGPPeeringPolicyList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumBGPPeeringPolicy, *ciliumiov2alpha1.CiliumBGPPeeringPolicyList]( "ciliumbgppeeringpolicies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumBGPPeeringPolicy { return &v2alpha1.CiliumBGPPeeringPolicy{} }, - func() *v2alpha1.CiliumBGPPeeringPolicyList { return &v2alpha1.CiliumBGPPeeringPolicyList{} }), + func() *ciliumiov2alpha1.CiliumBGPPeeringPolicy { return &ciliumiov2alpha1.CiliumBGPPeeringPolicy{} }, + func() *ciliumiov2alpha1.CiliumBGPPeeringPolicyList { + return &ciliumiov2alpha1.CiliumBGPPeeringPolicyList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go index 57f13d70cc13f..74c10b86ce198 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumcidrgroup.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumCIDRGroupsGetter interface { // CiliumCIDRGroupInterface has methods to work with CiliumCIDRGroup resources. type CiliumCIDRGroupInterface interface { - Create(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.CreateOptions) (*v2alpha1.CiliumCIDRGroup, error) - Update(ctx context.Context, ciliumCIDRGroup *v2alpha1.CiliumCIDRGroup, opts v1.UpdateOptions) (*v2alpha1.CiliumCIDRGroup, error) + Create(ctx context.Context, ciliumCIDRGroup *ciliumiov2alpha1.CiliumCIDRGroup, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumCIDRGroup, error) + Update(ctx context.Context, ciliumCIDRGroup *ciliumiov2alpha1.CiliumCIDRGroup, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumCIDRGroup, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumCIDRGroup, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumCIDRGroupList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumCIDRGroup, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumCIDRGroupList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumCIDRGroup, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumCIDRGroup, err error) CiliumCIDRGroupExpansion } // ciliumCIDRGroups implements CiliumCIDRGroupInterface type ciliumCIDRGroups struct { - *gentype.ClientWithList[*v2alpha1.CiliumCIDRGroup, *v2alpha1.CiliumCIDRGroupList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumCIDRGroup, *ciliumiov2alpha1.CiliumCIDRGroupList] } // newCiliumCIDRGroups returns a CiliumCIDRGroups func newCiliumCIDRGroups(c *CiliumV2alpha1Client) *ciliumCIDRGroups { return &ciliumCIDRGroups{ - gentype.NewClientWithList[*v2alpha1.CiliumCIDRGroup, *v2alpha1.CiliumCIDRGroupList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumCIDRGroup, *ciliumiov2alpha1.CiliumCIDRGroupList]( "ciliumcidrgroups", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumCIDRGroup { return &v2alpha1.CiliumCIDRGroup{} }, - func() *v2alpha1.CiliumCIDRGroupList { return &v2alpha1.CiliumCIDRGroupList{} }), + func() *ciliumiov2alpha1.CiliumCIDRGroup { return &ciliumiov2alpha1.CiliumCIDRGroup{} }, + func() *ciliumiov2alpha1.CiliumCIDRGroupList { return &ciliumiov2alpha1.CiliumCIDRGroupList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go index fe1444a53e94a..0fb1a99183e88 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumendpointslice.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumEndpointSlicesGetter interface { // CiliumEndpointSliceInterface has methods to work with CiliumEndpointSlice resources. type CiliumEndpointSliceInterface interface { - Create(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.CreateOptions) (*v2alpha1.CiliumEndpointSlice, error) - Update(ctx context.Context, ciliumEndpointSlice *v2alpha1.CiliumEndpointSlice, opts v1.UpdateOptions) (*v2alpha1.CiliumEndpointSlice, error) + Create(ctx context.Context, ciliumEndpointSlice *ciliumiov2alpha1.CiliumEndpointSlice, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumEndpointSlice, error) + Update(ctx context.Context, ciliumEndpointSlice *ciliumiov2alpha1.CiliumEndpointSlice, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumEndpointSlice, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumEndpointSlice, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumEndpointSliceList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumEndpointSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumEndpointSliceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumEndpointSlice, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumEndpointSlice, err error) CiliumEndpointSliceExpansion } // ciliumEndpointSlices implements CiliumEndpointSliceInterface type ciliumEndpointSlices struct { - *gentype.ClientWithList[*v2alpha1.CiliumEndpointSlice, *v2alpha1.CiliumEndpointSliceList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumEndpointSlice, *ciliumiov2alpha1.CiliumEndpointSliceList] } // newCiliumEndpointSlices returns a CiliumEndpointSlices func newCiliumEndpointSlices(c *CiliumV2alpha1Client) *ciliumEndpointSlices { return &ciliumEndpointSlices{ - gentype.NewClientWithList[*v2alpha1.CiliumEndpointSlice, *v2alpha1.CiliumEndpointSliceList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumEndpointSlice, *ciliumiov2alpha1.CiliumEndpointSliceList]( "ciliumendpointslices", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumEndpointSlice { return &v2alpha1.CiliumEndpointSlice{} }, - func() *v2alpha1.CiliumEndpointSliceList { return &v2alpha1.CiliumEndpointSliceList{} }), + func() *ciliumiov2alpha1.CiliumEndpointSlice { return &ciliumiov2alpha1.CiliumEndpointSlice{} }, + func() *ciliumiov2alpha1.CiliumEndpointSliceList { return &ciliumiov2alpha1.CiliumEndpointSliceList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go index 30bb485d90115..f07a4d7f175b8 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliuml2announcementpolicy.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,37 @@ type CiliumL2AnnouncementPoliciesGetter interface { // CiliumL2AnnouncementPolicyInterface has methods to work with CiliumL2AnnouncementPolicy resources. type CiliumL2AnnouncementPolicyInterface interface { - Create(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.CreateOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) - Update(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) + Create(ctx context.Context, ciliumL2AnnouncementPolicy *ciliumiov2alpha1.CiliumL2AnnouncementPolicy, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, error) + Update(ctx context.Context, ciliumL2AnnouncementPolicy *ciliumiov2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumL2AnnouncementPolicy *v2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) + UpdateStatus(ctx context.Context, ciliumL2AnnouncementPolicy *ciliumiov2alpha1.CiliumL2AnnouncementPolicy, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumL2AnnouncementPolicy, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumL2AnnouncementPolicyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumL2AnnouncementPolicyList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumL2AnnouncementPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumL2AnnouncementPolicy, err error) CiliumL2AnnouncementPolicyExpansion } // ciliumL2AnnouncementPolicies implements CiliumL2AnnouncementPolicyInterface type ciliumL2AnnouncementPolicies struct { - *gentype.ClientWithList[*v2alpha1.CiliumL2AnnouncementPolicy, *v2alpha1.CiliumL2AnnouncementPolicyList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, *ciliumiov2alpha1.CiliumL2AnnouncementPolicyList] } // newCiliumL2AnnouncementPolicies returns a CiliumL2AnnouncementPolicies func newCiliumL2AnnouncementPolicies(c *CiliumV2alpha1Client) *ciliumL2AnnouncementPolicies { return &ciliumL2AnnouncementPolicies{ - gentype.NewClientWithList[*v2alpha1.CiliumL2AnnouncementPolicy, *v2alpha1.CiliumL2AnnouncementPolicyList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, *ciliumiov2alpha1.CiliumL2AnnouncementPolicyList]( "ciliuml2announcementpolicies", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumL2AnnouncementPolicy { return &v2alpha1.CiliumL2AnnouncementPolicy{} }, - func() *v2alpha1.CiliumL2AnnouncementPolicyList { return &v2alpha1.CiliumL2AnnouncementPolicyList{} }), + func() *ciliumiov2alpha1.CiliumL2AnnouncementPolicy { + return &ciliumiov2alpha1.CiliumL2AnnouncementPolicy{} + }, + func() *ciliumiov2alpha1.CiliumL2AnnouncementPolicyList { + return &ciliumiov2alpha1.CiliumL2AnnouncementPolicyList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go index 8c27774fe9d89..16e0894e652b3 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumloadbalancerippool.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,35 @@ type CiliumLoadBalancerIPPoolsGetter interface { // CiliumLoadBalancerIPPoolInterface has methods to work with CiliumLoadBalancerIPPool resources. type CiliumLoadBalancerIPPoolInterface interface { - Create(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.CreateOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) - Update(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) + Create(ctx context.Context, ciliumLoadBalancerIPPool *ciliumiov2alpha1.CiliumLoadBalancerIPPool, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumLoadBalancerIPPool, error) + Update(ctx context.Context, ciliumLoadBalancerIPPool *ciliumiov2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumLoadBalancerIPPool, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ciliumLoadBalancerIPPool *v2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) + UpdateStatus(ctx context.Context, ciliumLoadBalancerIPPool *ciliumiov2alpha1.CiliumLoadBalancerIPPool, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumLoadBalancerIPPool, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumLoadBalancerIPPool, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumLoadBalancerIPPoolList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumLoadBalancerIPPool, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumLoadBalancerIPPoolList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumLoadBalancerIPPool, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumLoadBalancerIPPool, err error) CiliumLoadBalancerIPPoolExpansion } // ciliumLoadBalancerIPPools implements CiliumLoadBalancerIPPoolInterface type ciliumLoadBalancerIPPools struct { - *gentype.ClientWithList[*v2alpha1.CiliumLoadBalancerIPPool, *v2alpha1.CiliumLoadBalancerIPPoolList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumLoadBalancerIPPool, *ciliumiov2alpha1.CiliumLoadBalancerIPPoolList] } // newCiliumLoadBalancerIPPools returns a CiliumLoadBalancerIPPools func newCiliumLoadBalancerIPPools(c *CiliumV2alpha1Client) *ciliumLoadBalancerIPPools { return &ciliumLoadBalancerIPPools{ - gentype.NewClientWithList[*v2alpha1.CiliumLoadBalancerIPPool, *v2alpha1.CiliumLoadBalancerIPPoolList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumLoadBalancerIPPool, *ciliumiov2alpha1.CiliumLoadBalancerIPPoolList]( "ciliumloadbalancerippools", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumLoadBalancerIPPool { return &v2alpha1.CiliumLoadBalancerIPPool{} }, - func() *v2alpha1.CiliumLoadBalancerIPPoolList { return &v2alpha1.CiliumLoadBalancerIPPoolList{} }), + func() *ciliumiov2alpha1.CiliumLoadBalancerIPPool { return &ciliumiov2alpha1.CiliumLoadBalancerIPPool{} }, + func() *ciliumiov2alpha1.CiliumLoadBalancerIPPoolList { + return &ciliumiov2alpha1.CiliumLoadBalancerIPPoolList{} + }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go index 21f48ff578722..0751c2c497d22 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumnodeconfig.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumNodeConfigsGetter interface { // CiliumNodeConfigInterface has methods to work with CiliumNodeConfig resources. type CiliumNodeConfigInterface interface { - Create(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.CreateOptions) (*v2alpha1.CiliumNodeConfig, error) - Update(ctx context.Context, ciliumNodeConfig *v2alpha1.CiliumNodeConfig, opts v1.UpdateOptions) (*v2alpha1.CiliumNodeConfig, error) + Create(ctx context.Context, ciliumNodeConfig *ciliumiov2alpha1.CiliumNodeConfig, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumNodeConfig, error) + Update(ctx context.Context, ciliumNodeConfig *ciliumiov2alpha1.CiliumNodeConfig, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumNodeConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumNodeConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumNodeConfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumNodeConfig, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumNodeConfigList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumNodeConfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumNodeConfig, err error) CiliumNodeConfigExpansion } // ciliumNodeConfigs implements CiliumNodeConfigInterface type ciliumNodeConfigs struct { - *gentype.ClientWithList[*v2alpha1.CiliumNodeConfig, *v2alpha1.CiliumNodeConfigList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumNodeConfig, *ciliumiov2alpha1.CiliumNodeConfigList] } // newCiliumNodeConfigs returns a CiliumNodeConfigs func newCiliumNodeConfigs(c *CiliumV2alpha1Client, namespace string) *ciliumNodeConfigs { return &ciliumNodeConfigs{ - gentype.NewClientWithList[*v2alpha1.CiliumNodeConfig, *v2alpha1.CiliumNodeConfigList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumNodeConfig, *ciliumiov2alpha1.CiliumNodeConfigList]( "ciliumnodeconfigs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v2alpha1.CiliumNodeConfig { return &v2alpha1.CiliumNodeConfig{} }, - func() *v2alpha1.CiliumNodeConfigList { return &v2alpha1.CiliumNodeConfigList{} }), + func() *ciliumiov2alpha1.CiliumNodeConfig { return &ciliumiov2alpha1.CiliumNodeConfig{} }, + func() *ciliumiov2alpha1.CiliumNodeConfigList { return &ciliumiov2alpha1.CiliumNodeConfigList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go index d5886904ccd64..b32eca9148e80 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/ciliumpodippool.go @@ -6,9 +6,9 @@ package v2alpha1 import ( - "context" + context "context" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" scheme "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type CiliumPodIPPoolsGetter interface { // CiliumPodIPPoolInterface has methods to work with CiliumPodIPPool resources. type CiliumPodIPPoolInterface interface { - Create(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.CreateOptions) (*v2alpha1.CiliumPodIPPool, error) - Update(ctx context.Context, ciliumPodIPPool *v2alpha1.CiliumPodIPPool, opts v1.UpdateOptions) (*v2alpha1.CiliumPodIPPool, error) + Create(ctx context.Context, ciliumPodIPPool *ciliumiov2alpha1.CiliumPodIPPool, opts v1.CreateOptions) (*ciliumiov2alpha1.CiliumPodIPPool, error) + Update(ctx context.Context, ciliumPodIPPool *ciliumiov2alpha1.CiliumPodIPPool, opts v1.UpdateOptions) (*ciliumiov2alpha1.CiliumPodIPPool, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v2alpha1.CiliumPodIPPool, error) - List(ctx context.Context, opts v1.ListOptions) (*v2alpha1.CiliumPodIPPoolList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*ciliumiov2alpha1.CiliumPodIPPool, error) + List(ctx context.Context, opts v1.ListOptions) (*ciliumiov2alpha1.CiliumPodIPPoolList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.CiliumPodIPPool, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *ciliumiov2alpha1.CiliumPodIPPool, err error) CiliumPodIPPoolExpansion } // ciliumPodIPPools implements CiliumPodIPPoolInterface type ciliumPodIPPools struct { - *gentype.ClientWithList[*v2alpha1.CiliumPodIPPool, *v2alpha1.CiliumPodIPPoolList] + *gentype.ClientWithList[*ciliumiov2alpha1.CiliumPodIPPool, *ciliumiov2alpha1.CiliumPodIPPoolList] } // newCiliumPodIPPools returns a CiliumPodIPPools func newCiliumPodIPPools(c *CiliumV2alpha1Client) *ciliumPodIPPools { return &ciliumPodIPPools{ - gentype.NewClientWithList[*v2alpha1.CiliumPodIPPool, *v2alpha1.CiliumPodIPPoolList]( + gentype.NewClientWithList[*ciliumiov2alpha1.CiliumPodIPPool, *ciliumiov2alpha1.CiliumPodIPPoolList]( "ciliumpodippools", c.RESTClient(), scheme.ParameterCodec, "", - func() *v2alpha1.CiliumPodIPPool { return &v2alpha1.CiliumPodIPPool{} }, - func() *v2alpha1.CiliumPodIPPoolList { return &v2alpha1.CiliumPodIPPoolList{} }), + func() *ciliumiov2alpha1.CiliumPodIPPool { return &ciliumiov2alpha1.CiliumPodIPPool{} }, + func() *ciliumiov2alpha1.CiliumPodIPPoolList { return &ciliumiov2alpha1.CiliumPodIPPoolList{} }), } } diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go index 632ad328c7ee6..870f67b046e8f 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpadvertisement.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go index c45f25cf1c5a3..c9c2ec49d1ebf 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpclusterconfig.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go index 4ab45f62a0626..ac4adef455f84 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfig.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go index 1bd76eee62f8a..e4a9b33025a7a 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgpnodeconfigoverride.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go index 650a69554fa4b..4e79d5e70328b 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeerconfig.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go index 7de7d6ee3d6ab..ec210452122fa 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumbgppeeringpolicy.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go index a610e44bc7d6a..12e3005c7da29 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumcidrgroup.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go index 78d0ea99bdbe8..f56cbfb49fe5d 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumendpointslice.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go index 06ddc9e6ace86..042d007583e33 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliuml2announcementpolicy.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go index fd1a6ae957233..4c13050a6b889 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumloadbalancerippool.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go index 9af0a60ae45ea..9b22fdd01f292 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumnodeconfig.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go index 0e84fab8c72e0..dbdb96eb10359 100644 --- a/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go +++ b/pkg/k8s/client/clientset/versioned/typed/cilium.io/v2alpha1/fake/fake_ciliumpodippool.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwideenvoyconfig.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwideenvoyconfig.go index ab11f76feb806..a0a66bbca1e8c 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwideenvoyconfig.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwideenvoyconfig.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumClusterwideEnvoyConfigs. type CiliumClusterwideEnvoyConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumClusterwideEnvoyConfigLister + Lister() ciliumiov2.CiliumClusterwideEnvoyConfigLister } type ciliumClusterwideEnvoyConfigInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumClusterwideEnvoyConfigInformer(client versioned.Interface, return client.CiliumV2().CiliumClusterwideEnvoyConfigs().Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumClusterwideEnvoyConfig{}, + &apisciliumiov2.CiliumClusterwideEnvoyConfig{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumClusterwideEnvoyConfigInformer) defaultInformer(client versioned. } func (f *ciliumClusterwideEnvoyConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumClusterwideEnvoyConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumClusterwideEnvoyConfig{}, f.defaultInformer) } -func (f *ciliumClusterwideEnvoyConfigInformer) Lister() v2.CiliumClusterwideEnvoyConfigLister { - return v2.NewCiliumClusterwideEnvoyConfigLister(f.Informer().GetIndexer()) +func (f *ciliumClusterwideEnvoyConfigInformer) Lister() ciliumiov2.CiliumClusterwideEnvoyConfigLister { + return ciliumiov2.NewCiliumClusterwideEnvoyConfigLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwidenetworkpolicy.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwidenetworkpolicy.go index 68db1b7413ddd..60a32547eaa27 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwidenetworkpolicy.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumclusterwidenetworkpolicy.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumClusterwideNetworkPolicies. type CiliumClusterwideNetworkPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumClusterwideNetworkPolicyLister + Lister() ciliumiov2.CiliumClusterwideNetworkPolicyLister } type ciliumClusterwideNetworkPolicyInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumClusterwideNetworkPolicyInformer(client versioned.Interfac return client.CiliumV2().CiliumClusterwideNetworkPolicies().Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumClusterwideNetworkPolicy{}, + &apisciliumiov2.CiliumClusterwideNetworkPolicy{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumClusterwideNetworkPolicyInformer) defaultInformer(client versione } func (f *ciliumClusterwideNetworkPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumClusterwideNetworkPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumClusterwideNetworkPolicy{}, f.defaultInformer) } -func (f *ciliumClusterwideNetworkPolicyInformer) Lister() v2.CiliumClusterwideNetworkPolicyLister { - return v2.NewCiliumClusterwideNetworkPolicyLister(f.Informer().GetIndexer()) +func (f *ciliumClusterwideNetworkPolicyInformer) Lister() ciliumiov2.CiliumClusterwideNetworkPolicyLister { + return ciliumiov2.NewCiliumClusterwideNetworkPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumegressgatewaypolicy.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumegressgatewaypolicy.go index 0fc551c08ca2e..0a60eda9d85aa 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumegressgatewaypolicy.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumegressgatewaypolicy.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumEgressGatewayPolicies. type CiliumEgressGatewayPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumEgressGatewayPolicyLister + Lister() ciliumiov2.CiliumEgressGatewayPolicyLister } type ciliumEgressGatewayPolicyInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumEgressGatewayPolicyInformer(client versioned.Interface, re return client.CiliumV2().CiliumEgressGatewayPolicies().Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumEgressGatewayPolicy{}, + &apisciliumiov2.CiliumEgressGatewayPolicy{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumEgressGatewayPolicyInformer) defaultInformer(client versioned.Int } func (f *ciliumEgressGatewayPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumEgressGatewayPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumEgressGatewayPolicy{}, f.defaultInformer) } -func (f *ciliumEgressGatewayPolicyInformer) Lister() v2.CiliumEgressGatewayPolicyLister { - return v2.NewCiliumEgressGatewayPolicyLister(f.Informer().GetIndexer()) +func (f *ciliumEgressGatewayPolicyInformer) Lister() ciliumiov2.CiliumEgressGatewayPolicyLister { + return ciliumiov2.NewCiliumEgressGatewayPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumendpoint.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumendpoint.go index 6c4aae1657bd2..e754ad71cb67f 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumendpoint.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumendpoint.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumEndpoints. type CiliumEndpointInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumEndpointLister + Lister() ciliumiov2.CiliumEndpointLister } type ciliumEndpointInformer struct { @@ -58,7 +58,7 @@ func NewFilteredCiliumEndpointInformer(client versioned.Interface, namespace str return client.CiliumV2().CiliumEndpoints(namespace).Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumEndpoint{}, + &apisciliumiov2.CiliumEndpoint{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *ciliumEndpointInformer) defaultInformer(client versioned.Interface, res } func (f *ciliumEndpointInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumEndpoint{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumEndpoint{}, f.defaultInformer) } -func (f *ciliumEndpointInformer) Lister() v2.CiliumEndpointLister { - return v2.NewCiliumEndpointLister(f.Informer().GetIndexer()) +func (f *ciliumEndpointInformer) Lister() ciliumiov2.CiliumEndpointLister { + return ciliumiov2.NewCiliumEndpointLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumenvoyconfig.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumenvoyconfig.go index 9d2b06ddc9140..03883a2148c43 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumenvoyconfig.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumenvoyconfig.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumEnvoyConfigs. type CiliumEnvoyConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumEnvoyConfigLister + Lister() ciliumiov2.CiliumEnvoyConfigLister } type ciliumEnvoyConfigInformer struct { @@ -58,7 +58,7 @@ func NewFilteredCiliumEnvoyConfigInformer(client versioned.Interface, namespace return client.CiliumV2().CiliumEnvoyConfigs(namespace).Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumEnvoyConfig{}, + &apisciliumiov2.CiliumEnvoyConfig{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *ciliumEnvoyConfigInformer) defaultInformer(client versioned.Interface, } func (f *ciliumEnvoyConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumEnvoyConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumEnvoyConfig{}, f.defaultInformer) } -func (f *ciliumEnvoyConfigInformer) Lister() v2.CiliumEnvoyConfigLister { - return v2.NewCiliumEnvoyConfigLister(f.Informer().GetIndexer()) +func (f *ciliumEnvoyConfigInformer) Lister() ciliumiov2.CiliumEnvoyConfigLister { + return ciliumiov2.NewCiliumEnvoyConfigLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumexternalworkload.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumexternalworkload.go index 39755c67d2aeb..06a682179a174 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumexternalworkload.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumexternalworkload.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumExternalWorkloads. type CiliumExternalWorkloadInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumExternalWorkloadLister + Lister() ciliumiov2.CiliumExternalWorkloadLister } type ciliumExternalWorkloadInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumExternalWorkloadInformer(client versioned.Interface, resyn return client.CiliumV2().CiliumExternalWorkloads().Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumExternalWorkload{}, + &apisciliumiov2.CiliumExternalWorkload{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumExternalWorkloadInformer) defaultInformer(client versioned.Interf } func (f *ciliumExternalWorkloadInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumExternalWorkload{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumExternalWorkload{}, f.defaultInformer) } -func (f *ciliumExternalWorkloadInformer) Lister() v2.CiliumExternalWorkloadLister { - return v2.NewCiliumExternalWorkloadLister(f.Informer().GetIndexer()) +func (f *ciliumExternalWorkloadInformer) Lister() ciliumiov2.CiliumExternalWorkloadLister { + return ciliumiov2.NewCiliumExternalWorkloadLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumidentity.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumidentity.go index 4d092419376f8..e15c251adb08d 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumidentity.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumidentity.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumIdentities. type CiliumIdentityInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumIdentityLister + Lister() ciliumiov2.CiliumIdentityLister } type ciliumIdentityInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumIdentityInformer(client versioned.Interface, resyncPeriod return client.CiliumV2().CiliumIdentities().Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumIdentity{}, + &apisciliumiov2.CiliumIdentity{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumIdentityInformer) defaultInformer(client versioned.Interface, res } func (f *ciliumIdentityInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumIdentity{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumIdentity{}, f.defaultInformer) } -func (f *ciliumIdentityInformer) Lister() v2.CiliumIdentityLister { - return v2.NewCiliumIdentityLister(f.Informer().GetIndexer()) +func (f *ciliumIdentityInformer) Lister() ciliumiov2.CiliumIdentityLister { + return ciliumiov2.NewCiliumIdentityLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumlocalredirectpolicy.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumlocalredirectpolicy.go index 23c7bd60c9ae7..f9913fe052a88 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumlocalredirectpolicy.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumlocalredirectpolicy.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumLocalRedirectPolicies. type CiliumLocalRedirectPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumLocalRedirectPolicyLister + Lister() ciliumiov2.CiliumLocalRedirectPolicyLister } type ciliumLocalRedirectPolicyInformer struct { @@ -58,7 +58,7 @@ func NewFilteredCiliumLocalRedirectPolicyInformer(client versioned.Interface, na return client.CiliumV2().CiliumLocalRedirectPolicies(namespace).Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumLocalRedirectPolicy{}, + &apisciliumiov2.CiliumLocalRedirectPolicy{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *ciliumLocalRedirectPolicyInformer) defaultInformer(client versioned.Int } func (f *ciliumLocalRedirectPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumLocalRedirectPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumLocalRedirectPolicy{}, f.defaultInformer) } -func (f *ciliumLocalRedirectPolicyInformer) Lister() v2.CiliumLocalRedirectPolicyLister { - return v2.NewCiliumLocalRedirectPolicyLister(f.Informer().GetIndexer()) +func (f *ciliumLocalRedirectPolicyInformer) Lister() ciliumiov2.CiliumLocalRedirectPolicyLister { + return ciliumiov2.NewCiliumLocalRedirectPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnetworkpolicy.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnetworkpolicy.go index 84812f67d2aad..b011c4fc76919 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnetworkpolicy.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnetworkpolicy.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumNetworkPolicies. type CiliumNetworkPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumNetworkPolicyLister + Lister() ciliumiov2.CiliumNetworkPolicyLister } type ciliumNetworkPolicyInformer struct { @@ -58,7 +58,7 @@ func NewFilteredCiliumNetworkPolicyInformer(client versioned.Interface, namespac return client.CiliumV2().CiliumNetworkPolicies(namespace).Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumNetworkPolicy{}, + &apisciliumiov2.CiliumNetworkPolicy{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *ciliumNetworkPolicyInformer) defaultInformer(client versioned.Interface } func (f *ciliumNetworkPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumNetworkPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumNetworkPolicy{}, f.defaultInformer) } -func (f *ciliumNetworkPolicyInformer) Lister() v2.CiliumNetworkPolicyLister { - return v2.NewCiliumNetworkPolicyLister(f.Informer().GetIndexer()) +func (f *ciliumNetworkPolicyInformer) Lister() ciliumiov2.CiliumNetworkPolicyLister { + return ciliumiov2.NewCiliumNetworkPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnode.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnode.go index c040b33069750..b5b3315f29504 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnode.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnode.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumNodes. type CiliumNodeInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumNodeLister + Lister() ciliumiov2.CiliumNodeLister } type ciliumNodeInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumNodeInformer(client versioned.Interface, resyncPeriod time return client.CiliumV2().CiliumNodes().Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumNode{}, + &apisciliumiov2.CiliumNode{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumNodeInformer) defaultInformer(client versioned.Interface, resyncP } func (f *ciliumNodeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumNode{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumNode{}, f.defaultInformer) } -func (f *ciliumNodeInformer) Lister() v2.CiliumNodeLister { - return v2.NewCiliumNodeLister(f.Informer().GetIndexer()) +func (f *ciliumNodeInformer) Lister() ciliumiov2.CiliumNodeLister { + return ciliumiov2.NewCiliumNodeLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnodeconfig.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnodeconfig.go index 9254cfa990608..3d589a48f2de6 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnodeconfig.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2/ciliumnodeconfig.go @@ -6,13 +6,13 @@ package v2 import ( - "context" + context "context" time "time" - ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + apisciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumNodeConfigs. type CiliumNodeConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v2.CiliumNodeConfigLister + Lister() ciliumiov2.CiliumNodeConfigLister } type ciliumNodeConfigInformer struct { @@ -58,7 +58,7 @@ func NewFilteredCiliumNodeConfigInformer(client versioned.Interface, namespace s return client.CiliumV2().CiliumNodeConfigs(namespace).Watch(context.TODO(), options) }, }, - &ciliumiov2.CiliumNodeConfig{}, + &apisciliumiov2.CiliumNodeConfig{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *ciliumNodeConfigInformer) defaultInformer(client versioned.Interface, r } func (f *ciliumNodeConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2.CiliumNodeConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2.CiliumNodeConfig{}, f.defaultInformer) } -func (f *ciliumNodeConfigInformer) Lister() v2.CiliumNodeConfigLister { - return v2.NewCiliumNodeConfigLister(f.Informer().GetIndexer()) +func (f *ciliumNodeConfigInformer) Lister() ciliumiov2.CiliumNodeConfigLister { + return ciliumiov2.NewCiliumNodeConfigLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpadvertisement.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpadvertisement.go index 80132f6348433..ffcbede089bd1 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpadvertisement.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpadvertisement.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumBGPAdvertisements. type CiliumBGPAdvertisementInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumBGPAdvertisementLister + Lister() ciliumiov2alpha1.CiliumBGPAdvertisementLister } type ciliumBGPAdvertisementInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumBGPAdvertisementInformer(client versioned.Interface, resyn return client.CiliumV2alpha1().CiliumBGPAdvertisements().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumBGPAdvertisement{}, + &apisciliumiov2alpha1.CiliumBGPAdvertisement{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumBGPAdvertisementInformer) defaultInformer(client versioned.Interf } func (f *ciliumBGPAdvertisementInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumBGPAdvertisement{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumBGPAdvertisement{}, f.defaultInformer) } -func (f *ciliumBGPAdvertisementInformer) Lister() v2alpha1.CiliumBGPAdvertisementLister { - return v2alpha1.NewCiliumBGPAdvertisementLister(f.Informer().GetIndexer()) +func (f *ciliumBGPAdvertisementInformer) Lister() ciliumiov2alpha1.CiliumBGPAdvertisementLister { + return ciliumiov2alpha1.NewCiliumBGPAdvertisementLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpclusterconfig.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpclusterconfig.go index 9afb488fe9b2d..5de8c28386fc9 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpclusterconfig.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpclusterconfig.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumBGPClusterConfigs. type CiliumBGPClusterConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumBGPClusterConfigLister + Lister() ciliumiov2alpha1.CiliumBGPClusterConfigLister } type ciliumBGPClusterConfigInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumBGPClusterConfigInformer(client versioned.Interface, resyn return client.CiliumV2alpha1().CiliumBGPClusterConfigs().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumBGPClusterConfig{}, + &apisciliumiov2alpha1.CiliumBGPClusterConfig{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumBGPClusterConfigInformer) defaultInformer(client versioned.Interf } func (f *ciliumBGPClusterConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumBGPClusterConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumBGPClusterConfig{}, f.defaultInformer) } -func (f *ciliumBGPClusterConfigInformer) Lister() v2alpha1.CiliumBGPClusterConfigLister { - return v2alpha1.NewCiliumBGPClusterConfigLister(f.Informer().GetIndexer()) +func (f *ciliumBGPClusterConfigInformer) Lister() ciliumiov2alpha1.CiliumBGPClusterConfigLister { + return ciliumiov2alpha1.NewCiliumBGPClusterConfigLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfig.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfig.go index 9fb6f9806ac47..807e6da8d5b8b 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfig.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfig.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumBGPNodeConfigs. type CiliumBGPNodeConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumBGPNodeConfigLister + Lister() ciliumiov2alpha1.CiliumBGPNodeConfigLister } type ciliumBGPNodeConfigInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumBGPNodeConfigInformer(client versioned.Interface, resyncPe return client.CiliumV2alpha1().CiliumBGPNodeConfigs().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumBGPNodeConfig{}, + &apisciliumiov2alpha1.CiliumBGPNodeConfig{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumBGPNodeConfigInformer) defaultInformer(client versioned.Interface } func (f *ciliumBGPNodeConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumBGPNodeConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumBGPNodeConfig{}, f.defaultInformer) } -func (f *ciliumBGPNodeConfigInformer) Lister() v2alpha1.CiliumBGPNodeConfigLister { - return v2alpha1.NewCiliumBGPNodeConfigLister(f.Informer().GetIndexer()) +func (f *ciliumBGPNodeConfigInformer) Lister() ciliumiov2alpha1.CiliumBGPNodeConfigLister { + return ciliumiov2alpha1.NewCiliumBGPNodeConfigLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go index 6f010f350ccff..e9ae86f54af5f 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumBGPNodeConfigOverrides. type CiliumBGPNodeConfigOverrideInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumBGPNodeConfigOverrideLister + Lister() ciliumiov2alpha1.CiliumBGPNodeConfigOverrideLister } type ciliumBGPNodeConfigOverrideInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumBGPNodeConfigOverrideInformer(client versioned.Interface, return client.CiliumV2alpha1().CiliumBGPNodeConfigOverrides().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumBGPNodeConfigOverride{}, + &apisciliumiov2alpha1.CiliumBGPNodeConfigOverride{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumBGPNodeConfigOverrideInformer) defaultInformer(client versioned.I } func (f *ciliumBGPNodeConfigOverrideInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumBGPNodeConfigOverride{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumBGPNodeConfigOverride{}, f.defaultInformer) } -func (f *ciliumBGPNodeConfigOverrideInformer) Lister() v2alpha1.CiliumBGPNodeConfigOverrideLister { - return v2alpha1.NewCiliumBGPNodeConfigOverrideLister(f.Informer().GetIndexer()) +func (f *ciliumBGPNodeConfigOverrideInformer) Lister() ciliumiov2alpha1.CiliumBGPNodeConfigOverrideLister { + return ciliumiov2alpha1.NewCiliumBGPNodeConfigOverrideLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeerconfig.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeerconfig.go index 958fc765cc86f..0a103c1f5c6ff 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeerconfig.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeerconfig.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumBGPPeerConfigs. type CiliumBGPPeerConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumBGPPeerConfigLister + Lister() ciliumiov2alpha1.CiliumBGPPeerConfigLister } type ciliumBGPPeerConfigInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumBGPPeerConfigInformer(client versioned.Interface, resyncPe return client.CiliumV2alpha1().CiliumBGPPeerConfigs().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumBGPPeerConfig{}, + &apisciliumiov2alpha1.CiliumBGPPeerConfig{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumBGPPeerConfigInformer) defaultInformer(client versioned.Interface } func (f *ciliumBGPPeerConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumBGPPeerConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumBGPPeerConfig{}, f.defaultInformer) } -func (f *ciliumBGPPeerConfigInformer) Lister() v2alpha1.CiliumBGPPeerConfigLister { - return v2alpha1.NewCiliumBGPPeerConfigLister(f.Informer().GetIndexer()) +func (f *ciliumBGPPeerConfigInformer) Lister() ciliumiov2alpha1.CiliumBGPPeerConfigLister { + return ciliumiov2alpha1.NewCiliumBGPPeerConfigLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go index d046ac8d3ad9b..bdd7dca05814f 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumBGPPeeringPolicies. type CiliumBGPPeeringPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumBGPPeeringPolicyLister + Lister() ciliumiov2alpha1.CiliumBGPPeeringPolicyLister } type ciliumBGPPeeringPolicyInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumBGPPeeringPolicyInformer(client versioned.Interface, resyn return client.CiliumV2alpha1().CiliumBGPPeeringPolicies().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumBGPPeeringPolicy{}, + &apisciliumiov2alpha1.CiliumBGPPeeringPolicy{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumBGPPeeringPolicyInformer) defaultInformer(client versioned.Interf } func (f *ciliumBGPPeeringPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumBGPPeeringPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumBGPPeeringPolicy{}, f.defaultInformer) } -func (f *ciliumBGPPeeringPolicyInformer) Lister() v2alpha1.CiliumBGPPeeringPolicyLister { - return v2alpha1.NewCiliumBGPPeeringPolicyLister(f.Informer().GetIndexer()) +func (f *ciliumBGPPeeringPolicyInformer) Lister() ciliumiov2alpha1.CiliumBGPPeeringPolicyLister { + return ciliumiov2alpha1.NewCiliumBGPPeeringPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumcidrgroup.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumcidrgroup.go index 94d6c59b5e669..9b7576a0d9d49 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumcidrgroup.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumcidrgroup.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumCIDRGroups. type CiliumCIDRGroupInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumCIDRGroupLister + Lister() ciliumiov2alpha1.CiliumCIDRGroupLister } type ciliumCIDRGroupInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumCIDRGroupInformer(client versioned.Interface, resyncPeriod return client.CiliumV2alpha1().CiliumCIDRGroups().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumCIDRGroup{}, + &apisciliumiov2alpha1.CiliumCIDRGroup{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumCIDRGroupInformer) defaultInformer(client versioned.Interface, re } func (f *ciliumCIDRGroupInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumCIDRGroup{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumCIDRGroup{}, f.defaultInformer) } -func (f *ciliumCIDRGroupInformer) Lister() v2alpha1.CiliumCIDRGroupLister { - return v2alpha1.NewCiliumCIDRGroupLister(f.Informer().GetIndexer()) +func (f *ciliumCIDRGroupInformer) Lister() ciliumiov2alpha1.CiliumCIDRGroupLister { + return ciliumiov2alpha1.NewCiliumCIDRGroupLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumendpointslice.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumendpointslice.go index 0c2768da1001c..ab657d6d6eb7c 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumendpointslice.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumendpointslice.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumEndpointSlices. type CiliumEndpointSliceInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumEndpointSliceLister + Lister() ciliumiov2alpha1.CiliumEndpointSliceLister } type ciliumEndpointSliceInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumEndpointSliceInformer(client versioned.Interface, resyncPe return client.CiliumV2alpha1().CiliumEndpointSlices().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumEndpointSlice{}, + &apisciliumiov2alpha1.CiliumEndpointSlice{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumEndpointSliceInformer) defaultInformer(client versioned.Interface } func (f *ciliumEndpointSliceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumEndpointSlice{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumEndpointSlice{}, f.defaultInformer) } -func (f *ciliumEndpointSliceInformer) Lister() v2alpha1.CiliumEndpointSliceLister { - return v2alpha1.NewCiliumEndpointSliceLister(f.Informer().GetIndexer()) +func (f *ciliumEndpointSliceInformer) Lister() ciliumiov2alpha1.CiliumEndpointSliceLister { + return ciliumiov2alpha1.NewCiliumEndpointSliceLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliuml2announcementpolicy.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliuml2announcementpolicy.go index 932096e554275..88ad3b1e82cdc 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliuml2announcementpolicy.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliuml2announcementpolicy.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumL2AnnouncementPolicies. type CiliumL2AnnouncementPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumL2AnnouncementPolicyLister + Lister() ciliumiov2alpha1.CiliumL2AnnouncementPolicyLister } type ciliumL2AnnouncementPolicyInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumL2AnnouncementPolicyInformer(client versioned.Interface, r return client.CiliumV2alpha1().CiliumL2AnnouncementPolicies().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumL2AnnouncementPolicy{}, + &apisciliumiov2alpha1.CiliumL2AnnouncementPolicy{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumL2AnnouncementPolicyInformer) defaultInformer(client versioned.In } func (f *ciliumL2AnnouncementPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumL2AnnouncementPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumL2AnnouncementPolicy{}, f.defaultInformer) } -func (f *ciliumL2AnnouncementPolicyInformer) Lister() v2alpha1.CiliumL2AnnouncementPolicyLister { - return v2alpha1.NewCiliumL2AnnouncementPolicyLister(f.Informer().GetIndexer()) +func (f *ciliumL2AnnouncementPolicyInformer) Lister() ciliumiov2alpha1.CiliumL2AnnouncementPolicyLister { + return ciliumiov2alpha1.NewCiliumL2AnnouncementPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumloadbalancerippool.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumloadbalancerippool.go index 122ef626c52e7..303a37bd35a80 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumloadbalancerippool.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumloadbalancerippool.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumLoadBalancerIPPools. type CiliumLoadBalancerIPPoolInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumLoadBalancerIPPoolLister + Lister() ciliumiov2alpha1.CiliumLoadBalancerIPPoolLister } type ciliumLoadBalancerIPPoolInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumLoadBalancerIPPoolInformer(client versioned.Interface, res return client.CiliumV2alpha1().CiliumLoadBalancerIPPools().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumLoadBalancerIPPool{}, + &apisciliumiov2alpha1.CiliumLoadBalancerIPPool{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumLoadBalancerIPPoolInformer) defaultInformer(client versioned.Inte } func (f *ciliumLoadBalancerIPPoolInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumLoadBalancerIPPool{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumLoadBalancerIPPool{}, f.defaultInformer) } -func (f *ciliumLoadBalancerIPPoolInformer) Lister() v2alpha1.CiliumLoadBalancerIPPoolLister { - return v2alpha1.NewCiliumLoadBalancerIPPoolLister(f.Informer().GetIndexer()) +func (f *ciliumLoadBalancerIPPoolInformer) Lister() ciliumiov2alpha1.CiliumLoadBalancerIPPoolLister { + return ciliumiov2alpha1.NewCiliumLoadBalancerIPPoolLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumnodeconfig.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumnodeconfig.go index 25a605ddc0b52..e1cde017d454c 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumnodeconfig.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumnodeconfig.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumNodeConfigs. type CiliumNodeConfigInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumNodeConfigLister + Lister() ciliumiov2alpha1.CiliumNodeConfigLister } type ciliumNodeConfigInformer struct { @@ -58,7 +58,7 @@ func NewFilteredCiliumNodeConfigInformer(client versioned.Interface, namespace s return client.CiliumV2alpha1().CiliumNodeConfigs(namespace).Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumNodeConfig{}, + &apisciliumiov2alpha1.CiliumNodeConfig{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *ciliumNodeConfigInformer) defaultInformer(client versioned.Interface, r } func (f *ciliumNodeConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumNodeConfig{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumNodeConfig{}, f.defaultInformer) } -func (f *ciliumNodeConfigInformer) Lister() v2alpha1.CiliumNodeConfigLister { - return v2alpha1.NewCiliumNodeConfigLister(f.Informer().GetIndexer()) +func (f *ciliumNodeConfigInformer) Lister() ciliumiov2alpha1.CiliumNodeConfigLister { + return ciliumiov2alpha1.NewCiliumNodeConfigLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumpodippool.go b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumpodippool.go index 4995488207f73..751365f078834 100644 --- a/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumpodippool.go +++ b/pkg/k8s/client/informers/externalversions/cilium.io/v2alpha1/ciliumpodippool.go @@ -6,13 +6,13 @@ package v2alpha1 import ( - "context" + context "context" time "time" - ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + apisciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" versioned "github.com/cilium/cilium/pkg/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/client/informers/externalversions/internalinterfaces" - v2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/client/listers/cilium.io/v2alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CiliumPodIPPools. type CiliumPodIPPoolInformer interface { Informer() cache.SharedIndexInformer - Lister() v2alpha1.CiliumPodIPPoolLister + Lister() ciliumiov2alpha1.CiliumPodIPPoolLister } type ciliumPodIPPoolInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCiliumPodIPPoolInformer(client versioned.Interface, resyncPeriod return client.CiliumV2alpha1().CiliumPodIPPools().Watch(context.TODO(), options) }, }, - &ciliumiov2alpha1.CiliumPodIPPool{}, + &apisciliumiov2alpha1.CiliumPodIPPool{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *ciliumPodIPPoolInformer) defaultInformer(client versioned.Interface, re } func (f *ciliumPodIPPoolInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&ciliumiov2alpha1.CiliumPodIPPool{}, f.defaultInformer) + return f.factory.InformerFor(&apisciliumiov2alpha1.CiliumPodIPPool{}, f.defaultInformer) } -func (f *ciliumPodIPPoolInformer) Lister() v2alpha1.CiliumPodIPPoolLister { - return v2alpha1.NewCiliumPodIPPoolLister(f.Informer().GetIndexer()) +func (f *ciliumPodIPPoolInformer) Lister() ciliumiov2alpha1.CiliumPodIPPoolLister { + return ciliumiov2alpha1.NewCiliumPodIPPoolLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/client/informers/externalversions/generic.go b/pkg/k8s/client/informers/externalversions/generic.go index 613086be0597f..71493201ee0e0 100644 --- a/pkg/k8s/client/informers/externalversions/generic.go +++ b/pkg/k8s/client/informers/externalversions/generic.go @@ -6,7 +6,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwideenvoyconfig.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwideenvoyconfig.go index df6a79f0e8ca8..ff0ddedf98ebd 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwideenvoyconfig.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwideenvoyconfig.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumClusterwideEnvoyConfigLister helps list CiliumClusterwideEnvoyConfigs. @@ -17,19 +17,19 @@ import ( type CiliumClusterwideEnvoyConfigLister interface { // List lists all CiliumClusterwideEnvoyConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumClusterwideEnvoyConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumClusterwideEnvoyConfig, err error) // Get retrieves the CiliumClusterwideEnvoyConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumClusterwideEnvoyConfig, error) + Get(name string) (*ciliumiov2.CiliumClusterwideEnvoyConfig, error) CiliumClusterwideEnvoyConfigListerExpansion } // ciliumClusterwideEnvoyConfigLister implements the CiliumClusterwideEnvoyConfigLister interface. type ciliumClusterwideEnvoyConfigLister struct { - listers.ResourceIndexer[*v2.CiliumClusterwideEnvoyConfig] + listers.ResourceIndexer[*ciliumiov2.CiliumClusterwideEnvoyConfig] } // NewCiliumClusterwideEnvoyConfigLister returns a new CiliumClusterwideEnvoyConfigLister. func NewCiliumClusterwideEnvoyConfigLister(indexer cache.Indexer) CiliumClusterwideEnvoyConfigLister { - return &ciliumClusterwideEnvoyConfigLister{listers.New[*v2.CiliumClusterwideEnvoyConfig](indexer, v2.Resource("ciliumclusterwideenvoyconfig"))} + return &ciliumClusterwideEnvoyConfigLister{listers.New[*ciliumiov2.CiliumClusterwideEnvoyConfig](indexer, ciliumiov2.Resource("ciliumclusterwideenvoyconfig"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwidenetworkpolicy.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwidenetworkpolicy.go index 7f870b0c9eab8..3a39a6e76eaa9 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwidenetworkpolicy.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumclusterwidenetworkpolicy.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumClusterwideNetworkPolicyLister helps list CiliumClusterwideNetworkPolicies. @@ -17,19 +17,19 @@ import ( type CiliumClusterwideNetworkPolicyLister interface { // List lists all CiliumClusterwideNetworkPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumClusterwideNetworkPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumClusterwideNetworkPolicy, err error) // Get retrieves the CiliumClusterwideNetworkPolicy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumClusterwideNetworkPolicy, error) + Get(name string) (*ciliumiov2.CiliumClusterwideNetworkPolicy, error) CiliumClusterwideNetworkPolicyListerExpansion } // ciliumClusterwideNetworkPolicyLister implements the CiliumClusterwideNetworkPolicyLister interface. type ciliumClusterwideNetworkPolicyLister struct { - listers.ResourceIndexer[*v2.CiliumClusterwideNetworkPolicy] + listers.ResourceIndexer[*ciliumiov2.CiliumClusterwideNetworkPolicy] } // NewCiliumClusterwideNetworkPolicyLister returns a new CiliumClusterwideNetworkPolicyLister. func NewCiliumClusterwideNetworkPolicyLister(indexer cache.Indexer) CiliumClusterwideNetworkPolicyLister { - return &ciliumClusterwideNetworkPolicyLister{listers.New[*v2.CiliumClusterwideNetworkPolicy](indexer, v2.Resource("ciliumclusterwidenetworkpolicy"))} + return &ciliumClusterwideNetworkPolicyLister{listers.New[*ciliumiov2.CiliumClusterwideNetworkPolicy](indexer, ciliumiov2.Resource("ciliumclusterwidenetworkpolicy"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumegressgatewaypolicy.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumegressgatewaypolicy.go index 01169e1c04fc5..3733bb9eb4f94 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumegressgatewaypolicy.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumegressgatewaypolicy.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumEgressGatewayPolicyLister helps list CiliumEgressGatewayPolicies. @@ -17,19 +17,19 @@ import ( type CiliumEgressGatewayPolicyLister interface { // List lists all CiliumEgressGatewayPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumEgressGatewayPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumEgressGatewayPolicy, err error) // Get retrieves the CiliumEgressGatewayPolicy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumEgressGatewayPolicy, error) + Get(name string) (*ciliumiov2.CiliumEgressGatewayPolicy, error) CiliumEgressGatewayPolicyListerExpansion } // ciliumEgressGatewayPolicyLister implements the CiliumEgressGatewayPolicyLister interface. type ciliumEgressGatewayPolicyLister struct { - listers.ResourceIndexer[*v2.CiliumEgressGatewayPolicy] + listers.ResourceIndexer[*ciliumiov2.CiliumEgressGatewayPolicy] } // NewCiliumEgressGatewayPolicyLister returns a new CiliumEgressGatewayPolicyLister. func NewCiliumEgressGatewayPolicyLister(indexer cache.Indexer) CiliumEgressGatewayPolicyLister { - return &ciliumEgressGatewayPolicyLister{listers.New[*v2.CiliumEgressGatewayPolicy](indexer, v2.Resource("ciliumegressgatewaypolicy"))} + return &ciliumEgressGatewayPolicyLister{listers.New[*ciliumiov2.CiliumEgressGatewayPolicy](indexer, ciliumiov2.Resource("ciliumegressgatewaypolicy"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumendpoint.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumendpoint.go index 26116f7930999..6d3c3b26bf53d 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumendpoint.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumendpoint.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumEndpointLister helps list CiliumEndpoints. @@ -17,7 +17,7 @@ import ( type CiliumEndpointLister interface { // List lists all CiliumEndpoints in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumEndpoint, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumEndpoint, err error) // CiliumEndpoints returns an object that can list and get CiliumEndpoints. CiliumEndpoints(namespace string) CiliumEndpointNamespaceLister CiliumEndpointListerExpansion @@ -25,17 +25,17 @@ type CiliumEndpointLister interface { // ciliumEndpointLister implements the CiliumEndpointLister interface. type ciliumEndpointLister struct { - listers.ResourceIndexer[*v2.CiliumEndpoint] + listers.ResourceIndexer[*ciliumiov2.CiliumEndpoint] } // NewCiliumEndpointLister returns a new CiliumEndpointLister. func NewCiliumEndpointLister(indexer cache.Indexer) CiliumEndpointLister { - return &ciliumEndpointLister{listers.New[*v2.CiliumEndpoint](indexer, v2.Resource("ciliumendpoint"))} + return &ciliumEndpointLister{listers.New[*ciliumiov2.CiliumEndpoint](indexer, ciliumiov2.Resource("ciliumendpoint"))} } // CiliumEndpoints returns an object that can list and get CiliumEndpoints. func (s *ciliumEndpointLister) CiliumEndpoints(namespace string) CiliumEndpointNamespaceLister { - return ciliumEndpointNamespaceLister{listers.NewNamespaced[*v2.CiliumEndpoint](s.ResourceIndexer, namespace)} + return ciliumEndpointNamespaceLister{listers.NewNamespaced[*ciliumiov2.CiliumEndpoint](s.ResourceIndexer, namespace)} } // CiliumEndpointNamespaceLister helps list and get CiliumEndpoints. @@ -43,15 +43,15 @@ func (s *ciliumEndpointLister) CiliumEndpoints(namespace string) CiliumEndpointN type CiliumEndpointNamespaceLister interface { // List lists all CiliumEndpoints in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumEndpoint, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumEndpoint, err error) // Get retrieves the CiliumEndpoint from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumEndpoint, error) + Get(name string) (*ciliumiov2.CiliumEndpoint, error) CiliumEndpointNamespaceListerExpansion } // ciliumEndpointNamespaceLister implements the CiliumEndpointNamespaceLister // interface. type ciliumEndpointNamespaceLister struct { - listers.ResourceIndexer[*v2.CiliumEndpoint] + listers.ResourceIndexer[*ciliumiov2.CiliumEndpoint] } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumenvoyconfig.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumenvoyconfig.go index 13357782362f5..bd29a2f6ff5bc 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumenvoyconfig.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumenvoyconfig.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumEnvoyConfigLister helps list CiliumEnvoyConfigs. @@ -17,7 +17,7 @@ import ( type CiliumEnvoyConfigLister interface { // List lists all CiliumEnvoyConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumEnvoyConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumEnvoyConfig, err error) // CiliumEnvoyConfigs returns an object that can list and get CiliumEnvoyConfigs. CiliumEnvoyConfigs(namespace string) CiliumEnvoyConfigNamespaceLister CiliumEnvoyConfigListerExpansion @@ -25,17 +25,17 @@ type CiliumEnvoyConfigLister interface { // ciliumEnvoyConfigLister implements the CiliumEnvoyConfigLister interface. type ciliumEnvoyConfigLister struct { - listers.ResourceIndexer[*v2.CiliumEnvoyConfig] + listers.ResourceIndexer[*ciliumiov2.CiliumEnvoyConfig] } // NewCiliumEnvoyConfigLister returns a new CiliumEnvoyConfigLister. func NewCiliumEnvoyConfigLister(indexer cache.Indexer) CiliumEnvoyConfigLister { - return &ciliumEnvoyConfigLister{listers.New[*v2.CiliumEnvoyConfig](indexer, v2.Resource("ciliumenvoyconfig"))} + return &ciliumEnvoyConfigLister{listers.New[*ciliumiov2.CiliumEnvoyConfig](indexer, ciliumiov2.Resource("ciliumenvoyconfig"))} } // CiliumEnvoyConfigs returns an object that can list and get CiliumEnvoyConfigs. func (s *ciliumEnvoyConfigLister) CiliumEnvoyConfigs(namespace string) CiliumEnvoyConfigNamespaceLister { - return ciliumEnvoyConfigNamespaceLister{listers.NewNamespaced[*v2.CiliumEnvoyConfig](s.ResourceIndexer, namespace)} + return ciliumEnvoyConfigNamespaceLister{listers.NewNamespaced[*ciliumiov2.CiliumEnvoyConfig](s.ResourceIndexer, namespace)} } // CiliumEnvoyConfigNamespaceLister helps list and get CiliumEnvoyConfigs. @@ -43,15 +43,15 @@ func (s *ciliumEnvoyConfigLister) CiliumEnvoyConfigs(namespace string) CiliumEnv type CiliumEnvoyConfigNamespaceLister interface { // List lists all CiliumEnvoyConfigs in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumEnvoyConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumEnvoyConfig, err error) // Get retrieves the CiliumEnvoyConfig from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumEnvoyConfig, error) + Get(name string) (*ciliumiov2.CiliumEnvoyConfig, error) CiliumEnvoyConfigNamespaceListerExpansion } // ciliumEnvoyConfigNamespaceLister implements the CiliumEnvoyConfigNamespaceLister // interface. type ciliumEnvoyConfigNamespaceLister struct { - listers.ResourceIndexer[*v2.CiliumEnvoyConfig] + listers.ResourceIndexer[*ciliumiov2.CiliumEnvoyConfig] } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumexternalworkload.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumexternalworkload.go index c40043d6ce4b8..723958964a114 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumexternalworkload.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumexternalworkload.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumExternalWorkloadLister helps list CiliumExternalWorkloads. @@ -17,19 +17,19 @@ import ( type CiliumExternalWorkloadLister interface { // List lists all CiliumExternalWorkloads in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumExternalWorkload, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumExternalWorkload, err error) // Get retrieves the CiliumExternalWorkload from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumExternalWorkload, error) + Get(name string) (*ciliumiov2.CiliumExternalWorkload, error) CiliumExternalWorkloadListerExpansion } // ciliumExternalWorkloadLister implements the CiliumExternalWorkloadLister interface. type ciliumExternalWorkloadLister struct { - listers.ResourceIndexer[*v2.CiliumExternalWorkload] + listers.ResourceIndexer[*ciliumiov2.CiliumExternalWorkload] } // NewCiliumExternalWorkloadLister returns a new CiliumExternalWorkloadLister. func NewCiliumExternalWorkloadLister(indexer cache.Indexer) CiliumExternalWorkloadLister { - return &ciliumExternalWorkloadLister{listers.New[*v2.CiliumExternalWorkload](indexer, v2.Resource("ciliumexternalworkload"))} + return &ciliumExternalWorkloadLister{listers.New[*ciliumiov2.CiliumExternalWorkload](indexer, ciliumiov2.Resource("ciliumexternalworkload"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumidentity.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumidentity.go index 34ed811aa46f9..01e53a2c3bf2b 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumidentity.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumidentity.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumIdentityLister helps list CiliumIdentities. @@ -17,19 +17,19 @@ import ( type CiliumIdentityLister interface { // List lists all CiliumIdentities in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumIdentity, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumIdentity, err error) // Get retrieves the CiliumIdentity from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumIdentity, error) + Get(name string) (*ciliumiov2.CiliumIdentity, error) CiliumIdentityListerExpansion } // ciliumIdentityLister implements the CiliumIdentityLister interface. type ciliumIdentityLister struct { - listers.ResourceIndexer[*v2.CiliumIdentity] + listers.ResourceIndexer[*ciliumiov2.CiliumIdentity] } // NewCiliumIdentityLister returns a new CiliumIdentityLister. func NewCiliumIdentityLister(indexer cache.Indexer) CiliumIdentityLister { - return &ciliumIdentityLister{listers.New[*v2.CiliumIdentity](indexer, v2.Resource("ciliumidentity"))} + return &ciliumIdentityLister{listers.New[*ciliumiov2.CiliumIdentity](indexer, ciliumiov2.Resource("ciliumidentity"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumlocalredirectpolicy.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumlocalredirectpolicy.go index eead34a7b92f5..db68fc3ef041f 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumlocalredirectpolicy.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumlocalredirectpolicy.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumLocalRedirectPolicyLister helps list CiliumLocalRedirectPolicies. @@ -17,7 +17,7 @@ import ( type CiliumLocalRedirectPolicyLister interface { // List lists all CiliumLocalRedirectPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumLocalRedirectPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumLocalRedirectPolicy, err error) // CiliumLocalRedirectPolicies returns an object that can list and get CiliumLocalRedirectPolicies. CiliumLocalRedirectPolicies(namespace string) CiliumLocalRedirectPolicyNamespaceLister CiliumLocalRedirectPolicyListerExpansion @@ -25,17 +25,17 @@ type CiliumLocalRedirectPolicyLister interface { // ciliumLocalRedirectPolicyLister implements the CiliumLocalRedirectPolicyLister interface. type ciliumLocalRedirectPolicyLister struct { - listers.ResourceIndexer[*v2.CiliumLocalRedirectPolicy] + listers.ResourceIndexer[*ciliumiov2.CiliumLocalRedirectPolicy] } // NewCiliumLocalRedirectPolicyLister returns a new CiliumLocalRedirectPolicyLister. func NewCiliumLocalRedirectPolicyLister(indexer cache.Indexer) CiliumLocalRedirectPolicyLister { - return &ciliumLocalRedirectPolicyLister{listers.New[*v2.CiliumLocalRedirectPolicy](indexer, v2.Resource("ciliumlocalredirectpolicy"))} + return &ciliumLocalRedirectPolicyLister{listers.New[*ciliumiov2.CiliumLocalRedirectPolicy](indexer, ciliumiov2.Resource("ciliumlocalredirectpolicy"))} } // CiliumLocalRedirectPolicies returns an object that can list and get CiliumLocalRedirectPolicies. func (s *ciliumLocalRedirectPolicyLister) CiliumLocalRedirectPolicies(namespace string) CiliumLocalRedirectPolicyNamespaceLister { - return ciliumLocalRedirectPolicyNamespaceLister{listers.NewNamespaced[*v2.CiliumLocalRedirectPolicy](s.ResourceIndexer, namespace)} + return ciliumLocalRedirectPolicyNamespaceLister{listers.NewNamespaced[*ciliumiov2.CiliumLocalRedirectPolicy](s.ResourceIndexer, namespace)} } // CiliumLocalRedirectPolicyNamespaceLister helps list and get CiliumLocalRedirectPolicies. @@ -43,15 +43,15 @@ func (s *ciliumLocalRedirectPolicyLister) CiliumLocalRedirectPolicies(namespace type CiliumLocalRedirectPolicyNamespaceLister interface { // List lists all CiliumLocalRedirectPolicies in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumLocalRedirectPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumLocalRedirectPolicy, err error) // Get retrieves the CiliumLocalRedirectPolicy from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumLocalRedirectPolicy, error) + Get(name string) (*ciliumiov2.CiliumLocalRedirectPolicy, error) CiliumLocalRedirectPolicyNamespaceListerExpansion } // ciliumLocalRedirectPolicyNamespaceLister implements the CiliumLocalRedirectPolicyNamespaceLister // interface. type ciliumLocalRedirectPolicyNamespaceLister struct { - listers.ResourceIndexer[*v2.CiliumLocalRedirectPolicy] + listers.ResourceIndexer[*ciliumiov2.CiliumLocalRedirectPolicy] } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumnetworkpolicy.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumnetworkpolicy.go index e46c6a22f98e6..5747872b415ac 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumnetworkpolicy.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumnetworkpolicy.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumNetworkPolicyLister helps list CiliumNetworkPolicies. @@ -17,7 +17,7 @@ import ( type CiliumNetworkPolicyLister interface { // List lists all CiliumNetworkPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumNetworkPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumNetworkPolicy, err error) // CiliumNetworkPolicies returns an object that can list and get CiliumNetworkPolicies. CiliumNetworkPolicies(namespace string) CiliumNetworkPolicyNamespaceLister CiliumNetworkPolicyListerExpansion @@ -25,17 +25,17 @@ type CiliumNetworkPolicyLister interface { // ciliumNetworkPolicyLister implements the CiliumNetworkPolicyLister interface. type ciliumNetworkPolicyLister struct { - listers.ResourceIndexer[*v2.CiliumNetworkPolicy] + listers.ResourceIndexer[*ciliumiov2.CiliumNetworkPolicy] } // NewCiliumNetworkPolicyLister returns a new CiliumNetworkPolicyLister. func NewCiliumNetworkPolicyLister(indexer cache.Indexer) CiliumNetworkPolicyLister { - return &ciliumNetworkPolicyLister{listers.New[*v2.CiliumNetworkPolicy](indexer, v2.Resource("ciliumnetworkpolicy"))} + return &ciliumNetworkPolicyLister{listers.New[*ciliumiov2.CiliumNetworkPolicy](indexer, ciliumiov2.Resource("ciliumnetworkpolicy"))} } // CiliumNetworkPolicies returns an object that can list and get CiliumNetworkPolicies. func (s *ciliumNetworkPolicyLister) CiliumNetworkPolicies(namespace string) CiliumNetworkPolicyNamespaceLister { - return ciliumNetworkPolicyNamespaceLister{listers.NewNamespaced[*v2.CiliumNetworkPolicy](s.ResourceIndexer, namespace)} + return ciliumNetworkPolicyNamespaceLister{listers.NewNamespaced[*ciliumiov2.CiliumNetworkPolicy](s.ResourceIndexer, namespace)} } // CiliumNetworkPolicyNamespaceLister helps list and get CiliumNetworkPolicies. @@ -43,15 +43,15 @@ func (s *ciliumNetworkPolicyLister) CiliumNetworkPolicies(namespace string) Cili type CiliumNetworkPolicyNamespaceLister interface { // List lists all CiliumNetworkPolicies in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumNetworkPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumNetworkPolicy, err error) // Get retrieves the CiliumNetworkPolicy from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumNetworkPolicy, error) + Get(name string) (*ciliumiov2.CiliumNetworkPolicy, error) CiliumNetworkPolicyNamespaceListerExpansion } // ciliumNetworkPolicyNamespaceLister implements the CiliumNetworkPolicyNamespaceLister // interface. type ciliumNetworkPolicyNamespaceLister struct { - listers.ResourceIndexer[*v2.CiliumNetworkPolicy] + listers.ResourceIndexer[*ciliumiov2.CiliumNetworkPolicy] } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumnode.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumnode.go index 8ddb721da6a48..32e01fab8b6fb 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumnode.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumnode.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumNodeLister helps list CiliumNodes. @@ -17,19 +17,19 @@ import ( type CiliumNodeLister interface { // List lists all CiliumNodes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumNode, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumNode, err error) // Get retrieves the CiliumNode from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumNode, error) + Get(name string) (*ciliumiov2.CiliumNode, error) CiliumNodeListerExpansion } // ciliumNodeLister implements the CiliumNodeLister interface. type ciliumNodeLister struct { - listers.ResourceIndexer[*v2.CiliumNode] + listers.ResourceIndexer[*ciliumiov2.CiliumNode] } // NewCiliumNodeLister returns a new CiliumNodeLister. func NewCiliumNodeLister(indexer cache.Indexer) CiliumNodeLister { - return &ciliumNodeLister{listers.New[*v2.CiliumNode](indexer, v2.Resource("ciliumnode"))} + return &ciliumNodeLister{listers.New[*ciliumiov2.CiliumNode](indexer, ciliumiov2.Resource("ciliumnode"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2/ciliumnodeconfig.go b/pkg/k8s/client/listers/cilium.io/v2/ciliumnodeconfig.go index 50e2950cefbce..45ac73847d797 100644 --- a/pkg/k8s/client/listers/cilium.io/v2/ciliumnodeconfig.go +++ b/pkg/k8s/client/listers/cilium.io/v2/ciliumnodeconfig.go @@ -6,10 +6,10 @@ package v2 import ( - v2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumNodeConfigLister helps list CiliumNodeConfigs. @@ -17,7 +17,7 @@ import ( type CiliumNodeConfigLister interface { // List lists all CiliumNodeConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumNodeConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumNodeConfig, err error) // CiliumNodeConfigs returns an object that can list and get CiliumNodeConfigs. CiliumNodeConfigs(namespace string) CiliumNodeConfigNamespaceLister CiliumNodeConfigListerExpansion @@ -25,17 +25,17 @@ type CiliumNodeConfigLister interface { // ciliumNodeConfigLister implements the CiliumNodeConfigLister interface. type ciliumNodeConfigLister struct { - listers.ResourceIndexer[*v2.CiliumNodeConfig] + listers.ResourceIndexer[*ciliumiov2.CiliumNodeConfig] } // NewCiliumNodeConfigLister returns a new CiliumNodeConfigLister. func NewCiliumNodeConfigLister(indexer cache.Indexer) CiliumNodeConfigLister { - return &ciliumNodeConfigLister{listers.New[*v2.CiliumNodeConfig](indexer, v2.Resource("ciliumnodeconfig"))} + return &ciliumNodeConfigLister{listers.New[*ciliumiov2.CiliumNodeConfig](indexer, ciliumiov2.Resource("ciliumnodeconfig"))} } // CiliumNodeConfigs returns an object that can list and get CiliumNodeConfigs. func (s *ciliumNodeConfigLister) CiliumNodeConfigs(namespace string) CiliumNodeConfigNamespaceLister { - return ciliumNodeConfigNamespaceLister{listers.NewNamespaced[*v2.CiliumNodeConfig](s.ResourceIndexer, namespace)} + return ciliumNodeConfigNamespaceLister{listers.NewNamespaced[*ciliumiov2.CiliumNodeConfig](s.ResourceIndexer, namespace)} } // CiliumNodeConfigNamespaceLister helps list and get CiliumNodeConfigs. @@ -43,15 +43,15 @@ func (s *ciliumNodeConfigLister) CiliumNodeConfigs(namespace string) CiliumNodeC type CiliumNodeConfigNamespaceLister interface { // List lists all CiliumNodeConfigs in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2.CiliumNodeConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2.CiliumNodeConfig, err error) // Get retrieves the CiliumNodeConfig from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v2.CiliumNodeConfig, error) + Get(name string) (*ciliumiov2.CiliumNodeConfig, error) CiliumNodeConfigNamespaceListerExpansion } // ciliumNodeConfigNamespaceLister implements the CiliumNodeConfigNamespaceLister // interface. type ciliumNodeConfigNamespaceLister struct { - listers.ResourceIndexer[*v2.CiliumNodeConfig] + listers.ResourceIndexer[*ciliumiov2.CiliumNodeConfig] } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpadvertisement.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpadvertisement.go index 0d8edb32b0003..eb92c303efc63 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpadvertisement.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpadvertisement.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumBGPAdvertisementLister helps list CiliumBGPAdvertisements. @@ -17,19 +17,19 @@ import ( type CiliumBGPAdvertisementLister interface { // List lists all CiliumBGPAdvertisements in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumBGPAdvertisement, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumBGPAdvertisement, err error) // Get retrieves the CiliumBGPAdvertisement from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumBGPAdvertisement, error) + Get(name string) (*ciliumiov2alpha1.CiliumBGPAdvertisement, error) CiliumBGPAdvertisementListerExpansion } // ciliumBGPAdvertisementLister implements the CiliumBGPAdvertisementLister interface. type ciliumBGPAdvertisementLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumBGPAdvertisement] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumBGPAdvertisement] } // NewCiliumBGPAdvertisementLister returns a new CiliumBGPAdvertisementLister. func NewCiliumBGPAdvertisementLister(indexer cache.Indexer) CiliumBGPAdvertisementLister { - return &ciliumBGPAdvertisementLister{listers.New[*v2alpha1.CiliumBGPAdvertisement](indexer, v2alpha1.Resource("ciliumbgpadvertisement"))} + return &ciliumBGPAdvertisementLister{listers.New[*ciliumiov2alpha1.CiliumBGPAdvertisement](indexer, ciliumiov2alpha1.Resource("ciliumbgpadvertisement"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpclusterconfig.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpclusterconfig.go index a70016c2eb326..a743d33c9d3f3 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpclusterconfig.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpclusterconfig.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumBGPClusterConfigLister helps list CiliumBGPClusterConfigs. @@ -17,19 +17,19 @@ import ( type CiliumBGPClusterConfigLister interface { // List lists all CiliumBGPClusterConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumBGPClusterConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumBGPClusterConfig, err error) // Get retrieves the CiliumBGPClusterConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumBGPClusterConfig, error) + Get(name string) (*ciliumiov2alpha1.CiliumBGPClusterConfig, error) CiliumBGPClusterConfigListerExpansion } // ciliumBGPClusterConfigLister implements the CiliumBGPClusterConfigLister interface. type ciliumBGPClusterConfigLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumBGPClusterConfig] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumBGPClusterConfig] } // NewCiliumBGPClusterConfigLister returns a new CiliumBGPClusterConfigLister. func NewCiliumBGPClusterConfigLister(indexer cache.Indexer) CiliumBGPClusterConfigLister { - return &ciliumBGPClusterConfigLister{listers.New[*v2alpha1.CiliumBGPClusterConfig](indexer, v2alpha1.Resource("ciliumbgpclusterconfig"))} + return &ciliumBGPClusterConfigLister{listers.New[*ciliumiov2alpha1.CiliumBGPClusterConfig](indexer, ciliumiov2alpha1.Resource("ciliumbgpclusterconfig"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfig.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfig.go index 47ca8ab5a5c63..796827fb22489 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfig.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfig.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumBGPNodeConfigLister helps list CiliumBGPNodeConfigs. @@ -17,19 +17,19 @@ import ( type CiliumBGPNodeConfigLister interface { // List lists all CiliumBGPNodeConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumBGPNodeConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumBGPNodeConfig, err error) // Get retrieves the CiliumBGPNodeConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumBGPNodeConfig, error) + Get(name string) (*ciliumiov2alpha1.CiliumBGPNodeConfig, error) CiliumBGPNodeConfigListerExpansion } // ciliumBGPNodeConfigLister implements the CiliumBGPNodeConfigLister interface. type ciliumBGPNodeConfigLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumBGPNodeConfig] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumBGPNodeConfig] } // NewCiliumBGPNodeConfigLister returns a new CiliumBGPNodeConfigLister. func NewCiliumBGPNodeConfigLister(indexer cache.Indexer) CiliumBGPNodeConfigLister { - return &ciliumBGPNodeConfigLister{listers.New[*v2alpha1.CiliumBGPNodeConfig](indexer, v2alpha1.Resource("ciliumbgpnodeconfig"))} + return &ciliumBGPNodeConfigLister{listers.New[*ciliumiov2alpha1.CiliumBGPNodeConfig](indexer, ciliumiov2alpha1.Resource("ciliumbgpnodeconfig"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go index 69c6b5c0610b6..ef3b2c0e10dd3 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgpnodeconfigoverride.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumBGPNodeConfigOverrideLister helps list CiliumBGPNodeConfigOverrides. @@ -17,19 +17,19 @@ import ( type CiliumBGPNodeConfigOverrideLister interface { // List lists all CiliumBGPNodeConfigOverrides in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumBGPNodeConfigOverride, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumBGPNodeConfigOverride, err error) // Get retrieves the CiliumBGPNodeConfigOverride from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumBGPNodeConfigOverride, error) + Get(name string) (*ciliumiov2alpha1.CiliumBGPNodeConfigOverride, error) CiliumBGPNodeConfigOverrideListerExpansion } // ciliumBGPNodeConfigOverrideLister implements the CiliumBGPNodeConfigOverrideLister interface. type ciliumBGPNodeConfigOverrideLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumBGPNodeConfigOverride] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumBGPNodeConfigOverride] } // NewCiliumBGPNodeConfigOverrideLister returns a new CiliumBGPNodeConfigOverrideLister. func NewCiliumBGPNodeConfigOverrideLister(indexer cache.Indexer) CiliumBGPNodeConfigOverrideLister { - return &ciliumBGPNodeConfigOverrideLister{listers.New[*v2alpha1.CiliumBGPNodeConfigOverride](indexer, v2alpha1.Resource("ciliumbgpnodeconfigoverride"))} + return &ciliumBGPNodeConfigOverrideLister{listers.New[*ciliumiov2alpha1.CiliumBGPNodeConfigOverride](indexer, ciliumiov2alpha1.Resource("ciliumbgpnodeconfigoverride"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeerconfig.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeerconfig.go index 8051639436ff7..5dd5dc8e90be5 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeerconfig.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeerconfig.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumBGPPeerConfigLister helps list CiliumBGPPeerConfigs. @@ -17,19 +17,19 @@ import ( type CiliumBGPPeerConfigLister interface { // List lists all CiliumBGPPeerConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumBGPPeerConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumBGPPeerConfig, err error) // Get retrieves the CiliumBGPPeerConfig from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumBGPPeerConfig, error) + Get(name string) (*ciliumiov2alpha1.CiliumBGPPeerConfig, error) CiliumBGPPeerConfigListerExpansion } // ciliumBGPPeerConfigLister implements the CiliumBGPPeerConfigLister interface. type ciliumBGPPeerConfigLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumBGPPeerConfig] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumBGPPeerConfig] } // NewCiliumBGPPeerConfigLister returns a new CiliumBGPPeerConfigLister. func NewCiliumBGPPeerConfigLister(indexer cache.Indexer) CiliumBGPPeerConfigLister { - return &ciliumBGPPeerConfigLister{listers.New[*v2alpha1.CiliumBGPPeerConfig](indexer, v2alpha1.Resource("ciliumbgppeerconfig"))} + return &ciliumBGPPeerConfigLister{listers.New[*ciliumiov2alpha1.CiliumBGPPeerConfig](indexer, ciliumiov2alpha1.Resource("ciliumbgppeerconfig"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go index 92d58aff1de24..99b45d2fcb2ee 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumbgppeeringpolicy.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumBGPPeeringPolicyLister helps list CiliumBGPPeeringPolicies. @@ -17,19 +17,19 @@ import ( type CiliumBGPPeeringPolicyLister interface { // List lists all CiliumBGPPeeringPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumBGPPeeringPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumBGPPeeringPolicy, err error) // Get retrieves the CiliumBGPPeeringPolicy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumBGPPeeringPolicy, error) + Get(name string) (*ciliumiov2alpha1.CiliumBGPPeeringPolicy, error) CiliumBGPPeeringPolicyListerExpansion } // ciliumBGPPeeringPolicyLister implements the CiliumBGPPeeringPolicyLister interface. type ciliumBGPPeeringPolicyLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumBGPPeeringPolicy] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumBGPPeeringPolicy] } // NewCiliumBGPPeeringPolicyLister returns a new CiliumBGPPeeringPolicyLister. func NewCiliumBGPPeeringPolicyLister(indexer cache.Indexer) CiliumBGPPeeringPolicyLister { - return &ciliumBGPPeeringPolicyLister{listers.New[*v2alpha1.CiliumBGPPeeringPolicy](indexer, v2alpha1.Resource("ciliumbgppeeringpolicy"))} + return &ciliumBGPPeeringPolicyLister{listers.New[*ciliumiov2alpha1.CiliumBGPPeeringPolicy](indexer, ciliumiov2alpha1.Resource("ciliumbgppeeringpolicy"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumcidrgroup.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumcidrgroup.go index a91e4483c1835..7137723ae6321 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumcidrgroup.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumcidrgroup.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumCIDRGroupLister helps list CiliumCIDRGroups. @@ -17,19 +17,19 @@ import ( type CiliumCIDRGroupLister interface { // List lists all CiliumCIDRGroups in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumCIDRGroup, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumCIDRGroup, err error) // Get retrieves the CiliumCIDRGroup from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumCIDRGroup, error) + Get(name string) (*ciliumiov2alpha1.CiliumCIDRGroup, error) CiliumCIDRGroupListerExpansion } // ciliumCIDRGroupLister implements the CiliumCIDRGroupLister interface. type ciliumCIDRGroupLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumCIDRGroup] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumCIDRGroup] } // NewCiliumCIDRGroupLister returns a new CiliumCIDRGroupLister. func NewCiliumCIDRGroupLister(indexer cache.Indexer) CiliumCIDRGroupLister { - return &ciliumCIDRGroupLister{listers.New[*v2alpha1.CiliumCIDRGroup](indexer, v2alpha1.Resource("ciliumcidrgroup"))} + return &ciliumCIDRGroupLister{listers.New[*ciliumiov2alpha1.CiliumCIDRGroup](indexer, ciliumiov2alpha1.Resource("ciliumcidrgroup"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumendpointslice.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumendpointslice.go index 359dac4bfbd16..b8051604166b1 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumendpointslice.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumendpointslice.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumEndpointSliceLister helps list CiliumEndpointSlices. @@ -17,19 +17,19 @@ import ( type CiliumEndpointSliceLister interface { // List lists all CiliumEndpointSlices in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumEndpointSlice, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumEndpointSlice, err error) // Get retrieves the CiliumEndpointSlice from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumEndpointSlice, error) + Get(name string) (*ciliumiov2alpha1.CiliumEndpointSlice, error) CiliumEndpointSliceListerExpansion } // ciliumEndpointSliceLister implements the CiliumEndpointSliceLister interface. type ciliumEndpointSliceLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumEndpointSlice] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumEndpointSlice] } // NewCiliumEndpointSliceLister returns a new CiliumEndpointSliceLister. func NewCiliumEndpointSliceLister(indexer cache.Indexer) CiliumEndpointSliceLister { - return &ciliumEndpointSliceLister{listers.New[*v2alpha1.CiliumEndpointSlice](indexer, v2alpha1.Resource("ciliumendpointslice"))} + return &ciliumEndpointSliceLister{listers.New[*ciliumiov2alpha1.CiliumEndpointSlice](indexer, ciliumiov2alpha1.Resource("ciliumendpointslice"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliuml2announcementpolicy.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliuml2announcementpolicy.go index 7e447e127a24c..c66731144f26c 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliuml2announcementpolicy.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliuml2announcementpolicy.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumL2AnnouncementPolicyLister helps list CiliumL2AnnouncementPolicies. @@ -17,19 +17,19 @@ import ( type CiliumL2AnnouncementPolicyLister interface { // List lists all CiliumL2AnnouncementPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumL2AnnouncementPolicy, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, err error) // Get retrieves the CiliumL2AnnouncementPolicy from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumL2AnnouncementPolicy, error) + Get(name string) (*ciliumiov2alpha1.CiliumL2AnnouncementPolicy, error) CiliumL2AnnouncementPolicyListerExpansion } // ciliumL2AnnouncementPolicyLister implements the CiliumL2AnnouncementPolicyLister interface. type ciliumL2AnnouncementPolicyLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumL2AnnouncementPolicy] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumL2AnnouncementPolicy] } // NewCiliumL2AnnouncementPolicyLister returns a new CiliumL2AnnouncementPolicyLister. func NewCiliumL2AnnouncementPolicyLister(indexer cache.Indexer) CiliumL2AnnouncementPolicyLister { - return &ciliumL2AnnouncementPolicyLister{listers.New[*v2alpha1.CiliumL2AnnouncementPolicy](indexer, v2alpha1.Resource("ciliuml2announcementpolicy"))} + return &ciliumL2AnnouncementPolicyLister{listers.New[*ciliumiov2alpha1.CiliumL2AnnouncementPolicy](indexer, ciliumiov2alpha1.Resource("ciliuml2announcementpolicy"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumloadbalancerippool.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumloadbalancerippool.go index c94138514ee65..0b2abee1d40e0 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumloadbalancerippool.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumloadbalancerippool.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumLoadBalancerIPPoolLister helps list CiliumLoadBalancerIPPools. @@ -17,19 +17,19 @@ import ( type CiliumLoadBalancerIPPoolLister interface { // List lists all CiliumLoadBalancerIPPools in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumLoadBalancerIPPool, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumLoadBalancerIPPool, err error) // Get retrieves the CiliumLoadBalancerIPPool from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumLoadBalancerIPPool, error) + Get(name string) (*ciliumiov2alpha1.CiliumLoadBalancerIPPool, error) CiliumLoadBalancerIPPoolListerExpansion } // ciliumLoadBalancerIPPoolLister implements the CiliumLoadBalancerIPPoolLister interface. type ciliumLoadBalancerIPPoolLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumLoadBalancerIPPool] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumLoadBalancerIPPool] } // NewCiliumLoadBalancerIPPoolLister returns a new CiliumLoadBalancerIPPoolLister. func NewCiliumLoadBalancerIPPoolLister(indexer cache.Indexer) CiliumLoadBalancerIPPoolLister { - return &ciliumLoadBalancerIPPoolLister{listers.New[*v2alpha1.CiliumLoadBalancerIPPool](indexer, v2alpha1.Resource("ciliumloadbalancerippool"))} + return &ciliumLoadBalancerIPPoolLister{listers.New[*ciliumiov2alpha1.CiliumLoadBalancerIPPool](indexer, ciliumiov2alpha1.Resource("ciliumloadbalancerippool"))} } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumnodeconfig.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumnodeconfig.go index a2510fe36a263..8d655359e999d 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumnodeconfig.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumnodeconfig.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumNodeConfigLister helps list CiliumNodeConfigs. @@ -17,7 +17,7 @@ import ( type CiliumNodeConfigLister interface { // List lists all CiliumNodeConfigs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumNodeConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumNodeConfig, err error) // CiliumNodeConfigs returns an object that can list and get CiliumNodeConfigs. CiliumNodeConfigs(namespace string) CiliumNodeConfigNamespaceLister CiliumNodeConfigListerExpansion @@ -25,17 +25,17 @@ type CiliumNodeConfigLister interface { // ciliumNodeConfigLister implements the CiliumNodeConfigLister interface. type ciliumNodeConfigLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumNodeConfig] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumNodeConfig] } // NewCiliumNodeConfigLister returns a new CiliumNodeConfigLister. func NewCiliumNodeConfigLister(indexer cache.Indexer) CiliumNodeConfigLister { - return &ciliumNodeConfigLister{listers.New[*v2alpha1.CiliumNodeConfig](indexer, v2alpha1.Resource("ciliumnodeconfig"))} + return &ciliumNodeConfigLister{listers.New[*ciliumiov2alpha1.CiliumNodeConfig](indexer, ciliumiov2alpha1.Resource("ciliumnodeconfig"))} } // CiliumNodeConfigs returns an object that can list and get CiliumNodeConfigs. func (s *ciliumNodeConfigLister) CiliumNodeConfigs(namespace string) CiliumNodeConfigNamespaceLister { - return ciliumNodeConfigNamespaceLister{listers.NewNamespaced[*v2alpha1.CiliumNodeConfig](s.ResourceIndexer, namespace)} + return ciliumNodeConfigNamespaceLister{listers.NewNamespaced[*ciliumiov2alpha1.CiliumNodeConfig](s.ResourceIndexer, namespace)} } // CiliumNodeConfigNamespaceLister helps list and get CiliumNodeConfigs. @@ -43,15 +43,15 @@ func (s *ciliumNodeConfigLister) CiliumNodeConfigs(namespace string) CiliumNodeC type CiliumNodeConfigNamespaceLister interface { // List lists all CiliumNodeConfigs in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumNodeConfig, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumNodeConfig, err error) // Get retrieves the CiliumNodeConfig from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumNodeConfig, error) + Get(name string) (*ciliumiov2alpha1.CiliumNodeConfig, error) CiliumNodeConfigNamespaceListerExpansion } // ciliumNodeConfigNamespaceLister implements the CiliumNodeConfigNamespaceLister // interface. type ciliumNodeConfigNamespaceLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumNodeConfig] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumNodeConfig] } diff --git a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumpodippool.go b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumpodippool.go index eb657f8bc2a6f..8bc1f2a92ca55 100644 --- a/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumpodippool.go +++ b/pkg/k8s/client/listers/cilium.io/v2alpha1/ciliumpodippool.go @@ -6,10 +6,10 @@ package v2alpha1 import ( - v2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + ciliumiov2alpha1 "github.com/cilium/cilium/pkg/k8s/apis/cilium.io/v2alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CiliumPodIPPoolLister helps list CiliumPodIPPools. @@ -17,19 +17,19 @@ import ( type CiliumPodIPPoolLister interface { // List lists all CiliumPodIPPools in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v2alpha1.CiliumPodIPPool, err error) + List(selector labels.Selector) (ret []*ciliumiov2alpha1.CiliumPodIPPool, err error) // Get retrieves the CiliumPodIPPool from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v2alpha1.CiliumPodIPPool, error) + Get(name string) (*ciliumiov2alpha1.CiliumPodIPPool, error) CiliumPodIPPoolListerExpansion } // ciliumPodIPPoolLister implements the CiliumPodIPPoolLister interface. type ciliumPodIPPoolLister struct { - listers.ResourceIndexer[*v2alpha1.CiliumPodIPPool] + listers.ResourceIndexer[*ciliumiov2alpha1.CiliumPodIPPool] } // NewCiliumPodIPPoolLister returns a new CiliumPodIPPoolLister. func NewCiliumPodIPPoolLister(indexer cache.Indexer) CiliumPodIPPoolLister { - return &ciliumPodIPPoolLister{listers.New[*v2alpha1.CiliumPodIPPool](indexer, v2alpha1.Resource("ciliumpodippool"))} + return &ciliumPodIPPoolLister{listers.New[*ciliumiov2alpha1.CiliumPodIPPool](indexer, ciliumiov2alpha1.Resource("ciliumpodippool"))} } diff --git a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/clientset.go b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/clientset.go index a44f5ee0993ba..af015904a0b36 100644 --- a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/clientset.go +++ b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/clientset.go @@ -6,8 +6,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1" discovery "k8s.io/client-go/discovery" diff --git a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go index 5f5e04bd9aa8a..2c2d6c5216929 100644 --- a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go +++ b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/apiextensions_client.go @@ -6,10 +6,10 @@ package v1 import ( - "net/http" + http "net/http" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" + scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme" + apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" rest "k8s.io/client-go/rest" ) @@ -72,7 +72,7 @@ func New(c rest.Interface) *ApiextensionsV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := apiextensionsv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go index 66dbbe2b04d49..4ce75c1e80072 100644 --- a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go +++ b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/customresourcedefinition.go @@ -6,10 +6,10 @@ package v1 import ( - "context" + context "context" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/scheme" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" + apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" @@ -24,31 +24,33 @@ type CustomResourceDefinitionsGetter interface { // CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. type CustomResourceDefinitionInterface interface { - Create(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.CreateOptions) (*v1.CustomResourceDefinition, error) - Update(ctx context.Context, customResourceDefinition *v1.CustomResourceDefinition, opts metav1.UpdateOptions) (*v1.CustomResourceDefinition, error) + Create(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts metav1.CreateOptions) (*apiextensionsv1.CustomResourceDefinition, error) + Update(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts metav1.UpdateOptions) (*apiextensionsv1.CustomResourceDefinition, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.CustomResourceDefinition, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.CustomResourceDefinitionList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiextensionsv1.CustomResourceDefinition, error) + List(ctx context.Context, opts metav1.ListOptions) (*apiextensionsv1.CustomResourceDefinitionList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.CustomResourceDefinition, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) CustomResourceDefinitionExpansion } // customResourceDefinitions implements CustomResourceDefinitionInterface type customResourceDefinitions struct { - *gentype.ClientWithList[*v1.CustomResourceDefinition, *v1.CustomResourceDefinitionList] + *gentype.ClientWithList[*apiextensionsv1.CustomResourceDefinition, *apiextensionsv1.CustomResourceDefinitionList] } // newCustomResourceDefinitions returns a CustomResourceDefinitions func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefinitions { return &customResourceDefinitions{ - gentype.NewClientWithList[*v1.CustomResourceDefinition, *v1.CustomResourceDefinitionList]( + gentype.NewClientWithList[*apiextensionsv1.CustomResourceDefinition, *apiextensionsv1.CustomResourceDefinitionList]( "customresourcedefinitions", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.CustomResourceDefinition { return &v1.CustomResourceDefinition{} }, - func() *v1.CustomResourceDefinitionList { return &v1.CustomResourceDefinitionList{} }), + func() *apiextensionsv1.CustomResourceDefinition { return &apiextensionsv1.CustomResourceDefinition{} }, + func() *apiextensionsv1.CustomResourceDefinitionList { + return &apiextensionsv1.CustomResourceDefinitionList{} + }), } } diff --git a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/fake/fake_customresourcedefinition.go b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/fake/fake_customresourcedefinition.go index 32985f2dee16c..c868c2ed05a1f 100644 --- a/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/fake/fake_customresourcedefinition.go +++ b/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned/typed/apiextensions/v1/fake/fake_customresourcedefinition.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/apiextensions/v1/customresourcedefinition.go b/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/apiextensions/v1/customresourcedefinition.go index 523c65eef513b..7a053e708ddc6 100644 --- a/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/apiextensions/v1/customresourcedefinition.go +++ b/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/apiextensions/v1/customresourcedefinition.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/listers/apiextensions/v1" - apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" + apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apiextensions-client/listers/apiextensions/v1" + apisapiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // CustomResourceDefinitions. type CustomResourceDefinitionInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.CustomResourceDefinitionLister + Lister() apiextensionsv1.CustomResourceDefinitionLister } type customResourceDefinitionInformer struct { @@ -57,7 +57,7 @@ func NewFilteredCustomResourceDefinitionInformer(client versioned.Interface, res return client.ApiextensionsV1().CustomResourceDefinitions().Watch(context.TODO(), options) }, }, - &apiextensionsv1.CustomResourceDefinition{}, + &apisapiextensionsv1.CustomResourceDefinition{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *customResourceDefinitionInformer) defaultInformer(client versioned.Inte } func (f *customResourceDefinitionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiextensionsv1.CustomResourceDefinition{}, f.defaultInformer) + return f.factory.InformerFor(&apisapiextensionsv1.CustomResourceDefinition{}, f.defaultInformer) } -func (f *customResourceDefinitionInformer) Lister() v1.CustomResourceDefinitionLister { - return v1.NewCustomResourceDefinitionLister(f.Informer().GetIndexer()) +func (f *customResourceDefinitionInformer) Lister() apiextensionsv1.CustomResourceDefinitionLister { + return apiextensionsv1.NewCustomResourceDefinitionLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/generic.go b/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/generic.go index 85977955e2464..5bb21d4302d58 100644 --- a/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/generic.go +++ b/pkg/k8s/slim/k8s/apiextensions-client/informers/externalversions/generic.go @@ -6,7 +6,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" schema "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/pkg/k8s/slim/k8s/apiextensions-client/listers/apiextensions/v1/customresourcedefinition.go b/pkg/k8s/slim/k8s/apiextensions-client/listers/apiextensions/v1/customresourcedefinition.go index 316f7cfcbab2e..0ef80fe30d9bc 100644 --- a/pkg/k8s/slim/k8s/apiextensions-client/listers/apiextensions/v1/customresourcedefinition.go +++ b/pkg/k8s/slim/k8s/apiextensions-client/listers/apiextensions/v1/customresourcedefinition.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + apiextensionsv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/apis/apiextensions/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // CustomResourceDefinitionLister helps list CustomResourceDefinitions. @@ -17,19 +17,19 @@ import ( type CustomResourceDefinitionLister interface { // List lists all CustomResourceDefinitions in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.CustomResourceDefinition, err error) + List(selector labels.Selector) (ret []*apiextensionsv1.CustomResourceDefinition, err error) // Get retrieves the CustomResourceDefinition from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.CustomResourceDefinition, error) + Get(name string) (*apiextensionsv1.CustomResourceDefinition, error) CustomResourceDefinitionListerExpansion } // customResourceDefinitionLister implements the CustomResourceDefinitionLister interface. type customResourceDefinitionLister struct { - listers.ResourceIndexer[*v1.CustomResourceDefinition] + listers.ResourceIndexer[*apiextensionsv1.CustomResourceDefinition] } // NewCustomResourceDefinitionLister returns a new CustomResourceDefinitionLister. func NewCustomResourceDefinitionLister(indexer cache.Indexer) CustomResourceDefinitionLister { - return &customResourceDefinitionLister{listers.New[*v1.CustomResourceDefinition](indexer, v1.Resource("customresourcedefinition"))} + return &customResourceDefinitionLister{listers.New[*apiextensionsv1.CustomResourceDefinition](indexer, apiextensionsv1.Resource("customresourcedefinition"))} } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go b/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go index 66370e6d6f902..2ec6aa35d09f3 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/clientset.go @@ -6,8 +6,8 @@ package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1" discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go index 25eab19580c55..a0fbaebde2dfe 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/core_client.go @@ -6,10 +6,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -97,7 +97,7 @@ func New(c rest.Interface) *CoreV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := corev1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/api" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go index a0a09e41e5516..d66b17fd9a22c 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/endpoints.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type EndpointsGetter interface { // EndpointsInterface has methods to work with Endpoints resources. type EndpointsInterface interface { - Create(ctx context.Context, endpoints *v1.Endpoints, opts metav1.CreateOptions) (*v1.Endpoints, error) - Update(ctx context.Context, endpoints *v1.Endpoints, opts metav1.UpdateOptions) (*v1.Endpoints, error) + Create(ctx context.Context, endpoints *corev1.Endpoints, opts metav1.CreateOptions) (*corev1.Endpoints, error) + Update(ctx context.Context, endpoints *corev1.Endpoints, opts metav1.UpdateOptions) (*corev1.Endpoints, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Endpoints, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointsList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Endpoints, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.EndpointsList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Endpoints, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *corev1.Endpoints, err error) EndpointsExpansion } // endpoints implements EndpointsInterface type endpoints struct { - *gentype.ClientWithList[*v1.Endpoints, *v1.EndpointsList] + *gentype.ClientWithList[*corev1.Endpoints, *corev1.EndpointsList] } // newEndpoints returns a Endpoints func newEndpoints(c *CoreV1Client, namespace string) *endpoints { return &endpoints{ - gentype.NewClientWithList[*v1.Endpoints, *v1.EndpointsList]( + gentype.NewClientWithList[*corev1.Endpoints, *corev1.EndpointsList]( "endpoints", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Endpoints { return &v1.Endpoints{} }, - func() *v1.EndpointsList { return &v1.EndpointsList{} }), + func() *corev1.Endpoints { return &corev1.Endpoints{} }, + func() *corev1.EndpointsList { return &corev1.EndpointsList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go index 0cca0af7c96f1..fe2dda7143f76 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_endpoints.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go index 36372ea414d9d..b16f29d9d8ec0 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_namespace.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go index 0005486118add..e61d886d0ee01 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_node.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go index 798da133cf011..d3197ceabe7a2 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_pod.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go index edac295c27bcd..72442a38c5374 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_secret.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go index 95c59a4fffe28..1bd4f957794c2 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/fake/fake_service.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go index 39392ff98a76f..a389a2ca0446b 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/namespace.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,30 +24,30 @@ type NamespacesGetter interface { // NamespaceInterface has methods to work with Namespace resources. type NamespaceInterface interface { - Create(ctx context.Context, namespace *v1.Namespace, opts metav1.CreateOptions) (*v1.Namespace, error) - Update(ctx context.Context, namespace *v1.Namespace, opts metav1.UpdateOptions) (*v1.Namespace, error) + Create(ctx context.Context, namespace *corev1.Namespace, opts metav1.CreateOptions) (*corev1.Namespace, error) + Update(ctx context.Context, namespace *corev1.Namespace, opts metav1.UpdateOptions) (*corev1.Namespace, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Namespace, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NamespaceList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Namespace, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.NamespaceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Namespace, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *corev1.Namespace, err error) NamespaceExpansion } // namespaces implements NamespaceInterface type namespaces struct { - *gentype.ClientWithList[*v1.Namespace, *v1.NamespaceList] + *gentype.ClientWithList[*corev1.Namespace, *corev1.NamespaceList] } // newNamespaces returns a Namespaces func newNamespaces(c *CoreV1Client) *namespaces { return &namespaces{ - gentype.NewClientWithList[*v1.Namespace, *v1.NamespaceList]( + gentype.NewClientWithList[*corev1.Namespace, *corev1.NamespaceList]( "namespaces", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Namespace { return &v1.Namespace{} }, - func() *v1.NamespaceList { return &v1.NamespaceList{} }), + func() *corev1.Namespace { return &corev1.Namespace{} }, + func() *corev1.NamespaceList { return &corev1.NamespaceList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go index 22a06f4d6bb4d..7d546099a0ef6 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/node.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,33 +24,33 @@ type NodesGetter interface { // NodeInterface has methods to work with Node resources. type NodeInterface interface { - Create(ctx context.Context, node *v1.Node, opts metav1.CreateOptions) (*v1.Node, error) - Update(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) + Create(ctx context.Context, node *corev1.Node, opts metav1.CreateOptions) (*corev1.Node, error) + Update(ctx context.Context, node *corev1.Node, opts metav1.UpdateOptions) (*corev1.Node, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, node *v1.Node, opts metav1.UpdateOptions) (*v1.Node, error) + UpdateStatus(ctx context.Context, node *corev1.Node, opts metav1.UpdateOptions) (*corev1.Node, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Node, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NodeList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Node, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.NodeList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Node, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *corev1.Node, err error) NodeExpansion } // nodes implements NodeInterface type nodes struct { - *gentype.ClientWithList[*v1.Node, *v1.NodeList] + *gentype.ClientWithList[*corev1.Node, *corev1.NodeList] } // newNodes returns a Nodes func newNodes(c *CoreV1Client) *nodes { return &nodes{ - gentype.NewClientWithList[*v1.Node, *v1.NodeList]( + gentype.NewClientWithList[*corev1.Node, *corev1.NodeList]( "nodes", c.RESTClient(), scheme.ParameterCodec, "", - func() *v1.Node { return &v1.Node{} }, - func() *v1.NodeList { return &v1.NodeList{} }), + func() *corev1.Node { return &corev1.Node{} }, + func() *corev1.NodeList { return &corev1.NodeList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go index b864dbc83a92d..258fc242ac461 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/pod.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,42 +24,42 @@ type PodsGetter interface { // PodInterface has methods to work with Pod resources. type PodInterface interface { - Create(ctx context.Context, pod *v1.Pod, opts metav1.CreateOptions) (*v1.Pod, error) - Update(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) + Create(ctx context.Context, pod *corev1.Pod, opts metav1.CreateOptions) (*corev1.Pod, error) + Update(ctx context.Context, pod *corev1.Pod, opts metav1.UpdateOptions) (*corev1.Pod, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) + UpdateStatus(ctx context.Context, pod *corev1.Pod, opts metav1.UpdateOptions) (*corev1.Pod, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Pod, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.PodList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Pod, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.PodList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Pod, err error) - UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (*v1.Pod, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *corev1.Pod, err error) + UpdateEphemeralContainers(ctx context.Context, podName string, pod *corev1.Pod, opts metav1.UpdateOptions) (*corev1.Pod, error) PodExpansion } // pods implements PodInterface type pods struct { - *gentype.ClientWithList[*v1.Pod, *v1.PodList] + *gentype.ClientWithList[*corev1.Pod, *corev1.PodList] } // newPods returns a Pods func newPods(c *CoreV1Client, namespace string) *pods { return &pods{ - gentype.NewClientWithList[*v1.Pod, *v1.PodList]( + gentype.NewClientWithList[*corev1.Pod, *corev1.PodList]( "pods", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Pod { return &v1.Pod{} }, - func() *v1.PodList { return &v1.PodList{} }), + func() *corev1.Pod { return &corev1.Pod{} }, + func() *corev1.PodList { return &corev1.PodList{} }), } } // UpdateEphemeralContainers takes the top resource name and the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any. -func (c *pods) UpdateEphemeralContainers(ctx context.Context, podName string, pod *v1.Pod, opts metav1.UpdateOptions) (result *v1.Pod, err error) { - result = &v1.Pod{} +func (c *pods) UpdateEphemeralContainers(ctx context.Context, podName string, pod *corev1.Pod, opts metav1.UpdateOptions) (result *corev1.Pod, err error) { + result = &corev1.Pod{} err = c.GetClient().Put(). Namespace(c.GetNamespace()). Resource("pods"). diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go index 6d1cc1fe62f73..5eea1509a0f52 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/secret.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type SecretsGetter interface { // SecretInterface has methods to work with Secret resources. type SecretInterface interface { - Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) (*v1.Secret, error) - Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) (*v1.Secret, error) + Create(ctx context.Context, secret *corev1.Secret, opts metav1.CreateOptions) (*corev1.Secret, error) + Update(ctx context.Context, secret *corev1.Secret, opts metav1.UpdateOptions) (*corev1.Secret, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Secret, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.SecretList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Secret, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.SecretList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Secret, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *corev1.Secret, err error) SecretExpansion } // secrets implements SecretInterface type secrets struct { - *gentype.ClientWithList[*v1.Secret, *v1.SecretList] + *gentype.ClientWithList[*corev1.Secret, *corev1.SecretList] } // newSecrets returns a Secrets func newSecrets(c *CoreV1Client, namespace string) *secrets { return &secrets{ - gentype.NewClientWithList[*v1.Secret, *v1.SecretList]( + gentype.NewClientWithList[*corev1.Secret, *corev1.SecretList]( "secrets", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Secret { return &v1.Secret{} }, - func() *v1.SecretList { return &v1.SecretList{} }), + func() *corev1.Secret { return &corev1.Secret{} }, + func() *corev1.SecretList { return &corev1.SecretList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go index 0e7032b453fdd..cf40a03b23aed 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/core/v1/service.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,32 +24,32 @@ type ServicesGetter interface { // ServiceInterface has methods to work with Service resources. type ServiceInterface interface { - Create(ctx context.Context, service *v1.Service, opts metav1.CreateOptions) (*v1.Service, error) - Update(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + Create(ctx context.Context, service *corev1.Service, opts metav1.CreateOptions) (*corev1.Service, error) + Update(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, service *v1.Service, opts metav1.UpdateOptions) (*v1.Service, error) + UpdateStatus(ctx context.Context, service *corev1.Service, opts metav1.UpdateOptions) (*corev1.Service, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Service, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.ServiceList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*corev1.Service, error) + List(ctx context.Context, opts metav1.ListOptions) (*corev1.ServiceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Service, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *corev1.Service, err error) ServiceExpansion } // services implements ServiceInterface type services struct { - *gentype.ClientWithList[*v1.Service, *v1.ServiceList] + *gentype.ClientWithList[*corev1.Service, *corev1.ServiceList] } // newServices returns a Services func newServices(c *CoreV1Client, namespace string) *services { return &services{ - gentype.NewClientWithList[*v1.Service, *v1.ServiceList]( + gentype.NewClientWithList[*corev1.Service, *corev1.ServiceList]( "services", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.Service { return &v1.Service{} }, - func() *v1.ServiceList { return &v1.ServiceList{} }), + func() *corev1.Service { return &corev1.Service{} }, + func() *corev1.ServiceList { return &corev1.ServiceList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go index ca9ef1187fff0..ffa438d0589cc 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/discovery_client.go @@ -6,10 +6,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" + discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" + scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -72,7 +72,7 @@ func New(c rest.Interface) *DiscoveryV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := discoveryv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go index 9026481b169f9..4e628602865f4 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/endpointslice.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" + discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type EndpointSlicesGetter interface { // EndpointSliceInterface has methods to work with EndpointSlice resources. type EndpointSliceInterface interface { - Create(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.CreateOptions) (*v1.EndpointSlice, error) - Update(ctx context.Context, endpointSlice *v1.EndpointSlice, opts metav1.UpdateOptions) (*v1.EndpointSlice, error) + Create(ctx context.Context, endpointSlice *discoveryv1.EndpointSlice, opts metav1.CreateOptions) (*discoveryv1.EndpointSlice, error) + Update(ctx context.Context, endpointSlice *discoveryv1.EndpointSlice, opts metav1.UpdateOptions) (*discoveryv1.EndpointSlice, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.EndpointSlice, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.EndpointSliceList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*discoveryv1.EndpointSlice, error) + List(ctx context.Context, opts metav1.ListOptions) (*discoveryv1.EndpointSliceList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.EndpointSlice, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *discoveryv1.EndpointSlice, err error) EndpointSliceExpansion } // endpointSlices implements EndpointSliceInterface type endpointSlices struct { - *gentype.ClientWithList[*v1.EndpointSlice, *v1.EndpointSliceList] + *gentype.ClientWithList[*discoveryv1.EndpointSlice, *discoveryv1.EndpointSliceList] } // newEndpointSlices returns a EndpointSlices func newEndpointSlices(c *DiscoveryV1Client, namespace string) *endpointSlices { return &endpointSlices{ - gentype.NewClientWithList[*v1.EndpointSlice, *v1.EndpointSliceList]( + gentype.NewClientWithList[*discoveryv1.EndpointSlice, *discoveryv1.EndpointSliceList]( "endpointslices", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.EndpointSlice { return &v1.EndpointSlice{} }, - func() *v1.EndpointSliceList { return &v1.EndpointSliceList{} }), + func() *discoveryv1.EndpointSlice { return &discoveryv1.EndpointSlice{} }, + func() *discoveryv1.EndpointSliceList { return &discoveryv1.EndpointSliceList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go index af8ca81395b71..215c18ef4b75d 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1/fake/fake_endpointslice.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go index d2d55658183d2..ede30d0ce1409 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/discovery_client.go @@ -6,10 +6,10 @@ package v1beta1 import ( - "net/http" + http "net/http" - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" + discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" + scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -72,7 +72,7 @@ func New(c rest.Interface) *DiscoveryV1beta1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion + gv := discoveryv1beta1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go index 813769c1f67d1..82b17ef6733b0 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/endpointslice.go @@ -6,9 +6,9 @@ package v1beta1 import ( - "context" + context "context" - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" + discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type EndpointSlicesGetter interface { // EndpointSliceInterface has methods to work with EndpointSlice resources. type EndpointSliceInterface interface { - Create(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.CreateOptions) (*v1beta1.EndpointSlice, error) - Update(ctx context.Context, endpointSlice *v1beta1.EndpointSlice, opts v1.UpdateOptions) (*v1beta1.EndpointSlice, error) + Create(ctx context.Context, endpointSlice *discoveryv1beta1.EndpointSlice, opts v1.CreateOptions) (*discoveryv1beta1.EndpointSlice, error) + Update(ctx context.Context, endpointSlice *discoveryv1beta1.EndpointSlice, opts v1.UpdateOptions) (*discoveryv1beta1.EndpointSlice, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.EndpointSlice, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.EndpointSliceList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*discoveryv1beta1.EndpointSlice, error) + List(ctx context.Context, opts v1.ListOptions) (*discoveryv1beta1.EndpointSliceList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.EndpointSlice, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *discoveryv1beta1.EndpointSlice, err error) EndpointSliceExpansion } // endpointSlices implements EndpointSliceInterface type endpointSlices struct { - *gentype.ClientWithList[*v1beta1.EndpointSlice, *v1beta1.EndpointSliceList] + *gentype.ClientWithList[*discoveryv1beta1.EndpointSlice, *discoveryv1beta1.EndpointSliceList] } // newEndpointSlices returns a EndpointSlices func newEndpointSlices(c *DiscoveryV1beta1Client, namespace string) *endpointSlices { return &endpointSlices{ - gentype.NewClientWithList[*v1beta1.EndpointSlice, *v1beta1.EndpointSliceList]( + gentype.NewClientWithList[*discoveryv1beta1.EndpointSlice, *discoveryv1beta1.EndpointSliceList]( "endpointslices", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1beta1.EndpointSlice { return &v1beta1.EndpointSlice{} }, - func() *v1beta1.EndpointSliceList { return &v1beta1.EndpointSliceList{} }), + func() *discoveryv1beta1.EndpointSlice { return &discoveryv1beta1.EndpointSlice{} }, + func() *discoveryv1beta1.EndpointSliceList { return &discoveryv1beta1.EndpointSliceList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go index 3f4b0eca51f6d..32a5edb07b7ae 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/discovery/v1beta1/fake/fake_endpointslice.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go index 769abf5831a5d..a2d68a15ceb84 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/fake/fake_networkpolicy.go @@ -6,7 +6,7 @@ package fake import ( - "context" + context "context" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go index ab93e1dfa9d27..b62b7492b52a6 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networking_client.go @@ -6,10 +6,10 @@ package v1 import ( - "net/http" + http "net/http" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" - "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" + networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" + scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) @@ -72,7 +72,7 @@ func New(c rest.Interface) *NetworkingV1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1.SchemeGroupVersion + gv := networkingv1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() diff --git a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go index 2c5e9fcf833f5..a26a2af5e6946 100644 --- a/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go +++ b/pkg/k8s/slim/k8s/client/clientset/versioned/typed/networking/v1/networkpolicy.go @@ -6,9 +6,9 @@ package v1 import ( - "context" + context "context" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" + networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" scheme "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned/scheme" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -24,31 +24,31 @@ type NetworkPoliciesGetter interface { // NetworkPolicyInterface has methods to work with NetworkPolicy resources. type NetworkPolicyInterface interface { - Create(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.CreateOptions) (*v1.NetworkPolicy, error) - Update(ctx context.Context, networkPolicy *v1.NetworkPolicy, opts metav1.UpdateOptions) (*v1.NetworkPolicy, error) + Create(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts metav1.CreateOptions) (*networkingv1.NetworkPolicy, error) + Update(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, opts metav1.UpdateOptions) (*networkingv1.NetworkPolicy, error) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.NetworkPolicy, error) - List(ctx context.Context, opts metav1.ListOptions) (*v1.NetworkPolicyList, error) + Get(ctx context.Context, name string, opts metav1.GetOptions) (*networkingv1.NetworkPolicy, error) + List(ctx context.Context, opts metav1.ListOptions) (*networkingv1.NetworkPolicyList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.NetworkPolicy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *networkingv1.NetworkPolicy, err error) NetworkPolicyExpansion } // networkPolicies implements NetworkPolicyInterface type networkPolicies struct { - *gentype.ClientWithList[*v1.NetworkPolicy, *v1.NetworkPolicyList] + *gentype.ClientWithList[*networkingv1.NetworkPolicy, *networkingv1.NetworkPolicyList] } // newNetworkPolicies returns a NetworkPolicies func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicies { return &networkPolicies{ - gentype.NewClientWithList[*v1.NetworkPolicy, *v1.NetworkPolicyList]( + gentype.NewClientWithList[*networkingv1.NetworkPolicy, *networkingv1.NetworkPolicyList]( "networkpolicies", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1.NetworkPolicy { return &v1.NetworkPolicy{} }, - func() *v1.NetworkPolicyList { return &v1.NetworkPolicyList{} }), + func() *networkingv1.NetworkPolicy { return &networkingv1.NetworkPolicy{} }, + func() *networkingv1.NetworkPolicyList { return &networkingv1.NetworkPolicyList{} }), } } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/endpoints.go b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/endpoints.go index ba1226714ce40..c12aa92f5eee2 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/endpoints.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/endpoints.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + apicorev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // Endpoints. type EndpointsInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.EndpointsLister + Lister() corev1.EndpointsLister } type endpointsInformer struct { @@ -58,7 +58,7 @@ func NewFilteredEndpointsInformer(client versioned.Interface, namespace string, return client.CoreV1().Endpoints(namespace).Watch(context.TODO(), options) }, }, - &corev1.Endpoints{}, + &apicorev1.Endpoints{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *endpointsInformer) defaultInformer(client versioned.Interface, resyncPe } func (f *endpointsInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&corev1.Endpoints{}, f.defaultInformer) + return f.factory.InformerFor(&apicorev1.Endpoints{}, f.defaultInformer) } -func (f *endpointsInformer) Lister() v1.EndpointsLister { - return v1.NewEndpointsLister(f.Informer().GetIndexer()) +func (f *endpointsInformer) Lister() corev1.EndpointsLister { + return corev1.NewEndpointsLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/namespace.go b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/namespace.go index e87d66312cda9..ba8bbac18e753 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/namespace.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/namespace.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + apicorev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // Namespaces. type NamespaceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.NamespaceLister + Lister() corev1.NamespaceLister } type namespaceInformer struct { @@ -57,7 +57,7 @@ func NewFilteredNamespaceInformer(client versioned.Interface, resyncPeriod time. return client.CoreV1().Namespaces().Watch(context.TODO(), options) }, }, - &corev1.Namespace{}, + &apicorev1.Namespace{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *namespaceInformer) defaultInformer(client versioned.Interface, resyncPe } func (f *namespaceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&corev1.Namespace{}, f.defaultInformer) + return f.factory.InformerFor(&apicorev1.Namespace{}, f.defaultInformer) } -func (f *namespaceInformer) Lister() v1.NamespaceLister { - return v1.NewNamespaceLister(f.Informer().GetIndexer()) +func (f *namespaceInformer) Lister() corev1.NamespaceLister { + return corev1.NewNamespaceLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/node.go b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/node.go index 8e045ab5cd8ad..f7a410fb9c53f 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/node.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/node.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + apicorev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // Nodes. type NodeInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.NodeLister + Lister() corev1.NodeLister } type nodeInformer struct { @@ -57,7 +57,7 @@ func NewFilteredNodeInformer(client versioned.Interface, resyncPeriod time.Durat return client.CoreV1().Nodes().Watch(context.TODO(), options) }, }, - &corev1.Node{}, + &apicorev1.Node{}, resyncPeriod, indexers, ) @@ -68,9 +68,9 @@ func (f *nodeInformer) defaultInformer(client versioned.Interface, resyncPeriod } func (f *nodeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&corev1.Node{}, f.defaultInformer) + return f.factory.InformerFor(&apicorev1.Node{}, f.defaultInformer) } -func (f *nodeInformer) Lister() v1.NodeLister { - return v1.NewNodeLister(f.Informer().GetIndexer()) +func (f *nodeInformer) Lister() corev1.NodeLister { + return corev1.NewNodeLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/pod.go b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/pod.go index 10f05911b8567..5b30408e9f8c4 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/pod.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/pod.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + apicorev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // Pods. type PodInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.PodLister + Lister() corev1.PodLister } type podInformer struct { @@ -58,7 +58,7 @@ func NewFilteredPodInformer(client versioned.Interface, namespace string, resync return client.CoreV1().Pods(namespace).Watch(context.TODO(), options) }, }, - &corev1.Pod{}, + &apicorev1.Pod{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *podInformer) defaultInformer(client versioned.Interface, resyncPeriod t } func (f *podInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&corev1.Pod{}, f.defaultInformer) + return f.factory.InformerFor(&apicorev1.Pod{}, f.defaultInformer) } -func (f *podInformer) Lister() v1.PodLister { - return v1.NewPodLister(f.Informer().GetIndexer()) +func (f *podInformer) Lister() corev1.PodLister { + return corev1.NewPodLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/secret.go b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/secret.go index d20211e675d26..da134daae877d 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/secret.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/secret.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + apicorev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // Secrets. type SecretInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.SecretLister + Lister() corev1.SecretLister } type secretInformer struct { @@ -58,7 +58,7 @@ func NewFilteredSecretInformer(client versioned.Interface, namespace string, res return client.CoreV1().Secrets(namespace).Watch(context.TODO(), options) }, }, - &corev1.Secret{}, + &apicorev1.Secret{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *secretInformer) defaultInformer(client versioned.Interface, resyncPerio } func (f *secretInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&corev1.Secret{}, f.defaultInformer) + return f.factory.InformerFor(&apicorev1.Secret{}, f.defaultInformer) } -func (f *secretInformer) Lister() v1.SecretLister { - return v1.NewSecretLister(f.Informer().GetIndexer()) +func (f *secretInformer) Lister() corev1.SecretLister { + return corev1.NewSecretLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/service.go b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/service.go index f213aec9ca635..c4b15018b7ae9 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/service.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/core/v1/service.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + apicorev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // Services. type ServiceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.ServiceLister + Lister() corev1.ServiceLister } type serviceInformer struct { @@ -58,7 +58,7 @@ func NewFilteredServiceInformer(client versioned.Interface, namespace string, re return client.CoreV1().Services(namespace).Watch(context.TODO(), options) }, }, - &corev1.Service{}, + &apicorev1.Service{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *serviceInformer) defaultInformer(client versioned.Interface, resyncPeri } func (f *serviceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&corev1.Service{}, f.defaultInformer) + return f.factory.InformerFor(&apicorev1.Service{}, f.defaultInformer) } -func (f *serviceInformer) Lister() v1.ServiceLister { - return v1.NewServiceLister(f.Informer().GetIndexer()) +func (f *serviceInformer) Lister() corev1.ServiceLister { + return corev1.NewServiceLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1/endpointslice.go b/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1/endpointslice.go index 31ed7c21d0756..eb1a83760461f 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1/endpointslice.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1/endpointslice.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" + apidiscoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/discovery/v1" + discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/discovery/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // EndpointSlices. type EndpointSliceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.EndpointSliceLister + Lister() discoveryv1.EndpointSliceLister } type endpointSliceInformer struct { @@ -58,7 +58,7 @@ func NewFilteredEndpointSliceInformer(client versioned.Interface, namespace stri return client.DiscoveryV1().EndpointSlices(namespace).Watch(context.TODO(), options) }, }, - &discoveryv1.EndpointSlice{}, + &apidiscoveryv1.EndpointSlice{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *endpointSliceInformer) defaultInformer(client versioned.Interface, resy } func (f *endpointSliceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&discoveryv1.EndpointSlice{}, f.defaultInformer) + return f.factory.InformerFor(&apidiscoveryv1.EndpointSlice{}, f.defaultInformer) } -func (f *endpointSliceInformer) Lister() v1.EndpointSliceLister { - return v1.NewEndpointSliceLister(f.Informer().GetIndexer()) +func (f *endpointSliceInformer) Lister() discoveryv1.EndpointSliceLister { + return discoveryv1.NewEndpointSliceLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1beta1/endpointslice.go b/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1beta1/endpointslice.go index cc400c951a000..b6f67774d6f4f 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1beta1/endpointslice.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/discovery/v1beta1/endpointslice.go @@ -6,13 +6,13 @@ package v1beta1 import ( - "context" + context "context" time "time" - discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" + apidiscoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/discovery/v1beta1" + discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/discovery/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // EndpointSlices. type EndpointSliceInformer interface { Informer() cache.SharedIndexInformer - Lister() v1beta1.EndpointSliceLister + Lister() discoveryv1beta1.EndpointSliceLister } type endpointSliceInformer struct { @@ -58,7 +58,7 @@ func NewFilteredEndpointSliceInformer(client versioned.Interface, namespace stri return client.DiscoveryV1beta1().EndpointSlices(namespace).Watch(context.TODO(), options) }, }, - &discoveryv1beta1.EndpointSlice{}, + &apidiscoveryv1beta1.EndpointSlice{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *endpointSliceInformer) defaultInformer(client versioned.Interface, resy } func (f *endpointSliceInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&discoveryv1beta1.EndpointSlice{}, f.defaultInformer) + return f.factory.InformerFor(&apidiscoveryv1beta1.EndpointSlice{}, f.defaultInformer) } -func (f *endpointSliceInformer) Lister() v1beta1.EndpointSliceLister { - return v1beta1.NewEndpointSliceLister(f.Informer().GetIndexer()) +func (f *endpointSliceInformer) Lister() discoveryv1beta1.EndpointSliceLister { + return discoveryv1beta1.NewEndpointSliceLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/generic.go b/pkg/k8s/slim/k8s/client/informers/externalversions/generic.go index 292a9e7d442ec..94194d5cd8d6e 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/generic.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/generic.go @@ -6,7 +6,7 @@ package externalversions import ( - "fmt" + fmt "fmt" v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" diff --git a/pkg/k8s/slim/k8s/client/informers/externalversions/networking/v1/networkpolicy.go b/pkg/k8s/slim/k8s/client/informers/externalversions/networking/v1/networkpolicy.go index 7697fdf19a27e..288689261fd9b 100644 --- a/pkg/k8s/slim/k8s/client/informers/externalversions/networking/v1/networkpolicy.go +++ b/pkg/k8s/slim/k8s/client/informers/externalversions/networking/v1/networkpolicy.go @@ -6,13 +6,13 @@ package v1 import ( - "context" + context "context" time "time" - networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" + apinetworkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" versioned "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/clientset/versioned" internalinterfaces "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/informers/externalversions/internalinterfaces" - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/networking/v1" + networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/client/listers/networking/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -23,7 +23,7 @@ import ( // NetworkPolicies. type NetworkPolicyInformer interface { Informer() cache.SharedIndexInformer - Lister() v1.NetworkPolicyLister + Lister() networkingv1.NetworkPolicyLister } type networkPolicyInformer struct { @@ -58,7 +58,7 @@ func NewFilteredNetworkPolicyInformer(client versioned.Interface, namespace stri return client.NetworkingV1().NetworkPolicies(namespace).Watch(context.TODO(), options) }, }, - &networkingv1.NetworkPolicy{}, + &apinetworkingv1.NetworkPolicy{}, resyncPeriod, indexers, ) @@ -69,9 +69,9 @@ func (f *networkPolicyInformer) defaultInformer(client versioned.Interface, resy } func (f *networkPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&networkingv1.NetworkPolicy{}, f.defaultInformer) + return f.factory.InformerFor(&apinetworkingv1.NetworkPolicy{}, f.defaultInformer) } -func (f *networkPolicyInformer) Lister() v1.NetworkPolicyLister { - return v1.NewNetworkPolicyLister(f.Informer().GetIndexer()) +func (f *networkPolicyInformer) Lister() networkingv1.NetworkPolicyLister { + return networkingv1.NewNetworkPolicyLister(f.Informer().GetIndexer()) } diff --git a/pkg/k8s/slim/k8s/client/listers/core/v1/endpoints.go b/pkg/k8s/slim/k8s/client/listers/core/v1/endpoints.go index d37a57416b5da..3b17496c38a0f 100644 --- a/pkg/k8s/slim/k8s/client/listers/core/v1/endpoints.go +++ b/pkg/k8s/slim/k8s/client/listers/core/v1/endpoints.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // EndpointsLister helps list Endpoints. @@ -17,7 +17,7 @@ import ( type EndpointsLister interface { // List lists all Endpoints in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Endpoints, err error) + List(selector labels.Selector) (ret []*corev1.Endpoints, err error) // Endpoints returns an object that can list and get Endpoints. Endpoints(namespace string) EndpointsNamespaceLister EndpointsListerExpansion @@ -25,17 +25,17 @@ type EndpointsLister interface { // endpointsLister implements the EndpointsLister interface. type endpointsLister struct { - listers.ResourceIndexer[*v1.Endpoints] + listers.ResourceIndexer[*corev1.Endpoints] } // NewEndpointsLister returns a new EndpointsLister. func NewEndpointsLister(indexer cache.Indexer) EndpointsLister { - return &endpointsLister{listers.New[*v1.Endpoints](indexer, v1.Resource("endpoints"))} + return &endpointsLister{listers.New[*corev1.Endpoints](indexer, corev1.Resource("endpoints"))} } // Endpoints returns an object that can list and get Endpoints. func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister { - return endpointsNamespaceLister{listers.NewNamespaced[*v1.Endpoints](s.ResourceIndexer, namespace)} + return endpointsNamespaceLister{listers.NewNamespaced[*corev1.Endpoints](s.ResourceIndexer, namespace)} } // EndpointsNamespaceLister helps list and get Endpoints. @@ -43,15 +43,15 @@ func (s *endpointsLister) Endpoints(namespace string) EndpointsNamespaceLister { type EndpointsNamespaceLister interface { // List lists all Endpoints in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Endpoints, err error) + List(selector labels.Selector) (ret []*corev1.Endpoints, err error) // Get retrieves the Endpoints from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Endpoints, error) + Get(name string) (*corev1.Endpoints, error) EndpointsNamespaceListerExpansion } // endpointsNamespaceLister implements the EndpointsNamespaceLister // interface. type endpointsNamespaceLister struct { - listers.ResourceIndexer[*v1.Endpoints] + listers.ResourceIndexer[*corev1.Endpoints] } diff --git a/pkg/k8s/slim/k8s/client/listers/core/v1/namespace.go b/pkg/k8s/slim/k8s/client/listers/core/v1/namespace.go index a585ce873812b..7ea72d62c8dd4 100644 --- a/pkg/k8s/slim/k8s/client/listers/core/v1/namespace.go +++ b/pkg/k8s/slim/k8s/client/listers/core/v1/namespace.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // NamespaceLister helps list Namespaces. @@ -17,19 +17,19 @@ import ( type NamespaceLister interface { // List lists all Namespaces in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Namespace, err error) + List(selector labels.Selector) (ret []*corev1.Namespace, err error) // Get retrieves the Namespace from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Namespace, error) + Get(name string) (*corev1.Namespace, error) NamespaceListerExpansion } // namespaceLister implements the NamespaceLister interface. type namespaceLister struct { - listers.ResourceIndexer[*v1.Namespace] + listers.ResourceIndexer[*corev1.Namespace] } // NewNamespaceLister returns a new NamespaceLister. func NewNamespaceLister(indexer cache.Indexer) NamespaceLister { - return &namespaceLister{listers.New[*v1.Namespace](indexer, v1.Resource("namespace"))} + return &namespaceLister{listers.New[*corev1.Namespace](indexer, corev1.Resource("namespace"))} } diff --git a/pkg/k8s/slim/k8s/client/listers/core/v1/node.go b/pkg/k8s/slim/k8s/client/listers/core/v1/node.go index fbba687487fd6..43434ecae7763 100644 --- a/pkg/k8s/slim/k8s/client/listers/core/v1/node.go +++ b/pkg/k8s/slim/k8s/client/listers/core/v1/node.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // NodeLister helps list Nodes. @@ -17,19 +17,19 @@ import ( type NodeLister interface { // List lists all Nodes in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Node, err error) + List(selector labels.Selector) (ret []*corev1.Node, err error) // Get retrieves the Node from the index for a given name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Node, error) + Get(name string) (*corev1.Node, error) NodeListerExpansion } // nodeLister implements the NodeLister interface. type nodeLister struct { - listers.ResourceIndexer[*v1.Node] + listers.ResourceIndexer[*corev1.Node] } // NewNodeLister returns a new NodeLister. func NewNodeLister(indexer cache.Indexer) NodeLister { - return &nodeLister{listers.New[*v1.Node](indexer, v1.Resource("node"))} + return &nodeLister{listers.New[*corev1.Node](indexer, corev1.Resource("node"))} } diff --git a/pkg/k8s/slim/k8s/client/listers/core/v1/pod.go b/pkg/k8s/slim/k8s/client/listers/core/v1/pod.go index ee19233be9638..f72d6e9d1175d 100644 --- a/pkg/k8s/slim/k8s/client/listers/core/v1/pod.go +++ b/pkg/k8s/slim/k8s/client/listers/core/v1/pod.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // PodLister helps list Pods. @@ -17,7 +17,7 @@ import ( type PodLister interface { // List lists all Pods in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Pod, err error) + List(selector labels.Selector) (ret []*corev1.Pod, err error) // Pods returns an object that can list and get Pods. Pods(namespace string) PodNamespaceLister PodListerExpansion @@ -25,17 +25,17 @@ type PodLister interface { // podLister implements the PodLister interface. type podLister struct { - listers.ResourceIndexer[*v1.Pod] + listers.ResourceIndexer[*corev1.Pod] } // NewPodLister returns a new PodLister. func NewPodLister(indexer cache.Indexer) PodLister { - return &podLister{listers.New[*v1.Pod](indexer, v1.Resource("pod"))} + return &podLister{listers.New[*corev1.Pod](indexer, corev1.Resource("pod"))} } // Pods returns an object that can list and get Pods. func (s *podLister) Pods(namespace string) PodNamespaceLister { - return podNamespaceLister{listers.NewNamespaced[*v1.Pod](s.ResourceIndexer, namespace)} + return podNamespaceLister{listers.NewNamespaced[*corev1.Pod](s.ResourceIndexer, namespace)} } // PodNamespaceLister helps list and get Pods. @@ -43,15 +43,15 @@ func (s *podLister) Pods(namespace string) PodNamespaceLister { type PodNamespaceLister interface { // List lists all Pods in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Pod, err error) + List(selector labels.Selector) (ret []*corev1.Pod, err error) // Get retrieves the Pod from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Pod, error) + Get(name string) (*corev1.Pod, error) PodNamespaceListerExpansion } // podNamespaceLister implements the PodNamespaceLister // interface. type podNamespaceLister struct { - listers.ResourceIndexer[*v1.Pod] + listers.ResourceIndexer[*corev1.Pod] } diff --git a/pkg/k8s/slim/k8s/client/listers/core/v1/secret.go b/pkg/k8s/slim/k8s/client/listers/core/v1/secret.go index 19025cabf6ea0..e9993e86f736d 100644 --- a/pkg/k8s/slim/k8s/client/listers/core/v1/secret.go +++ b/pkg/k8s/slim/k8s/client/listers/core/v1/secret.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // SecretLister helps list Secrets. @@ -17,7 +17,7 @@ import ( type SecretLister interface { // List lists all Secrets in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Secret, err error) + List(selector labels.Selector) (ret []*corev1.Secret, err error) // Secrets returns an object that can list and get Secrets. Secrets(namespace string) SecretNamespaceLister SecretListerExpansion @@ -25,17 +25,17 @@ type SecretLister interface { // secretLister implements the SecretLister interface. type secretLister struct { - listers.ResourceIndexer[*v1.Secret] + listers.ResourceIndexer[*corev1.Secret] } // NewSecretLister returns a new SecretLister. func NewSecretLister(indexer cache.Indexer) SecretLister { - return &secretLister{listers.New[*v1.Secret](indexer, v1.Resource("secret"))} + return &secretLister{listers.New[*corev1.Secret](indexer, corev1.Resource("secret"))} } // Secrets returns an object that can list and get Secrets. func (s *secretLister) Secrets(namespace string) SecretNamespaceLister { - return secretNamespaceLister{listers.NewNamespaced[*v1.Secret](s.ResourceIndexer, namespace)} + return secretNamespaceLister{listers.NewNamespaced[*corev1.Secret](s.ResourceIndexer, namespace)} } // SecretNamespaceLister helps list and get Secrets. @@ -43,15 +43,15 @@ func (s *secretLister) Secrets(namespace string) SecretNamespaceLister { type SecretNamespaceLister interface { // List lists all Secrets in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Secret, err error) + List(selector labels.Selector) (ret []*corev1.Secret, err error) // Get retrieves the Secret from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Secret, error) + Get(name string) (*corev1.Secret, error) SecretNamespaceListerExpansion } // secretNamespaceLister implements the SecretNamespaceLister // interface. type secretNamespaceLister struct { - listers.ResourceIndexer[*v1.Secret] + listers.ResourceIndexer[*corev1.Secret] } diff --git a/pkg/k8s/slim/k8s/client/listers/core/v1/service.go b/pkg/k8s/slim/k8s/client/listers/core/v1/service.go index f40546b76801d..17255c33a815a 100644 --- a/pkg/k8s/slim/k8s/client/listers/core/v1/service.go +++ b/pkg/k8s/slim/k8s/client/listers/core/v1/service.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + corev1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/core/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // ServiceLister helps list Services. @@ -17,7 +17,7 @@ import ( type ServiceLister interface { // List lists all Services in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Service, err error) + List(selector labels.Selector) (ret []*corev1.Service, err error) // Services returns an object that can list and get Services. Services(namespace string) ServiceNamespaceLister ServiceListerExpansion @@ -25,17 +25,17 @@ type ServiceLister interface { // serviceLister implements the ServiceLister interface. type serviceLister struct { - listers.ResourceIndexer[*v1.Service] + listers.ResourceIndexer[*corev1.Service] } // NewServiceLister returns a new ServiceLister. func NewServiceLister(indexer cache.Indexer) ServiceLister { - return &serviceLister{listers.New[*v1.Service](indexer, v1.Resource("service"))} + return &serviceLister{listers.New[*corev1.Service](indexer, corev1.Resource("service"))} } // Services returns an object that can list and get Services. func (s *serviceLister) Services(namespace string) ServiceNamespaceLister { - return serviceNamespaceLister{listers.NewNamespaced[*v1.Service](s.ResourceIndexer, namespace)} + return serviceNamespaceLister{listers.NewNamespaced[*corev1.Service](s.ResourceIndexer, namespace)} } // ServiceNamespaceLister helps list and get Services. @@ -43,15 +43,15 @@ func (s *serviceLister) Services(namespace string) ServiceNamespaceLister { type ServiceNamespaceLister interface { // List lists all Services in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.Service, err error) + List(selector labels.Selector) (ret []*corev1.Service, err error) // Get retrieves the Service from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.Service, error) + Get(name string) (*corev1.Service, error) ServiceNamespaceListerExpansion } // serviceNamespaceLister implements the ServiceNamespaceLister // interface. type serviceNamespaceLister struct { - listers.ResourceIndexer[*v1.Service] + listers.ResourceIndexer[*corev1.Service] } diff --git a/pkg/k8s/slim/k8s/client/listers/discovery/v1/endpointslice.go b/pkg/k8s/slim/k8s/client/listers/discovery/v1/endpointslice.go index abc5eb95c2a55..8282c00d202d3 100644 --- a/pkg/k8s/slim/k8s/client/listers/discovery/v1/endpointslice.go +++ b/pkg/k8s/slim/k8s/client/listers/discovery/v1/endpointslice.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + discoveryv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // EndpointSliceLister helps list EndpointSlices. @@ -17,7 +17,7 @@ import ( type EndpointSliceLister interface { // List lists all EndpointSlices in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) + List(selector labels.Selector) (ret []*discoveryv1.EndpointSlice, err error) // EndpointSlices returns an object that can list and get EndpointSlices. EndpointSlices(namespace string) EndpointSliceNamespaceLister EndpointSliceListerExpansion @@ -25,17 +25,17 @@ type EndpointSliceLister interface { // endpointSliceLister implements the EndpointSliceLister interface. type endpointSliceLister struct { - listers.ResourceIndexer[*v1.EndpointSlice] + listers.ResourceIndexer[*discoveryv1.EndpointSlice] } // NewEndpointSliceLister returns a new EndpointSliceLister. func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { - return &endpointSliceLister{listers.New[*v1.EndpointSlice](indexer, v1.Resource("endpointslice"))} + return &endpointSliceLister{listers.New[*discoveryv1.EndpointSlice](indexer, discoveryv1.Resource("endpointslice"))} } // EndpointSlices returns an object that can list and get EndpointSlices. func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceNamespaceLister { - return endpointSliceNamespaceLister{listers.NewNamespaced[*v1.EndpointSlice](s.ResourceIndexer, namespace)} + return endpointSliceNamespaceLister{listers.NewNamespaced[*discoveryv1.EndpointSlice](s.ResourceIndexer, namespace)} } // EndpointSliceNamespaceLister helps list and get EndpointSlices. @@ -43,15 +43,15 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName type EndpointSliceNamespaceLister interface { // List lists all EndpointSlices in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.EndpointSlice, err error) + List(selector labels.Selector) (ret []*discoveryv1.EndpointSlice, err error) // Get retrieves the EndpointSlice from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.EndpointSlice, error) + Get(name string) (*discoveryv1.EndpointSlice, error) EndpointSliceNamespaceListerExpansion } // endpointSliceNamespaceLister implements the EndpointSliceNamespaceLister // interface. type endpointSliceNamespaceLister struct { - listers.ResourceIndexer[*v1.EndpointSlice] + listers.ResourceIndexer[*discoveryv1.EndpointSlice] } diff --git a/pkg/k8s/slim/k8s/client/listers/discovery/v1beta1/endpointslice.go b/pkg/k8s/slim/k8s/client/listers/discovery/v1beta1/endpointslice.go index b6d6aa66abb23..f5bf1a32f26fc 100644 --- a/pkg/k8s/slim/k8s/client/listers/discovery/v1beta1/endpointslice.go +++ b/pkg/k8s/slim/k8s/client/listers/discovery/v1beta1/endpointslice.go @@ -6,10 +6,10 @@ package v1beta1 import ( - v1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + discoveryv1beta1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/discovery/v1beta1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // EndpointSliceLister helps list EndpointSlices. @@ -17,7 +17,7 @@ import ( type EndpointSliceLister interface { // List lists all EndpointSlices in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) + List(selector labels.Selector) (ret []*discoveryv1beta1.EndpointSlice, err error) // EndpointSlices returns an object that can list and get EndpointSlices. EndpointSlices(namespace string) EndpointSliceNamespaceLister EndpointSliceListerExpansion @@ -25,17 +25,17 @@ type EndpointSliceLister interface { // endpointSliceLister implements the EndpointSliceLister interface. type endpointSliceLister struct { - listers.ResourceIndexer[*v1beta1.EndpointSlice] + listers.ResourceIndexer[*discoveryv1beta1.EndpointSlice] } // NewEndpointSliceLister returns a new EndpointSliceLister. func NewEndpointSliceLister(indexer cache.Indexer) EndpointSliceLister { - return &endpointSliceLister{listers.New[*v1beta1.EndpointSlice](indexer, v1beta1.Resource("endpointslice"))} + return &endpointSliceLister{listers.New[*discoveryv1beta1.EndpointSlice](indexer, discoveryv1beta1.Resource("endpointslice"))} } // EndpointSlices returns an object that can list and get EndpointSlices. func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceNamespaceLister { - return endpointSliceNamespaceLister{listers.NewNamespaced[*v1beta1.EndpointSlice](s.ResourceIndexer, namespace)} + return endpointSliceNamespaceLister{listers.NewNamespaced[*discoveryv1beta1.EndpointSlice](s.ResourceIndexer, namespace)} } // EndpointSliceNamespaceLister helps list and get EndpointSlices. @@ -43,15 +43,15 @@ func (s *endpointSliceLister) EndpointSlices(namespace string) EndpointSliceName type EndpointSliceNamespaceLister interface { // List lists all EndpointSlices in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1beta1.EndpointSlice, err error) + List(selector labels.Selector) (ret []*discoveryv1beta1.EndpointSlice, err error) // Get retrieves the EndpointSlice from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1beta1.EndpointSlice, error) + Get(name string) (*discoveryv1beta1.EndpointSlice, error) EndpointSliceNamespaceListerExpansion } // endpointSliceNamespaceLister implements the EndpointSliceNamespaceLister // interface. type endpointSliceNamespaceLister struct { - listers.ResourceIndexer[*v1beta1.EndpointSlice] + listers.ResourceIndexer[*discoveryv1beta1.EndpointSlice] } diff --git a/pkg/k8s/slim/k8s/client/listers/networking/v1/networkpolicy.go b/pkg/k8s/slim/k8s/client/listers/networking/v1/networkpolicy.go index 12964387cc6a6..f5da6422fb35a 100644 --- a/pkg/k8s/slim/k8s/client/listers/networking/v1/networkpolicy.go +++ b/pkg/k8s/slim/k8s/client/listers/networking/v1/networkpolicy.go @@ -6,10 +6,10 @@ package v1 import ( - v1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/client-go/listers" - "k8s.io/client-go/tools/cache" + networkingv1 "github.com/cilium/cilium/pkg/k8s/slim/k8s/api/networking/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" ) // NetworkPolicyLister helps list NetworkPolicies. @@ -17,7 +17,7 @@ import ( type NetworkPolicyLister interface { // List lists all NetworkPolicies in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) + List(selector labels.Selector) (ret []*networkingv1.NetworkPolicy, err error) // NetworkPolicies returns an object that can list and get NetworkPolicies. NetworkPolicies(namespace string) NetworkPolicyNamespaceLister NetworkPolicyListerExpansion @@ -25,17 +25,17 @@ type NetworkPolicyLister interface { // networkPolicyLister implements the NetworkPolicyLister interface. type networkPolicyLister struct { - listers.ResourceIndexer[*v1.NetworkPolicy] + listers.ResourceIndexer[*networkingv1.NetworkPolicy] } // NewNetworkPolicyLister returns a new NetworkPolicyLister. func NewNetworkPolicyLister(indexer cache.Indexer) NetworkPolicyLister { - return &networkPolicyLister{listers.New[*v1.NetworkPolicy](indexer, v1.Resource("networkpolicy"))} + return &networkPolicyLister{listers.New[*networkingv1.NetworkPolicy](indexer, networkingv1.Resource("networkpolicy"))} } // NetworkPolicies returns an object that can list and get NetworkPolicies. func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNamespaceLister { - return networkPolicyNamespaceLister{listers.NewNamespaced[*v1.NetworkPolicy](s.ResourceIndexer, namespace)} + return networkPolicyNamespaceLister{listers.NewNamespaced[*networkingv1.NetworkPolicy](s.ResourceIndexer, namespace)} } // NetworkPolicyNamespaceLister helps list and get NetworkPolicies. @@ -43,15 +43,15 @@ func (s *networkPolicyLister) NetworkPolicies(namespace string) NetworkPolicyNam type NetworkPolicyNamespaceLister interface { // List lists all NetworkPolicies in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*v1.NetworkPolicy, err error) + List(selector labels.Selector) (ret []*networkingv1.NetworkPolicy, err error) // Get retrieves the NetworkPolicy from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. - Get(name string) (*v1.NetworkPolicy, error) + Get(name string) (*networkingv1.NetworkPolicy, error) NetworkPolicyNamespaceListerExpansion } // networkPolicyNamespaceLister implements the NetworkPolicyNamespaceLister // interface. type networkPolicyNamespaceLister struct { - listers.ResourceIndexer[*v1.NetworkPolicy] + listers.ResourceIndexer[*networkingv1.NetworkPolicy] } diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go index 89f7ed4f02599..9b6aa7cec9f7d 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/applyconfiguration.go @@ -19,6 +19,7 @@ package generators import ( "io" "path" + "slices" "strings" "k8s.io/gengo/v2/generator" @@ -114,7 +115,7 @@ func (g *applyConfigurationGenerator) GenerateType(c *generator.Context, t *type sw.Do(constructor, typeParams) } } - g.generateWithFuncs(t, typeParams, sw, nil) + g.generateWithFuncs(t, typeParams, sw, nil, &[]string{}) g.generateGetters(t, typeParams, sw, nil) return sw.Error() } @@ -176,7 +177,8 @@ func (g *applyConfigurationGenerator) generateGetters(t *types.Type, typeParams } } -func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParams TypeParams, sw *generator.SnippetWriter, embed *memberParams) { +func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParams TypeParams, sw *generator.SnippetWriter, embed *memberParams, + generated *[]string) { for _, member := range t.Members { if blocklisted(t, member) { continue @@ -186,6 +188,11 @@ func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParam memberType = &types.Type{Kind: types.Pointer, Elem: memberType} } if jsonTags, ok := lookupJSONTags(member); ok { + if slices.Contains(*generated, member.Name) { + klog.V(5).Infof("With%s already generated on %s, skipping\n", member.Name, t.Name) + continue + } + *generated = append(*generated, member.Name) memberParams := memberParams{ TypeParams: typeParams, Member: member, @@ -194,7 +201,7 @@ func (g *applyConfigurationGenerator) generateWithFuncs(t *types.Type, typeParam EmbeddedIn: embed, } if memberParams.Member.Embedded { - g.generateWithFuncs(member.Type, typeParams, sw, &memberParams) + g.generateWithFuncs(member.Type, typeParams, sw, &memberParams, generated) if !jsonTags.inline { // non-inlined embeds are nillable and need a "ensure exists" utility function sw.Do(ensureEmbedExists, memberParams) @@ -281,9 +288,9 @@ func (g *applyConfigurationGenerator) generateMemberWith(sw *generator.SnippetWr sw.Do("func (b *$.ApplyConfig.ApplyConfiguration|public$) With$.Member.Name$(value $.MemberType|raw$) *$.ApplyConfig.ApplyConfiguration|public$ {\n", memberParams) g.ensureEmbedExistsIfApplicable(sw, memberParams) if g.refGraph.isApplyConfig(memberParams.Member.Type) || isNillable(memberParams.Member.Type) { - sw.Do("b.$.Member.Name$ = value\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = value\n", memberParams) } else { - sw.Do("b.$.Member.Name$ = &value\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = &value\n", memberParams) } sw.Do(" return b\n", memberParams) sw.Do("}\n", memberParams) @@ -297,7 +304,7 @@ func (g *applyConfigurationGenerator) generateMemberGetter(sw *generator.Snippet sw.Do("func (b *$.ApplyConfig.ApplyConfiguration|public$) Get$.Member.Name$() *$.MemberType|raw$ {\n", memberParams) } g.ensureEmbedExistsIfApplicable(sw, memberParams) - sw.Do(" return b.$.Member.Name$\n", memberParams) + sw.Do(" return b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$\n", memberParams) sw.Do("}\n", memberParams) } @@ -324,15 +331,15 @@ func (g *applyConfigurationGenerator) generateMemberWithForSlice(sw *generator.S sw.Do("}\n", memberParams) if memberIsPointerToSlice { - sw.Do("*b.$.Member.Name$ = append(*b.$.Member.Name$, *values[i])\n", memberParams) + sw.Do("*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, *values[i])\n", memberParams) } else { - sw.Do("b.$.Member.Name$ = append(b.$.Member.Name$, *values[i])\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, *values[i])\n", memberParams) } } else { if memberIsPointerToSlice { - sw.Do("*b.$.Member.Name$ = append(*b.$.Member.Name$, values[i])\n", memberParams) + sw.Do("*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(*b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, values[i])\n", memberParams) } else { - sw.Do("b.$.Member.Name$ = append(b.$.Member.Name$, values[i])\n", memberParams) + sw.Do("b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = append(b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$, values[i])\n", memberParams) } } sw.Do(" }\n", memberParams) @@ -347,11 +354,11 @@ func (g *applyConfigurationGenerator) generateMemberWithForMap(sw *generator.Sni sw.Do("// overwriting an existing map entries in $.Member.Name$ field with the same key.\n", memberParams) sw.Do("func (b *$.ApplyConfig.ApplyConfiguration|public$) With$.Member.Name$(entries $.MemberType|raw$) *$.ApplyConfig.ApplyConfiguration|public$ {\n", memberParams) g.ensureEmbedExistsIfApplicable(sw, memberParams) - sw.Do(" if b.$.Member.Name$ == nil && len(entries) > 0 {\n", memberParams) - sw.Do(" b.$.Member.Name$ = make($.MemberType|raw$, len(entries))\n", memberParams) + sw.Do(" if b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ == nil && len(entries) > 0 {\n", memberParams) + sw.Do(" b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$ = make($.MemberType|raw$, len(entries))\n", memberParams) sw.Do(" }\n", memberParams) sw.Do(" for k, v := range entries {\n", memberParams) - sw.Do(" b.$.Member.Name$[k] = v\n", memberParams) + sw.Do(" b$if ne .EmbeddedIn nil$.$.EmbeddedIn.MemberType.Elem.Name.Name$$end$.$.Member.Name$[k] = v\n", memberParams) sw.Do(" }\n", memberParams) sw.Do(" return b\n", memberParams) sw.Do("}\n", memberParams) diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go index abd6501000742..f8d659e4338b0 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/internal.go @@ -74,6 +74,8 @@ func (g *internalGenerator) GenerateType(c *generator.Context, _ *types.Type, w "schemaYAML": string(schemaYAML), "smdParser": smdParser, "smdNewParser": smdNewParser, + "fmtSprintf": fmtSprintf, + "syncOnce": syncOnce, "yamlObject": yamlObject, "yamlUnmarshal": yamlUnmarshal, }) @@ -87,13 +89,13 @@ func Parser() *{{.smdParser|raw}} { var err error parser, err = {{.smdNewParser|raw}}(schemaYAML) if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) + panic({{.fmtSprintf|raw}}("Failed to parse schema: %v", err)) } }) return parser } -var parserOnce sync.Once +var parserOnce {{.syncOnce|raw}} var parser *{{.smdParser|raw}} var schemaYAML = {{.yamlObject|raw}}(` + "`{{.schemaYAML}}`" + `) ` diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go index 197e932517936..b033d22d82961 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/targets.go @@ -188,7 +188,7 @@ func targetForApplyConfigurationsPackage(outputDirBase, outputPkgBase, pkgSubdir localPkg: outputPkg, groupVersion: gv, applyConfig: toGenerate, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), refGraph: refs, openAPIType: openAPIType, }) @@ -211,7 +211,7 @@ func targetForUtils(outputDirBase, outputPkgBase string, boilerplate []byte, gro OutputFilename: "utils.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkgBase), groupVersions: groupVersions, typesForGroupVersion: applyConfigsForGroupVersion, groupGoNames: groupGoNames, @@ -236,7 +236,7 @@ func targetForInternal(outputDirBase, outputPkgBase string, boilerplate []byte, OutputFilename: "internal.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), typeModels: models, }) return generators diff --git a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go index bc0b54d032873..95e6bb3455ad0 100644 --- a/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go +++ b/vendor/k8s.io/code-generator/cmd/applyconfiguration-gen/generators/types.go @@ -19,6 +19,8 @@ package generators import "k8s.io/gengo/v2/types" var ( + fmtSprintf = types.Ref("fmt", "Sprintf") + syncOnce = types.Ref("sync", "Once") applyConfiguration = types.Ref("k8s.io/apimachinery/pkg/runtime", "ApplyConfiguration") groupVersionKind = types.Ref("k8s.io/apimachinery/pkg/runtime/schema", "GroupVersionKind") typeMeta = types.Ref("k8s.io/apimachinery/pkg/apis/meta/v1", "TypeMeta") diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go index 12a4afdbf945f..1fc21c224b566 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/client_generator.go @@ -161,7 +161,7 @@ func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie version: gv.Version.String(), groupGoName: groupGoName, typeToMatch: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(gvPkg), }) } @@ -177,7 +177,7 @@ func targetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie groupGoName: groupGoName, apiPath: apiPath, types: typeList, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(gvPkg), }) expansionFileName := "generated_expansion.go" @@ -214,7 +214,7 @@ func targetForClientset(args *args.Args, clientsetDir, clientsetPkg string, grou groups: args.Groups, groupGoNames: groupGoNames, clientsetPackage: clientsetPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(clientsetPkg), }, } return generators @@ -260,7 +260,7 @@ NextGroup: OutputPath: schemeDir, Groups: args.Groups, GroupGoNames: groupGoNames, - ImportTracker: generator.NewImportTracker(), + ImportTracker: generator.NewImportTrackerForPackage(schemePkg), CreateRegistry: internalClient, }, } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go index 74c98232c5ca2..699c7b5f3c59d 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/fake_client_generator.go @@ -63,7 +63,7 @@ func TargetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie version: gv.Version.String(), groupGoName: groupGoName, typeToMatch: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), applyConfigurationPackage: applyBuilderPackage, }) } @@ -78,7 +78,7 @@ func TargetForGroup(gv clientgentypes.GroupVersion, typeList []*types.Type, clie version: gv.Version.String(), groupGoName: groupGoName, types: typeList, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), }) return generators }, @@ -111,7 +111,7 @@ func TargetForClientset(args *args.Args, clientsetDir, clientsetPkg string, appl groups: args.Groups, groupGoNames: groupGoNames, fakeClientsetPackage: clientsetPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(clientsetPkg), realClientsetPackage: clientsetPkg, applyConfigurationPackage: applyConfigurationPkg, }, @@ -123,7 +123,7 @@ func TargetForClientset(args *args.Args, clientsetDir, clientsetPkg string, appl OutputPkg: clientsetPkg, Groups: args.Groups, GroupGoNames: groupGoNames, - ImportTracker: generator.NewImportTracker(), + ImportTracker: generator.NewImportTrackerForPackage(clientsetPkg), PrivateScheme: true, }, } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go index 3bf7aa12b9c64..ffb02ebba1e8c 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_clientset.go @@ -77,7 +77,6 @@ func (g *genClientset) Imports(c *generator.Context) (imports []string) { "fakediscovery \"k8s.io/client-go/discovery/fake\"", "k8s.io/apimachinery/pkg/runtime", "k8s.io/apimachinery/pkg/watch", - "k8s.io/apimachinery/pkg/api/meta/testrestmapper", ) return diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go index 20499cf8c1687..0e071af92267b 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/fake/generator_fake_for_type.go @@ -123,6 +123,8 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. "ApplyPatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "ApplyPatchType"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/watch", Name: "Interface"}), "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), + "fmtErrorf": c.Universe.Type(types.Name{Package: "fmt", Name: "Errorf"}), + "contextContext": c.Universe.Type(types.Name{Package: "context", Name: "Context"}), "NewRootListActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewRootListActionWithOptions"}), "NewListActionWithOptions": c.Universe.Function(types.Name{Package: pkgClientGoTesting, Name: "NewListActionWithOptions"}), @@ -332,7 +334,7 @@ var $.type|allLowercasePlural$Kind = $.SchemeGroupVersion|raw$.WithKind("$.type| var listTemplate = ` // List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. -func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { +func (c *Fake$.type|publicPlural$) List(ctx $.contextContext|raw$, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { emptyResult := &$.type|raw$List{} obj, err := c.Fake. $if .namespaced$Invokes($.NewListActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, c.ns, opts), emptyResult) @@ -346,7 +348,7 @@ func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions| var listUsingOptionsTemplate = ` // List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. -func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { +func (c *Fake$.type|publicPlural$) List(ctx $.contextContext|raw$, opts $.ListOptions|raw$) (result *$.type|raw$List, err error) { emptyResult := &$.type|raw$List{} obj, err := c.Fake. $if .namespaced$Invokes($.NewListActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|allLowercasePlural$Kind, c.ns, opts), emptyResult) @@ -371,7 +373,7 @@ func (c *Fake$.type|publicPlural$) List(ctx context.Context, opts $.ListOptions| var getTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *Fake$.type|publicPlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Get(ctx $.contextContext|raw$, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewGetActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, name, options), emptyResult) @@ -385,7 +387,7 @@ func (c *Fake$.type|publicPlural$) Get(ctx context.Context, name string, options var getSubresourceTemplate = ` // Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *Fake$.type|publicPlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Get(ctx $.contextContext|raw$, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewGetSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, "$.subresourcePath$", $.type|private$Name, options), emptyResult) @@ -399,7 +401,7 @@ func (c *Fake$.type|publicPlural$) Get(ctx context.Context, $.type|private$Name var deleteTemplate = ` // Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. -func (c *Fake$.type|publicPlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error { +func (c *Fake$.type|publicPlural$) Delete(ctx $.contextContext|raw$, name string, opts $.DeleteOptions|raw$) error { _, err := c.Fake. $if .namespaced$Invokes($.NewDeleteActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, name, opts), &$.type|raw${}) $else$Invokes($.NewRootDeleteActionWithOptions|raw$($.type|allLowercasePlural$Resource, name, opts), &$.type|raw${})$end$ @@ -409,7 +411,7 @@ func (c *Fake$.type|publicPlural$) Delete(ctx context.Context, name string, opts var deleteCollectionTemplate = ` // DeleteCollection deletes a collection of objects. -func (c *Fake$.type|publicPlural$) DeleteCollection(ctx context.Context, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error { +func (c *Fake$.type|publicPlural$) DeleteCollection(ctx $.contextContext|raw$, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error { $if .namespaced$action := $.NewDeleteCollectionActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, opts, listOpts) $else$action := $.NewRootDeleteCollectionActionWithOptions|raw$($.type|allLowercasePlural$Resource, opts, listOpts) $end$ @@ -419,7 +421,7 @@ func (c *Fake$.type|publicPlural$) DeleteCollection(ctx context.Context, opts $. ` var createTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Create(ctx $.contextContext|raw$, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewCreateActionWithOptions|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$, opts), emptyResult) @@ -433,7 +435,7 @@ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.inputType|priva var createSubresourceTemplate = ` // Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Create(ctx $.contextContext|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewCreateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, $.type|private$Name, "$.subresourcePath$", c.ns, $.inputType|private$, opts), emptyResult) @@ -447,7 +449,7 @@ func (c *Fake$.type|publicPlural$) Create(ctx context.Context, $.type|private$Na var updateTemplate = ` // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Update(ctx $.contextContext|raw$, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewUpdateActionWithOptions|raw$($.inputType|allLowercasePlural$Resource, c.ns, $.inputType|private$, opts), emptyResult) @@ -461,7 +463,7 @@ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.inputType|priva var updateSubresourceTemplate = ` // Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Update(ctx $.contextContext|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewUpdateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, "$.subresourcePath$", c.ns, $.inputType|private$, opts), &$.inputType|raw${}) @@ -476,7 +478,7 @@ func (c *Fake$.type|publicPlural$) Update(ctx context.Context, $.type|private$Na var updateStatusTemplate = ` // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *Fake$.type|publicPlural$) UpdateStatus(ctx context.Context, $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (result *$.type|raw$, err error) { +func (c *Fake$.type|publicPlural$) UpdateStatus(ctx $.contextContext|raw$, $.type|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (result *$.type|raw$, err error) { emptyResult := &$.type|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewUpdateSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, "status", c.ns, $.type|private$, opts), emptyResult) @@ -490,7 +492,7 @@ func (c *Fake$.type|publicPlural$) UpdateStatus(ctx context.Context, $.type|priv var watchTemplate = ` // Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. -func (c *Fake$.type|publicPlural$) Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { +func (c *Fake$.type|publicPlural$) Watch(ctx $.contextContext|raw$, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { return c.Fake. $if .namespaced$InvokesWatch($.NewWatchActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, opts)) $else$InvokesWatch($.NewRootWatchActionWithOptions|raw$($.type|allLowercasePlural$Resource, opts))$end$ @@ -499,7 +501,7 @@ func (c *Fake$.type|publicPlural$) Watch(ctx context.Context, opts $.ListOptions var patchTemplate = ` // Patch applies the patch and returns the patched $.resultType|private$. -func (c *Fake$.type|publicPlural$) Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Patch(ctx $.contextContext|raw$, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { emptyResult := &$.resultType|raw${} obj, err := c.Fake. $if .namespaced$Invokes($.NewPatchSubresourceActionWithOptions|raw$($.type|allLowercasePlural$Resource, c.ns, name, pt, data, opts, subresources... ), emptyResult) @@ -513,9 +515,9 @@ func (c *Fake$.type|publicPlural$) Patch(ctx context.Context, name string, pt $. var applyTemplate = ` // Apply takes the given apply declarative configuration, applies it and returns the applied $.resultType|private$. -func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Apply(ctx $.contextContext|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to Apply must not be nil") } data, err := $.jsonMarshal|raw$($.inputType|private$) if err != nil { @@ -523,7 +525,7 @@ func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.inputType|privat } name := $.inputType|private$.Name if name == nil { - return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply") + return nil, $.fmtErrorf|raw$("$.inputType|private$.Name must be provided to Apply") } emptyResult := &$.resultType|raw${} obj, err := c.Fake. @@ -539,9 +541,9 @@ func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.inputType|privat var applyStatusTemplate = ` // ApplyStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) ApplyStatus(ctx $.contextContext|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to Apply must not be nil") } data, err := $.jsonMarshal|raw$($.inputType|private$) if err != nil { @@ -549,7 +551,7 @@ func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType| } name := $.inputType|private$.Name if name == nil { - return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply") + return nil, $.fmtErrorf|raw$("$.inputType|private$.Name must be provided to Apply") } emptyResult := &$.resultType|raw${} obj, err := c.Fake. @@ -565,9 +567,9 @@ func (c *Fake$.type|publicPlural$) ApplyStatus(ctx context.Context, $.inputType| var applySubresourceTemplate = ` // Apply takes top resource name and the apply declarative configuration for $.subresourcePath$, // applies it and returns the applied $.resultType|private$, and an error, if there is any. -func (c *Fake$.type|publicPlural$) Apply(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *Fake$.type|publicPlural$) Apply(ctx $.contextContext|raw$, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to Apply must not be nil") } data, err := $.jsonMarshal|raw$($.inputType|private$) if err != nil { diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go index 0c043cee9e8ae..e84205604dbcf 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_clientset.go @@ -73,12 +73,14 @@ func (g *genClientset) GenerateType(c *generator.Context, t *types.Type, w io.Wr allGroups := clientgentypes.ToGroupVersionInfo(g.groups, g.groupGoNames) m := map[string]interface{}{ "allGroups": allGroups, + "fmtErrorf": c.Universe.Type(types.Name{Package: "fmt", Name: "Errorf"}), "Config": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Config"}), "DefaultKubernetesUserAgent": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "DefaultKubernetesUserAgent"}), "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), "DiscoveryInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/discovery", Name: "DiscoveryInterface"}), "DiscoveryClient": c.Universe.Type(types.Name{Package: "k8s.io/client-go/discovery", Name: "DiscoveryClient"}), + "httpClient": c.Universe.Type(types.Name{Package: "net/http", Name: "Client"}), "NewDiscoveryClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClientForConfigAndClient"}), "NewDiscoveryClientForConfigOrDie": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClientForConfigOrDie"}), "NewDiscoveryClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/discovery", Name: "NewDiscoveryClient"}), @@ -160,11 +162,11 @@ var newClientsetForConfigAndClientTemplate = ` // Note the http client provided takes precedence over the configured transport values. // If config's RateLimiter is not set and QPS and Burst are acceptable, // NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *$.Config|raw$, httpClient *http.Client) (*Clientset, error) { +func NewForConfigAndClient(c *$.Config|raw$, httpClient *$.httpClient|raw$) (*Clientset, error) { configShallowCopy := *c if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + return nil, $.fmtErrorf|raw$("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") } configShallowCopy.RateLimiter = $.flowcontrolNewTokenBucketRateLimiter|raw$(configShallowCopy.QPS, configShallowCopy.Burst) } diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go index 83b13b11cdcc1..e5915b67724f5 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_group.go @@ -64,7 +64,6 @@ func (g *genGroup) Namers(c *generator.Context) namer.NameSystems { func (g *genGroup) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, path.Join(g.clientsetPackage, "scheme")) return } @@ -82,23 +81,27 @@ func (g *genGroup) GenerateType(c *generator.Context, t *types.Type, w io.Writer if groupName == "" { apiPath = `"/api"` } - + schemePackage := path.Join(g.clientsetPackage, "scheme") m := map[string]interface{}{ - "version": g.version, - "groupName": groupName, - "GroupGoName": g.groupGoName, - "Version": namer.IC(g.version), - "types": g.types, - "apiPath": apiPath, - "schemaGroupVersion": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersion"}), - "runtimeAPIVersionInternal": c.Universe.Variable(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "APIVersionInternal"}), - "restConfig": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Config"}), - "restDefaultKubernetesUserAgent": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "DefaultKubernetesUserAgent"}), - "restRESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), - "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), - "restRESTClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientFor"}), - "restRESTClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientForConfigAndClient"}), - "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: g.inputPackage, Name: "SchemeGroupVersion"}), + "version": g.version, + "groupName": groupName, + "GroupGoName": g.groupGoName, + "Version": namer.IC(g.version), + "types": g.types, + "apiPath": apiPath, + "httpClient": c.Universe.Type(types.Name{Package: "net/http", Name: "Client"}), + "schemaGroupVersion": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/runtime/schema", Name: "GroupVersion"}), + "runtimeAPIVersionInternal": c.Universe.Variable(types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "APIVersionInternal"}), + "restConfig": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Config"}), + "restDefaultKubernetesUserAgent": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "DefaultKubernetesUserAgent"}), + "restRESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), + "RESTHTTPClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "HTTPClientFor"}), + "restRESTClientFor": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientFor"}), + "restRESTClientForConfigAndClient": c.Universe.Function(types.Name{Package: "k8s.io/client-go/rest", Name: "RESTClientForConfigAndClient"}), + "SchemeGroupVersion": c.Universe.Variable(types.Name{Package: g.inputPackage, Name: "SchemeGroupVersion"}), + "SchemePrioritizedVersionsForGroup": c.Universe.Variable(types.Name{Package: schemePackage, Name: "Scheme.PrioritizedVersionsForGroup"}), + "Codecs": c.Universe.Variable(types.Name{Package: schemePackage, Name: "Codecs"}), + "CodecsWithoutConversion": c.Universe.Variable(types.Name{Package: schemePackage, Name: "Codecs.WithoutConversion"}), } sw.Do(groupInterfaceTemplate, m) sw.Do(groupClientTemplate, m) @@ -179,7 +182,7 @@ func NewForConfig(c *$.restConfig|raw$) (*$.GroupGoName$$.Version$Client, error) var newClientForConfigAndClientTemplate = ` // NewForConfigAndClient creates a new $.GroupGoName$$.Version$Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *$.restConfig|raw$, h *http.Client) (*$.GroupGoName$$.Version$Client, error) { +func NewForConfigAndClient(c *$.restConfig|raw$, h *$.httpClient|raw$) (*$.GroupGoName$$.Version$Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -228,11 +231,11 @@ func setConfigDefaults(config *$.restConfig|raw$) error { if config.UserAgent == "" { config.UserAgent = $.restDefaultKubernetesUserAgent|raw$() } - if config.GroupVersion == nil || config.GroupVersion.Group != scheme.Scheme.PrioritizedVersionsForGroup("$.groupName$")[0].Group { - gv := scheme.Scheme.PrioritizedVersionsForGroup("$.groupName$")[0] + if config.GroupVersion == nil || config.GroupVersion.Group != $.SchemePrioritizedVersionsForGroup|raw$("$.groupName$")[0].Group { + gv := $.SchemePrioritizedVersionsForGroup|raw$("$.groupName$")[0] config.GroupVersion = &gv } - config.NegotiatedSerializer = scheme.Codecs + config.NegotiatedSerializer = $.Codecs|raw$ if config.QPS == 0 { config.QPS = 5 @@ -250,7 +253,7 @@ func setConfigDefaults(config *$.restConfig|raw$) error { gv := $.SchemeGroupVersion|raw$ config.GroupVersion = &gv config.APIPath = $.apiPath$ - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = $.CodecsWithoutConversion|raw$() if config.UserAgent == "" { config.UserAgent = $.restDefaultKubernetesUserAgent|raw$() diff --git a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go index 7361c48f1f5bf..5e08292251db0 100644 --- a/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go +++ b/vendor/k8s.io/code-generator/cmd/client-gen/generators/generator_for_type.go @@ -23,6 +23,7 @@ import ( "golang.org/x/text/cases" "golang.org/x/text/language" + "k8s.io/gengo/v2/generator" "k8s.io/gengo/v2/namer" "k8s.io/gengo/v2/types" @@ -140,6 +141,7 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "ApplyOptions": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ApplyOptions"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/types", Name: "PatchType"}), "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), + "context": c.Universe.Type(types.Name{Package: "context", Name: "Context"}), }, } if e.HasVerb("apply") { @@ -172,6 +174,8 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i "RESTClientInterface": c.Universe.Type(types.Name{Package: "k8s.io/client-go/rest", Name: "Interface"}), "schemeParameterCodec": c.Universe.Variable(types.Name{Package: path.Join(g.clientsetPackage, "scheme"), Name: "ParameterCodec"}), "jsonMarshal": c.Universe.Type(types.Name{Package: "encoding/json", Name: "Marshal"}), + "fmtErrorf": c.Universe.Type(types.Name{Package: "fmt", Name: "Errorf"}), + "context": c.Universe.Type(types.Name{Package: "context", Name: "Context"}), "resourceVersionMatchNotOlderThan": c.Universe.Type(types.Name{Package: "k8s.io/apimachinery/pkg/apis/meta/v1", Name: "ResourceVersionMatchNotOlderThan"}), "CheckListFromCacheDataConsistencyIfRequested": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/consistencydetector", Name: "CheckListFromCacheDataConsistencyIfRequested"}), "CheckWatchListFromCacheDataConsistencyIfRequested": c.Universe.Function(types.Name{Package: "k8s.io/client-go/util/consistencydetector", Name: "CheckWatchListFromCacheDataConsistencyIfRequested"}), @@ -267,64 +271,65 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i m["inputType"] = &inputType m["resultType"] = &resultType m["subresourcePath"] = e.SubResourcePath + m["verb"] = e.VerbName if e.HasVerb("apply") { m["inputApplyConfig"] = types.Ref(path.Join(g.applyConfigurationPackage, inputGVString), inputType.Name.Name+"ApplyConfiguration") } if e.HasVerb("get") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, getSubresourceTemplate), m) + sw.Do(getSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, getTemplate), m) + sw.Do(getTemplate, m) } } if e.HasVerb("list") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, listSubresourceTemplate), m) + sw.Do(listSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, listTemplate), m) - sw.Do(adjustTemplate(e.VerbName, e.VerbType, privateListTemplate), m) - sw.Do(adjustTemplate(e.VerbName, e.VerbType, watchListTemplate), m) + sw.Do(listTemplate, m) + sw.Do(privateListTemplate, m) + sw.Do(watchListTemplate, m) } } // TODO: Figure out schemantic for watching a sub-resource. if e.HasVerb("watch") { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, watchTemplate), m) + sw.Do(watchTemplate, m) } if e.HasVerb("create") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, createSubresourceTemplate), m) + sw.Do(createSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, createTemplate), m) + sw.Do(createTemplate, m) } } if e.HasVerb("update") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, updateSubresourceTemplate), m) + sw.Do(updateSubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, updateTemplate), m) + sw.Do(updateTemplate, m) } } // TODO: Figure out schemantic for deleting a sub-resource (what arguments // are passed, does it need two names? etc. if e.HasVerb("delete") { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, deleteTemplate), m) + sw.Do(deleteTemplate, m) } if e.HasVerb("patch") { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, patchTemplate), m) + sw.Do(patchTemplate, m) } if e.HasVerb("apply") { if e.IsSubresource() { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, applySubresourceTemplate), m) + sw.Do(applySubresourceTemplate, m) } else { - sw.Do(adjustTemplate(e.VerbName, e.VerbType, applyTemplate), m) + sw.Do(applyTemplate, m) } } } @@ -332,13 +337,6 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i return sw.Error() } -// adjustTemplate adjust the origin verb template using the expansion name. -// TODO: Make the verbs in templates parametrized so the strings.Replace() is -// not needed. -func adjustTemplate(name, verbType, template string) string { - return strings.ReplaceAll(template, " "+titler.String(verbType), " "+name) -} - func generateInterface(defaultVerbTemplates map[string]string, tags util.Tags) string { // need an ordered list here to guarantee order of generated methods. out := []string{} @@ -352,34 +350,34 @@ func generateInterface(defaultVerbTemplates map[string]string, tags util.Tags) s func buildSubresourceDefaultVerbTemplates(generateApply bool) map[string]string { m := map[string]string{ - "create": `Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, - "list": `List(ctx context.Context, $.type|private$Name string, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, - "update": `Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, - "get": `Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (*$.resultType|raw$, error)`, + "create": `Create(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, + "list": `List(ctx $.context|raw$, $.type|private$Name string, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, + "update": `Update(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, + "get": `Get(ctx $.context|raw$, $.type|private$Name string, options $.GetOptions|raw$) (*$.resultType|raw$, error)`, } if generateApply { - m["apply"] = `Apply(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (*$.resultType|raw$, error)` + m["apply"] = `Apply(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (*$.resultType|raw$, error)` } return m } func buildDefaultVerbTemplates(generateApply bool) map[string]string { m := map[string]string{ - "create": `Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, - "update": `Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, + "create": `Create(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (*$.resultType|raw$, error)`, + "update": `Update(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (*$.resultType|raw$, error)`, "updateStatus": `// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -UpdateStatus(ctx context.Context, $.inputType|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error)`, - "delete": `Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error`, - "deleteCollection": `DeleteCollection(ctx context.Context, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error`, - "get": `Get(ctx context.Context, name string, opts $.GetOptions|raw$) (*$.resultType|raw$, error)`, - "list": `List(ctx context.Context, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, - "watch": `Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error)`, - "patch": `Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error)`, +UpdateStatus(ctx $.context|raw$, $.inputType|private$ *$.type|raw$, opts $.UpdateOptions|raw$) (*$.type|raw$, error)`, + "delete": `Delete(ctx $.context|raw$, name string, opts $.DeleteOptions|raw$) error`, + "deleteCollection": `DeleteCollection(ctx $.context|raw$, opts $.DeleteOptions|raw$, listOpts $.ListOptions|raw$) error`, + "get": `Get(ctx $.context|raw$, name string, opts $.GetOptions|raw$) (*$.resultType|raw$, error)`, + "list": `List(ctx $.context|raw$, opts $.ListOptions|raw$) (*$.resultType|raw$List, error)`, + "watch": `Watch(ctx $.context|raw$, opts $.ListOptions|raw$) ($.watchInterface|raw$, error)`, + "patch": `Patch(ctx $.context|raw$, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error)`, } if generateApply { - m["apply"] = `Apply(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` + m["apply"] = `Apply(ctx $.context|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` m["applyStatus"] = `// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). -ApplyStatus(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` +ApplyStatus(ctx $.context|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error)` } return m } @@ -579,8 +577,8 @@ var newStruct = []string{ } var listTemplate = ` -// List takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) List(ctx context.Context, opts $.ListOptions|raw$) (*$.resultType|raw$List, error) { +// $.verb$ takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, opts $.ListOptions|raw$) (*$.resultType|raw$List, error) { if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := $.PrepareWatchListOptionsFromListOptions|raw$(opts); watchListOptionsErr != nil { klog.Warningf("Failed preparing watchlist options for $.type|resource$, falling back to the standard LIST semantics, err = %v", watchListOptionsErr ) } else if hasWatchListOptionsPrepared { @@ -601,7 +599,7 @@ func (c *$.type|privatePlural$) List(ctx context.Context, opts $.ListOptions|raw var privateListTemplate = ` // list takes label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) list(ctx context.Context, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { +func (c *$.type|privatePlural$) list(ctx $.context|raw$, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil{ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -619,8 +617,8 @@ func (c *$.type|privatePlural$) list(ctx context.Context, opts $.ListOptions|raw ` var listSubresourceTemplate = ` -// List takes $.type|raw$ name, label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. -func (c *$.type|privatePlural$) List(ctx context.Context, $.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { +// $.verb$ takes $.type|raw$ name, label and field selectors, and returns the list of $.resultType|publicPlural$ that match those selectors. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil{ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -640,8 +638,8 @@ func (c *$.type|privatePlural$) List(ctx context.Context, $.type|private$Name st ` var getTemplate = ` -// Get takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. -func (c *$.type|privatePlural$) Get(ctx context.Context, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes name of the $.type|private$, and returns the corresponding $.resultType|private$ object, and an error if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Get(). $if .namespaced$Namespace(c.GetNamespace()).$end$ @@ -655,8 +653,8 @@ func (c *$.type|privatePlural$) Get(ctx context.Context, name string, options $. ` var getSubresourceTemplate = ` -// Get takes name of the $.type|private$, and returns the corresponding $.resultType|raw$ object, and an error if there is any. -func (c *$.type|privatePlural$) Get(ctx context.Context, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes name of the $.type|private$, and returns the corresponding $.resultType|raw$ object, and an error if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, options $.GetOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Get(). $if .namespaced$Namespace(c.GetNamespace()).$end$ @@ -671,8 +669,8 @@ func (c *$.type|privatePlural$) Get(ctx context.Context, $.type|private$Name str ` var deleteTemplate = ` -// Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. -func (c *$.type|privatePlural$) Delete(ctx context.Context, name string, opts $.DeleteOptions|raw$) error { +// $.verb$ takes name of the $.type|private$ and deletes it. Returns an error if one occurs. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, name string, opts $.DeleteOptions|raw$) error { return c.GetClient().Delete(). $if .namespaced$Namespace(c.GetNamespace()).$end$ Resource("$.type|resource$"). @@ -684,8 +682,8 @@ func (c *$.type|privatePlural$) Delete(ctx context.Context, name string, opts $. ` var createSubresourceTemplate = ` -// Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Create(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Post(). $if .namespaced$Namespace(c.GetNamespace()).$end$ @@ -701,8 +699,8 @@ func (c *$.type|privatePlural$) Create(ctx context.Context, $.type|private$Name ` var createTemplate = ` -// Create takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Create(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the representation of a $.inputType|private$ and creates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.CreateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Post(). $if .namespaced$Namespace(c.GetNamespace()).$end$ @@ -716,8 +714,8 @@ func (c *$.type|privatePlural$) Create(ctx context.Context, $.inputType|private$ ` var updateSubresourceTemplate = ` -// Update takes the top resource name and the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Update(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the top resource name and the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Put(). $if .namespaced$Namespace(c.GetNamespace()).$end$ @@ -733,8 +731,8 @@ func (c *$.type|privatePlural$) Update(ctx context.Context, $.type|private$Name ` var updateTemplate = ` -// Update takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Update(ctx context.Context, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the representation of a $.inputType|private$ and updates it. Returns the server's representation of the $.resultType|private$, and an error, if there is any. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.inputType|private$ *$.inputType|raw$, opts $.UpdateOptions|raw$) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Put(). $if .namespaced$Namespace(c.GetNamespace()).$end$ @@ -749,8 +747,8 @@ func (c *$.type|privatePlural$) Update(ctx context.Context, $.inputType|private$ ` var watchTemplate = ` -// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. -func (c *$.type|privatePlural$) Watch(ctx context.Context, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { +// $.verb$ returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, opts $.ListOptions|raw$) ($.watchInterface|raw$, error) { var timeout time.Duration if opts.TimeoutSeconds != nil{ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -766,7 +764,7 @@ func (c *$.type|privatePlural$) Watch(ctx context.Context, opts $.ListOptions|ra var watchListTemplate = ` // watchList establishes a watch stream with the server and returns the list of $.resultType|publicPlural$ -func (c *$.type|privatePlural$) watchList(ctx context.Context, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { +func (c *$.type|privatePlural$) watchList(ctx $.context|raw$, opts $.ListOptions|raw$) (result *$.resultType|raw$List, err error) { var timeout time.Duration if opts.TimeoutSeconds != nil{ timeout = time.Duration(*opts.TimeoutSeconds) * time.Second @@ -784,8 +782,8 @@ func (c *$.type|privatePlural$) watchList(ctx context.Context, opts $.ListOption ` var patchTemplate = ` -// Patch applies the patch and returns the patched $.resultType|private$. -func (c *$.type|privatePlural$) Patch(ctx context.Context, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { +// $.verb$ applies the patch and returns the patched $.resultType|private$. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, name string, pt $.PatchType|raw$, data []byte, opts $.PatchOptions|raw$, subresources ...string) (result *$.resultType|raw$, err error) { result = &$.resultType|raw${} err = c.GetClient().Patch(pt). $if .namespaced$Namespace(c.GetNamespace()).$end$ @@ -801,10 +799,10 @@ func (c *$.type|privatePlural$) Patch(ctx context.Context, name string, pt $.Pat ` var applyTemplate = ` -// Apply takes the given apply declarative configuration, applies it and returns the applied $.resultType|private$. -func (c *$.type|privatePlural$) Apply(ctx context.Context, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +// $.verb$ takes the given apply declarative configuration, applies it and returns the applied $.resultType|private$. +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to $.verb$ must not be nil") } patchOpts := opts.ToPatchOptions() data, err := $.jsonMarshal|raw$($.inputType|private$) @@ -813,7 +811,7 @@ func (c *$.type|privatePlural$) Apply(ctx context.Context, $.inputType|private$ } name := $.inputType|private$.Name if name == nil { - return nil, fmt.Errorf("$.inputType|private$.Name must be provided to Apply") + return nil, $.fmtErrorf|raw$("$.inputType|private$.Name must be provided to $.verb$") } result = &$.resultType|raw${} err = c.GetClient().Patch($.ApplyPatchType|raw$). @@ -829,11 +827,11 @@ func (c *$.type|privatePlural$) Apply(ctx context.Context, $.inputType|private$ ` var applySubresourceTemplate = ` -// Apply takes top resource name and the apply declarative configuration for $.subresourcePath$, +// $.verb$ takes top resource name and the apply declarative configuration for $.subresourcePath$, // applies it and returns the applied $.resultType|private$, and an error, if there is any. -func (c *$.type|privatePlural$) Apply(ctx context.Context, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { +func (c *$.type|privatePlural$) $.verb$(ctx $.context|raw$, $.type|private$Name string, $.inputType|private$ *$.inputApplyConfig|raw$, opts $.ApplyOptions|raw$) (result *$.resultType|raw$, err error) { if $.inputType|private$ == nil { - return nil, fmt.Errorf("$.inputType|private$ provided to Apply must not be nil") + return nil, $.fmtErrorf|raw$("$.inputType|private$ provided to $.verb$ must not be nil") } patchOpts := opts.ToPatchOptions() data, err := $.jsonMarshal|raw$($.inputType|private$) diff --git a/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go index f58130af255a4..b1ac8209a5666 100644 --- a/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go +++ b/vendor/k8s.io/code-generator/cmd/conversion-gen/generators/conversion.go @@ -158,16 +158,16 @@ func getManualConversionFunctions(context *generator.Context, pkg *types.Package klog.V(6).Infof("%s has a receiver", f.Name) continue } - if len(signature.Parameters) != 3 || signature.Parameters[2].Name != scopeName { + if len(signature.Parameters) != 3 || signature.Parameters[2].Type.Name != scopeName { klog.V(6).Infof("%s has wrong parameters", f.Name) continue } - if len(signature.Results) != 1 || signature.Results[0].Name != errorName { + if len(signature.Results) != 1 || signature.Results[0].Type.Name != errorName { klog.V(6).Infof("%s has wrong results", f.Name) continue } - inType := signature.Parameters[0] - outType := signature.Parameters[1] + inType := signature.Parameters[0].Type + outType := signature.Parameters[1].Type if inType.Kind != types.Pointer || outType.Kind != types.Pointer { klog.V(6).Infof("%s has wrong parameter types", f.Name) continue @@ -478,7 +478,7 @@ func NewGenConversion(outputFilename, typesPackage, outputPackage string, manual outputPackage: outputPackage, peerPackages: peerPkgs, manualConversions: manualConversions, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPackage), types: []*types.Type{}, explicitConversions: []conversionPair{}, skippedFields: map[*types.Type][]string{}, diff --git a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go index c6047aacae034..e1a8e4c166ac8 100644 --- a/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go +++ b/vendor/k8s.io/code-generator/cmd/deepcopy-gen/generators/deepcopy.go @@ -222,7 +222,7 @@ func NewGenDeepCopy(outputFilename, targetPackage string, boundingDirs []string, boundingDirs: boundingDirs, allTypes: allTypes, registerTypes: registerTypes, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(targetPackage), typesForInit: make([]*types.Type, 0), } } @@ -277,8 +277,8 @@ func deepCopyMethod(t *types.Type) (*types.Signature, error) { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected exactly one result", t) } - ptrResult := f.Signature.Results[0].Kind == types.Pointer && f.Signature.Results[0].Elem.Name == t.Name - nonPtrResult := f.Signature.Results[0].Name == t.Name + ptrResult := f.Signature.Results[0].Type.Kind == types.Pointer && f.Signature.Results[0].Type.Elem.Name == t.Name + nonPtrResult := f.Signature.Results[0].Type.Name == t.Name if !ptrResult && !nonPtrResult { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected to return %s or *%s", t, t.Name.Name, t.Name.Name) @@ -329,7 +329,7 @@ func deepCopyIntoMethod(t *types.Type) (*types.Signature, error) { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected no result type", t) } - ptrParam := f.Signature.Parameters[0].Kind == types.Pointer && f.Signature.Parameters[0].Elem.Name == t.Name + ptrParam := f.Signature.Parameters[0].Type.Kind == types.Pointer && f.Signature.Parameters[0].Type.Elem.Name == t.Name if !ptrParam { return nil, fmt.Errorf("type %v: invalid DeepCopy signature, expected parameter of type *%s", t, t.Name.Name) @@ -696,7 +696,7 @@ func (g *genDeepCopy) doMap(t *types.Type, sw *generator.SnippetWriter) { leftPointer := ut.Elem.Kind == types.Pointer rightPointer := !isReference(ut.Elem) if dc != nil { - rightPointer = dc.Results[0].Kind == types.Pointer + rightPointer = dc.Results[0].Type.Kind == types.Pointer } if leftPointer == rightPointer { sw.Do("(*out)[key] = val.DeepCopy()\n", nil) @@ -812,7 +812,7 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) { leftPointer := ft.Kind == types.Pointer rightPointer := !isReference(ft) if dc != nil { - rightPointer = dc.Results[0].Kind == types.Pointer + rightPointer = dc.Results[0].Type.Kind == types.Pointer } if leftPointer == rightPointer { sw.Do("out.$.name$ = in.$.name$.DeepCopy()\n", args) @@ -866,7 +866,7 @@ func (g *genDeepCopy) doPointer(t *types.Type, sw *generator.SnippetWriter) { case dc != nil || dci != nil: rightPointer := !isReference(ut.Elem) if dc != nil { - rightPointer = dc.Results[0].Kind == types.Pointer + rightPointer = dc.Results[0].Type.Kind == types.Pointer } if rightPointer { sw.Do("*out = (*in).DeepCopy()\n", nil) diff --git a/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go b/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go index 64b9ff29998b8..f7a6864c745e8 100644 --- a/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go +++ b/vendor/k8s.io/code-generator/cmd/defaulter-gen/generators/defaulter.go @@ -165,7 +165,7 @@ func getManualDefaultingFunctions(context *generator.Context, pkg *types.Package if len(signature.Results) != 0 { continue } - inType := signature.Parameters[0] + inType := signature.Parameters[0].Type if inType.Kind != types.Pointer { continue } @@ -823,7 +823,7 @@ func (g *genDefaulter) GenerateType(c *generator.Context, t *types.Type, w io.Wr }) sw := generator.NewSnippetWriter(w, c, "$", "$") - g.generateDefaulter(t, callTree, sw) + g.generateDefaulter(c, t, callTree, sw) return sw.Error() } @@ -833,9 +833,9 @@ func defaultingArgsFromType(inType *types.Type) generator.Args { } } -func (g *genDefaulter) generateDefaulter(inType *types.Type, callTree *callNode, sw *generator.SnippetWriter) { +func (g *genDefaulter) generateDefaulter(c *generator.Context, inType *types.Type, callTree *callNode, sw *generator.SnippetWriter) { sw.Do("func $.inType|objectdefaultfn$(in *$.inType|raw$) {\n", defaultingArgsFromType(inType)) - callTree.WriteMethod("in", 0, nil, sw) + callTree.WriteMethod(c, "in", 0, nil, sw) sw.Do("}\n\n", nil) } @@ -996,15 +996,19 @@ func getTypeZeroValue(t string) (interface{}, error) { return defaultZero, nil } -func (n *callNode) writeDefaulter(varName string, index string, isVarPointer bool, sw *generator.SnippetWriter) { +func (n *callNode) writeDefaulter(c *generator.Context, varName string, index string, isVarPointer bool, sw *generator.SnippetWriter) { if n.defaultValue.IsEmpty() { return } + + jsonUnmarshalType := c.Universe.Type(types.Name{Package: "encoding/json", Name: "Unmarshal"}) + args := generator.Args{ - "defaultValue": n.defaultValue.Resolved(), - "varName": varName, - "index": index, - "varTopType": n.defaultTopLevelType, + "defaultValue": n.defaultValue.Resolved(), + "varName": varName, + "index": index, + "varTopType": n.defaultTopLevelType, + "jsonUnmarshal": jsonUnmarshalType, } variablePlaceholder := "" @@ -1101,13 +1105,13 @@ func (n *callNode) writeDefaulter(varName string, index string, isVarPointer boo // This applies to maps with non-primitive values (eg: map[string]SubStruct) if n.key { sw.Do("$.mapDefaultVar$ := $.varName$[$.index$]\n", args) - sw.Do("if err := json.Unmarshal([]byte(`$.defaultValue$`), &$.mapDefaultVar$); err != nil {\n", args) + sw.Do("if err := $.jsonUnmarshal|raw$([]byte(`$.defaultValue$`), &$.mapDefaultVar$); err != nil {\n", args) } else { variablePointer := variablePlaceholder if !isVarPointer { variablePointer = "&" + variablePointer } - sw.Do(fmt.Sprintf("if err := json.Unmarshal([]byte(`$.defaultValue$`), %s); err != nil {\n", variablePointer), args) + sw.Do(fmt.Sprintf("if err := $.jsonUnmarshal|raw$([]byte(`$.defaultValue$`), %s); err != nil {\n", variablePointer), args) } sw.Do("panic(err)\n", nil) sw.Do("}\n", nil) @@ -1121,7 +1125,7 @@ func (n *callNode) writeDefaulter(varName string, index string, isVarPointer boo // WriteMethod performs an in-order traversal of the calltree, generating loops and if blocks as necessary // to correctly turn the call tree into a method body that invokes all calls on all child nodes of the call tree. // Depth is used to generate local variables at the proper depth. -func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode, sw *generator.SnippetWriter) { +func (n *callNode) WriteMethod(c *generator.Context, varName string, depth int, ancestors []*callNode, sw *generator.SnippetWriter) { // if len(n.call) > 0 { // sw.Do(fmt.Sprintf("// %s\n", callPath(append(ancestors, n)).String()), nil) // } @@ -1153,10 +1157,10 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode, } } - n.writeDefaulter(varName, index, isPointer, sw) + n.writeDefaulter(c, varName, index, isPointer, sw) n.writeCalls(local, true, sw) for i := range n.children { - n.children[i].WriteMethod(local, depth+1, append(ancestors, n), sw) + n.children[i].WriteMethod(c, local, depth+1, append(ancestors, n), sw) } sw.Do("}\n", nil) case n.key: @@ -1165,14 +1169,14 @@ func (n *callNode) WriteMethod(varName string, depth int, ancestors []*callNode, index = index + "_" + ancestors[len(ancestors)-1].field vars["index"] = index sw.Do("for $.index$ := range $.var$ {\n", vars) - n.writeDefaulter(varName, index, isPointer, sw) + n.writeDefaulter(c, varName, index, isPointer, sw) sw.Do("}\n", nil) } default: - n.writeDefaulter(varName, index, isPointer, sw) + n.writeDefaulter(c, varName, index, isPointer, sw) n.writeCalls(varName, isPointer, sw) for i := range n.children { - n.children[i].WriteMethod(varName, depth, append(ancestors, n), sw) + n.children[i].WriteMethod(c, varName, depth, append(ancestors, n), sw) } } diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go index d8e8873aab68a..e863b1d2fde4f 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go @@ -61,7 +61,6 @@ func (g *genericGenerator) Namers(c *generator.Context) namer.NameSystems { func (g *genericGenerator) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, "fmt") return } @@ -127,6 +126,7 @@ func (g *genericGenerator) GenerateType(c *generator.Context, t *types.Type, w i "cacheGenericLister": c.Universe.Type(cacheGenericLister), "cacheNewGenericLister": c.Universe.Function(cacheNewGenericLister), "cacheSharedIndexInformer": c.Universe.Type(cacheSharedIndexInformer), + "fmtErrorf": c.Universe.Type(fmtErrorfFunc), "groups": groups, "schemeGVs": schemeGVs, "schemaGroupResource": c.Universe.Type(schemaGroupResource), @@ -179,6 +179,6 @@ func (f *sharedInformerFactory) ForResource(resource {{.schemaGroupVersionResour {{end -}} } - return nil, fmt.Errorf("no informer found for %v", resource) + return nil, {{.fmtErrorf|raw}}("no informer found for %v", resource) } ` diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go index 9d786ea07d6a7..4034695ddf0f5 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/informer.go @@ -86,6 +86,7 @@ func (g *informerGenerator) GenerateType(c *generator.Context, t *types.Type, w "cacheNewSharedIndexInformer": c.Universe.Function(cacheNewSharedIndexInformer), "cacheSharedIndexInformer": c.Universe.Type(cacheSharedIndexInformer), "clientSetInterface": clientSetInterface, + "contextTODO": c.Universe.Type(contextTODOFunc), "group": namer.IC(g.groupGoName), "informerFor": informerFor, "interfacesTweakListOptionsFunc": c.Universe.Type(types.Name{Package: g.internalInterfacesPackage, Name: "TweakListOptionsFunc"}), @@ -151,13 +152,13 @@ func NewFiltered$.type|public$Informer(client $.clientSetInterface|raw$$if .name if tweakListOptions != nil { tweakListOptions(&options) } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).List(context.TODO(), options) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).List($.contextTODO|raw$(), options) }, WatchFunc: func(options $.v1ListOptions|raw$) ($.watchInterface|raw$, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).Watch(context.TODO(), options) + return client.$.group$$.version$().$.type|publicPlural$($if .namespaced$namespace$end$).Watch($.contextTODO|raw$(), options) }, }, &$.type|raw${}, diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go index 65dc89d0385d7..2e886d4e00c57 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/targets.go @@ -249,7 +249,7 @@ func factoryTarget(outputDirBase, outputPkgBase string, boilerplate []byte, grou OutputFilename: "factory.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkgBase), groupVersions: groupVersions, clientSetPackage: clientSetPackage, internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), @@ -261,7 +261,7 @@ func factoryTarget(outputDirBase, outputPkgBase string, boilerplate []byte, grou OutputFilename: "generic.go", }, outputPackage: outputPkgBase, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkgBase), groupVersions: groupVersions, pluralExceptions: pluralExceptions, typesForGroupVersion: typesForGroupVersion, @@ -288,7 +288,7 @@ func factoryInterfaceTarget(outputDirBase, outputPkgBase string, boilerplate []b OutputFilename: "factory_interfaces.go", }, outputPackage: outputPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), clientSetPackage: clientSetPackage, }) @@ -314,7 +314,7 @@ func groupTarget(outputDirBase, outputPackageBase string, groupVersions clientge }, outputPackage: outputPkg, groupVersions: groupVersions, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), internalInterfacesPackage: path.Join(outputPackageBase, subdirForInternalInterfaces), }) return generators @@ -342,7 +342,7 @@ func versionTarget(outputDirBase, outputPkgBase string, groupPkgName string, gv OutputFilename: "interface.go", }, outputPackage: outputPkg, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), types: typesToGenerate, internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), }) @@ -357,7 +357,7 @@ func versionTarget(outputDirBase, outputPkgBase string, groupPkgName string, gv groupVersion: gv, groupGoName: groupGoName, typeToGenerate: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), clientSetPackage: clientSetPackage, listersPackage: listersPackage, internalInterfacesPackage: path.Join(outputPkgBase, subdirForInternalInterfaces), diff --git a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go index 4ca511ea4ed4b..b717adfd3ec53 100644 --- a/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go +++ b/vendor/k8s.io/code-generator/cmd/informer-gen/generators/types.go @@ -29,6 +29,8 @@ var ( cacheNewSharedIndexInformer = types.Name{Package: "k8s.io/client-go/tools/cache", Name: "NewSharedIndexInformer"} cacheSharedIndexInformer = types.Name{Package: "k8s.io/client-go/tools/cache", Name: "SharedIndexInformer"} cacheTransformFunc = types.Name{Package: "k8s.io/client-go/tools/cache", Name: "TransformFunc"} + contextTODOFunc = types.Name{Package: "context", Name: "TODO"} + fmtErrorfFunc = types.Name{Package: "fmt", Name: "Errorf"} listOptions = types.Name{Package: "k8s.io/kubernetes/pkg/apis/core", Name: "ListOptions"} reflectType = types.Name{Package: "reflect", Name: "Type"} runtimeObject = types.Name{Package: "k8s.io/apimachinery/pkg/runtime", Name: "Object"} diff --git a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go index 8955e076f6c5d..a5beb2a7f18d2 100644 --- a/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go +++ b/vendor/k8s.io/code-generator/cmd/lister-gen/generators/lister.go @@ -149,7 +149,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target groupVersion: gv, internalGVPkg: internalGVPkg, typeToGenerate: t, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(outputPkg), objectMeta: objectMeta, }) } @@ -213,11 +213,6 @@ func (g *listerGenerator) Namers(c *generator.Context) namer.NameSystems { func (g *listerGenerator) Imports(c *generator.Context) (imports []string) { imports = append(imports, g.imports.ImportLines()...) - imports = append(imports, "k8s.io/apimachinery/pkg/api/errors") - imports = append(imports, "k8s.io/apimachinery/pkg/labels") - imports = append(imports, "k8s.io/client-go/listers") - // for Indexer - imports = append(imports, "k8s.io/client-go/tools/cache") return } @@ -226,9 +221,14 @@ func (g *listerGenerator) GenerateType(c *generator.Context, t *types.Type, w io klog.V(5).Infof("processing type %v", t) m := map[string]interface{}{ - "Resource": c.Universe.Function(types.Name{Package: t.Name.Package, Name: "Resource"}), - "type": t, - "objectMeta": g.objectMeta, + "Resource": c.Universe.Function(types.Name{Package: t.Name.Package, Name: "Resource"}), + "labelsSelector": c.Universe.Function(types.Name{Package: "k8s.io/apimachinery/pkg/labels", Name: "Selector"}), + "listersResourceIndexer": c.Universe.Function(types.Name{Package: "k8s.io/client-go/listers", Name: "ResourceIndexer"}), + "listersNew": c.Universe.Function(types.Name{Package: "k8s.io/client-go/listers", Name: "New"}), + "listersNewNamespaced": c.Universe.Function(types.Name{Package: "k8s.io/client-go/listers", Name: "NewNamespaced"}), + "cacheIndexer": c.Universe.Type(types.Name{Package: "k8s.io/client-go/tools/cache", Name: "Indexer"}), + "type": t, + "objectMeta": g.objectMeta, } tags, err := util.ParseClientGenTags(append(t.SecondClosestCommentLines, t.CommentLines...)) @@ -262,7 +262,7 @@ var typeListerInterface = ` type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*$.type|raw$, err error) + List(selector $.labelsSelector|raw$) (ret []*$.type|raw$, err error) // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. $.type|publicPlural$(namespace string) $.type|public$NamespaceLister $.type|public$ListerExpansion @@ -275,7 +275,7 @@ var typeListerInterfaceNonNamespaced = ` type $.type|public$Lister interface { // List lists all $.type|publicPlural$ in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*$.type|raw$, err error) + List(selector $.labelsSelector|raw$) (ret []*$.type|raw$, err error) // Get retrieves the $.type|public$ from the index for a given name. // Objects returned here must be treated as read-only. Get(name string) (*$.type|raw$, error) @@ -289,21 +289,21 @@ type $.type|public$Lister interface { var typeListerStruct = ` // $.type|private$Lister implements the $.type|public$Lister interface. type $.type|private$Lister struct { - listers.ResourceIndexer[*$.type|raw$] + $.listersResourceIndexer|raw$[*$.type|raw$] } ` var typeListerConstructor = ` // New$.type|public$Lister returns a new $.type|public$Lister. -func New$.type|public$Lister(indexer cache.Indexer) $.type|public$Lister { - return &$.type|private$Lister{listers.New[*$.type|raw$](indexer, $.Resource|raw$("$.type|lowercaseSingular$"))} +func New$.type|public$Lister(indexer $.cacheIndexer|raw$) $.type|public$Lister { + return &$.type|private$Lister{$.listersNew|raw$[*$.type|raw$](indexer, $.Resource|raw$("$.type|lowercaseSingular$"))} } ` var typeListerNamespaceLister = ` // $.type|publicPlural$ returns an object that can list and get $.type|publicPlural$. func (s *$.type|private$Lister) $.type|publicPlural$(namespace string) $.type|public$NamespaceLister { - return $.type|private$NamespaceLister{listers.NewNamespaced[*$.type|raw$](s.ResourceIndexer, namespace)} + return $.type|private$NamespaceLister{$.listersNewNamespaced|raw$[*$.type|raw$](s.ResourceIndexer, namespace)} } ` @@ -313,7 +313,7 @@ var namespaceListerInterface = ` type $.type|public$NamespaceLister interface { // List lists all $.type|publicPlural$ in the indexer for a given namespace. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*$.type|raw$, err error) + List(selector $.labelsSelector|raw$) (ret []*$.type|raw$, err error) // Get retrieves the $.type|public$ from the indexer for a given namespace and name. // Objects returned here must be treated as read-only. Get(name string) (*$.type|raw$, error) @@ -328,6 +328,6 @@ var namespaceListerStruct = ` // $.type|private$NamespaceLister implements the $.type|public$NamespaceLister // interface. type $.type|private$NamespaceLister struct { - listers.ResourceIndexer[*$.type|raw$] + $.listersResourceIndexer|raw$[*$.type|raw$] } ` diff --git a/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go b/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go index d2998261c8dab..952e276f7b5f5 100644 --- a/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go +++ b/vendor/k8s.io/code-generator/cmd/register-gen/generators/targets.go @@ -115,7 +115,7 @@ func GetTargets(context *generator.Context, args *args.Args) []generator.Target gv: gv, typesToGenerate: typesToRegister, outputPackage: pkg.Path, - imports: generator.NewImportTracker(), + imports: generator.NewImportTrackerForPackage(pkg.Path), }, } }, diff --git a/vendor/k8s.io/gengo/args/args.go b/vendor/k8s.io/gengo/args/args.go index b81ceb93afb79..48fe806cd9e6f 100644 --- a/vendor/k8s.io/gengo/args/args.go +++ b/vendor/k8s.io/gengo/args/args.go @@ -23,7 +23,6 @@ import ( "fmt" "io/ioutil" "os" - "path" "path/filepath" "strconv" "strings" @@ -121,7 +120,9 @@ func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) { if len(b) != 0 { b = append(b, byte('\n')) } - generatorName := path.Base(os.Args[0]) + generatorName := filepath.Base(os.Args[0]) + // Strip the extension from the name to normalize output between *nix and Windows. + generatorName = generatorName[:len(generatorName)-len(filepath.Ext(generatorName))] generatedByComment := strings.Replace(g.GeneratedByCommentTemplate, "GENERATOR_NAME", generatorName, -1) s := fmt.Sprintf("%s\n\n", generatedByComment) b = append(b, []byte(s)...) diff --git a/vendor/k8s.io/gengo/namer/import_tracker.go b/vendor/k8s.io/gengo/namer/import_tracker.go index 2bf1d503f946f..567c1fffcd932 100644 --- a/vendor/k8s.io/gengo/namer/import_tracker.go +++ b/vendor/k8s.io/gengo/namer/import_tracker.go @@ -99,7 +99,7 @@ func (tracker *DefaultImportTracker) ImportLines() []string { for path := range tracker.pathToName { importPaths = append(importPaths, path) } - sort.Sort(sort.StringSlice(importPaths)) + sort.Strings(importPaths) out := []string{} for _, path := range importPaths { out = append(out, tracker.PrintImport(path, tracker.pathToName[path])) diff --git a/vendor/k8s.io/gengo/parser/parse.go b/vendor/k8s.io/gengo/parser/parse.go index bbd719295e6e0..8b2ae58bfd3bc 100644 --- a/vendor/k8s.io/gengo/parser/parse.go +++ b/vendor/k8s.io/gengo/parser/parse.go @@ -33,8 +33,9 @@ import ( "sort" "strings" - "k8s.io/gengo/types" "k8s.io/klog/v2" + + "k8s.io/gengo/types" ) // This clarifies when a pkg path has been canonicalized. @@ -718,6 +719,12 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t name = *useName } + // Handle alias types conditionally on go1.22+. + // Inline this once the minimum supported version is go1.22 + if out := b.walkAliasType(u, in); out != nil { + return out + } + switch t := in.(type) { case *tc.Struct: out := u.Type(name) diff --git a/vendor/k8s.io/gengo/parser/parse_122.go b/vendor/k8s.io/gengo/parser/parse_122.go new file mode 100644 index 0000000000000..94a107e60016d --- /dev/null +++ b/vendor/k8s.io/gengo/parser/parse_122.go @@ -0,0 +1,33 @@ +//go:build go1.22 +// +build go1.22 + +/* +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 parser + +import ( + gotypes "go/types" + + "k8s.io/gengo/types" +) + +func (b *Builder) walkAliasType(u types.Universe, in gotypes.Type) *types.Type { + if t, isAlias := in.(*gotypes.Alias); isAlias { + return b.walkType(u, nil, gotypes.Unalias(t)) + } + return nil +} diff --git a/vendor/k8s.io/gengo/parser/parse_pre_122.go b/vendor/k8s.io/gengo/parser/parse_pre_122.go new file mode 100644 index 0000000000000..2b8b70818b9e4 --- /dev/null +++ b/vendor/k8s.io/gengo/parser/parse_pre_122.go @@ -0,0 +1,30 @@ +//go:build !go1.22 +// +build !go1.22 + +/* +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 parser + +import ( + gotypes "go/types" + + "k8s.io/gengo/types" +) + +func (p *Parser) walkAliasType(u types.Universe, in gotypes.Type) *types.Type { + return nil +} diff --git a/vendor/k8s.io/gengo/v2/Makefile b/vendor/k8s.io/gengo/v2/Makefile new file mode 100644 index 0000000000000..8d0fbdaa8a8a4 --- /dev/null +++ b/vendor/k8s.io/gengo/v2/Makefile @@ -0,0 +1,14 @@ +all: + go build ./... + +test: + GODEBUG=gotypesalias=0 go test -race ./... -count=1 + GODEBUG=gotypesalias=1 go test -race ./... -count=1 + +# We verify for the maximum version of the go directive as 1.20 +# here because the oldest go directive that exists on our supported +# release branches in k/k is 1.20. +verify: + GODEBUG=gotypesalias=0 ./hack/verify-examples.sh + GODEBUG=gotypesalias=1 ./hack/verify-examples.sh + ./hack/verify-go-directive.sh 1.20 diff --git a/vendor/k8s.io/gengo/v2/generator/execute.go b/vendor/k8s.io/gengo/v2/generator/execute.go index 02b4c3318a6ca..a1e052f5cc678 100644 --- a/vendor/k8s.io/gengo/v2/generator/execute.go +++ b/vendor/k8s.io/gengo/v2/generator/execute.go @@ -26,6 +26,7 @@ import ( "strings" "golang.org/x/tools/imports" + "k8s.io/gengo/v2/namer" "k8s.io/gengo/v2/types" "k8s.io/klog/v2" @@ -114,7 +115,13 @@ func assembleGoFile(w io.Writer, f *File) { } func importsWrapper(src []byte) ([]byte, error) { - return imports.Process("", src, nil) + opt := imports.Options{ + Comments: true, + TabIndent: true, + TabWidth: 8, + FormatOnly: true, // Disable the insertion and deletion of imports + } + return imports.Process("", src, &opt) } func NewGoFile() *DefaultFileType { diff --git a/vendor/k8s.io/gengo/v2/generator/import_tracker.go b/vendor/k8s.io/gengo/v2/generator/import_tracker.go index 70b86cf56b22d..22393e4d49391 100644 --- a/vendor/k8s.io/gengo/v2/generator/import_tracker.go +++ b/vendor/k8s.io/gengo/v2/generator/import_tracker.go @@ -18,6 +18,7 @@ package generator import ( "go/token" + "path/filepath" "strings" "k8s.io/klog/v2" @@ -45,7 +46,7 @@ import ( func NewImportTrackerForPackage(local string, typesToAdd ...*types.Type) *namer.DefaultImportTracker { tracker := namer.NewDefaultImportTracker(types.Name{Package: local}) tracker.IsInvalidType = func(*types.Type) bool { return false } - tracker.LocalName = func(name types.Name) string { return goTrackerLocalName(&tracker, name) } + tracker.LocalName = func(name types.Name) string { return goTrackerLocalName(&tracker, local, name) } tracker.PrintImport = func(path, name string) string { return name + " \"" + path + "\"" } tracker.AddTypes(typesToAdd...) @@ -56,7 +57,7 @@ func NewImportTracker(typesToAdd ...*types.Type) *namer.DefaultImportTracker { return NewImportTrackerForPackage("", typesToAdd...) } -func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { +func goTrackerLocalName(tracker namer.ImportTracker, localPkg string, t types.Name) string { path := t.Package // Using backslashes in package names causes gengo to produce Go code which @@ -64,6 +65,7 @@ func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { if strings.ContainsRune(path, '\\') { klog.Warningf("Warning: backslash used in import path '%v', this is unsupported.\n", path) } + localLeaf := filepath.Base(localPkg) dirs := strings.Split(path, namer.GoSeperator) for n := len(dirs) - 1; n >= 0; n-- { @@ -74,8 +76,13 @@ func goTrackerLocalName(tracker namer.ImportTracker, t types.Name) string { // packages, but aren't legal go names. So we'll sanitize. name = strings.ReplaceAll(name, ".", "") name = strings.ReplaceAll(name, "-", "") - if _, found := tracker.PathOf(name); found { - // This name collides with some other package + if _, found := tracker.PathOf(name); found || name == localLeaf { + // This name collides with some other package. + // Or, this name is tne same name as the local package, + // which we avoid because it can be confusing. For example, + // if the local package is v1, we to avoid importing + // another package using the v1 name, and instead import + // it with a more qualified name, such as metav1. continue } diff --git a/vendor/k8s.io/gengo/v2/generator/snippet_writer.go b/vendor/k8s.io/gengo/v2/generator/snippet_writer.go index 7f4610c00f7f3..550214e1635d4 100644 --- a/vendor/k8s.io/gengo/v2/generator/snippet_writer.go +++ b/vendor/k8s.io/gengo/v2/generator/snippet_writer.go @@ -123,25 +123,28 @@ func (s *SnippetWriter) Do(format string, args interface{}) *SnippetWriter { // SnippetWriter.Do. type Args map[interface{}]interface{} -// With makes a copy of a and adds the given key, value pair. +// With makes a copy of a and adds the given key, value pair. If key overlaps, +// the new value wins. func (a Args) With(key, value interface{}) Args { - a2 := Args{key: value} + result := Args{} for k, v := range a { - a2[k] = v + result[k] = v } - return a2 + result[key] = value + return result } -// WithArgs makes a copy of a and adds the given arguments. +// WithArgs makes a copy of a and adds the given arguments. If any keys +// overlap, the values from rhs win. func (a Args) WithArgs(rhs Args) Args { - a2 := Args{} - for k, v := range rhs { - a2[k] = v - } + result := Args{} for k, v := range a { - a2[k] = v + result[k] = v + } + for k, v := range rhs { + result[k] = v } - return a2 + return result } func (s *SnippetWriter) Out() io.Writer { @@ -152,3 +155,16 @@ func (s *SnippetWriter) Out() io.Writer { func (s *SnippetWriter) Error() error { return s.err } + +// Dup creates an exact duplicate SnippetWriter with a different io.Writer. +func (s *SnippetWriter) Dup(w io.Writer) *SnippetWriter { + ret := *s + ret.w = w + return &ret +} + +// Append adds the contents of the io.Reader to this SnippetWriter's buffer. +func (s *SnippetWriter) Append(r io.Reader) error { + _, err := io.Copy(s.w, r) + return err +} diff --git a/vendor/k8s.io/gengo/v2/namer/namer.go b/vendor/k8s.io/gengo/v2/namer/namer.go index e82fe66adcf2f..37877eb4921b4 100644 --- a/vendor/k8s.io/gengo/v2/namer/namer.go +++ b/vendor/k8s.io/gengo/v2/namer/namer.go @@ -281,12 +281,12 @@ func (ns *NameStrategy) Name(t *types.Type) string { case types.Func: // TODO: add to name test parts := []string{"Func"} - for _, pt := range t.Signature.Parameters { - parts = append(parts, ns.removePrefixAndSuffix(ns.Name(pt))) + for _, param := range t.Signature.Parameters { + parts = append(parts, ns.removePrefixAndSuffix(ns.Name(param.Type))) } parts = append(parts, "Returns") - for _, rt := range t.Signature.Results { - parts = append(parts, ns.removePrefixAndSuffix(ns.Name(rt))) + for _, result := range t.Signature.Results { + parts = append(parts, ns.removePrefixAndSuffix(ns.Name(result.Type))) } name = ns.Join(ns.Prefix, parts, ns.Suffix) default: @@ -374,12 +374,12 @@ func (r *rawNamer) Name(t *types.Type) string { case types.Func: // TODO: add to name test params := []string{} - for _, pt := range t.Signature.Parameters { - params = append(params, r.Name(pt)) + for _, param := range t.Signature.Parameters { + params = append(params, r.Name(param.Type)) } results := []string{} - for _, rt := range t.Signature.Results { - results = append(results, r.Name(rt)) + for _, result := range t.Signature.Results { + results = append(results, r.Name(result.Type)) } name = "func(" + strings.Join(params, ",") + ")" if len(results) == 1 { diff --git a/vendor/k8s.io/gengo/v2/parser/parse.go b/vendor/k8s.io/gengo/v2/parser/parse.go index a5993d1639310..d4de19e7699b4 100644 --- a/vendor/k8s.io/gengo/v2/parser/parse.go +++ b/vendor/k8s.io/gengo/v2/parser/parse.go @@ -29,6 +29,7 @@ import ( "time" "golang.org/x/tools/go/packages" + "k8s.io/gengo/v2/types" "k8s.io/klog/v2" ) @@ -572,6 +573,9 @@ func goVarNameToName(in string) types.Name { return goNameToName(nameParts[1]) } +// goNameToName converts a go name string to a gengo types.Name. +// It operates solely on the string on a best effort basis. The name may be updated +// in walkType for generics. func goNameToName(in string) types.Name { // Detect anonymous type names. (These may have '.' characters because // embedded types may have packages, so we detect them specially.) @@ -587,14 +591,25 @@ func goNameToName(in string) types.Name { return types.Name{Name: in} } + // There may be '.' characters within a generic. Temporarily remove + // the generic. + genericIndex := strings.IndexRune(in, '[') + if genericIndex == -1 { + genericIndex = len(in) + } + // Otherwise, if there are '.' characters present, the name has a // package path in front. - nameParts := strings.Split(in, ".") + nameParts := strings.Split(in[:genericIndex], ".") name := types.Name{Name: in} if n := len(nameParts); n >= 2 { // The final "." is the name of the type--previous ones must // have been in the package path. name.Package, name.Name = strings.Join(nameParts[:n-1], "."), nameParts[n-1] + // Add back the generic component now that the package and type name have been separated. + if genericIndex != len(in) { + name.Name = name.Name + in[genericIndex:] + } } return name } @@ -602,12 +617,16 @@ func goNameToName(in string) types.Name { func (p *Parser) convertSignature(u types.Universe, t *gotypes.Signature) *types.Signature { signature := &types.Signature{} for i := 0; i < t.Params().Len(); i++ { - signature.Parameters = append(signature.Parameters, p.walkType(u, nil, t.Params().At(i).Type())) - signature.ParameterNames = append(signature.ParameterNames, t.Params().At(i).Name()) + signature.Parameters = append(signature.Parameters, &types.ParamResult{ + Name: t.Params().At(i).Name(), + Type: p.walkType(u, nil, t.Params().At(i).Type()), + }) } for i := 0; i < t.Results().Len(); i++ { - signature.Results = append(signature.Results, p.walkType(u, nil, t.Results().At(i).Type())) - signature.ResultNames = append(signature.ResultNames, t.Results().At(i).Name()) + signature.Results = append(signature.Results, &types.ParamResult{ + Name: t.Results().At(i).Name(), + Type: p.walkType(u, nil, t.Results().At(i).Type()), + }) } if r := t.Recv(); r != nil { signature.Receiver = p.walkType(u, nil, r.Type()) @@ -624,6 +643,12 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type name = *useName } + // Handle alias types conditionally on go1.22+. + // Inline this once the minimum supported version is go1.22 + if out := p.walkAliasType(u, in); out != nil { + return out + } + switch t := in.(type) { case *gotypes.Struct: out := u.Type(name) @@ -734,6 +759,27 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type } out.Kind = types.Alias out.Underlying = p.walkType(u, nil, t.Underlying()) + case *gotypes.Struct, *gotypes.Interface: + name := goNameToName(t.String()) + tpMap := map[string]*types.Type{} + if t.TypeParams().Len() != 0 { + // Remove generics, then readd them without the encoded + // type, e.g. Foo[T any] => Foo[T] + var tpNames []string + for i := 0; i < t.TypeParams().Len(); i++ { + tp := t.TypeParams().At(i) + tpName := tp.Obj().Name() + tpNames = append(tpNames, tpName) + tpMap[tpName] = p.walkType(u, nil, tp.Constraint()) + } + name.Name = fmt.Sprintf("%s[%s]", strings.SplitN(name.Name, "[", 2)[0], strings.Join(tpNames, ",")) + } + + if out := u.Type(name); out.Kind != types.Unknown { + return out // short circuit if we've already made this. + } + out = p.walkType(u, &name, t.Underlying()) + out.TypeParams = tpMap default: // gotypes package makes everything "named" with an // underlying anonymous type--we remove that annoying @@ -760,6 +806,15 @@ func (p *Parser) walkType(u types.Universe, useName *types.Name, in gotypes.Type } } return out + case *gotypes.TypeParam: + // DO NOT retrieve the type from the universe. The default type-param name is only the + // generic variable name. Ideally, it would be namespaced by package and struct but it is + // not. Thus, if we try to use the universe, we would start polluting it. + // e.g. if Foo[T] and Bar[T] exists, we'd mistakenly use the same type T for both. + return &types.Type{ + Name: name, + Kind: types.TypeParam, + } default: out := u.Type(name) if out.Kind != types.Unknown { diff --git a/vendor/k8s.io/gengo/v2/parser/parse_122.go b/vendor/k8s.io/gengo/v2/parser/parse_122.go new file mode 100644 index 0000000000000..ec2064958a909 --- /dev/null +++ b/vendor/k8s.io/gengo/v2/parser/parse_122.go @@ -0,0 +1,33 @@ +//go:build go1.22 +// +build go1.22 + +/* +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 parser + +import ( + gotypes "go/types" + + "k8s.io/gengo/v2/types" +) + +func (p *Parser) walkAliasType(u types.Universe, in gotypes.Type) *types.Type { + if t, isAlias := in.(*gotypes.Alias); isAlias { + return p.walkType(u, nil, gotypes.Unalias(t)) + } + return nil +} diff --git a/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go b/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go new file mode 100644 index 0000000000000..6f62100c0a773 --- /dev/null +++ b/vendor/k8s.io/gengo/v2/parser/parse_pre_122.go @@ -0,0 +1,30 @@ +//go:build !go1.22 +// +build !go1.22 + +/* +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 parser + +import ( + gotypes "go/types" + + "k8s.io/gengo/v2/types" +) + +func (p *Parser) walkAliasType(u types.Universe, in gotypes.Type) *types.Type { + return nil +} diff --git a/vendor/k8s.io/gengo/v2/types/types.go b/vendor/k8s.io/gengo/v2/types/types.go index e9c8319c6563b..7bbca017332d0 100644 --- a/vendor/k8s.io/gengo/v2/types/types.go +++ b/vendor/k8s.io/gengo/v2/types/types.go @@ -98,6 +98,7 @@ const ( DeclarationOf Kind = "DeclarationOf" Unknown Kind = "" Unsupported Kind = "Unsupported" + TypeParam Kind = "TypeParam" // Protobuf is protobuf type. Protobuf Kind = "Protobuf" @@ -324,6 +325,9 @@ type Type struct { // If Kind == Struct Members []Member + // If Kind == Struct + TypeParams map[string]*Type + // If Kind == Map, Slice, Pointer, or Chan Elem *Type @@ -423,14 +427,20 @@ func (m Member) String() string { return m.Name + " " + m.Type.String() } +// ParamResult represents a parameter or a result of a method's signature. +type ParamResult struct { + // The name of the parameter or result. + Name string + // The type of this parameter or result. + Type *Type +} + // Signature is a function's signature. type Signature struct { // If a method of some type, this is the type it's a member of. - Receiver *Type - Parameters []*Type - ParameterNames []string - Results []*Type - ResultNames []string + Receiver *Type + Parameters []*ParamResult + Results []*ParamResult // True if the last in parameter is of the form ...T. Variadic bool diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go b/vendor/k8s.io/kube-openapi/pkg/generators/markers.go index 7f0fe985a6afc..c4dd67d3beb3f 100644 --- a/vendor/k8s.io/kube-openapi/pkg/generators/markers.go +++ b/vendor/k8s.io/kube-openapi/pkg/generators/markers.go @@ -75,7 +75,29 @@ func (c *CELTag) Validate() error { // - +listMapKeys // - +mapType type commentTags struct { - spec.SchemaProps + Nullable *bool `json:"nullable,omitempty"` + Format *string `json:"format,omitempty"` + Maximum *float64 `json:"maximum,omitempty"` + ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` + Minimum *float64 `json:"minimum,omitempty"` + ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + Pattern *string `json:"pattern,omitempty"` + MaxItems *int64 `json:"maxItems,omitempty"` + MinItems *int64 `json:"minItems,omitempty"` + UniqueItems *bool `json:"uniqueItems,omitempty"` + MultipleOf *float64 `json:"multipleOf,omitempty"` + Enum []interface{} `json:"enum,omitempty"` + MaxProperties *int64 `json:"maxProperties,omitempty"` + MinProperties *int64 `json:"minProperties,omitempty"` + + // Nested commentTags for extending the schemas of subfields at point-of-use + // when you cant annotate them directly. Cannot be used to add properties + // or remove validations on the overridden schema. + Items *commentTags `json:"items,omitempty"` + Properties map[string]*commentTags `json:"properties,omitempty"` + AdditionalProperties *commentTags `json:"additionalProperties,omitempty"` CEL []CELTag `json:"cel,omitempty"` @@ -86,9 +108,75 @@ type commentTags struct { // Returns the schema for the given CommentTags instance. // This is the final authoritative schema for the comment tags -func (c commentTags) ValidationSchema() (*spec.Schema, error) { +func (c *commentTags) ValidationSchema() (*spec.Schema, error) { + if c == nil { + return nil, nil + } + + isNullable := c.Nullable != nil && *c.Nullable + format := "" + if c.Format != nil { + format = *c.Format + } + isExclusiveMaximum := c.ExclusiveMaximum != nil && *c.ExclusiveMaximum + isExclusiveMinimum := c.ExclusiveMinimum != nil && *c.ExclusiveMinimum + isUniqueItems := c.UniqueItems != nil && *c.UniqueItems + pattern := "" + if c.Pattern != nil { + pattern = *c.Pattern + } + + var transformedItems *spec.SchemaOrArray + var transformedProperties map[string]spec.Schema + var transformedAdditionalProperties *spec.SchemaOrBool + + if c.Items != nil { + items, err := c.Items.ValidationSchema() + if err != nil { + return nil, fmt.Errorf("failed to transform items: %w", err) + } + transformedItems = &spec.SchemaOrArray{Schema: items} + } + + if c.Properties != nil { + properties := make(map[string]spec.Schema) + for key, value := range c.Properties { + property, err := value.ValidationSchema() + if err != nil { + return nil, fmt.Errorf("failed to transform property %q: %w", key, err) + } + properties[key] = *property + } + transformedProperties = properties + } + + if c.AdditionalProperties != nil { + additionalProperties, err := c.AdditionalProperties.ValidationSchema() + if err != nil { + return nil, fmt.Errorf("failed to transform additionalProperties: %w", err) + } + transformedAdditionalProperties = &spec.SchemaOrBool{Schema: additionalProperties, Allows: true} + } + res := spec.Schema{ - SchemaProps: c.SchemaProps, + SchemaProps: spec.SchemaProps{ + Nullable: isNullable, + Format: format, + Maximum: c.Maximum, + ExclusiveMaximum: isExclusiveMaximum, + Minimum: c.Minimum, + ExclusiveMinimum: isExclusiveMinimum, + MaxLength: c.MaxLength, + MinLength: c.MinLength, + Pattern: pattern, + MaxItems: c.MaxItems, + MinItems: c.MinItems, + UniqueItems: isUniqueItems, + MultipleOf: c.MultipleOf, + Enum: c.Enum, + MaxProperties: c.MaxProperties, + MinProperties: c.MinProperties, + }, } if len(c.CEL) > 0 { @@ -105,6 +193,18 @@ func (c commentTags) ValidationSchema() (*spec.Schema, error) { res.VendorExtensible.AddExtension("x-kubernetes-validations", celTagMap) } + // Dont add structural properties directly to this schema. This schema + // is used only for validation. + if transformedItems != nil || len(transformedProperties) > 0 || transformedAdditionalProperties != nil { + res.AllOf = append(res.AllOf, spec.Schema{ + SchemaProps: spec.SchemaProps{ + Items: transformedItems, + Properties: transformedProperties, + AdditionalProperties: transformedAdditionalProperties, + }, + }) + } + return &res, nil } @@ -134,7 +234,7 @@ func (c commentTags) Validate() error { if c.Minimum != nil && c.Maximum != nil && *c.Minimum > *c.Maximum { err = errors.Join(err, fmt.Errorf("minimum %f is greater than maximum %f", *c.Minimum, *c.Maximum)) } - if (c.ExclusiveMinimum || c.ExclusiveMaximum) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum { + if (c.ExclusiveMinimum != nil || c.ExclusiveMaximum != nil) && c.Minimum != nil && c.Maximum != nil && *c.Minimum == *c.Maximum { err = errors.Join(err, fmt.Errorf("exclusiveMinimum/Maximum cannot be set when minimum == maximum")) } if c.MinLength != nil && c.MaxLength != nil && *c.MinLength > *c.MaxLength { @@ -146,10 +246,10 @@ func (c commentTags) Validate() error { if c.MinProperties != nil && c.MaxProperties != nil && *c.MinProperties > *c.MaxProperties { err = errors.Join(err, fmt.Errorf("minProperties %d is greater than maxProperties %d", *c.MinProperties, *c.MaxProperties)) } - if c.Pattern != "" { - _, e := regexp.Compile(c.Pattern) + if c.Pattern != nil { + _, e := regexp.Compile(*c.Pattern) if e != nil { - err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", c.Pattern, e)) + err = errors.Join(err, fmt.Errorf("invalid pattern %q: %v", *c.Pattern, e)) } } if c.MultipleOf != nil && *c.MultipleOf == 0 { @@ -175,10 +275,23 @@ func (c commentTags) ValidateType(t *types.Type) error { typeString, _ := openapi.OpenAPITypeFormat(resolvedType.String()) // will be empty for complicated types // Structs and interfaces may dynamically be any type, so we cant validate them - // easily. We may be able to if we check that they don't implement all the - // override functions, but for now we just skip them. + // easily. if resolvedType.Kind == types.Interface || resolvedType.Kind == types.Struct { - return nil + // Skip validation for structs and interfaces which implement custom + // overrides + // + // Only check top-level t type without resolving alias to mirror generator + // behavior. Generator only checks the top level type without resolving + // alias. The `has*Method` functions can be changed to add this behavior in the + // future if needed. + elemT := resolvePtrType(t) + if hasOpenAPIDefinitionMethod(elemT) || + hasOpenAPIDefinitionMethods(elemT) || + hasOpenAPIV3DefinitionMethod(elemT) || + hasOpenAPIV3OneOfMethod(elemT) { + + return nil + } } isArray := resolvedType.Kind == types.Slice || resolvedType.Kind == types.Array @@ -186,6 +299,7 @@ func (c commentTags) ValidateType(t *types.Type) error { isString := typeString == "string" isInt := typeString == "integer" isFloat := typeString == "number" + isStruct := resolvedType.Kind == types.Struct if c.MaxItems != nil && !isArray { err = errors.Join(err, fmt.Errorf("maxItems can only be used on array types")) @@ -193,13 +307,13 @@ func (c commentTags) ValidateType(t *types.Type) error { if c.MinItems != nil && !isArray { err = errors.Join(err, fmt.Errorf("minItems can only be used on array types")) } - if c.UniqueItems && !isArray { + if c.UniqueItems != nil && !isArray { err = errors.Join(err, fmt.Errorf("uniqueItems can only be used on array types")) } - if c.MaxProperties != nil && !isMap { + if c.MaxProperties != nil && !(isMap || isStruct) { err = errors.Join(err, fmt.Errorf("maxProperties can only be used on map types")) } - if c.MinProperties != nil && !isMap { + if c.MinProperties != nil && !(isMap || isStruct) { err = errors.Join(err, fmt.Errorf("minProperties can only be used on map types")) } if c.MinLength != nil && !isString { @@ -208,7 +322,7 @@ func (c commentTags) ValidateType(t *types.Type) error { if c.MaxLength != nil && !isString { err = errors.Join(err, fmt.Errorf("maxLength can only be used on string types")) } - if c.Pattern != "" && !isString { + if c.Pattern != nil && !isString { err = errors.Join(err, fmt.Errorf("pattern can only be used on string types")) } if c.Minimum != nil && !isInt && !isFloat { @@ -220,16 +334,57 @@ func (c commentTags) ValidateType(t *types.Type) error { if c.MultipleOf != nil && !isInt && !isFloat { err = errors.Join(err, fmt.Errorf("multipleOf can only be used on numeric types")) } - if c.ExclusiveMinimum && !isInt && !isFloat { + if c.ExclusiveMinimum != nil && !isInt && !isFloat { err = errors.Join(err, fmt.Errorf("exclusiveMinimum can only be used on numeric types")) } - if c.ExclusiveMaximum && !isInt && !isFloat { + if c.ExclusiveMaximum != nil && !isInt && !isFloat { err = errors.Join(err, fmt.Errorf("exclusiveMaximum can only be used on numeric types")) } + if c.AdditionalProperties != nil && !isMap { + err = errors.Join(err, fmt.Errorf("additionalProperties can only be used on map types")) + + if err == nil { + err = errors.Join(err, c.AdditionalProperties.ValidateType(t)) + } + } + if c.Items != nil && !isArray { + err = errors.Join(err, fmt.Errorf("items can only be used on array types")) + + if err == nil { + err = errors.Join(err, c.Items.ValidateType(t)) + } + } + if c.Properties != nil { + if !isStruct && !isMap { + err = errors.Join(err, fmt.Errorf("properties can only be used on struct types")) + } else if isStruct && err == nil { + for key, tags := range c.Properties { + if member := memberWithJSONName(resolvedType, key); member == nil { + err = errors.Join(err, fmt.Errorf("property used in comment tag %q not found in struct %s", key, resolvedType.String())) + } else if nestedErr := tags.ValidateType(member.Type); nestedErr != nil { + err = errors.Join(err, fmt.Errorf("failed to validate property %q: %w", key, nestedErr)) + } + } + } + } return err } +func memberWithJSONName(t *types.Type, key string) *types.Member { + for _, member := range t.Members { + tags := getJsonTags(&member) + if len(tags) > 0 && tags[0] == key { + return &member + } else if member.Embedded { + if embeddedMember := memberWithJSONName(member.Type, key); embeddedMember != nil { + return embeddedMember + } + } + } + return nil +} + // Parses the given comments into a CommentTags type. Validates the parsed comment tags, and returns the result. // Accepts an optional type to validate against, and a prefix to filter out markers not related to validation. // Accepts a prefix to filter out markers not related to validation. diff --git a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go b/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go index 1ffcf9094913a..c5c0093818363 100644 --- a/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go +++ b/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go @@ -249,7 +249,7 @@ func methodReturnsValue(mt *types.Type, pkg, name string) bool { return false } r := mt.Signature.Results[0] - return r.Name.Name == name && r.Name.Package == pkg + return r.Type.Name.Name == name && r.Type.Name.Package == pkg } func hasOpenAPIV3DefinitionMethod(t *types.Type) bool { @@ -362,6 +362,88 @@ func (g openAPITypeWriter) generateCall(t *types.Type) error { return g.Error() } +// Generates Go code to represent an OpenAPI schema. May be refactored in +// the future to take more responsibility as we transition from an on-line +// approach to parsing the comments to spec.Schema +func (g openAPITypeWriter) generateSchema(s *spec.Schema) error { + if !reflect.DeepEqual(s.SchemaProps, spec.SchemaProps{}) { + g.Do("SchemaProps: spec.SchemaProps{\n", nil) + err := g.generateValueValidations(&s.SchemaProps) + if err != nil { + return err + } + + if len(s.Properties) > 0 { + g.Do("Properties: map[string]spec.Schema{\n", nil) + + // Sort property names to generate deterministic output + keys := []string{} + for k := range s.Properties { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := s.Properties[k] + g.Do("$.$: {\n", fmt.Sprintf("%#v", k)) + err := g.generateSchema(&v) + if err != nil { + return err + } + g.Do("},\n", nil) + } + g.Do("},\n", nil) + } + + if s.AdditionalProperties != nil && s.AdditionalProperties.Schema != nil { + g.Do("AdditionalProperties: &spec.SchemaOrBool{\n", nil) + g.Do("Allows: true,\n", nil) + g.Do("Schema: &spec.Schema{\n", nil) + err := g.generateSchema(s.AdditionalProperties.Schema) + if err != nil { + return err + } + g.Do("},\n", nil) + g.Do("},\n", nil) + } + + if s.Items != nil && s.Items.Schema != nil { + g.Do("Items: &spec.SchemaOrArray{\n", nil) + g.Do("Schema: &spec.Schema{\n", nil) + err := g.generateSchema(s.Items.Schema) + if err != nil { + return err + } + g.Do("},\n", nil) + g.Do("},\n", nil) + } + + g.Do("},\n", nil) + } + + if len(s.Extensions) > 0 { + g.Do("VendorExtensible: spec.VendorExtensible{\nExtensions: spec.Extensions{\n", nil) + + // Sort extension keys to generate deterministic output + keys := []string{} + for k := range s.Extensions { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := s.Extensions[k] + g.Do("$.key$: $.value$,\n", map[string]interface{}{ + "key": fmt.Sprintf("%#v", k), + "value": fmt.Sprintf("%#v", v), + }) + } + g.Do("},\n},\n", nil) + } + + return nil +} + func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error { if vs == nil { @@ -420,6 +502,18 @@ func (g openAPITypeWriter) generateValueValidations(vs *spec.SchemaProps) error g.Do("UniqueItems: true,\n", nil) } + if len(vs.AllOf) > 0 { + g.Do("AllOf: []spec.Schema{\n", nil) + for _, s := range vs.AllOf { + g.Do("{\n", nil) + if err := g.generateSchema(&s); err != nil { + return err + } + g.Do("},\n", nil) + } + g.Do("},\n", nil) + } + return nil } @@ -429,7 +523,7 @@ func (g openAPITypeWriter) generate(t *types.Type) error { case types.Struct: validationSchema, err := ParseCommentTags(t, t.CommentLines, markerPrefix) if err != nil { - return err + return fmt.Errorf("failed parsing comment tags for %v: %w", t.String(), err) } hasV2Definition := hasOpenAPIDefinitionMethod(t) @@ -644,7 +738,15 @@ func (g openAPITypeWriter) emitExtensions(extensions []extension, unions []union } if len(otherExtensions) > 0 { - for k, v := range otherExtensions { + // Sort extension keys to generate deterministic output + keys := []string{} + for k := range otherExtensions { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := otherExtensions[k] g.Do("$.key$: $.value$,\n", map[string]interface{}{ "key": fmt.Sprintf("%#v", k), "value": fmt.Sprintf("%#v", v), @@ -928,6 +1030,17 @@ func (g openAPITypeWriter) generateReferenceProperty(t *types.Type) { g.Do("Ref: ref(\"$.$\"),\n", t.Name.String()) } +func resolvePtrType(t *types.Type) *types.Type { + var prev *types.Type + for prev != t { + prev = t + if t.Kind == types.Pointer { + t = t.Elem + } + } + return t +} + func resolveAliasAndPtrType(t *types.Type) *types.Type { var prev *types.Type for prev != t { diff --git a/vendor/modules.txt b/vendor/modules.txt index 190089b910c7e..755f190b31c68 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -232,8 +232,8 @@ github.com/cilium/charts github.com/cilium/coverbee github.com/cilium/coverbee/pkg/cparser github.com/cilium/coverbee/pkg/verifierlog -# github.com/cilium/deepequal-gen v0.0.0-20231116094812-0d6c075c335f -## explicit; go 1.20 +# github.com/cilium/deepequal-gen v0.0.0-20240920134030-fe070c611b00 +## explicit; go 1.23.0 github.com/cilium/deepequal-gen github.com/cilium/deepequal-gen/generators # github.com/cilium/dns v1.1.51-0.20240603182237-af788769786a @@ -2463,8 +2463,8 @@ k8s.io/client-go/util/jsonpath k8s.io/client-go/util/keyutil k8s.io/client-go/util/watchlist k8s.io/client-go/util/workqueue -# k8s.io/code-generator v0.31.1 -## explicit; go 1.22.0 +# k8s.io/code-generator v0.31.1 => k8s.io/code-generator v0.30.0-alpha.3.0.20240920005538-61df8a8f0355 +## explicit; go 1.23.0 k8s.io/code-generator k8s.io/code-generator/cmd/applyconfiguration-gen k8s.io/code-generator/cmd/applyconfiguration-gen/args @@ -2512,7 +2512,7 @@ k8s.io/component-base/version ## explicit; go 1.22.0 k8s.io/endpointslice/metrics k8s.io/endpointslice/util -# k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 +# k8s.io/gengo v0.0.0-20240911193312-2b36238f13e9 => github.com/sayboras/gengo v0.0.0-20240920133050-8cd674ebf6a9 ## explicit; go 1.13 k8s.io/gengo/args k8s.io/gengo/examples/set-gen/sets @@ -2520,7 +2520,7 @@ k8s.io/gengo/generator k8s.io/gengo/namer k8s.io/gengo/parser k8s.io/gengo/types -# k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 +# k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 ## explicit; go 1.20 k8s.io/gengo/v2 k8s.io/gengo/v2/generator @@ -2536,7 +2536,7 @@ k8s.io/klog/v2/internal/dbg k8s.io/klog/v2/internal/serialize k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler -# k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 +# k8s.io/kube-openapi v0.0.0-20240827152857-f7e401e7b4c2 ## explicit; go 1.20 k8s.io/kube-openapi/cmd/openapi-gen k8s.io/kube-openapi/cmd/openapi-gen/args @@ -2785,4 +2785,6 @@ sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 sigs.k8s.io/yaml/goyaml.v3 # go.universe.tf/metallb => github.com/cilium/metallb v0.1.1-0.20220829170633-5d7dfb1129f7 +# k8s.io/code-generator => k8s.io/code-generator v0.30.0-alpha.3.0.20240920005538-61df8a8f0355 +# k8s.io/gengo => github.com/sayboras/gengo v0.0.0-20240920133050-8cd674ebf6a9 # sigs.k8s.io/controller-tools => github.com/cilium/controller-tools v0.16.1-1