diff --git a/.golangci.yaml b/.golangci.yaml index 4c0f7cbad..29c4d38fb 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,8 +1,6 @@ run: timeout: 10m allow-parallel-runners: true - skip-files: - - '.+_expansion\.go' linters: disable-all: true @@ -12,7 +10,6 @@ linters: - bidichk - bodyclose - containedctx - - depguard - dupword - durationcheck - errcheck @@ -126,6 +123,8 @@ linters-settings: issues: max-same-issues: 0 max-issues-per-linter: 0 + exclude-files: + - '.+_expansion\.go' exclude-rules: - linters: - unparam @@ -137,3 +136,4 @@ issues: - linters: - gosec path: test/e2e/* + diff --git a/.prow.yaml b/.prow.yaml index b7bcf459e..20ee121f7 100644 --- a/.prow.yaml +++ b/.prow.yaml @@ -7,7 +7,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.22.2-1 command: - make - verify @@ -20,7 +20,7 @@ presubmits: preset-goproxy: "true" spec: containers: - - image: ghcr.io/kcp-dev/infra/build:1.19.9-2 + - image: ghcr.io/kcp-dev/infra/build:1.22.2-1 command: - make - lint diff --git a/Makefile b/Makefile index e3f7576f6..9bf538aca 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ GOBIN_DIR=$(abspath ./bin ) PATH := $(GOBIN_DIR):$(TOOLS_GOBIN_DIR):$(PATH) TMPDIR := $(shell mktemp -d) -CODE_GENERATOR_VER := a43d6e3492e34f209cc788bb5d094b9c5d0d2970 +CODE_GENERATOR_VER := b529ed3306a300ec73ce50439a5fb1c6409982f4 CODE_GENERATOR_BIN := code-generator CODE_GENERATOR := $(TOOLS_DIR)/$(CODE_GENERATOR_BIN)-$(CODE_GENERATOR_VER) export CODE_GENERATOR # so hack scripts can use it @@ -31,7 +31,7 @@ export CODE_GENERATOR # so hack scripts can use it $(CODE_GENERATOR): GOBIN=$(TOOLS_GOBIN_DIR) $(GO_INSTALL) github.com/kcp-dev/code-generator/v2 $(CODE_GENERATOR_BIN) $(CODE_GENERATOR_VER) -OPENSHIFT_GOIMPORTS_VER := c72f1dc2e3aacfa00aece3391d938c9bc734e791 +OPENSHIFT_GOIMPORTS_VER := c70783e636f2213cac683f6865d88c5edace3157 OPENSHIFT_GOIMPORTS_BIN := openshift-goimports OPENSHIFT_GOIMPORTS := $(TOOLS_DIR)/$(OPENSHIFT_GOIMPORTS_BIN)-$(OPENSHIFT_GOIMPORTS_VER) export OPENSHIFT_GOIMPORTS # so hack scripts can use it @@ -43,7 +43,7 @@ imports: $(OPENSHIFT_GOIMPORTS) $(OPENSHIFT_GOIMPORTS) -m github.com/kcp-dev/client-go .PHONY: imports -GOLANGCI_LINT_VER := v1.50.1 +GOLANGCI_LINT_VER := v1.58.1 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(TOOLS_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER) @@ -76,3 +76,7 @@ verify-codegen: .PHONY: verify verify: verify-codegen + +.PHONY: clean-generated +clean-generated: + grep --exclude Makefile -l 'Code generated by kcp code-generator. DO NOT EDIT.' -r . | xargs rm diff --git a/apiextensions/informers/factory.go b/apiextensions/informers/factory.go index ddbf7e793..c2e4db4b1 100644 --- a/apiextensions/informers/factory.go +++ b/apiextensions/informers/factory.go @@ -46,6 +46,7 @@ type SharedInformerOption func(*SharedInformerOptions) *SharedInformerOptions type SharedInformerOptions struct { customResync map[reflect.Type]time.Duration tweakListOptions internalinterfaces.TweakListOptionsFunc + transform cache.TransformFunc } type sharedInformerFactory struct { @@ -54,6 +55,7 @@ type sharedInformerFactory struct { lock sync.Mutex defaultResync time.Duration customResync map[reflect.Type]time.Duration + transform cache.TransformFunc informers map[reflect.Type]kcpcache.ScopeableSharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -84,6 +86,14 @@ func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFu } } +// WithTransform sets a transform on all informers. +func WithTransform(transform cache.TransformFunc) SharedInformerOption { + return func(opts *SharedInformerOptions) *SharedInformerOptions { + opts.transform = transform + return opts + } +} + // NewSharedInformerFactory constructs a new instance of SharedInformerFactory for all namespaces. func NewSharedInformerFactory(client clientset.ClusterInterface, defaultResync time.Duration) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync) @@ -111,6 +121,7 @@ func NewSharedInformerFactoryWithOptions(client clientset.ClusterInterface, defa // Forward options to the factory factory.customResync = opts.customResync factory.tweakListOptions = opts.tweakListOptions + factory.transform = opts.transform return factory } diff --git a/go.mod b/go.mod index c8c55373a..42ebccde5 100644 --- a/go.mod +++ b/go.mod @@ -1,17 +1,17 @@ module github.com/kcp-dev/client-go -go 1.19 +go 1.22.0 require ( github.com/evanphx/json-patch v5.6.0+incompatible github.com/google/gnostic-models v0.6.8 github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230826151957-7189d0d1fe31 github.com/kcp-dev/logicalcluster/v3 v3.0.4 - k8s.io/api v0.28.2 - k8s.io/apiextensions-apiserver v0.28.2 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.2 - k8s.io/klog/v2 v2.100.1 + k8s.io/api v0.30.0 + k8s.io/apiextensions-apiserver v0.30.0 + k8s.io/apimachinery v0.30.0 + k8s.io/client-go v0.30.0 + k8s.io/klog/v2 v2.120.1 ) require ( @@ -22,20 +22,20 @@ require ( github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.9.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/cel-go v0.16.1 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/cel-go v0.17.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/imdario/mergo v0.3.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -51,39 +51,36 @@ require ( github.com/prometheus/procfs v0.10.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 // indirect - go.opentelemetry.io/otel v1.10.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 // indirect - go.opentelemetry.io/otel/metric v0.31.0 // indirect - go.opentelemetry.io/otel/sdk v1.10.0 // indirect - go.opentelemetry.io/otel/trace v1.10.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect + go.opentelemetry.io/otel v1.19.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect + go.opentelemetry.io/otel/metric v1.19.0 // indirect + go.opentelemetry.io/otel/sdk v1.19.0 // indirect + go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.13.0 // indirect + golang.org/x/net v0.23.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.11.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect - google.golang.org/grpc v1.54.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/grpc v1.58.3 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.28.2 // indirect - k8s.io/component-base v0.28.2 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect + k8s.io/apiserver v0.30.0 // indirect + k8s.io/component-base v0.30.0 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 4e74a1509..f78a7c9c9 100644 --- a/go.sum +++ b/go.sum @@ -1,40 +1,3 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= @@ -45,47 +8,25 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= +github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= -github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= @@ -95,98 +36,48 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.16.1 h1:3hZfSNiAU3KOiNtxuFXVp5WFy4hf/Ly3Sa4/7F8SXNo= -github.com/google/cel-go v0.16.1/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= +github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230826151957-7189d0d1fe31 h1:vNFCQHCMyrKoMDUH0JbmWHVfoqSHbzgcZKE4oN6Omb4= github.com/kcp-dev/apimachinery/v2 v2.0.0-alpha.0.0.20230826151957-7189d0d1fe31/go.mod h1:cWoaYGHl1nlzdEM2xvMzIASkEZJZLSf5nhe17M7wDhw= github.com/kcp-dev/logicalcluster/v3 v3.0.4 h1:q7KngML/QM7sWl8aVzmfZF0TPMnBwYNxsPKfwUvvBvU= github.com/kcp-dev/logicalcluster/v3 v3.0.4/go.mod h1:EWBUBxdr49fUB1cLMO4nOdBWmYifLbP1LfoL20KkXYY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -202,25 +93,24 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.9.4 h1:xR7vG4IXt5RWx6FfIjyAtsoMAtnc3C/rFXBBd2AjZwE= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= @@ -229,365 +119,137 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1 h1:sxoY9kG1s1WpSYNyzm24rlwH4lnRYFXUVVBmKMBfRgw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= -go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= -go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0= -go.opentelemetry.io/otel/metric v0.31.0 h1:6SiklT+gfWAwWUR0meEMxQBtihpiEs4c+vL9spDTqUs= -go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= -go.opentelemetry.io/otel/sdk v1.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY= -go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= -go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= -go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= +go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= +go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= +go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= +go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= +go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= +go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= +go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= +go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= +go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= -golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= +golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= +google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= -k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= -k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/apiserver v0.28.2 h1:rBeYkLvF94Nku9XfXyUIirsVzCzJBs6jMn3NWeHieyI= -k8s.io/apiserver v0.28.2/go.mod h1:f7D5e8wH8MWcKD7azq6Csw9UN+CjdtXIVQUyUhrtb+E= -k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= -k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= -k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= -k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0= +k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= +k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= +k8s.io/apiextensions-apiserver v0.30.0 h1:jcZFKMqnICJfRxTgnC4E+Hpcq8UEhT8B2lhBcQ+6uAs= +k8s.io/apiextensions-apiserver v0.30.0/go.mod h1:N9ogQFGcrbWqAY9p2mUAL5mGxsLqwgtUce127VtRX5Y= +k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= +k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apiserver v0.30.0 h1:QCec+U72tMQ+9tR6A0sMBB5Vh6ImCEkoKkTDRABWq6M= +k8s.io/apiserver v0.30.0/go.mod h1:smOIBq8t0MbKZi7O7SyIpjPsiKJ8qa+llcFCluKyqiY= +k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ= +k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY= +k8s.io/component-base v0.30.0 h1:cj6bp38g0ainlfYtaOQuRELh5KSYjhKxM+io7AUIk4o= +k8s.io/component-base v0.30.0/go.mod h1:V9x/0ePFNaKeKYA3bOvIbrNoluTSG+fSJKjLdjOoeXQ= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RChhv7P11uhYvCSm5G2GaIi5AIGBS6r4c= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/hack/go-install.sh b/hack/go-install.sh index 1b1bcb361..6afbe0c48 100755 --- a/hack/go-install.sh +++ b/hack/go-install.sh @@ -15,48 +15,35 @@ # limitations under the License. # Originally copied from -# https://github.com/kubernetes-sigs/cluster-api-provider-gcp/blob/c26a68b23e9317323d5d37660fe9d29b3d2ff40c/scripts/go_install.sh +# https://github.com/kubernetes-sigs/controller-runtime/blob/479b723944e34ae42c9911fe01228ff34eb5ca81/hack/go-install.sh set -o errexit set -o nounset set -o pipefail -if [[ -z "${1:-}" ]]; then +if [ -z "${1}" ]; then echo "must provide module as first parameter" exit 1 fi -if [[ -z "${2:-}" ]]; then +if [ -z "${2}" ]; then echo "must provide binary name as second parameter" exit 1 fi -if [[ -z "${3:-}" ]]; then +if [ -z "${3}" ]; then echo "must provide version as third parameter" exit 1 fi -if [[ -z "${GOBIN:-}" ]]; then +if [ -z "${GOBIN}" ]; then echo "GOBIN is not set. Must set GOBIN to install the bin in a specified directory." exit 1 fi -mkdir -p "${GOBIN}" - -tmp_dir=$(mktemp -d -t goinstall_XXXXXXXXXX) -function clean { - rm -rf "${tmp_dir}" -} -trap clean EXIT - -rm "${GOBIN}/${2}"* > /dev/null 2>&1 || true - -cd "${tmp_dir}" - -# create a new module in the tmp directory -go mod init fake/mod +rm -f "${GOBIN}/${2}"* || true # install the golang module specified as the first argument -go install -tags tools "${1}@${3}" +go install "${1}@${3}" mv "${GOBIN}/${2}" "${GOBIN}/${2}-${3}" -ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}" \ No newline at end of file +ln -sf "${GOBIN}/${2}-${3}" "${GOBIN}/${2}" diff --git a/informers/admissionregistration/v1/interface.go b/informers/admissionregistration/v1/interface.go index 9ca728c5f..84c7c6e73 100644 --- a/informers/admissionregistration/v1/interface.go +++ b/informers/admissionregistration/v1/interface.go @@ -26,6 +26,10 @@ import ( ) type ClusterInterface interface { + // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyClusterInformer + ValidatingAdmissionPolicies() ValidatingAdmissionPolicyClusterInformer + // ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingClusterInformer + ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingClusterInformer // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationClusterInformer ValidatingWebhookConfigurations() ValidatingWebhookConfigurationClusterInformer // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationClusterInformer @@ -42,6 +46,16 @@ func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalin return &version{factory: f, tweakListOptions: tweakListOptions} } +// ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyClusterInformer +func (v *version) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyClusterInformer { + return &validatingAdmissionPolicyClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ValidatingAdmissionPolicyBindings returns a ValidatingAdmissionPolicyBindingClusterInformer +func (v *version) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingClusterInformer { + return &validatingAdmissionPolicyBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // ValidatingWebhookConfigurations returns a ValidatingWebhookConfigurationClusterInformer func (v *version) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationClusterInformer { return &validatingWebhookConfigurationClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/informers/admissionregistration/v1/validatingadmissionpolicy.go b/informers/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 000000000..6362e7b2a --- /dev/null +++ b/informers/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,124 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + upstreamadmissionregistrationv1informers "k8s.io/client-go/informers/admissionregistration/v1" + upstreamadmissionregistrationv1listers "k8s.io/client-go/listers/admissionregistration/v1" + "k8s.io/client-go/tools/cache" + + "github.com/kcp-dev/client-go/informers/internalinterfaces" + clientset "github.com/kcp-dev/client-go/kubernetes" + admissionregistrationv1listers "github.com/kcp-dev/client-go/listers/admissionregistration/v1" +) + +// ValidatingAdmissionPolicyClusterInformer provides access to a shared informer and lister for +// ValidatingAdmissionPolicies. +type ValidatingAdmissionPolicyClusterInformer interface { + Cluster(logicalcluster.Name) upstreamadmissionregistrationv1informers.ValidatingAdmissionPolicyInformer + Informer() kcpcache.ScopeableSharedIndexInformer + Lister() admissionregistrationv1listers.ValidatingAdmissionPolicyClusterLister +} + +type validatingAdmissionPolicyClusterInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewValidatingAdmissionPolicyClusterInformer constructs a new informer for ValidatingAdmissionPolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewValidatingAdmissionPolicyClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredValidatingAdmissionPolicyClusterInformer constructs a new informer for ValidatingAdmissionPolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredValidatingAdmissionPolicyClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { + return kcpinformers.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicies().Watch(context.TODO(), options) + }, + }, + &admissionregistrationv1.ValidatingAdmissionPolicy{}, + resyncPeriod, + indexers, + ) +} + +func (f *validatingAdmissionPolicyClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + }, + f.tweakListOptions, + ) +} + +func (f *validatingAdmissionPolicyClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&admissionregistrationv1.ValidatingAdmissionPolicy{}, f.defaultInformer) +} + +func (f *validatingAdmissionPolicyClusterInformer) Lister() admissionregistrationv1listers.ValidatingAdmissionPolicyClusterLister { + return admissionregistrationv1listers.NewValidatingAdmissionPolicyClusterLister(f.Informer().GetIndexer()) +} + +func (f *validatingAdmissionPolicyClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamadmissionregistrationv1informers.ValidatingAdmissionPolicyInformer { + return &validatingAdmissionPolicyInformer{ + informer: f.Informer().Cluster(clusterName), + lister: f.Lister().Cluster(clusterName), + } +} + +type validatingAdmissionPolicyInformer struct { + informer cache.SharedIndexInformer + lister upstreamadmissionregistrationv1listers.ValidatingAdmissionPolicyLister +} + +func (f *validatingAdmissionPolicyInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +func (f *validatingAdmissionPolicyInformer) Lister() upstreamadmissionregistrationv1listers.ValidatingAdmissionPolicyLister { + return f.lister +} diff --git a/informers/admissionregistration/v1/validatingadmissionpolicybinding.go b/informers/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 000000000..024947cd7 --- /dev/null +++ b/informers/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,124 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +import ( + "context" + "time" + + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + upstreamadmissionregistrationv1informers "k8s.io/client-go/informers/admissionregistration/v1" + upstreamadmissionregistrationv1listers "k8s.io/client-go/listers/admissionregistration/v1" + "k8s.io/client-go/tools/cache" + + "github.com/kcp-dev/client-go/informers/internalinterfaces" + clientset "github.com/kcp-dev/client-go/kubernetes" + admissionregistrationv1listers "github.com/kcp-dev/client-go/listers/admissionregistration/v1" +) + +// ValidatingAdmissionPolicyBindingClusterInformer provides access to a shared informer and lister for +// ValidatingAdmissionPolicyBindings. +type ValidatingAdmissionPolicyBindingClusterInformer interface { + Cluster(logicalcluster.Name) upstreamadmissionregistrationv1informers.ValidatingAdmissionPolicyBindingInformer + Informer() kcpcache.ScopeableSharedIndexInformer + Lister() admissionregistrationv1listers.ValidatingAdmissionPolicyBindingClusterLister +} + +type validatingAdmissionPolicyBindingClusterInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewValidatingAdmissionPolicyBindingClusterInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewValidatingAdmissionPolicyBindingClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyBindingClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredValidatingAdmissionPolicyBindingClusterInformer constructs a new informer for ValidatingAdmissionPolicyBinding type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredValidatingAdmissionPolicyBindingClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { + return kcpinformers.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1().ValidatingAdmissionPolicyBindings().Watch(context.TODO(), options) + }, + }, + &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}, + resyncPeriod, + indexers, + ) +} + +func (f *validatingAdmissionPolicyBindingClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredValidatingAdmissionPolicyBindingClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + }, + f.tweakListOptions, + ) +} + +func (f *validatingAdmissionPolicyBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&admissionregistrationv1.ValidatingAdmissionPolicyBinding{}, f.defaultInformer) +} + +func (f *validatingAdmissionPolicyBindingClusterInformer) Lister() admissionregistrationv1listers.ValidatingAdmissionPolicyBindingClusterLister { + return admissionregistrationv1listers.NewValidatingAdmissionPolicyBindingClusterLister(f.Informer().GetIndexer()) +} + +func (f *validatingAdmissionPolicyBindingClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamadmissionregistrationv1informers.ValidatingAdmissionPolicyBindingInformer { + return &validatingAdmissionPolicyBindingInformer{ + informer: f.Informer().Cluster(clusterName), + lister: f.Lister().Cluster(clusterName), + } +} + +type validatingAdmissionPolicyBindingInformer struct { + informer cache.SharedIndexInformer + lister upstreamadmissionregistrationv1listers.ValidatingAdmissionPolicyBindingLister +} + +func (f *validatingAdmissionPolicyBindingInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +func (f *validatingAdmissionPolicyBindingInformer) Lister() upstreamadmissionregistrationv1listers.ValidatingAdmissionPolicyBindingLister { + return f.lister +} diff --git a/informers/factory.go b/informers/factory.go index ecd38edec..5e214cde7 100644 --- a/informers/factory.go +++ b/informers/factory.go @@ -55,6 +55,7 @@ import ( resourceinformers "github.com/kcp-dev/client-go/informers/resource" schedulinginformers "github.com/kcp-dev/client-go/informers/scheduling" storageinformers "github.com/kcp-dev/client-go/informers/storage" + storagemigrationinformers "github.com/kcp-dev/client-go/informers/storagemigration" clientset "github.com/kcp-dev/client-go/kubernetes" ) @@ -64,6 +65,7 @@ type SharedInformerOption func(*SharedInformerOptions) *SharedInformerOptions type SharedInformerOptions struct { customResync map[reflect.Type]time.Duration tweakListOptions internalinterfaces.TweakListOptionsFunc + transform cache.TransformFunc } type sharedInformerFactory struct { @@ -72,6 +74,7 @@ type sharedInformerFactory struct { lock sync.Mutex defaultResync time.Duration customResync map[reflect.Type]time.Duration + transform cache.TransformFunc informers map[reflect.Type]kcpcache.ScopeableSharedIndexInformer // startedInformers is used for tracking which informers have been started. @@ -102,6 +105,14 @@ func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFu } } +// WithTransform sets a transform on all informers. +func WithTransform(transform cache.TransformFunc) SharedInformerOption { + return func(opts *SharedInformerOptions) *SharedInformerOptions { + opts.transform = transform + return opts + } +} + // NewSharedInformerFactory constructs a new instance of SharedInformerFactory for all namespaces. func NewSharedInformerFactory(client clientset.ClusterInterface, defaultResync time.Duration) SharedInformerFactory { return NewSharedInformerFactoryWithOptions(client, defaultResync) @@ -129,6 +140,7 @@ func NewSharedInformerFactoryWithOptions(client clientset.ClusterInterface, defa // Forward options to the factory factory.customResync = opts.customResync factory.tweakListOptions = opts.tweakListOptions + factory.transform = opts.transform return factory } @@ -294,6 +306,7 @@ type SharedInformerFactory interface { Resource() resourceinformers.ClusterInterface Scheduling() schedulinginformers.ClusterInterface Storage() storageinformers.ClusterInterface + Storagemigration() storagemigrationinformers.ClusterInterface } func (f *sharedInformerFactory) Admissionregistration() admissionregistrationinformers.ClusterInterface { @@ -372,6 +385,10 @@ func (f *sharedInformerFactory) Storage() storageinformers.ClusterInterface { return storageinformers.New(f, f.tweakListOptions) } +func (f *sharedInformerFactory) Storagemigration() storagemigrationinformers.ClusterInterface { + return storagemigrationinformers.New(f, f.tweakListOptions) +} + func (f *sharedInformerFactory) Cluster(clusterName logicalcluster.Name) ScopedDynamicSharedInformerFactory { return &scopedDynamicSharedInformerFactory{ sharedInformerFactory: f, diff --git a/informers/flowcontrol/interface.go b/informers/flowcontrol/interface.go index 7536ea286..407139e2a 100644 --- a/informers/flowcontrol/interface.go +++ b/informers/flowcontrol/interface.go @@ -22,7 +22,7 @@ limitations under the License. package flowcontrol import ( - "github.com/kcp-dev/client-go/informers/flowcontrol/v1alpha1" + "github.com/kcp-dev/client-go/informers/flowcontrol/v1" "github.com/kcp-dev/client-go/informers/flowcontrol/v1beta1" "github.com/kcp-dev/client-go/informers/flowcontrol/v1beta2" "github.com/kcp-dev/client-go/informers/flowcontrol/v1beta3" @@ -30,8 +30,8 @@ import ( ) type ClusterInterface interface { - // V1alpha1 provides access to the shared informers in V1alpha1. - V1alpha1() v1alpha1.ClusterInterface + // V1 provides access to the shared informers in V1. + V1() v1.ClusterInterface // V1beta1 provides access to the shared informers in V1beta1. V1beta1() v1beta1.ClusterInterface // V1beta2 provides access to the shared informers in V1beta2. @@ -50,9 +50,9 @@ func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalin return &group{factory: f, tweakListOptions: tweakListOptions} } -// V1alpha1 returns a new v1alpha1.ClusterInterface. -func (g *group) V1alpha1() v1alpha1.ClusterInterface { - return v1alpha1.New(g.factory, g.tweakListOptions) +// V1 returns a new v1.ClusterInterface. +func (g *group) V1() v1.ClusterInterface { + return v1.New(g.factory, g.tweakListOptions) } // V1beta1 returns a new v1beta1.ClusterInterface. diff --git a/informers/flowcontrol/v1alpha1/flowschema.go b/informers/flowcontrol/v1/flowschema.go similarity index 75% rename from informers/flowcontrol/v1alpha1/flowschema.go rename to informers/flowcontrol/v1/flowschema.go index df538fa02..20bbde5cd 100644 --- a/informers/flowcontrol/v1alpha1/flowschema.go +++ b/informers/flowcontrol/v1/flowschema.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" @@ -29,25 +29,25 @@ import ( kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - upstreamflowcontrolv1alpha1informers "k8s.io/client-go/informers/flowcontrol/v1alpha1" - upstreamflowcontrolv1alpha1listers "k8s.io/client-go/listers/flowcontrol/v1alpha1" + upstreamflowcontrolv1informers "k8s.io/client-go/informers/flowcontrol/v1" + upstreamflowcontrolv1listers "k8s.io/client-go/listers/flowcontrol/v1" "k8s.io/client-go/tools/cache" "github.com/kcp-dev/client-go/informers/internalinterfaces" clientset "github.com/kcp-dev/client-go/kubernetes" - flowcontrolv1alpha1listers "github.com/kcp-dev/client-go/listers/flowcontrol/v1alpha1" + flowcontrolv1listers "github.com/kcp-dev/client-go/listers/flowcontrol/v1" ) // FlowSchemaClusterInformer provides access to a shared informer and lister for // FlowSchemas. type FlowSchemaClusterInformer interface { - Cluster(logicalcluster.Name) upstreamflowcontrolv1alpha1informers.FlowSchemaInformer + Cluster(logicalcluster.Name) upstreamflowcontrolv1informers.FlowSchemaInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() flowcontrolv1alpha1listers.FlowSchemaClusterLister + Lister() flowcontrolv1listers.FlowSchemaClusterLister } type flowSchemaClusterInformer struct { @@ -72,16 +72,16 @@ func NewFilteredFlowSchemaClusterInformer(client clientset.ClusterInterface, res if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().FlowSchemas().List(context.TODO(), options) + return client.FlowcontrolV1().FlowSchemas().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().FlowSchemas().Watch(context.TODO(), options) + return client.FlowcontrolV1().FlowSchemas().Watch(context.TODO(), options) }, }, - &flowcontrolv1alpha1.FlowSchema{}, + &flowcontrolv1.FlowSchema{}, resyncPeriod, indexers, ) @@ -96,14 +96,14 @@ func (f *flowSchemaClusterInformer) defaultInformer(client clientset.ClusterInte } func (f *flowSchemaClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&flowcontrolv1alpha1.FlowSchema{}, f.defaultInformer) + return f.factory.InformerFor(&flowcontrolv1.FlowSchema{}, f.defaultInformer) } -func (f *flowSchemaClusterInformer) Lister() flowcontrolv1alpha1listers.FlowSchemaClusterLister { - return flowcontrolv1alpha1listers.NewFlowSchemaClusterLister(f.Informer().GetIndexer()) +func (f *flowSchemaClusterInformer) Lister() flowcontrolv1listers.FlowSchemaClusterLister { + return flowcontrolv1listers.NewFlowSchemaClusterLister(f.Informer().GetIndexer()) } -func (f *flowSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamflowcontrolv1alpha1informers.FlowSchemaInformer { +func (f *flowSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamflowcontrolv1informers.FlowSchemaInformer { return &flowSchemaInformer{ informer: f.Informer().Cluster(clusterName), lister: f.Lister().Cluster(clusterName), @@ -112,13 +112,13 @@ func (f *flowSchemaClusterInformer) Cluster(clusterName logicalcluster.Name) ups type flowSchemaInformer struct { informer cache.SharedIndexInformer - lister upstreamflowcontrolv1alpha1listers.FlowSchemaLister + lister upstreamflowcontrolv1listers.FlowSchemaLister } func (f *flowSchemaInformer) Informer() cache.SharedIndexInformer { return f.informer } -func (f *flowSchemaInformer) Lister() upstreamflowcontrolv1alpha1listers.FlowSchemaLister { +func (f *flowSchemaInformer) Lister() upstreamflowcontrolv1listers.FlowSchemaLister { return f.lister } diff --git a/informers/flowcontrol/v1alpha1/interface.go b/informers/flowcontrol/v1/interface.go similarity index 99% rename from informers/flowcontrol/v1alpha1/interface.go rename to informers/flowcontrol/v1/interface.go index 91567e452..9a939406d 100644 --- a/informers/flowcontrol/v1alpha1/interface.go +++ b/informers/flowcontrol/v1/interface.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( "github.com/kcp-dev/client-go/informers/internalinterfaces" diff --git a/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/informers/flowcontrol/v1/prioritylevelconfiguration.go similarity index 76% rename from informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go rename to informers/flowcontrol/v1/prioritylevelconfiguration.go index 3840ce1fd..0903cb046 100644 --- a/informers/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/informers/flowcontrol/v1/prioritylevelconfiguration.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" @@ -29,25 +29,25 @@ import ( kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - upstreamflowcontrolv1alpha1informers "k8s.io/client-go/informers/flowcontrol/v1alpha1" - upstreamflowcontrolv1alpha1listers "k8s.io/client-go/listers/flowcontrol/v1alpha1" + upstreamflowcontrolv1informers "k8s.io/client-go/informers/flowcontrol/v1" + upstreamflowcontrolv1listers "k8s.io/client-go/listers/flowcontrol/v1" "k8s.io/client-go/tools/cache" "github.com/kcp-dev/client-go/informers/internalinterfaces" clientset "github.com/kcp-dev/client-go/kubernetes" - flowcontrolv1alpha1listers "github.com/kcp-dev/client-go/listers/flowcontrol/v1alpha1" + flowcontrolv1listers "github.com/kcp-dev/client-go/listers/flowcontrol/v1" ) // PriorityLevelConfigurationClusterInformer provides access to a shared informer and lister for // PriorityLevelConfigurations. type PriorityLevelConfigurationClusterInformer interface { - Cluster(logicalcluster.Name) upstreamflowcontrolv1alpha1informers.PriorityLevelConfigurationInformer + Cluster(logicalcluster.Name) upstreamflowcontrolv1informers.PriorityLevelConfigurationInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() flowcontrolv1alpha1listers.PriorityLevelConfigurationClusterLister + Lister() flowcontrolv1listers.PriorityLevelConfigurationClusterLister } type priorityLevelConfigurationClusterInformer struct { @@ -72,16 +72,16 @@ func NewFilteredPriorityLevelConfigurationClusterInformer(client clientset.Clust if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().List(context.TODO(), options) + return client.FlowcontrolV1().PriorityLevelConfigurations().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.FlowcontrolV1alpha1().PriorityLevelConfigurations().Watch(context.TODO(), options) + return client.FlowcontrolV1().PriorityLevelConfigurations().Watch(context.TODO(), options) }, }, - &flowcontrolv1alpha1.PriorityLevelConfiguration{}, + &flowcontrolv1.PriorityLevelConfiguration{}, resyncPeriod, indexers, ) @@ -96,14 +96,14 @@ func (f *priorityLevelConfigurationClusterInformer) defaultInformer(client clien } func (f *priorityLevelConfigurationClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&flowcontrolv1alpha1.PriorityLevelConfiguration{}, f.defaultInformer) + return f.factory.InformerFor(&flowcontrolv1.PriorityLevelConfiguration{}, f.defaultInformer) } -func (f *priorityLevelConfigurationClusterInformer) Lister() flowcontrolv1alpha1listers.PriorityLevelConfigurationClusterLister { - return flowcontrolv1alpha1listers.NewPriorityLevelConfigurationClusterLister(f.Informer().GetIndexer()) +func (f *priorityLevelConfigurationClusterInformer) Lister() flowcontrolv1listers.PriorityLevelConfigurationClusterLister { + return flowcontrolv1listers.NewPriorityLevelConfigurationClusterLister(f.Informer().GetIndexer()) } -func (f *priorityLevelConfigurationClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamflowcontrolv1alpha1informers.PriorityLevelConfigurationInformer { +func (f *priorityLevelConfigurationClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamflowcontrolv1informers.PriorityLevelConfigurationInformer { return &priorityLevelConfigurationInformer{ informer: f.Informer().Cluster(clusterName), lister: f.Lister().Cluster(clusterName), @@ -112,13 +112,13 @@ func (f *priorityLevelConfigurationClusterInformer) Cluster(clusterName logicalc type priorityLevelConfigurationInformer struct { informer cache.SharedIndexInformer - lister upstreamflowcontrolv1alpha1listers.PriorityLevelConfigurationLister + lister upstreamflowcontrolv1listers.PriorityLevelConfigurationLister } func (f *priorityLevelConfigurationInformer) Informer() cache.SharedIndexInformer { return f.informer } -func (f *priorityLevelConfigurationInformer) Lister() upstreamflowcontrolv1alpha1listers.PriorityLevelConfigurationLister { +func (f *priorityLevelConfigurationInformer) Lister() upstreamflowcontrolv1listers.PriorityLevelConfigurationLister { return f.lister } diff --git a/informers/generic.go b/informers/generic.go index e32708993..b1784eb05 100644 --- a/informers/generic.go +++ b/informers/generic.go @@ -51,7 +51,7 @@ import ( eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3" @@ -73,6 +73,7 @@ import ( storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1beta1 "k8s.io/api/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" "k8s.io/apimachinery/pkg/runtime/schema" upstreaminformers "k8s.io/client-go/informers" "k8s.io/client-go/tools/cache" @@ -127,6 +128,10 @@ func (f *genericInformer) Lister() cache.GenericLister { func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericClusterInformer, error) { switch resource { // Group=admissionregistration.k8s.io, Version=V1 + case admissionregistrationv1.SchemeGroupVersion.WithResource("validatingadmissionpolicies"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1().ValidatingAdmissionPolicies().Informer()}, nil + case admissionregistrationv1.SchemeGroupVersion.WithResource("validatingadmissionpolicybindings"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1().ValidatingAdmissionPolicyBindings().Informer()}, nil case admissionregistrationv1.SchemeGroupVersion.WithResource("validatingwebhookconfigurations"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1().ValidatingWebhookConfigurations().Informer()}, nil case admissionregistrationv1.SchemeGroupVersion.WithResource("mutatingwebhookconfigurations"): @@ -265,11 +270,11 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().ReplicaSets().Informer()}, nil case extensionsv1beta1.SchemeGroupVersion.WithResource("networkpolicies"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Extensions().V1beta1().NetworkPolicies().Informer()}, nil - // Group=flowcontrol.apiserver.k8s.io, Version=V1alpha1 - case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("flowschemas"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().FlowSchemas().Informer()}, nil - case flowcontrolv1alpha1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1alpha1().PriorityLevelConfigurations().Informer()}, nil + // Group=flowcontrol.apiserver.k8s.io, Version=V1 + case flowcontrolv1.SchemeGroupVersion.WithResource("flowschemas"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1().FlowSchemas().Informer()}, nil + case flowcontrolv1.SchemeGroupVersion.WithResource("prioritylevelconfigurations"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1().PriorityLevelConfigurations().Informer()}, nil // Group=flowcontrol.apiserver.k8s.io, Version=V1beta1 case flowcontrolv1beta1.SchemeGroupVersion.WithResource("flowschemas"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Flowcontrol().V1beta1().FlowSchemas().Informer()}, nil @@ -296,10 +301,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case networkingv1.SchemeGroupVersion.WithResource("ingressclasses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1().IngressClasses().Informer()}, nil // Group=networking.k8s.io, Version=V1alpha1 - case networkingv1alpha1.SchemeGroupVersion.WithResource("clustercidrs"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ClusterCIDRs().Informer()}, nil case networkingv1alpha1.SchemeGroupVersion.WithResource("ipaddresses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().IPAddresses().Informer()}, nil + case networkingv1alpha1.SchemeGroupVersion.WithResource("servicecidrs"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ServiceCIDRs().Informer()}, nil // Group=networking.k8s.io, Version=V1beta1 case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil @@ -320,8 +325,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=policy, Version=V1beta1 case policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil - case policyv1beta1.SchemeGroupVersion.WithResource("podsecuritypolicies"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodSecurityPolicies().Informer()}, nil // Group=rbac.authorization.k8s.io, Version=V1 case rbacv1.SchemeGroupVersion.WithResource("roles"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Rbac().V1().Roles().Informer()}, nil @@ -358,6 +361,12 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil case resourcev1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil + case resourcev1alpha2.SchemeGroupVersion.WithResource("resourceslices"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceSlices().Informer()}, nil + case resourcev1alpha2.SchemeGroupVersion.WithResource("resourceclaimparameters"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimParameters().Informer()}, nil + case resourcev1alpha2.SchemeGroupVersion.WithResource("resourceclassparameters"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClassParameters().Informer()}, nil // Group=scheduling.k8s.io, Version=V1 case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1().PriorityClasses().Informer()}, nil @@ -367,6 +376,9 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=scheduling.k8s.io, Version=V1beta1 case schedulingv1beta1.SchemeGroupVersion.WithResource("priorityclasses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1beta1().PriorityClasses().Informer()}, nil + // Group=storagemigration.k8s.io, Version=V1alpha1 + case storagemigrationv1alpha1.SchemeGroupVersion.WithResource("storageversionmigrations"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storagemigration().V1alpha1().StorageVersionMigrations().Informer()}, nil // Group=storage.k8s.io, Version=V1 case storagev1.SchemeGroupVersion.WithResource("storageclasses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil @@ -383,6 +395,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().VolumeAttachments().Informer()}, nil case storagev1alpha1.SchemeGroupVersion.WithResource("csistoragecapacities"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().CSIStorageCapacities().Informer()}, nil + case storagev1alpha1.SchemeGroupVersion.WithResource("volumeattributesclasses"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1alpha1().VolumeAttributesClasses().Informer()}, nil // Group=storage.k8s.io, Version=V1beta1 case storagev1beta1.SchemeGroupVersion.WithResource("storageclasses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1beta1().StorageClasses().Informer()}, nil diff --git a/informers/networking/v1alpha1/interface.go b/informers/networking/v1alpha1/interface.go index 8404785ce..4f83f8c01 100644 --- a/informers/networking/v1alpha1/interface.go +++ b/informers/networking/v1alpha1/interface.go @@ -26,10 +26,10 @@ import ( ) type ClusterInterface interface { - // ClusterCIDRs returns a ClusterCIDRClusterInformer - ClusterCIDRs() ClusterCIDRClusterInformer // IPAddresses returns a IPAddressClusterInformer IPAddresses() IPAddressClusterInformer + // ServiceCIDRs returns a ServiceCIDRClusterInformer + ServiceCIDRs() ServiceCIDRClusterInformer } type version struct { @@ -42,12 +42,12 @@ func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalin return &version{factory: f, tweakListOptions: tweakListOptions} } -// ClusterCIDRs returns a ClusterCIDRClusterInformer -func (v *version) ClusterCIDRs() ClusterCIDRClusterInformer { - return &clusterCIDRClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - // IPAddresses returns a IPAddressClusterInformer func (v *version) IPAddresses() IPAddressClusterInformer { return &iPAddressClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// ServiceCIDRs returns a ServiceCIDRClusterInformer +func (v *version) ServiceCIDRs() ServiceCIDRClusterInformer { + return &serviceCIDRClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/informers/networking/v1alpha1/clustercidr.go b/informers/networking/v1alpha1/servicecidr.go similarity index 67% rename from informers/networking/v1alpha1/clustercidr.go rename to informers/networking/v1alpha1/servicecidr.go index a540326d1..ae1c0be07 100644 --- a/informers/networking/v1alpha1/clustercidr.go +++ b/informers/networking/v1alpha1/servicecidr.go @@ -42,83 +42,83 @@ import ( networkingv1alpha1listers "github.com/kcp-dev/client-go/listers/networking/v1alpha1" ) -// ClusterCIDRClusterInformer provides access to a shared informer and lister for -// ClusterCIDRs. -type ClusterCIDRClusterInformer interface { - Cluster(logicalcluster.Name) upstreamnetworkingv1alpha1informers.ClusterCIDRInformer +// ServiceCIDRClusterInformer provides access to a shared informer and lister for +// ServiceCIDRs. +type ServiceCIDRClusterInformer interface { + Cluster(logicalcluster.Name) upstreamnetworkingv1alpha1informers.ServiceCIDRInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() networkingv1alpha1listers.ClusterCIDRClusterLister + Lister() networkingv1alpha1listers.ServiceCIDRClusterLister } -type clusterCIDRClusterInformer struct { +type serviceCIDRClusterInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewClusterCIDRClusterInformer constructs a new informer for ClusterCIDR type. +// NewServiceCIDRClusterInformer constructs a new informer for ServiceCIDR type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewClusterCIDRClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredClusterCIDRClusterInformer(client, resyncPeriod, indexers, nil) +func NewServiceCIDRClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredServiceCIDRClusterInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredClusterCIDRClusterInformer constructs a new informer for ClusterCIDR type. +// NewFilteredServiceCIDRClusterInformer constructs a new informer for ServiceCIDR type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredClusterCIDRClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredServiceCIDRClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1alpha1().ClusterCIDRs().List(context.TODO(), options) + return client.NetworkingV1alpha1().ServiceCIDRs().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.NetworkingV1alpha1().ClusterCIDRs().Watch(context.TODO(), options) + return client.NetworkingV1alpha1().ServiceCIDRs().Watch(context.TODO(), options) }, }, - &networkingv1alpha1.ClusterCIDR{}, + &networkingv1alpha1.ServiceCIDR{}, resyncPeriod, indexers, ) } -func (f *clusterCIDRClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredClusterCIDRClusterInformer(client, resyncPeriod, cache.Indexers{ +func (f *serviceCIDRClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredServiceCIDRClusterInformer(client, resyncPeriod, cache.Indexers{ kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, }, f.tweakListOptions, ) } -func (f *clusterCIDRClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&networkingv1alpha1.ClusterCIDR{}, f.defaultInformer) +func (f *serviceCIDRClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&networkingv1alpha1.ServiceCIDR{}, f.defaultInformer) } -func (f *clusterCIDRClusterInformer) Lister() networkingv1alpha1listers.ClusterCIDRClusterLister { - return networkingv1alpha1listers.NewClusterCIDRClusterLister(f.Informer().GetIndexer()) +func (f *serviceCIDRClusterInformer) Lister() networkingv1alpha1listers.ServiceCIDRClusterLister { + return networkingv1alpha1listers.NewServiceCIDRClusterLister(f.Informer().GetIndexer()) } -func (f *clusterCIDRClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamnetworkingv1alpha1informers.ClusterCIDRInformer { - return &clusterCIDRInformer{ +func (f *serviceCIDRClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamnetworkingv1alpha1informers.ServiceCIDRInformer { + return &serviceCIDRInformer{ informer: f.Informer().Cluster(clusterName), lister: f.Lister().Cluster(clusterName), } } -type clusterCIDRInformer struct { +type serviceCIDRInformer struct { informer cache.SharedIndexInformer - lister upstreamnetworkingv1alpha1listers.ClusterCIDRLister + lister upstreamnetworkingv1alpha1listers.ServiceCIDRLister } -func (f *clusterCIDRInformer) Informer() cache.SharedIndexInformer { +func (f *serviceCIDRInformer) Informer() cache.SharedIndexInformer { return f.informer } -func (f *clusterCIDRInformer) Lister() upstreamnetworkingv1alpha1listers.ClusterCIDRLister { +func (f *serviceCIDRInformer) Lister() upstreamnetworkingv1alpha1listers.ServiceCIDRLister { return f.lister } diff --git a/informers/policy/v1beta1/interface.go b/informers/policy/v1beta1/interface.go index 9a896b73e..61164a191 100644 --- a/informers/policy/v1beta1/interface.go +++ b/informers/policy/v1beta1/interface.go @@ -28,8 +28,6 @@ import ( type ClusterInterface interface { // PodDisruptionBudgets returns a PodDisruptionBudgetClusterInformer PodDisruptionBudgets() PodDisruptionBudgetClusterInformer - // PodSecurityPolicies returns a PodSecurityPolicyClusterInformer - PodSecurityPolicies() PodSecurityPolicyClusterInformer } type version struct { @@ -46,8 +44,3 @@ func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalin func (v *version) PodDisruptionBudgets() PodDisruptionBudgetClusterInformer { return &podDisruptionBudgetClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } - -// PodSecurityPolicies returns a PodSecurityPolicyClusterInformer -func (v *version) PodSecurityPolicies() PodSecurityPolicyClusterInformer { - return &podSecurityPolicyClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/informers/policy/v1beta1/podsecuritypolicy.go b/informers/policy/v1beta1/podsecuritypolicy.go deleted file mode 100644 index 875f50533..000000000 --- a/informers/policy/v1beta1/podsecuritypolicy.go +++ /dev/null @@ -1,124 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by kcp code-generator. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "time" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - "github.com/kcp-dev/logicalcluster/v3" - - policyv1beta1 "k8s.io/api/policy/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/watch" - upstreampolicyv1beta1informers "k8s.io/client-go/informers/policy/v1beta1" - upstreampolicyv1beta1listers "k8s.io/client-go/listers/policy/v1beta1" - "k8s.io/client-go/tools/cache" - - "github.com/kcp-dev/client-go/informers/internalinterfaces" - clientset "github.com/kcp-dev/client-go/kubernetes" - policyv1beta1listers "github.com/kcp-dev/client-go/listers/policy/v1beta1" -) - -// PodSecurityPolicyClusterInformer provides access to a shared informer and lister for -// PodSecurityPolicies. -type PodSecurityPolicyClusterInformer interface { - Cluster(logicalcluster.Name) upstreampolicyv1beta1informers.PodSecurityPolicyInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() policyv1beta1listers.PodSecurityPolicyClusterLister -} - -type podSecurityPolicyClusterInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewPodSecurityPolicyClusterInformer constructs a new informer for PodSecurityPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPodSecurityPolicyClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredPodSecurityPolicyClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredPodSecurityPolicyClusterInformer constructs a new informer for PodSecurityPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredPodSecurityPolicyClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PolicyV1beta1().PodSecurityPolicies().List(context.TODO(), options) - }, - WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.PolicyV1beta1().PodSecurityPolicies().Watch(context.TODO(), options) - }, - }, - &policyv1beta1.PodSecurityPolicy{}, - resyncPeriod, - indexers, - ) -} - -func (f *podSecurityPolicyClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredPodSecurityPolicyClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - }, - f.tweakListOptions, - ) -} - -func (f *podSecurityPolicyClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&policyv1beta1.PodSecurityPolicy{}, f.defaultInformer) -} - -func (f *podSecurityPolicyClusterInformer) Lister() policyv1beta1listers.PodSecurityPolicyClusterLister { - return policyv1beta1listers.NewPodSecurityPolicyClusterLister(f.Informer().GetIndexer()) -} - -func (f *podSecurityPolicyClusterInformer) Cluster(clusterName logicalcluster.Name) upstreampolicyv1beta1informers.PodSecurityPolicyInformer { - return &podSecurityPolicyInformer{ - informer: f.Informer().Cluster(clusterName), - lister: f.Lister().Cluster(clusterName), - } -} - -type podSecurityPolicyInformer struct { - informer cache.SharedIndexInformer - lister upstreampolicyv1beta1listers.PodSecurityPolicyLister -} - -func (f *podSecurityPolicyInformer) Informer() cache.SharedIndexInformer { - return f.informer -} - -func (f *podSecurityPolicyInformer) Lister() upstreampolicyv1beta1listers.PodSecurityPolicyLister { - return f.lister -} diff --git a/informers/resource/v1alpha1/interface.go b/informers/resource/v1alpha1/interface.go deleted file mode 100644 index de7a0820f..000000000 --- a/informers/resource/v1alpha1/interface.go +++ /dev/null @@ -1,67 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by kcp code-generator. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/kcp-dev/client-go/informers/internalinterfaces" -) - -type ClusterInterface interface { - // ResourceClaims returns a ResourceClaimClusterInformer - ResourceClaims() ResourceClaimClusterInformer - // PodSchedulings returns a PodSchedulingClusterInformer - PodSchedulings() PodSchedulingClusterInformer - // ResourceClasses returns a ResourceClassClusterInformer - ResourceClasses() ResourceClassClusterInformer - // ResourceClaimTemplates returns a ResourceClaimTemplateClusterInformer - ResourceClaimTemplates() ResourceClaimTemplateClusterInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new ClusterInterface. -func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { - return &version{factory: f, tweakListOptions: tweakListOptions} -} - -// ResourceClaims returns a ResourceClaimClusterInformer -func (v *version) ResourceClaims() ResourceClaimClusterInformer { - return &resourceClaimClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// PodSchedulings returns a PodSchedulingClusterInformer -func (v *version) PodSchedulings() PodSchedulingClusterInformer { - return &podSchedulingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ResourceClasses returns a ResourceClassClusterInformer -func (v *version) ResourceClasses() ResourceClassClusterInformer { - return &resourceClassClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ResourceClaimTemplates returns a ResourceClaimTemplateClusterInformer -func (v *version) ResourceClaimTemplates() ResourceClaimTemplateClusterInformer { - return &resourceClaimTemplateClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/informers/resource/v1alpha2/interface.go b/informers/resource/v1alpha2/interface.go index ca59b06db..7b2e0ff49 100644 --- a/informers/resource/v1alpha2/interface.go +++ b/informers/resource/v1alpha2/interface.go @@ -34,6 +34,12 @@ type ClusterInterface interface { ResourceClasses() ResourceClassClusterInformer // ResourceClaimTemplates returns a ResourceClaimTemplateClusterInformer ResourceClaimTemplates() ResourceClaimTemplateClusterInformer + // ResourceSlices returns a ResourceSliceClusterInformer + ResourceSlices() ResourceSliceClusterInformer + // ResourceClaimParameters returns a ResourceClaimParametersClusterInformer + ResourceClaimParameters() ResourceClaimParametersClusterInformer + // ResourceClassParameters returns a ResourceClassParametersClusterInformer + ResourceClassParameters() ResourceClassParametersClusterInformer } type version struct { @@ -65,3 +71,18 @@ func (v *version) ResourceClasses() ResourceClassClusterInformer { func (v *version) ResourceClaimTemplates() ResourceClaimTemplateClusterInformer { return &resourceClaimTemplateClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// ResourceSlices returns a ResourceSliceClusterInformer +func (v *version) ResourceSlices() ResourceSliceClusterInformer { + return &resourceSliceClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ResourceClaimParameters returns a ResourceClaimParametersClusterInformer +func (v *version) ResourceClaimParameters() ResourceClaimParametersClusterInformer { + return &resourceClaimParametersClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ResourceClassParameters returns a ResourceClassParametersClusterInformer +func (v *version) ResourceClassParameters() ResourceClassParametersClusterInformer { + return &resourceClassParametersClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/informers/resource/v1alpha1/resourceclaim.go b/informers/resource/v1alpha2/resourceclaimparameters.go similarity index 52% rename from informers/resource/v1alpha1/resourceclaim.go rename to informers/resource/v1alpha2/resourceclaimparameters.go index 97ce7e2bb..7d695f4ad 100644 --- a/informers/resource/v1alpha1/resourceclaim.go +++ b/informers/resource/v1alpha2/resourceclaimparameters.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( "context" @@ -42,83 +42,83 @@ import ( resourcev1alpha2listers "github.com/kcp-dev/client-go/listers/resource/v1alpha2" ) -// ResourceClaimClusterInformer provides access to a shared informer and lister for -// ResourceClaims. -type ResourceClaimClusterInformer interface { - Cluster(logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClaimInformer +// ResourceClaimParametersClusterInformer provides access to a shared informer and lister for +// ResourceClaimParameters. +type ResourceClaimParametersClusterInformer interface { + Cluster(logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClaimParametersInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() resourcev1alpha2listers.ResourceClaimClusterLister + Lister() resourcev1alpha2listers.ResourceClaimParametersClusterLister } -type resourceClaimClusterInformer struct { +type resourceClaimParametersClusterInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewResourceClaimClusterInformer constructs a new informer for ResourceClaim type. +// NewResourceClaimParametersClusterInformer constructs a new informer for ResourceClaimParameters type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewResourceClaimClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredResourceClaimClusterInformer(client, resyncPeriod, indexers, nil) +func NewResourceClaimParametersClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredResourceClaimParametersClusterInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredResourceClaimClusterInformer constructs a new informer for ResourceClaim type. +// NewFilteredResourceClaimParametersClusterInformer constructs a new informer for ResourceClaimParameters type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredResourceClaimClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredResourceClaimParametersClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaims().List(context.TODO(), options) + return client.ResourceV1alpha2().ResourceClaimParameters().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaims().Watch(context.TODO(), options) + return client.ResourceV1alpha2().ResourceClaimParameters().Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClaim{}, + &resourcev1alpha2.ResourceClaimParameters{}, resyncPeriod, indexers, ) } -func (f *resourceClaimClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredResourceClaimClusterInformer(client, resyncPeriod, cache.Indexers{ +func (f *resourceClaimParametersClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredResourceClaimParametersClusterInformer(client, resyncPeriod, cache.Indexers{ kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc}, f.tweakListOptions, ) } -func (f *resourceClaimClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClaim{}, f.defaultInformer) +func (f *resourceClaimParametersClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimParameters{}, f.defaultInformer) } -func (f *resourceClaimClusterInformer) Lister() resourcev1alpha2listers.ResourceClaimClusterLister { - return resourcev1alpha2listers.NewResourceClaimClusterLister(f.Informer().GetIndexer()) +func (f *resourceClaimParametersClusterInformer) Lister() resourcev1alpha2listers.ResourceClaimParametersClusterLister { + return resourcev1alpha2listers.NewResourceClaimParametersClusterLister(f.Informer().GetIndexer()) } -func (f *resourceClaimClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClaimInformer { - return &resourceClaimInformer{ +func (f *resourceClaimParametersClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClaimParametersInformer { + return &resourceClaimParametersInformer{ informer: f.Informer().Cluster(clusterName), lister: f.Lister().Cluster(clusterName), } } -type resourceClaimInformer struct { +type resourceClaimParametersInformer struct { informer cache.SharedIndexInformer - lister upstreamresourcev1alpha2listers.ResourceClaimLister + lister upstreamresourcev1alpha2listers.ResourceClaimParametersLister } -func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer { +func (f *resourceClaimParametersInformer) Informer() cache.SharedIndexInformer { return f.informer } -func (f *resourceClaimInformer) Lister() upstreamresourcev1alpha2listers.ResourceClaimLister { +func (f *resourceClaimParametersInformer) Lister() upstreamresourcev1alpha2listers.ResourceClaimParametersLister { return f.lister } diff --git a/informers/resource/v1alpha1/podscheduling.go b/informers/resource/v1alpha2/resourceclassparameters.go similarity index 52% rename from informers/resource/v1alpha1/podscheduling.go rename to informers/resource/v1alpha2/resourceclassparameters.go index f68ba95cc..67a468e18 100644 --- a/informers/resource/v1alpha1/podscheduling.go +++ b/informers/resource/v1alpha2/resourceclassparameters.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( "context" @@ -42,83 +42,83 @@ import ( resourcev1alpha2listers "github.com/kcp-dev/client-go/listers/resource/v1alpha2" ) -// PodSchedulingClusterInformer provides access to a shared informer and lister for -// PodSchedulings. -type PodSchedulingClusterInformer interface { - Cluster(logicalcluster.Name) upstreamresourcev1alpha2informers.PodSchedulingContextInformer +// ResourceClassParametersClusterInformer provides access to a shared informer and lister for +// ResourceClassParameters. +type ResourceClassParametersClusterInformer interface { + Cluster(logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClassParametersInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() resourcev1alpha2listers.PodSchedulingContextClusterLister + Lister() resourcev1alpha2listers.ResourceClassParametersClusterLister } -type podSchedulingClusterInformer struct { +type resourceClassParametersClusterInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewPodSchedulingClusterInformer constructs a new informer for PodScheduling type. +// NewResourceClassParametersClusterInformer constructs a new informer for ResourceClassParameters type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewPodSchedulingClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredPodSchedulingClusterInformer(client, resyncPeriod, indexers, nil) +func NewResourceClassParametersClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredResourceClassParametersClusterInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredPodSchedulingClusterInformer constructs a new informer for PodScheduling type. +// NewFilteredResourceClassParametersClusterInformer constructs a new informer for ResourceClassParameters type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredPodSchedulingClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredResourceClassParametersClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().PodSchedulingContexts().List(context.TODO(), options) + return client.ResourceV1alpha2().ResourceClassParameters().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().PodSchedulingContexts().Watch(context.TODO(), options) + return client.ResourceV1alpha2().ResourceClassParameters().Watch(context.TODO(), options) }, }, - &resourcev1alpha2.PodSchedulingContext{}, + &resourcev1alpha2.ResourceClassParameters{}, resyncPeriod, indexers, ) } -func (f *podSchedulingClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredPodSchedulingClusterInformer(client, resyncPeriod, cache.Indexers{ +func (f *resourceClassParametersClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredResourceClassParametersClusterInformer(client, resyncPeriod, cache.Indexers{ kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc}, f.tweakListOptions, ) } -func (f *podSchedulingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.PodSchedulingContext{}, f.defaultInformer) +func (f *resourceClassParametersClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceClassParameters{}, f.defaultInformer) } -func (f *podSchedulingClusterInformer) Lister() resourcev1alpha2listers.PodSchedulingContextClusterLister { - return resourcev1alpha2listers.NewPodSchedulingContextClusterLister(f.Informer().GetIndexer()) +func (f *resourceClassParametersClusterInformer) Lister() resourcev1alpha2listers.ResourceClassParametersClusterLister { + return resourcev1alpha2listers.NewResourceClassParametersClusterLister(f.Informer().GetIndexer()) } -func (f *podSchedulingClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamresourcev1alpha2informers.PodSchedulingContextInformer { - return &podSchedulingInformer{ +func (f *resourceClassParametersClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClassParametersInformer { + return &resourceClassParametersInformer{ informer: f.Informer().Cluster(clusterName), lister: f.Lister().Cluster(clusterName), } } -type podSchedulingInformer struct { +type resourceClassParametersInformer struct { informer cache.SharedIndexInformer - lister upstreamresourcev1alpha2listers.PodSchedulingContextLister + lister upstreamresourcev1alpha2listers.ResourceClassParametersLister } -func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer { +func (f *resourceClassParametersInformer) Informer() cache.SharedIndexInformer { return f.informer } -func (f *podSchedulingInformer) Lister() upstreamresourcev1alpha2listers.PodSchedulingContextLister { +func (f *resourceClassParametersInformer) Lister() upstreamresourcev1alpha2listers.ResourceClassParametersLister { return f.lister } diff --git a/informers/resource/v1alpha1/resourceclass.go b/informers/resource/v1alpha2/resourceslice.go similarity index 66% rename from informers/resource/v1alpha1/resourceclass.go rename to informers/resource/v1alpha2/resourceslice.go index d825f456f..dd6d73118 100644 --- a/informers/resource/v1alpha1/resourceclass.go +++ b/informers/resource/v1alpha2/resourceslice.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1alpha2 import ( "context" @@ -42,83 +42,83 @@ import ( resourcev1alpha2listers "github.com/kcp-dev/client-go/listers/resource/v1alpha2" ) -// ResourceClassClusterInformer provides access to a shared informer and lister for -// ResourceClasses. -type ResourceClassClusterInformer interface { - Cluster(logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClassInformer +// ResourceSliceClusterInformer provides access to a shared informer and lister for +// ResourceSlices. +type ResourceSliceClusterInformer interface { + Cluster(logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceSliceInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() resourcev1alpha2listers.ResourceClassClusterLister + Lister() resourcev1alpha2listers.ResourceSliceClusterLister } -type resourceClassClusterInformer struct { +type resourceSliceClusterInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewResourceClassClusterInformer constructs a new informer for ResourceClass type. +// NewResourceSliceClusterInformer constructs a new informer for ResourceSlice type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewResourceClassClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredResourceClassClusterInformer(client, resyncPeriod, indexers, nil) +func NewResourceSliceClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredResourceSliceClusterInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredResourceClassClusterInformer constructs a new informer for ResourceClass type. +// NewFilteredResourceSliceClusterInformer constructs a new informer for ResourceSlice type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredResourceClassClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredResourceSliceClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClasses().List(context.TODO(), options) + return client.ResourceV1alpha2().ResourceSlices().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClasses().Watch(context.TODO(), options) + return client.ResourceV1alpha2().ResourceSlices().Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClass{}, + &resourcev1alpha2.ResourceSlice{}, resyncPeriod, indexers, ) } -func (f *resourceClassClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredResourceClassClusterInformer(client, resyncPeriod, cache.Indexers{ +func (f *resourceSliceClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredResourceSliceClusterInformer(client, resyncPeriod, cache.Indexers{ kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, }, f.tweakListOptions, ) } -func (f *resourceClassClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClass{}, f.defaultInformer) +func (f *resourceSliceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&resourcev1alpha2.ResourceSlice{}, f.defaultInformer) } -func (f *resourceClassClusterInformer) Lister() resourcev1alpha2listers.ResourceClassClusterLister { - return resourcev1alpha2listers.NewResourceClassClusterLister(f.Informer().GetIndexer()) +func (f *resourceSliceClusterInformer) Lister() resourcev1alpha2listers.ResourceSliceClusterLister { + return resourcev1alpha2listers.NewResourceSliceClusterLister(f.Informer().GetIndexer()) } -func (f *resourceClassClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClassInformer { - return &resourceClassInformer{ +func (f *resourceSliceClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceSliceInformer { + return &resourceSliceInformer{ informer: f.Informer().Cluster(clusterName), lister: f.Lister().Cluster(clusterName), } } -type resourceClassInformer struct { +type resourceSliceInformer struct { informer cache.SharedIndexInformer - lister upstreamresourcev1alpha2listers.ResourceClassLister + lister upstreamresourcev1alpha2listers.ResourceSliceLister } -func (f *resourceClassInformer) Informer() cache.SharedIndexInformer { +func (f *resourceSliceInformer) Informer() cache.SharedIndexInformer { return f.informer } -func (f *resourceClassInformer) Lister() upstreamresourcev1alpha2listers.ResourceClassLister { +func (f *resourceSliceInformer) Lister() upstreamresourcev1alpha2listers.ResourceSliceLister { return f.lister } diff --git a/informers/storage/v1alpha1/interface.go b/informers/storage/v1alpha1/interface.go index 342634ea4..3f1993026 100644 --- a/informers/storage/v1alpha1/interface.go +++ b/informers/storage/v1alpha1/interface.go @@ -30,6 +30,8 @@ type ClusterInterface interface { VolumeAttachments() VolumeAttachmentClusterInformer // CSIStorageCapacities returns a CSIStorageCapacityClusterInformer CSIStorageCapacities() CSIStorageCapacityClusterInformer + // VolumeAttributesClasses returns a VolumeAttributesClassClusterInformer + VolumeAttributesClasses() VolumeAttributesClassClusterInformer } type version struct { @@ -51,3 +53,8 @@ func (v *version) VolumeAttachments() VolumeAttachmentClusterInformer { func (v *version) CSIStorageCapacities() CSIStorageCapacityClusterInformer { return &cSIStorageCapacityClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// VolumeAttributesClasses returns a VolumeAttributesClassClusterInformer +func (v *version) VolumeAttributesClasses() VolumeAttributesClassClusterInformer { + return &volumeAttributesClassClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/informers/resource/v1alpha1/resourceclaimtemplate.go b/informers/storage/v1alpha1/volumeattributesclass.go similarity index 55% rename from informers/resource/v1alpha1/resourceclaimtemplate.go rename to informers/storage/v1alpha1/volumeattributesclass.go index 9c4dcfeeb..26d7704d6 100644 --- a/informers/resource/v1alpha1/resourceclaimtemplate.go +++ b/informers/storage/v1alpha1/volumeattributesclass.go @@ -29,96 +29,96 @@ import ( kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" "github.com/kcp-dev/logicalcluster/v3" - resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + storagev1alpha1 "k8s.io/api/storage/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" - upstreamresourcev1alpha2informers "k8s.io/client-go/informers/resource/v1alpha2" - upstreamresourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2" + upstreamstoragev1alpha1informers "k8s.io/client-go/informers/storage/v1alpha1" + upstreamstoragev1alpha1listers "k8s.io/client-go/listers/storage/v1alpha1" "k8s.io/client-go/tools/cache" "github.com/kcp-dev/client-go/informers/internalinterfaces" clientset "github.com/kcp-dev/client-go/kubernetes" - resourcev1alpha2listers "github.com/kcp-dev/client-go/listers/resource/v1alpha2" + storagev1alpha1listers "github.com/kcp-dev/client-go/listers/storage/v1alpha1" ) -// ResourceClaimTemplateClusterInformer provides access to a shared informer and lister for -// ResourceClaimTemplates. -type ResourceClaimTemplateClusterInformer interface { - Cluster(logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClaimTemplateInformer +// VolumeAttributesClassClusterInformer provides access to a shared informer and lister for +// VolumeAttributesClasses. +type VolumeAttributesClassClusterInformer interface { + Cluster(logicalcluster.Name) upstreamstoragev1alpha1informers.VolumeAttributesClassInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() resourcev1alpha2listers.ResourceClaimTemplateClusterLister + Lister() storagev1alpha1listers.VolumeAttributesClassClusterLister } -type resourceClaimTemplateClusterInformer struct { +type volumeAttributesClassClusterInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc } -// NewResourceClaimTemplateClusterInformer constructs a new informer for ResourceClaimTemplate type. +// NewVolumeAttributesClassClusterInformer constructs a new informer for VolumeAttributesClass type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewResourceClaimTemplateClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredResourceClaimTemplateClusterInformer(client, resyncPeriod, indexers, nil) +func NewVolumeAttributesClassClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredVolumeAttributesClassClusterInformer(client, resyncPeriod, indexers, nil) } -// NewFilteredResourceClaimTemplateClusterInformer constructs a new informer for ResourceClaimTemplate type. +// NewFilteredVolumeAttributesClassClusterInformer constructs a new informer for VolumeAttributesClass type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. -func NewFilteredResourceClaimTemplateClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { +func NewFilteredVolumeAttributesClassClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaimTemplates().List(context.TODO(), options) + return client.StorageV1alpha1().VolumeAttributesClasses().List(context.TODO(), options) }, WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha2().ResourceClaimTemplates().Watch(context.TODO(), options) + return client.StorageV1alpha1().VolumeAttributesClasses().Watch(context.TODO(), options) }, }, - &resourcev1alpha2.ResourceClaimTemplate{}, + &storagev1alpha1.VolumeAttributesClass{}, resyncPeriod, indexers, ) } -func (f *resourceClaimTemplateClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredResourceClaimTemplateClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc}, +func (f *volumeAttributesClassClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredVolumeAttributesClassClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + }, f.tweakListOptions, ) } -func (f *resourceClaimTemplateClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimTemplate{}, f.defaultInformer) +func (f *volumeAttributesClassClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&storagev1alpha1.VolumeAttributesClass{}, f.defaultInformer) } -func (f *resourceClaimTemplateClusterInformer) Lister() resourcev1alpha2listers.ResourceClaimTemplateClusterLister { - return resourcev1alpha2listers.NewResourceClaimTemplateClusterLister(f.Informer().GetIndexer()) +func (f *volumeAttributesClassClusterInformer) Lister() storagev1alpha1listers.VolumeAttributesClassClusterLister { + return storagev1alpha1listers.NewVolumeAttributesClassClusterLister(f.Informer().GetIndexer()) } -func (f *resourceClaimTemplateClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamresourcev1alpha2informers.ResourceClaimTemplateInformer { - return &resourceClaimTemplateInformer{ +func (f *volumeAttributesClassClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamstoragev1alpha1informers.VolumeAttributesClassInformer { + return &volumeAttributesClassInformer{ informer: f.Informer().Cluster(clusterName), lister: f.Lister().Cluster(clusterName), } } -type resourceClaimTemplateInformer struct { +type volumeAttributesClassInformer struct { informer cache.SharedIndexInformer - lister upstreamresourcev1alpha2listers.ResourceClaimTemplateLister + lister upstreamstoragev1alpha1listers.VolumeAttributesClassLister } -func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer { +func (f *volumeAttributesClassInformer) Informer() cache.SharedIndexInformer { return f.informer } -func (f *resourceClaimTemplateInformer) Lister() upstreamresourcev1alpha2listers.ResourceClaimTemplateLister { +func (f *volumeAttributesClassInformer) Lister() upstreamstoragev1alpha1listers.VolumeAttributesClassLister { return f.lister } diff --git a/informers/storagemigration/interface.go b/informers/storagemigration/interface.go new file mode 100644 index 000000000..097d05a3c --- /dev/null +++ b/informers/storagemigration/interface.go @@ -0,0 +1,47 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package storagemigration + +import ( + "github.com/kcp-dev/client-go/informers/internalinterfaces" + "github.com/kcp-dev/client-go/informers/storagemigration/v1alpha1" +) + +type ClusterInterface interface { + // V1alpha1 provides access to the shared informers in V1alpha1. + V1alpha1() v1alpha1.ClusterInterface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new ClusterInterface. +func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { + return &group{factory: f, tweakListOptions: tweakListOptions} +} + +// V1alpha1 returns a new v1alpha1.ClusterInterface. +func (g *group) V1alpha1() v1alpha1.ClusterInterface { + return v1alpha1.New(g.factory, g.tweakListOptions) +} diff --git a/informers/storagemigration/v1alpha1/interface.go b/informers/storagemigration/v1alpha1/interface.go new file mode 100644 index 000000000..879df0d0b --- /dev/null +++ b/informers/storagemigration/v1alpha1/interface.go @@ -0,0 +1,46 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/kcp-dev/client-go/informers/internalinterfaces" +) + +type ClusterInterface interface { + // StorageVersionMigrations returns a StorageVersionMigrationClusterInformer + StorageVersionMigrations() StorageVersionMigrationClusterInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new ClusterInterface. +func New(f internalinterfaces.SharedInformerFactory, tweakListOptions internalinterfaces.TweakListOptionsFunc) ClusterInterface { + return &version{factory: f, tweakListOptions: tweakListOptions} +} + +// StorageVersionMigrations returns a StorageVersionMigrationClusterInformer +func (v *version) StorageVersionMigrations() StorageVersionMigrationClusterInformer { + return &storageVersionMigrationClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/informers/storagemigration/v1alpha1/storageversionmigration.go b/informers/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 000000000..1ff23e6ba --- /dev/null +++ b/informers/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,124 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" + "github.com/kcp-dev/logicalcluster/v3" + + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + upstreamstoragemigrationv1alpha1informers "k8s.io/client-go/informers/storagemigration/v1alpha1" + upstreamstoragemigrationv1alpha1listers "k8s.io/client-go/listers/storagemigration/v1alpha1" + "k8s.io/client-go/tools/cache" + + "github.com/kcp-dev/client-go/informers/internalinterfaces" + clientset "github.com/kcp-dev/client-go/kubernetes" + storagemigrationv1alpha1listers "github.com/kcp-dev/client-go/listers/storagemigration/v1alpha1" +) + +// StorageVersionMigrationClusterInformer provides access to a shared informer and lister for +// StorageVersionMigrations. +type StorageVersionMigrationClusterInformer interface { + Cluster(logicalcluster.Name) upstreamstoragemigrationv1alpha1informers.StorageVersionMigrationInformer + Informer() kcpcache.ScopeableSharedIndexInformer + Lister() storagemigrationv1alpha1listers.StorageVersionMigrationClusterLister +} + +type storageVersionMigrationClusterInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewStorageVersionMigrationClusterInformer constructs a new informer for StorageVersionMigration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewStorageVersionMigrationClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredStorageVersionMigrationClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredStorageVersionMigrationClusterInformer constructs a new informer for StorageVersionMigration type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredStorageVersionMigrationClusterInformer(client clientset.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { + return kcpinformers.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StoragemigrationV1alpha1().StorageVersionMigrations().List(context.TODO(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StoragemigrationV1alpha1().StorageVersionMigrations().Watch(context.TODO(), options) + }, + }, + &storagemigrationv1alpha1.StorageVersionMigration{}, + resyncPeriod, + indexers, + ) +} + +func (f *storageVersionMigrationClusterInformer) defaultInformer(client clientset.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredStorageVersionMigrationClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + }, + f.tweakListOptions, + ) +} + +func (f *storageVersionMigrationClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return f.factory.InformerFor(&storagemigrationv1alpha1.StorageVersionMigration{}, f.defaultInformer) +} + +func (f *storageVersionMigrationClusterInformer) Lister() storagemigrationv1alpha1listers.StorageVersionMigrationClusterLister { + return storagemigrationv1alpha1listers.NewStorageVersionMigrationClusterLister(f.Informer().GetIndexer()) +} + +func (f *storageVersionMigrationClusterInformer) Cluster(clusterName logicalcluster.Name) upstreamstoragemigrationv1alpha1informers.StorageVersionMigrationInformer { + return &storageVersionMigrationInformer{ + informer: f.Informer().Cluster(clusterName), + lister: f.Lister().Cluster(clusterName), + } +} + +type storageVersionMigrationInformer struct { + informer cache.SharedIndexInformer + lister upstreamstoragemigrationv1alpha1listers.StorageVersionMigrationLister +} + +func (f *storageVersionMigrationInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +func (f *storageVersionMigrationInformer) Lister() upstreamstoragemigrationv1alpha1listers.StorageVersionMigrationLister { + return f.lister +} diff --git a/kubernetes/clientset.go b/kubernetes/clientset.go index e7f330559..1e8e70bba 100644 --- a/kubernetes/clientset.go +++ b/kubernetes/clientset.go @@ -62,7 +62,7 @@ import ( eventsv1 "github.com/kcp-dev/client-go/kubernetes/typed/events/v1" eventsv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/events/v1beta1" extensionsv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta1" flowcontrolv1beta2 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta2" flowcontrolv1beta3 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta3" @@ -84,6 +84,7 @@ import ( storagev1 "github.com/kcp-dev/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/storage/v1alpha1" storagev1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/storage/v1beta1" + storagemigrationv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/storagemigration/v1alpha1" ) type ClusterInterface interface { @@ -117,7 +118,7 @@ type ClusterInterface interface { EventsV1() eventsv1.EventsV1ClusterInterface EventsV1beta1() eventsv1beta1.EventsV1beta1ClusterInterface ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1ClusterInterface - FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1ClusterInterface + FlowcontrolV1() flowcontrolv1.FlowcontrolV1ClusterInterface FlowcontrolV1beta1() flowcontrolv1beta1.FlowcontrolV1beta1ClusterInterface FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2ClusterInterface FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3ClusterInterface @@ -137,6 +138,7 @@ type ClusterInterface interface { SchedulingV1() schedulingv1.SchedulingV1ClusterInterface SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1ClusterInterface SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1ClusterInterface + StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1ClusterInterface StorageV1() storagev1.StorageV1ClusterInterface StorageV1alpha1() storagev1alpha1.StorageV1alpha1ClusterInterface StorageV1beta1() storagev1beta1.StorageV1beta1ClusterInterface @@ -174,7 +176,7 @@ type ClusterClientset struct { eventsV1 *eventsv1.EventsV1ClusterClient eventsV1beta1 *eventsv1beta1.EventsV1beta1ClusterClient extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1ClusterClient - flowcontrolV1alpha1 *flowcontrolv1alpha1.FlowcontrolV1alpha1ClusterClient + flowcontrolV1 *flowcontrolv1.FlowcontrolV1ClusterClient flowcontrolV1beta1 *flowcontrolv1beta1.FlowcontrolV1beta1ClusterClient flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2ClusterClient flowcontrolV1beta3 *flowcontrolv1beta3.FlowcontrolV1beta3ClusterClient @@ -194,6 +196,7 @@ type ClusterClientset struct { schedulingV1 *schedulingv1.SchedulingV1ClusterClient schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1ClusterClient schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1ClusterClient + storagemigrationV1alpha1 *storagemigrationv1alpha1.StoragemigrationV1alpha1ClusterClient storageV1 *storagev1.StorageV1ClusterClient storageV1alpha1 *storagev1alpha1.StorageV1alpha1ClusterClient storageV1beta1 *storagev1beta1.StorageV1beta1ClusterClient @@ -347,9 +350,9 @@ func (c *ClusterClientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1bet return c.extensionsV1beta1 } -// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1ClusterClient. -func (c *ClusterClientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1ClusterInterface { - return c.flowcontrolV1alpha1 +// FlowcontrolV1 retrieves the FlowcontrolV1ClusterClient. +func (c *ClusterClientset) FlowcontrolV1() flowcontrolv1.FlowcontrolV1ClusterInterface { + return c.flowcontrolV1 } // FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1ClusterClient. @@ -447,6 +450,11 @@ func (c *ClusterClientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1bet return c.schedulingV1beta1 } +// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1ClusterClient. +func (c *ClusterClientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1ClusterInterface { + return c.storagemigrationV1alpha1 +} + // StorageV1 retrieves the StorageV1ClusterClient. func (c *ClusterClientset) StorageV1() storagev1.StorageV1ClusterInterface { return c.storageV1 @@ -626,7 +634,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*ClusterCli if err != nil { return nil, err } - cs.flowcontrolV1alpha1, err = flowcontrolv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.flowcontrolV1, err = flowcontrolv1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -706,6 +714,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*ClusterCli if err != nil { return nil, err } + cs.storagemigrationV1alpha1, err = storagemigrationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.storageV1, err = storagev1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err diff --git a/kubernetes/fake/clientset.go b/kubernetes/fake/clientset.go index 002797c55..579d11aee 100644 --- a/kubernetes/fake/clientset.go +++ b/kubernetes/fake/clientset.go @@ -57,7 +57,7 @@ import ( eventsv1 "k8s.io/client-go/kubernetes/typed/events/v1" eventsv1beta1 "k8s.io/client-go/kubernetes/typed/events/v1beta1" extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" flowcontrolv1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3" @@ -79,6 +79,7 @@ import ( storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" storagev1alpha1 "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" storagev1beta1 "k8s.io/client-go/kubernetes/typed/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" kcpclient "github.com/kcp-dev/client-go/kubernetes" kcpadmissionregistrationv1 "github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1" @@ -139,8 +140,8 @@ import ( fakeeventsv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/events/v1beta1/fake" kcpextensionsv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/extensions/v1beta1" fakeextensionsv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/extensions/v1beta1/fake" - kcpflowcontrolv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1alpha1" - fakeflowcontrolv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1alpha1/fake" + kcpflowcontrolv1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1" + fakeflowcontrolv1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1/fake" kcpflowcontrolv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta1" fakeflowcontrolv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta1/fake" kcpflowcontrolv1beta2 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta2" @@ -183,6 +184,8 @@ import ( fakestoragev1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/storage/v1alpha1/fake" kcpstoragev1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/storage/v1beta1" fakestoragev1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/storage/v1beta1/fake" + kcpstoragemigrationv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/storagemigration/v1alpha1" + fakestoragemigrationv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/storagemigration/v1alpha1/fake" kcpfakediscovery "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/discovery/fake" kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" ) @@ -361,9 +364,9 @@ func (c *ClusterClientset) ExtensionsV1beta1() kcpextensionsv1beta1.ExtensionsV1 return &fakeextensionsv1beta1.ExtensionsV1beta1ClusterClient{Fake: c.Fake} } -// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1ClusterClient. -func (c *ClusterClientset) FlowcontrolV1alpha1() kcpflowcontrolv1alpha1.FlowcontrolV1alpha1ClusterInterface { - return &fakeflowcontrolv1alpha1.FlowcontrolV1alpha1ClusterClient{Fake: c.Fake} +// FlowcontrolV1 retrieves the FlowcontrolV1ClusterClient. +func (c *ClusterClientset) FlowcontrolV1() kcpflowcontrolv1.FlowcontrolV1ClusterInterface { + return &fakeflowcontrolv1.FlowcontrolV1ClusterClient{Fake: c.Fake} } // FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1ClusterClient. @@ -461,6 +464,11 @@ func (c *ClusterClientset) SchedulingV1beta1() kcpschedulingv1beta1.SchedulingV1 return &fakeschedulingv1beta1.SchedulingV1beta1ClusterClient{Fake: c.Fake} } +// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1ClusterClient. +func (c *ClusterClientset) StoragemigrationV1alpha1() kcpstoragemigrationv1alpha1.StoragemigrationV1alpha1ClusterInterface { + return &fakestoragemigrationv1alpha1.StoragemigrationV1alpha1ClusterClient{Fake: c.Fake} +} + // StorageV1 retrieves the StorageV1ClusterClient. func (c *ClusterClientset) StorageV1() kcpstoragev1.StorageV1ClusterInterface { return &fakestoragev1.StorageV1ClusterClient{Fake: c.Fake} @@ -648,9 +656,9 @@ func (c *Clientset) ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Inter return &fakeextensionsv1beta1.ExtensionsV1beta1Client{Fake: c.Fake, ClusterPath: c.clusterPath} } -// FlowcontrolV1alpha1 retrieves the FlowcontrolV1alpha1Client. -func (c *Clientset) FlowcontrolV1alpha1() flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { - return &fakeflowcontrolv1alpha1.FlowcontrolV1alpha1Client{Fake: c.Fake, ClusterPath: c.clusterPath} +// FlowcontrolV1 retrieves the FlowcontrolV1Client. +func (c *Clientset) FlowcontrolV1() flowcontrolv1.FlowcontrolV1Interface { + return &fakeflowcontrolv1.FlowcontrolV1Client{Fake: c.Fake, ClusterPath: c.clusterPath} } // FlowcontrolV1beta1 retrieves the FlowcontrolV1beta1Client. @@ -748,6 +756,11 @@ func (c *Clientset) SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Inter return &fakeschedulingv1beta1.SchedulingV1beta1Client{Fake: c.Fake, ClusterPath: c.clusterPath} } +// StoragemigrationV1alpha1 retrieves the StoragemigrationV1alpha1Client. +func (c *Clientset) StoragemigrationV1alpha1() storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + return &fakestoragemigrationv1alpha1.StoragemigrationV1alpha1Client{Fake: c.Fake, ClusterPath: c.clusterPath} +} + // StorageV1 retrieves the StorageV1Client. func (c *Clientset) StorageV1() storagev1.StorageV1Interface { return &fakestoragev1.StorageV1Client{Fake: c.Fake, ClusterPath: c.clusterPath} diff --git a/kubernetes/scheme/register.go b/kubernetes/scheme/register.go index fa9f38a0b..763af66e7 100644 --- a/kubernetes/scheme/register.go +++ b/kubernetes/scheme/register.go @@ -51,7 +51,7 @@ import ( eventsv1 "k8s.io/api/events/v1" eventsv1beta1 "k8s.io/api/events/v1beta1" extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3" @@ -73,6 +73,7 @@ import ( storagev1 "k8s.io/api/storage/v1" storagev1alpha1 "k8s.io/api/storage/v1alpha1" storagev1beta1 "k8s.io/api/storage/v1beta1" + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -112,7 +113,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ eventsv1.AddToScheme, eventsv1beta1.AddToScheme, extensionsv1beta1.AddToScheme, - flowcontrolv1alpha1.AddToScheme, + flowcontrolv1.AddToScheme, flowcontrolv1beta1.AddToScheme, flowcontrolv1beta2.AddToScheme, flowcontrolv1beta3.AddToScheme, @@ -132,6 +133,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ schedulingv1.AddToScheme, schedulingv1alpha1.AddToScheme, schedulingv1beta1.AddToScheme, + storagemigrationv1alpha1.AddToScheme, storagev1.AddToScheme, storagev1alpha1.AddToScheme, storagev1beta1.AddToScheme, diff --git a/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go b/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go index 7ac93ba8d..0263a9314 100644 --- a/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go +++ b/kubernetes/typed/admissionregistration/v1/admissionregistration_client.go @@ -33,6 +33,8 @@ import ( type AdmissionregistrationV1ClusterInterface interface { AdmissionregistrationV1ClusterScoper + ValidatingAdmissionPoliciesClusterGetter + ValidatingAdmissionPolicyBindingsClusterGetter ValidatingWebhookConfigurationsClusterGetter MutatingWebhookConfigurationsClusterGetter } @@ -52,6 +54,14 @@ func (c *AdmissionregistrationV1ClusterClient) Cluster(clusterPath logicalcluste return c.clientCache.ClusterOrDie(clusterPath) } +func (c *AdmissionregistrationV1ClusterClient) ValidatingAdmissionPolicies() ValidatingAdmissionPolicyClusterInterface { + return &validatingAdmissionPoliciesClusterInterface{clientCache: c.clientCache} +} + +func (c *AdmissionregistrationV1ClusterClient) ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingClusterInterface { + return &validatingAdmissionPolicyBindingsClusterInterface{clientCache: c.clientCache} +} + func (c *AdmissionregistrationV1ClusterClient) ValidatingWebhookConfigurations() ValidatingWebhookConfigurationClusterInterface { return &validatingWebhookConfigurationsClusterInterface{clientCache: c.clientCache} } diff --git a/kubernetes/typed/admissionregistration/v1/fake/admissionregistration_client.go b/kubernetes/typed/admissionregistration/v1/fake/admissionregistration_client.go index a2bb24c2f..31b368dfb 100644 --- a/kubernetes/typed/admissionregistration/v1/fake/admissionregistration_client.go +++ b/kubernetes/typed/admissionregistration/v1/fake/admissionregistration_client.go @@ -44,6 +44,14 @@ func (c *AdmissionregistrationV1ClusterClient) Cluster(clusterPath logicalcluste return &AdmissionregistrationV1Client{Fake: c.Fake, ClusterPath: clusterPath} } +func (c *AdmissionregistrationV1ClusterClient) ValidatingAdmissionPolicies() kcpadmissionregistrationv1.ValidatingAdmissionPolicyClusterInterface { + return &validatingAdmissionPoliciesClusterClient{Fake: c.Fake} +} + +func (c *AdmissionregistrationV1ClusterClient) ValidatingAdmissionPolicyBindings() kcpadmissionregistrationv1.ValidatingAdmissionPolicyBindingClusterInterface { + return &validatingAdmissionPolicyBindingsClusterClient{Fake: c.Fake} +} + func (c *AdmissionregistrationV1ClusterClient) ValidatingWebhookConfigurations() kcpadmissionregistrationv1.ValidatingWebhookConfigurationClusterInterface { return &validatingWebhookConfigurationsClusterClient{Fake: c.Fake} } @@ -64,6 +72,14 @@ func (c *AdmissionregistrationV1Client) RESTClient() rest.Interface { return ret } +func (c *AdmissionregistrationV1Client) ValidatingAdmissionPolicies() admissionregistrationv1.ValidatingAdmissionPolicyInterface { + return &validatingAdmissionPoliciesClient{Fake: c.Fake, ClusterPath: c.ClusterPath} +} + +func (c *AdmissionregistrationV1Client) ValidatingAdmissionPolicyBindings() admissionregistrationv1.ValidatingAdmissionPolicyBindingInterface { + return &validatingAdmissionPolicyBindingsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} +} + func (c *AdmissionregistrationV1Client) ValidatingWebhookConfigurations() admissionregistrationv1.ValidatingWebhookConfigurationInterface { return &validatingWebhookConfigurationsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} } diff --git a/kubernetes/typed/admissionregistration/v1/fake/validatingadmissionpolicy.go b/kubernetes/typed/admissionregistration/v1/fake/validatingadmissionpolicy.go new file mode 100644 index 000000000..eb10324bc --- /dev/null +++ b/kubernetes/typed/admissionregistration/v1/fake/validatingadmissionpolicy.go @@ -0,0 +1,202 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsadmissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + admissionregistrationv1client "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + "k8s.io/client-go/testing" + + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var validatingAdmissionPoliciesResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1", Resource: "validatingadmissionpolicies"} +var validatingAdmissionPoliciesKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingAdmissionPolicy"} + +type validatingAdmissionPoliciesClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *validatingAdmissionPoliciesClusterClient) Cluster(clusterPath logicalcluster.Path) admissionregistrationv1client.ValidatingAdmissionPolicyInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &validatingAdmissionPoliciesClient{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors across all clusters. +func (c *validatingAdmissionPoliciesClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(validatingAdmissionPoliciesResource, validatingAdmissionPoliciesKind, logicalcluster.Wildcard, opts), &admissionregistrationv1.ValidatingAdmissionPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &admissionregistrationv1.ValidatingAdmissionPolicyList{ListMeta: obj.(*admissionregistrationv1.ValidatingAdmissionPolicyList).ListMeta} + for _, item := range obj.(*admissionregistrationv1.ValidatingAdmissionPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ValidatingAdmissionPolicies across all clusters. +func (c *validatingAdmissionPoliciesClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(validatingAdmissionPoliciesResource, logicalcluster.Wildcard, opts)) +} + +type validatingAdmissionPoliciesClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *validatingAdmissionPoliciesClient) Create(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicy, opts metav1.CreateOptions) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(validatingAdmissionPoliciesResource, c.ClusterPath, validatingAdmissionPolicy), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), err +} + +func (c *validatingAdmissionPoliciesClient) Update(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(validatingAdmissionPoliciesResource, c.ClusterPath, validatingAdmissionPolicy), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), err +} + +func (c *validatingAdmissionPoliciesClient) UpdateStatus(ctx context.Context, validatingAdmissionPolicy *admissionregistrationv1.ValidatingAdmissionPolicy, opts metav1.UpdateOptions) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(validatingAdmissionPoliciesResource, c.ClusterPath, "status", validatingAdmissionPolicy), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), err +} + +func (c *validatingAdmissionPoliciesClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(validatingAdmissionPoliciesResource, c.ClusterPath, name, opts), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + return err +} + +func (c *validatingAdmissionPoliciesClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewRootDeleteCollectionAction(validatingAdmissionPoliciesResource, c.ClusterPath, listOpts) + + _, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingAdmissionPolicyList{}) + return err +} + +func (c *validatingAdmissionPoliciesClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(validatingAdmissionPoliciesResource, c.ClusterPath, name), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), err +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicies that match those selectors. +func (c *validatingAdmissionPoliciesClient) List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(validatingAdmissionPoliciesResource, validatingAdmissionPoliciesKind, c.ClusterPath, opts), &admissionregistrationv1.ValidatingAdmissionPolicyList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &admissionregistrationv1.ValidatingAdmissionPolicyList{ListMeta: obj.(*admissionregistrationv1.ValidatingAdmissionPolicyList).ListMeta} + for _, item := range obj.(*admissionregistrationv1.ValidatingAdmissionPolicyList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *validatingAdmissionPoliciesClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(validatingAdmissionPoliciesResource, c.ClusterPath, opts)) +} + +func (c *validatingAdmissionPoliciesClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(validatingAdmissionPoliciesResource, c.ClusterPath, name, pt, data, subresources...), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), err +} + +func (c *validatingAdmissionPoliciesClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsadmissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(validatingAdmissionPoliciesResource, c.ClusterPath, *name, types.ApplyPatchType, data), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), err +} + +func (c *validatingAdmissionPoliciesClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsadmissionregistrationv1.ValidatingAdmissionPolicyApplyConfiguration, opts metav1.ApplyOptions) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(validatingAdmissionPoliciesResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &admissionregistrationv1.ValidatingAdmissionPolicy{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), err +} diff --git a/kubernetes/typed/admissionregistration/v1/fake/validatingadmissionpolicybinding.go b/kubernetes/typed/admissionregistration/v1/fake/validatingadmissionpolicybinding.go new file mode 100644 index 000000000..40ab198c1 --- /dev/null +++ b/kubernetes/typed/admissionregistration/v1/fake/validatingadmissionpolicybinding.go @@ -0,0 +1,202 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsadmissionregistrationv1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1" + admissionregistrationv1client "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" + "k8s.io/client-go/testing" + + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var validatingAdmissionPolicyBindingsResource = schema.GroupVersionResource{Group: "admissionregistration.k8s.io", Version: "v1", Resource: "validatingadmissionpolicybindings"} +var validatingAdmissionPolicyBindingsKind = schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingAdmissionPolicyBinding"} + +type validatingAdmissionPolicyBindingsClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *validatingAdmissionPolicyBindingsClusterClient) Cluster(clusterPath logicalcluster.Path) admissionregistrationv1client.ValidatingAdmissionPolicyBindingInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &validatingAdmissionPolicyBindingsClient{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors across all clusters. +func (c *validatingAdmissionPolicyBindingsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBindingList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(validatingAdmissionPolicyBindingsResource, validatingAdmissionPolicyBindingsKind, logicalcluster.Wildcard, opts), &admissionregistrationv1.ValidatingAdmissionPolicyBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &admissionregistrationv1.ValidatingAdmissionPolicyBindingList{ListMeta: obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBindingList).ListMeta} + for _, item := range obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ValidatingAdmissionPolicyBindings across all clusters. +func (c *validatingAdmissionPolicyBindingsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(validatingAdmissionPolicyBindingsResource, logicalcluster.Wildcard, opts)) +} + +type validatingAdmissionPolicyBindingsClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *validatingAdmissionPolicyBindingsClient) Create(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, opts metav1.CreateOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, validatingAdmissionPolicyBinding), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), err +} + +func (c *validatingAdmissionPolicyBindingsClient) Update(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, validatingAdmissionPolicyBinding), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), err +} + +func (c *validatingAdmissionPolicyBindingsClient) UpdateStatus(ctx context.Context, validatingAdmissionPolicyBinding *admissionregistrationv1.ValidatingAdmissionPolicyBinding, opts metav1.UpdateOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, "status", validatingAdmissionPolicyBinding), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), err +} + +func (c *validatingAdmissionPolicyBindingsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(validatingAdmissionPolicyBindingsResource, c.ClusterPath, name, opts), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + return err +} + +func (c *validatingAdmissionPolicyBindingsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewRootDeleteCollectionAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, listOpts) + + _, err := c.Fake.Invokes(action, &admissionregistrationv1.ValidatingAdmissionPolicyBindingList{}) + return err +} + +func (c *validatingAdmissionPolicyBindingsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, name), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), err +} + +// List takes label and field selectors, and returns the list of ValidatingAdmissionPolicyBindings that match those selectors. +func (c *validatingAdmissionPolicyBindingsClient) List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBindingList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(validatingAdmissionPolicyBindingsResource, validatingAdmissionPolicyBindingsKind, c.ClusterPath, opts), &admissionregistrationv1.ValidatingAdmissionPolicyBindingList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &admissionregistrationv1.ValidatingAdmissionPolicyBindingList{ListMeta: obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBindingList).ListMeta} + for _, item := range obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBindingList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *validatingAdmissionPolicyBindingsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, opts)) +} + +func (c *validatingAdmissionPolicyBindingsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, name, pt, data, subresources...), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), err +} + +func (c *validatingAdmissionPolicyBindingsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsadmissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts metav1.ApplyOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), err +} + +func (c *validatingAdmissionPolicyBindingsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsadmissionregistrationv1.ValidatingAdmissionPolicyBindingApplyConfiguration, opts metav1.ApplyOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(validatingAdmissionPolicyBindingsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &admissionregistrationv1.ValidatingAdmissionPolicyBinding{}) + if obj == nil { + return nil, err + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), err +} diff --git a/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go b/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 000000000..064e4c006 --- /dev/null +++ b/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,71 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +import ( + "context" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1client "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" +) + +// ValidatingAdmissionPoliciesClusterGetter has a method to return a ValidatingAdmissionPolicyClusterInterface. +// A group's cluster client should implement this interface. +type ValidatingAdmissionPoliciesClusterGetter interface { + ValidatingAdmissionPolicies() ValidatingAdmissionPolicyClusterInterface +} + +// ValidatingAdmissionPolicyClusterInterface can operate on ValidatingAdmissionPolicies across all clusters, +// or scope down to one cluster and return a admissionregistrationv1client.ValidatingAdmissionPolicyInterface. +type ValidatingAdmissionPolicyClusterInterface interface { + Cluster(logicalcluster.Path) admissionregistrationv1client.ValidatingAdmissionPolicyInterface + List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) +} + +type validatingAdmissionPoliciesClusterInterface struct { + clientCache kcpclient.Cache[*admissionregistrationv1client.AdmissionregistrationV1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *validatingAdmissionPoliciesClusterInterface) Cluster(clusterPath logicalcluster.Path) admissionregistrationv1client.ValidatingAdmissionPolicyInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).ValidatingAdmissionPolicies() +} + +// List returns the entire collection of all ValidatingAdmissionPolicies across all clusters. +func (c *validatingAdmissionPoliciesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ValidatingAdmissionPolicies().List(ctx, opts) +} + +// Watch begins to watch all ValidatingAdmissionPolicies across all clusters. +func (c *validatingAdmissionPoliciesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ValidatingAdmissionPolicies().Watch(ctx, opts) +} diff --git a/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go b/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 000000000..9df0ac6da --- /dev/null +++ b/kubernetes/typed/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,71 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +import ( + "context" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1client "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" +) + +// ValidatingAdmissionPolicyBindingsClusterGetter has a method to return a ValidatingAdmissionPolicyBindingClusterInterface. +// A group's cluster client should implement this interface. +type ValidatingAdmissionPolicyBindingsClusterGetter interface { + ValidatingAdmissionPolicyBindings() ValidatingAdmissionPolicyBindingClusterInterface +} + +// ValidatingAdmissionPolicyBindingClusterInterface can operate on ValidatingAdmissionPolicyBindings across all clusters, +// or scope down to one cluster and return a admissionregistrationv1client.ValidatingAdmissionPolicyBindingInterface. +type ValidatingAdmissionPolicyBindingClusterInterface interface { + Cluster(logicalcluster.Path) admissionregistrationv1client.ValidatingAdmissionPolicyBindingInterface + List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBindingList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) +} + +type validatingAdmissionPolicyBindingsClusterInterface struct { + clientCache kcpclient.Cache[*admissionregistrationv1client.AdmissionregistrationV1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *validatingAdmissionPolicyBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) admissionregistrationv1client.ValidatingAdmissionPolicyBindingInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).ValidatingAdmissionPolicyBindings() +} + +// List returns the entire collection of all ValidatingAdmissionPolicyBindings across all clusters. +func (c *validatingAdmissionPolicyBindingsClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*admissionregistrationv1.ValidatingAdmissionPolicyBindingList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ValidatingAdmissionPolicyBindings().List(ctx, opts) +} + +// Watch begins to watch all ValidatingAdmissionPolicyBindings across all clusters. +func (c *validatingAdmissionPolicyBindingsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ValidatingAdmissionPolicyBindings().Watch(ctx, opts) +} diff --git a/kubernetes/typed/flowcontrol/v1alpha1/fake/flowcontrol_client.go b/kubernetes/typed/flowcontrol/v1/fake/flowcontrol_client.go similarity index 53% rename from kubernetes/typed/flowcontrol/v1alpha1/fake/flowcontrol_client.go rename to kubernetes/typed/flowcontrol/v1/fake/flowcontrol_client.go index 4afa3a3ad..377bcd317 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/fake/flowcontrol_client.go +++ b/kubernetes/typed/flowcontrol/v1/fake/flowcontrol_client.go @@ -24,50 +24,50 @@ package fake import ( "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" "k8s.io/client-go/rest" - kcpflowcontrolv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1alpha1" + kcpflowcontrolv1 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1" kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" ) -var _ kcpflowcontrolv1alpha1.FlowcontrolV1alpha1ClusterInterface = (*FlowcontrolV1alpha1ClusterClient)(nil) +var _ kcpflowcontrolv1.FlowcontrolV1ClusterInterface = (*FlowcontrolV1ClusterClient)(nil) -type FlowcontrolV1alpha1ClusterClient struct { +type FlowcontrolV1ClusterClient struct { *kcptesting.Fake } -func (c *FlowcontrolV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +func (c *FlowcontrolV1ClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1.FlowcontrolV1Interface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } - return &FlowcontrolV1alpha1Client{Fake: c.Fake, ClusterPath: clusterPath} + return &FlowcontrolV1Client{Fake: c.Fake, ClusterPath: clusterPath} } -func (c *FlowcontrolV1alpha1ClusterClient) FlowSchemas() kcpflowcontrolv1alpha1.FlowSchemaClusterInterface { +func (c *FlowcontrolV1ClusterClient) FlowSchemas() kcpflowcontrolv1.FlowSchemaClusterInterface { return &flowSchemasClusterClient{Fake: c.Fake} } -func (c *FlowcontrolV1alpha1ClusterClient) PriorityLevelConfigurations() kcpflowcontrolv1alpha1.PriorityLevelConfigurationClusterInterface { +func (c *FlowcontrolV1ClusterClient) PriorityLevelConfigurations() kcpflowcontrolv1.PriorityLevelConfigurationClusterInterface { return &priorityLevelConfigurationsClusterClient{Fake: c.Fake} } -var _ flowcontrolv1alpha1.FlowcontrolV1alpha1Interface = (*FlowcontrolV1alpha1Client)(nil) +var _ flowcontrolv1.FlowcontrolV1Interface = (*FlowcontrolV1Client)(nil) -type FlowcontrolV1alpha1Client struct { +type FlowcontrolV1Client struct { *kcptesting.Fake ClusterPath logicalcluster.Path } -func (c *FlowcontrolV1alpha1Client) RESTClient() rest.Interface { +func (c *FlowcontrolV1Client) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } -func (c *FlowcontrolV1alpha1Client) FlowSchemas() flowcontrolv1alpha1.FlowSchemaInterface { +func (c *FlowcontrolV1Client) FlowSchemas() flowcontrolv1.FlowSchemaInterface { return &flowSchemasClient{Fake: c.Fake, ClusterPath: c.ClusterPath} } -func (c *FlowcontrolV1alpha1Client) PriorityLevelConfigurations() flowcontrolv1alpha1.PriorityLevelConfigurationInterface { +func (c *FlowcontrolV1Client) PriorityLevelConfigurations() flowcontrolv1.PriorityLevelConfigurationInterface { return &priorityLevelConfigurationsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} } diff --git a/kubernetes/typed/flowcontrol/v1alpha1/fake/flowschema.go b/kubernetes/typed/flowcontrol/v1/fake/flowschema.go similarity index 69% rename from kubernetes/typed/flowcontrol/v1alpha1/fake/flowschema.go rename to kubernetes/typed/flowcontrol/v1/fake/flowschema.go index ef228dfa5..b8d32b2d5 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/fake/flowschema.go +++ b/kubernetes/typed/flowcontrol/v1/fake/flowschema.go @@ -28,28 +28,28 @@ import ( "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - applyconfigurationsflowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" - flowcontrolv1alpha1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + applyconfigurationsflowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1" + flowcontrolv1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" "k8s.io/client-go/testing" kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" ) -var flowSchemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Resource: "flowschemas"} -var flowSchemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "FlowSchema"} +var flowSchemasResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Resource: "flowschemas"} +var flowSchemasKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Kind: "FlowSchema"} type flowSchemasClusterClient struct { *kcptesting.Fake } // Cluster scopes the client down to a particular cluster. -func (c *flowSchemasClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1alpha1client.FlowSchemaInterface { +func (c *flowSchemasClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1client.FlowSchemaInterface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } @@ -58,8 +58,8 @@ func (c *flowSchemasClusterClient) Cluster(clusterPath logicalcluster.Path) flow } // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors across all clusters. -func (c *flowSchemasClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.FlowSchemaList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(flowSchemasResource, flowSchemasKind, logicalcluster.Wildcard, opts), &flowcontrolv1alpha1.FlowSchemaList{}) +func (c *flowSchemasClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.FlowSchemaList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(flowSchemasResource, flowSchemasKind, logicalcluster.Wildcard, opts), &flowcontrolv1.FlowSchemaList{}) if obj == nil { return nil, err } @@ -68,8 +68,8 @@ func (c *flowSchemasClusterClient) List(ctx context.Context, opts metav1.ListOpt if label == nil { label = labels.Everything() } - list := &flowcontrolv1alpha1.FlowSchemaList{ListMeta: obj.(*flowcontrolv1alpha1.FlowSchemaList).ListMeta} - for _, item := range obj.(*flowcontrolv1alpha1.FlowSchemaList).Items { + list := &flowcontrolv1.FlowSchemaList{ListMeta: obj.(*flowcontrolv1.FlowSchemaList).ListMeta} + for _, item := range obj.(*flowcontrolv1.FlowSchemaList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -87,53 +87,53 @@ type flowSchemasClient struct { ClusterPath logicalcluster.Path } -func (c *flowSchemasClient) Create(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchema, opts metav1.CreateOptions) (*flowcontrolv1alpha1.FlowSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(flowSchemasResource, c.ClusterPath, flowSchema), &flowcontrolv1alpha1.FlowSchema{}) +func (c *flowSchemasClient) Create(ctx context.Context, flowSchema *flowcontrolv1.FlowSchema, opts metav1.CreateOptions) (*flowcontrolv1.FlowSchema, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(flowSchemasResource, c.ClusterPath, flowSchema), &flowcontrolv1.FlowSchema{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.FlowSchema), err + return obj.(*flowcontrolv1.FlowSchema), err } -func (c *flowSchemasClient) Update(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchema, opts metav1.UpdateOptions) (*flowcontrolv1alpha1.FlowSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(flowSchemasResource, c.ClusterPath, flowSchema), &flowcontrolv1alpha1.FlowSchema{}) +func (c *flowSchemasClient) Update(ctx context.Context, flowSchema *flowcontrolv1.FlowSchema, opts metav1.UpdateOptions) (*flowcontrolv1.FlowSchema, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(flowSchemasResource, c.ClusterPath, flowSchema), &flowcontrolv1.FlowSchema{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.FlowSchema), err + return obj.(*flowcontrolv1.FlowSchema), err } -func (c *flowSchemasClient) UpdateStatus(ctx context.Context, flowSchema *flowcontrolv1alpha1.FlowSchema, opts metav1.UpdateOptions) (*flowcontrolv1alpha1.FlowSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(flowSchemasResource, c.ClusterPath, "status", flowSchema), &flowcontrolv1alpha1.FlowSchema{}) +func (c *flowSchemasClient) UpdateStatus(ctx context.Context, flowSchema *flowcontrolv1.FlowSchema, opts metav1.UpdateOptions) (*flowcontrolv1.FlowSchema, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(flowSchemasResource, c.ClusterPath, "status", flowSchema), &flowcontrolv1.FlowSchema{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.FlowSchema), err + return obj.(*flowcontrolv1.FlowSchema), err } func (c *flowSchemasClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(flowSchemasResource, c.ClusterPath, name, opts), &flowcontrolv1alpha1.FlowSchema{}) + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(flowSchemasResource, c.ClusterPath, name, opts), &flowcontrolv1.FlowSchema{}) return err } func (c *flowSchemasClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := kcptesting.NewRootDeleteCollectionAction(flowSchemasResource, c.ClusterPath, listOpts) - _, err := c.Fake.Invokes(action, &flowcontrolv1alpha1.FlowSchemaList{}) + _, err := c.Fake.Invokes(action, &flowcontrolv1.FlowSchemaList{}) return err } -func (c *flowSchemasClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*flowcontrolv1alpha1.FlowSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(flowSchemasResource, c.ClusterPath, name), &flowcontrolv1alpha1.FlowSchema{}) +func (c *flowSchemasClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*flowcontrolv1.FlowSchema, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(flowSchemasResource, c.ClusterPath, name), &flowcontrolv1.FlowSchema{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.FlowSchema), err + return obj.(*flowcontrolv1.FlowSchema), err } // List takes label and field selectors, and returns the list of FlowSchemas that match those selectors. -func (c *flowSchemasClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.FlowSchemaList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(flowSchemasResource, flowSchemasKind, c.ClusterPath, opts), &flowcontrolv1alpha1.FlowSchemaList{}) +func (c *flowSchemasClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.FlowSchemaList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(flowSchemasResource, flowSchemasKind, c.ClusterPath, opts), &flowcontrolv1.FlowSchemaList{}) if obj == nil { return nil, err } @@ -142,8 +142,8 @@ func (c *flowSchemasClient) List(ctx context.Context, opts metav1.ListOptions) ( if label == nil { label = labels.Everything() } - list := &flowcontrolv1alpha1.FlowSchemaList{ListMeta: obj.(*flowcontrolv1alpha1.FlowSchemaList).ListMeta} - for _, item := range obj.(*flowcontrolv1alpha1.FlowSchemaList).Items { + list := &flowcontrolv1.FlowSchemaList{ListMeta: obj.(*flowcontrolv1.FlowSchemaList).ListMeta} + for _, item := range obj.(*flowcontrolv1.FlowSchemaList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -155,15 +155,15 @@ func (c *flowSchemasClient) Watch(ctx context.Context, opts metav1.ListOptions) return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(flowSchemasResource, c.ClusterPath, opts)) } -func (c *flowSchemasClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*flowcontrolv1alpha1.FlowSchema, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(flowSchemasResource, c.ClusterPath, name, pt, data, subresources...), &flowcontrolv1alpha1.FlowSchema{}) +func (c *flowSchemasClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*flowcontrolv1.FlowSchema, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(flowSchemasResource, c.ClusterPath, name, pt, data, subresources...), &flowcontrolv1.FlowSchema{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.FlowSchema), err + return obj.(*flowcontrolv1.FlowSchema), err } -func (c *flowSchemasClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1alpha1.FlowSchema, error) { +func (c *flowSchemasClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1.FlowSchema, error) { if applyConfiguration == nil { return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") } @@ -175,14 +175,14 @@ func (c *flowSchemasClient) Apply(ctx context.Context, applyConfiguration *apply if name == nil { return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(flowSchemasResource, c.ClusterPath, *name, types.ApplyPatchType, data), &flowcontrolv1alpha1.FlowSchema{}) + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(flowSchemasResource, c.ClusterPath, *name, types.ApplyPatchType, data), &flowcontrolv1.FlowSchema{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.FlowSchema), err + return obj.(*flowcontrolv1.FlowSchema), err } -func (c *flowSchemasClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1alpha1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1alpha1.FlowSchema, error) { +func (c *flowSchemasClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1.FlowSchemaApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1.FlowSchema, error) { if applyConfiguration == nil { return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") } @@ -194,9 +194,9 @@ func (c *flowSchemasClient) ApplyStatus(ctx context.Context, applyConfiguration if name == nil { return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(flowSchemasResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &flowcontrolv1alpha1.FlowSchema{}) + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(flowSchemasResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &flowcontrolv1.FlowSchema{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.FlowSchema), err + return obj.(*flowcontrolv1.FlowSchema), err } diff --git a/kubernetes/typed/flowcontrol/v1alpha1/fake/prioritylevelconfiguration.go b/kubernetes/typed/flowcontrol/v1/fake/prioritylevelconfiguration.go similarity index 66% rename from kubernetes/typed/flowcontrol/v1alpha1/fake/prioritylevelconfiguration.go rename to kubernetes/typed/flowcontrol/v1/fake/prioritylevelconfiguration.go index f92783652..0c5751d9a 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/fake/prioritylevelconfiguration.go +++ b/kubernetes/typed/flowcontrol/v1/fake/prioritylevelconfiguration.go @@ -28,28 +28,28 @@ import ( "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/watch" - applyconfigurationsflowcontrolv1alpha1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1alpha1" - flowcontrolv1alpha1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + applyconfigurationsflowcontrolv1 "k8s.io/client-go/applyconfigurations/flowcontrol/v1" + flowcontrolv1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" "k8s.io/client-go/testing" kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" ) -var priorityLevelConfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Resource: "prioritylevelconfigurations"} -var priorityLevelConfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1", Kind: "PriorityLevelConfiguration"} +var priorityLevelConfigurationsResource = schema.GroupVersionResource{Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Resource: "prioritylevelconfigurations"} +var priorityLevelConfigurationsKind = schema.GroupVersionKind{Group: "flowcontrol.apiserver.k8s.io", Version: "v1", Kind: "PriorityLevelConfiguration"} type priorityLevelConfigurationsClusterClient struct { *kcptesting.Fake } // Cluster scopes the client down to a particular cluster. -func (c *priorityLevelConfigurationsClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1alpha1client.PriorityLevelConfigurationInterface { +func (c *priorityLevelConfigurationsClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1client.PriorityLevelConfigurationInterface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } @@ -58,8 +58,8 @@ func (c *priorityLevelConfigurationsClusterClient) Cluster(clusterPath logicalcl } // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors across all clusters. -func (c *priorityLevelConfigurationsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.PriorityLevelConfigurationList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(priorityLevelConfigurationsResource, priorityLevelConfigurationsKind, logicalcluster.Wildcard, opts), &flowcontrolv1alpha1.PriorityLevelConfigurationList{}) +func (c *priorityLevelConfigurationsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.PriorityLevelConfigurationList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(priorityLevelConfigurationsResource, priorityLevelConfigurationsKind, logicalcluster.Wildcard, opts), &flowcontrolv1.PriorityLevelConfigurationList{}) if obj == nil { return nil, err } @@ -68,8 +68,8 @@ func (c *priorityLevelConfigurationsClusterClient) List(ctx context.Context, opt if label == nil { label = labels.Everything() } - list := &flowcontrolv1alpha1.PriorityLevelConfigurationList{ListMeta: obj.(*flowcontrolv1alpha1.PriorityLevelConfigurationList).ListMeta} - for _, item := range obj.(*flowcontrolv1alpha1.PriorityLevelConfigurationList).Items { + list := &flowcontrolv1.PriorityLevelConfigurationList{ListMeta: obj.(*flowcontrolv1.PriorityLevelConfigurationList).ListMeta} + for _, item := range obj.(*flowcontrolv1.PriorityLevelConfigurationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -87,53 +87,53 @@ type priorityLevelConfigurationsClient struct { ClusterPath logicalcluster.Path } -func (c *priorityLevelConfigurationsClient) Create(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfiguration, opts metav1.CreateOptions) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(priorityLevelConfigurationsResource, c.ClusterPath, priorityLevelConfiguration), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) +func (c *priorityLevelConfigurationsClient) Create(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfiguration, opts metav1.CreateOptions) (*flowcontrolv1.PriorityLevelConfiguration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(priorityLevelConfigurationsResource, c.ClusterPath, priorityLevelConfiguration), &flowcontrolv1.PriorityLevelConfiguration{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), err + return obj.(*flowcontrolv1.PriorityLevelConfiguration), err } -func (c *priorityLevelConfigurationsClient) Update(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(priorityLevelConfigurationsResource, c.ClusterPath, priorityLevelConfiguration), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) +func (c *priorityLevelConfigurationsClient) Update(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*flowcontrolv1.PriorityLevelConfiguration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(priorityLevelConfigurationsResource, c.ClusterPath, priorityLevelConfiguration), &flowcontrolv1.PriorityLevelConfiguration{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), err + return obj.(*flowcontrolv1.PriorityLevelConfiguration), err } -func (c *priorityLevelConfigurationsClient) UpdateStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, "status", priorityLevelConfiguration), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) +func (c *priorityLevelConfigurationsClient) UpdateStatus(ctx context.Context, priorityLevelConfiguration *flowcontrolv1.PriorityLevelConfiguration, opts metav1.UpdateOptions) (*flowcontrolv1.PriorityLevelConfiguration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, "status", priorityLevelConfiguration), &flowcontrolv1.PriorityLevelConfiguration{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), err + return obj.(*flowcontrolv1.PriorityLevelConfiguration), err } func (c *priorityLevelConfigurationsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(priorityLevelConfigurationsResource, c.ClusterPath, name, opts), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(priorityLevelConfigurationsResource, c.ClusterPath, name, opts), &flowcontrolv1.PriorityLevelConfiguration{}) return err } func (c *priorityLevelConfigurationsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { action := kcptesting.NewRootDeleteCollectionAction(priorityLevelConfigurationsResource, c.ClusterPath, listOpts) - _, err := c.Fake.Invokes(action, &flowcontrolv1alpha1.PriorityLevelConfigurationList{}) + _, err := c.Fake.Invokes(action, &flowcontrolv1.PriorityLevelConfigurationList{}) return err } -func (c *priorityLevelConfigurationsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(priorityLevelConfigurationsResource, c.ClusterPath, name), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) +func (c *priorityLevelConfigurationsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*flowcontrolv1.PriorityLevelConfiguration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(priorityLevelConfigurationsResource, c.ClusterPath, name), &flowcontrolv1.PriorityLevelConfiguration{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), err + return obj.(*flowcontrolv1.PriorityLevelConfiguration), err } // List takes label and field selectors, and returns the list of PriorityLevelConfigurations that match those selectors. -func (c *priorityLevelConfigurationsClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.PriorityLevelConfigurationList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(priorityLevelConfigurationsResource, priorityLevelConfigurationsKind, c.ClusterPath, opts), &flowcontrolv1alpha1.PriorityLevelConfigurationList{}) +func (c *priorityLevelConfigurationsClient) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.PriorityLevelConfigurationList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(priorityLevelConfigurationsResource, priorityLevelConfigurationsKind, c.ClusterPath, opts), &flowcontrolv1.PriorityLevelConfigurationList{}) if obj == nil { return nil, err } @@ -142,8 +142,8 @@ func (c *priorityLevelConfigurationsClient) List(ctx context.Context, opts metav if label == nil { label = labels.Everything() } - list := &flowcontrolv1alpha1.PriorityLevelConfigurationList{ListMeta: obj.(*flowcontrolv1alpha1.PriorityLevelConfigurationList).ListMeta} - for _, item := range obj.(*flowcontrolv1alpha1.PriorityLevelConfigurationList).Items { + list := &flowcontrolv1.PriorityLevelConfigurationList{ListMeta: obj.(*flowcontrolv1.PriorityLevelConfigurationList).ListMeta} + for _, item := range obj.(*flowcontrolv1.PriorityLevelConfigurationList).Items { if label.Matches(labels.Set(item.Labels)) { list.Items = append(list.Items, item) } @@ -155,15 +155,15 @@ func (c *priorityLevelConfigurationsClient) Watch(ctx context.Context, opts meta return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(priorityLevelConfigurationsResource, c.ClusterPath, opts)) } -func (c *priorityLevelConfigurationsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, name, pt, data, subresources...), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) +func (c *priorityLevelConfigurationsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*flowcontrolv1.PriorityLevelConfiguration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, name, pt, data, subresources...), &flowcontrolv1.PriorityLevelConfiguration{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), err + return obj.(*flowcontrolv1.PriorityLevelConfiguration), err } -func (c *priorityLevelConfigurationsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { +func (c *priorityLevelConfigurationsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1.PriorityLevelConfiguration, error) { if applyConfiguration == nil { return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") } @@ -175,14 +175,14 @@ func (c *priorityLevelConfigurationsClient) Apply(ctx context.Context, applyConf if name == nil { return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &flowcontrolv1.PriorityLevelConfiguration{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), err + return obj.(*flowcontrolv1.PriorityLevelConfiguration), err } -func (c *priorityLevelConfigurationsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1alpha1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { +func (c *priorityLevelConfigurationsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsflowcontrolv1.PriorityLevelConfigurationApplyConfiguration, opts metav1.ApplyOptions) (*flowcontrolv1.PriorityLevelConfiguration, error) { if applyConfiguration == nil { return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") } @@ -194,9 +194,9 @@ func (c *priorityLevelConfigurationsClient) ApplyStatus(ctx context.Context, app if name == nil { return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &flowcontrolv1alpha1.PriorityLevelConfiguration{}) + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(priorityLevelConfigurationsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &flowcontrolv1.PriorityLevelConfiguration{}) if obj == nil { return nil, err } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), err + return obj.(*flowcontrolv1.PriorityLevelConfiguration), err } diff --git a/kubernetes/typed/flowcontrol/v1alpha1/flowcontrol_client.go b/kubernetes/typed/flowcontrol/v1/flowcontrol_client.go similarity index 57% rename from kubernetes/typed/flowcontrol/v1alpha1/flowcontrol_client.go rename to kubernetes/typed/flowcontrol/v1/flowcontrol_client.go index 6f7138fba..19df8110a 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/flowcontrol_client.go +++ b/kubernetes/typed/flowcontrol/v1/flowcontrol_client.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( "net/http" @@ -27,43 +27,43 @@ import ( kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" "k8s.io/client-go/rest" ) -type FlowcontrolV1alpha1ClusterInterface interface { - FlowcontrolV1alpha1ClusterScoper +type FlowcontrolV1ClusterInterface interface { + FlowcontrolV1ClusterScoper FlowSchemasClusterGetter PriorityLevelConfigurationsClusterGetter } -type FlowcontrolV1alpha1ClusterScoper interface { - Cluster(logicalcluster.Path) flowcontrolv1alpha1.FlowcontrolV1alpha1Interface +type FlowcontrolV1ClusterScoper interface { + Cluster(logicalcluster.Path) flowcontrolv1.FlowcontrolV1Interface } -type FlowcontrolV1alpha1ClusterClient struct { - clientCache kcpclient.Cache[*flowcontrolv1alpha1.FlowcontrolV1alpha1Client] +type FlowcontrolV1ClusterClient struct { + clientCache kcpclient.Cache[*flowcontrolv1.FlowcontrolV1Client] } -func (c *FlowcontrolV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1alpha1.FlowcontrolV1alpha1Interface { +func (c *FlowcontrolV1ClusterClient) Cluster(clusterPath logicalcluster.Path) flowcontrolv1.FlowcontrolV1Interface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } return c.clientCache.ClusterOrDie(clusterPath) } -func (c *FlowcontrolV1alpha1ClusterClient) FlowSchemas() FlowSchemaClusterInterface { +func (c *FlowcontrolV1ClusterClient) FlowSchemas() FlowSchemaClusterInterface { return &flowSchemasClusterInterface{clientCache: c.clientCache} } -func (c *FlowcontrolV1alpha1ClusterClient) PriorityLevelConfigurations() PriorityLevelConfigurationClusterInterface { +func (c *FlowcontrolV1ClusterClient) PriorityLevelConfigurations() PriorityLevelConfigurationClusterInterface { return &priorityLevelConfigurationsClusterInterface{clientCache: c.clientCache} } -// NewForConfig creates a new FlowcontrolV1alpha1ClusterClient for the given config. +// NewForConfig creates a new FlowcontrolV1ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*FlowcontrolV1alpha1ClusterClient, error) { +func NewForConfig(c *rest.Config) (*FlowcontrolV1ClusterClient, error) { client, err := rest.HTTPClientFor(c) if err != nil { return nil, err @@ -71,21 +71,21 @@ func NewForConfig(c *rest.Config) (*FlowcontrolV1alpha1ClusterClient, error) { return NewForConfigAndClient(c, client) } -// NewForConfigAndClient creates a new FlowcontrolV1alpha1ClusterClient for the given config and http client. +// NewForConfigAndClient creates a new FlowcontrolV1ClusterClient for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1alpha1ClusterClient, error) { - cache := kcpclient.NewCache(c, h, &kcpclient.Constructor[*flowcontrolv1alpha1.FlowcontrolV1alpha1Client]{ - NewForConfigAndClient: flowcontrolv1alpha1.NewForConfigAndClient, +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlowcontrolV1ClusterClient, error) { + cache := kcpclient.NewCache(c, h, &kcpclient.Constructor[*flowcontrolv1.FlowcontrolV1Client]{ + NewForConfigAndClient: flowcontrolv1.NewForConfigAndClient, }) if _, err := cache.Cluster(logicalcluster.Name("root").Path()); err != nil { return nil, err } - return &FlowcontrolV1alpha1ClusterClient{clientCache: cache}, nil + return &FlowcontrolV1ClusterClient{clientCache: cache}, nil } -// NewForConfigOrDie creates a new FlowcontrolV1alpha1ClusterClient for the given config and +// NewForConfigOrDie creates a new FlowcontrolV1ClusterClient for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1alpha1ClusterClient { +func NewForConfigOrDie(c *rest.Config) *FlowcontrolV1ClusterClient { client, err := NewForConfig(c) if err != nil { panic(err) diff --git a/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go b/kubernetes/typed/flowcontrol/v1/flowschema.go similarity index 79% rename from kubernetes/typed/flowcontrol/v1alpha1/flowschema.go rename to kubernetes/typed/flowcontrol/v1/flowschema.go index e142a2f25..7227d53e1 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/flowschema.go +++ b/kubernetes/typed/flowcontrol/v1/flowschema.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" @@ -27,10 +27,10 @@ import ( kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - flowcontrolv1alpha1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" ) // FlowSchemasClusterGetter has a method to return a FlowSchemaClusterInterface. @@ -40,19 +40,19 @@ type FlowSchemasClusterGetter interface { } // FlowSchemaClusterInterface can operate on FlowSchemas across all clusters, -// or scope down to one cluster and return a flowcontrolv1alpha1client.FlowSchemaInterface. +// or scope down to one cluster and return a flowcontrolv1client.FlowSchemaInterface. type FlowSchemaClusterInterface interface { - Cluster(logicalcluster.Path) flowcontrolv1alpha1client.FlowSchemaInterface - List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.FlowSchemaList, error) + Cluster(logicalcluster.Path) flowcontrolv1client.FlowSchemaInterface + List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.FlowSchemaList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) } type flowSchemasClusterInterface struct { - clientCache kcpclient.Cache[*flowcontrolv1alpha1client.FlowcontrolV1alpha1Client] + clientCache kcpclient.Cache[*flowcontrolv1client.FlowcontrolV1Client] } // Cluster scopes the client down to a particular cluster. -func (c *flowSchemasClusterInterface) Cluster(clusterPath logicalcluster.Path) flowcontrolv1alpha1client.FlowSchemaInterface { +func (c *flowSchemasClusterInterface) Cluster(clusterPath logicalcluster.Path) flowcontrolv1client.FlowSchemaInterface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } @@ -61,7 +61,7 @@ func (c *flowSchemasClusterInterface) Cluster(clusterPath logicalcluster.Path) f } // List returns the entire collection of all FlowSchemas across all clusters. -func (c *flowSchemasClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.FlowSchemaList, error) { +func (c *flowSchemasClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.FlowSchemaList, error) { return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).FlowSchemas().List(ctx, opts) } diff --git a/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go similarity index 78% rename from kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go rename to kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go index a9e4db7a8..3dbf88d26 100644 --- a/kubernetes/typed/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/kubernetes/typed/flowcontrol/v1/prioritylevelconfiguration.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( "context" @@ -27,10 +27,10 @@ import ( kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/watch" - flowcontrolv1alpha1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1alpha1" + flowcontrolv1client "k8s.io/client-go/kubernetes/typed/flowcontrol/v1" ) // PriorityLevelConfigurationsClusterGetter has a method to return a PriorityLevelConfigurationClusterInterface. @@ -40,19 +40,19 @@ type PriorityLevelConfigurationsClusterGetter interface { } // PriorityLevelConfigurationClusterInterface can operate on PriorityLevelConfigurations across all clusters, -// or scope down to one cluster and return a flowcontrolv1alpha1client.PriorityLevelConfigurationInterface. +// or scope down to one cluster and return a flowcontrolv1client.PriorityLevelConfigurationInterface. type PriorityLevelConfigurationClusterInterface interface { - Cluster(logicalcluster.Path) flowcontrolv1alpha1client.PriorityLevelConfigurationInterface - List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.PriorityLevelConfigurationList, error) + Cluster(logicalcluster.Path) flowcontrolv1client.PriorityLevelConfigurationInterface + List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.PriorityLevelConfigurationList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) } type priorityLevelConfigurationsClusterInterface struct { - clientCache kcpclient.Cache[*flowcontrolv1alpha1client.FlowcontrolV1alpha1Client] + clientCache kcpclient.Cache[*flowcontrolv1client.FlowcontrolV1Client] } // Cluster scopes the client down to a particular cluster. -func (c *priorityLevelConfigurationsClusterInterface) Cluster(clusterPath logicalcluster.Path) flowcontrolv1alpha1client.PriorityLevelConfigurationInterface { +func (c *priorityLevelConfigurationsClusterInterface) Cluster(clusterPath logicalcluster.Path) flowcontrolv1client.PriorityLevelConfigurationInterface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } @@ -61,7 +61,7 @@ func (c *priorityLevelConfigurationsClusterInterface) Cluster(clusterPath logica } // List returns the entire collection of all PriorityLevelConfigurations across all clusters. -func (c *priorityLevelConfigurationsClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1alpha1.PriorityLevelConfigurationList, error) { +func (c *priorityLevelConfigurationsClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*flowcontrolv1.PriorityLevelConfigurationList, error) { return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).PriorityLevelConfigurations().List(ctx, opts) } diff --git a/kubernetes/typed/networking/v1alpha1/fake/clustercidr.go b/kubernetes/typed/networking/v1alpha1/fake/clustercidr.go deleted file mode 100644 index 964ba9c15..000000000 --- a/kubernetes/typed/networking/v1alpha1/fake/clustercidr.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - applyconfigurationsnetworkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - networkingv1alpha1client "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - "k8s.io/client-go/testing" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" -) - -var clusterCIDRsResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1alpha1", Resource: "clustercidrs"} -var clusterCIDRsKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1alpha1", Kind: "ClusterCIDR"} - -type clusterCIDRsClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *clusterCIDRsClusterClient) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1client.ClusterCIDRInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &clusterCIDRsClient{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of ClusterCIDRs that match those selectors across all clusters. -func (c *clusterCIDRsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ClusterCIDRList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(clusterCIDRsResource, clusterCIDRsKind, logicalcluster.Wildcard, opts), &networkingv1alpha1.ClusterCIDRList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &networkingv1alpha1.ClusterCIDRList{ListMeta: obj.(*networkingv1alpha1.ClusterCIDRList).ListMeta} - for _, item := range obj.(*networkingv1alpha1.ClusterCIDRList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested ClusterCIDRs across all clusters. -func (c *clusterCIDRsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(clusterCIDRsResource, logicalcluster.Wildcard, opts)) -} - -type clusterCIDRsClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *clusterCIDRsClient) Create(ctx context.Context, clusterCIDR *networkingv1alpha1.ClusterCIDR, opts metav1.CreateOptions) (*networkingv1alpha1.ClusterCIDR, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(clusterCIDRsResource, c.ClusterPath, clusterCIDR), &networkingv1alpha1.ClusterCIDR{}) - if obj == nil { - return nil, err - } - return obj.(*networkingv1alpha1.ClusterCIDR), err -} - -func (c *clusterCIDRsClient) Update(ctx context.Context, clusterCIDR *networkingv1alpha1.ClusterCIDR, opts metav1.UpdateOptions) (*networkingv1alpha1.ClusterCIDR, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(clusterCIDRsResource, c.ClusterPath, clusterCIDR), &networkingv1alpha1.ClusterCIDR{}) - if obj == nil { - return nil, err - } - return obj.(*networkingv1alpha1.ClusterCIDR), err -} - -func (c *clusterCIDRsClient) UpdateStatus(ctx context.Context, clusterCIDR *networkingv1alpha1.ClusterCIDR, opts metav1.UpdateOptions) (*networkingv1alpha1.ClusterCIDR, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(clusterCIDRsResource, c.ClusterPath, "status", clusterCIDR), &networkingv1alpha1.ClusterCIDR{}) - if obj == nil { - return nil, err - } - return obj.(*networkingv1alpha1.ClusterCIDR), err -} - -func (c *clusterCIDRsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(clusterCIDRsResource, c.ClusterPath, name, opts), &networkingv1alpha1.ClusterCIDR{}) - return err -} - -func (c *clusterCIDRsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewRootDeleteCollectionAction(clusterCIDRsResource, c.ClusterPath, listOpts) - - _, err := c.Fake.Invokes(action, &networkingv1alpha1.ClusterCIDRList{}) - return err -} - -func (c *clusterCIDRsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*networkingv1alpha1.ClusterCIDR, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(clusterCIDRsResource, c.ClusterPath, name), &networkingv1alpha1.ClusterCIDR{}) - if obj == nil { - return nil, err - } - return obj.(*networkingv1alpha1.ClusterCIDR), err -} - -// List takes label and field selectors, and returns the list of ClusterCIDRs that match those selectors. -func (c *clusterCIDRsClient) List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ClusterCIDRList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(clusterCIDRsResource, clusterCIDRsKind, c.ClusterPath, opts), &networkingv1alpha1.ClusterCIDRList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &networkingv1alpha1.ClusterCIDRList{ListMeta: obj.(*networkingv1alpha1.ClusterCIDRList).ListMeta} - for _, item := range obj.(*networkingv1alpha1.ClusterCIDRList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *clusterCIDRsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(clusterCIDRsResource, c.ClusterPath, opts)) -} - -func (c *clusterCIDRsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*networkingv1alpha1.ClusterCIDR, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(clusterCIDRsResource, c.ClusterPath, name, pt, data, subresources...), &networkingv1alpha1.ClusterCIDR{}) - if obj == nil { - return nil, err - } - return obj.(*networkingv1alpha1.ClusterCIDR), err -} - -func (c *clusterCIDRsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsnetworkingv1alpha1.ClusterCIDRApplyConfiguration, opts metav1.ApplyOptions) (*networkingv1alpha1.ClusterCIDR, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(clusterCIDRsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &networkingv1alpha1.ClusterCIDR{}) - if obj == nil { - return nil, err - } - return obj.(*networkingv1alpha1.ClusterCIDR), err -} - -func (c *clusterCIDRsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsnetworkingv1alpha1.ClusterCIDRApplyConfiguration, opts metav1.ApplyOptions) (*networkingv1alpha1.ClusterCIDR, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(clusterCIDRsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &networkingv1alpha1.ClusterCIDR{}) - if obj == nil { - return nil, err - } - return obj.(*networkingv1alpha1.ClusterCIDR), err -} diff --git a/kubernetes/typed/networking/v1alpha1/fake/networking_client.go b/kubernetes/typed/networking/v1alpha1/fake/networking_client.go index 7cded12f5..5f9c11148 100644 --- a/kubernetes/typed/networking/v1alpha1/fake/networking_client.go +++ b/kubernetes/typed/networking/v1alpha1/fake/networking_client.go @@ -44,14 +44,14 @@ func (c *NetworkingV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Pat return &NetworkingV1alpha1Client{Fake: c.Fake, ClusterPath: clusterPath} } -func (c *NetworkingV1alpha1ClusterClient) ClusterCIDRs() kcpnetworkingv1alpha1.ClusterCIDRClusterInterface { - return &clusterCIDRsClusterClient{Fake: c.Fake} -} - func (c *NetworkingV1alpha1ClusterClient) IPAddresses() kcpnetworkingv1alpha1.IPAddressClusterInterface { return &iPAddressesClusterClient{Fake: c.Fake} } +func (c *NetworkingV1alpha1ClusterClient) ServiceCIDRs() kcpnetworkingv1alpha1.ServiceCIDRClusterInterface { + return &serviceCIDRsClusterClient{Fake: c.Fake} +} + var _ networkingv1alpha1.NetworkingV1alpha1Interface = (*NetworkingV1alpha1Client)(nil) type NetworkingV1alpha1Client struct { @@ -64,10 +64,10 @@ func (c *NetworkingV1alpha1Client) RESTClient() rest.Interface { return ret } -func (c *NetworkingV1alpha1Client) ClusterCIDRs() networkingv1alpha1.ClusterCIDRInterface { - return &clusterCIDRsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} -} - func (c *NetworkingV1alpha1Client) IPAddresses() networkingv1alpha1.IPAddressInterface { return &iPAddressesClient{Fake: c.Fake, ClusterPath: c.ClusterPath} } + +func (c *NetworkingV1alpha1Client) ServiceCIDRs() networkingv1alpha1.ServiceCIDRInterface { + return &serviceCIDRsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} +} diff --git a/kubernetes/typed/networking/v1alpha1/fake/servicecidr.go b/kubernetes/typed/networking/v1alpha1/fake/servicecidr.go new file mode 100644 index 000000000..a4b1150ba --- /dev/null +++ b/kubernetes/typed/networking/v1alpha1/fake/servicecidr.go @@ -0,0 +1,202 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + networkingv1alpha1 "k8s.io/api/networking/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsnetworkingv1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" + networkingv1alpha1client "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" + "k8s.io/client-go/testing" + + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var serviceCIDRsResource = schema.GroupVersionResource{Group: "networking.k8s.io", Version: "v1alpha1", Resource: "servicecidrs"} +var serviceCIDRsKind = schema.GroupVersionKind{Group: "networking.k8s.io", Version: "v1alpha1", Kind: "ServiceCIDR"} + +type serviceCIDRsClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *serviceCIDRsClusterClient) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1client.ServiceCIDRInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &serviceCIDRsClient{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of ServiceCIDRs that match those selectors across all clusters. +func (c *serviceCIDRsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ServiceCIDRList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(serviceCIDRsResource, serviceCIDRsKind, logicalcluster.Wildcard, opts), &networkingv1alpha1.ServiceCIDRList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &networkingv1alpha1.ServiceCIDRList{ListMeta: obj.(*networkingv1alpha1.ServiceCIDRList).ListMeta} + for _, item := range obj.(*networkingv1alpha1.ServiceCIDRList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ServiceCIDRs across all clusters. +func (c *serviceCIDRsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(serviceCIDRsResource, logicalcluster.Wildcard, opts)) +} + +type serviceCIDRsClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *serviceCIDRsClient) Create(ctx context.Context, serviceCIDR *networkingv1alpha1.ServiceCIDR, opts metav1.CreateOptions) (*networkingv1alpha1.ServiceCIDR, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(serviceCIDRsResource, c.ClusterPath, serviceCIDR), &networkingv1alpha1.ServiceCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1alpha1.ServiceCIDR), err +} + +func (c *serviceCIDRsClient) Update(ctx context.Context, serviceCIDR *networkingv1alpha1.ServiceCIDR, opts metav1.UpdateOptions) (*networkingv1alpha1.ServiceCIDR, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(serviceCIDRsResource, c.ClusterPath, serviceCIDR), &networkingv1alpha1.ServiceCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1alpha1.ServiceCIDR), err +} + +func (c *serviceCIDRsClient) UpdateStatus(ctx context.Context, serviceCIDR *networkingv1alpha1.ServiceCIDR, opts metav1.UpdateOptions) (*networkingv1alpha1.ServiceCIDR, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(serviceCIDRsResource, c.ClusterPath, "status", serviceCIDR), &networkingv1alpha1.ServiceCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1alpha1.ServiceCIDR), err +} + +func (c *serviceCIDRsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(serviceCIDRsResource, c.ClusterPath, name, opts), &networkingv1alpha1.ServiceCIDR{}) + return err +} + +func (c *serviceCIDRsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewRootDeleteCollectionAction(serviceCIDRsResource, c.ClusterPath, listOpts) + + _, err := c.Fake.Invokes(action, &networkingv1alpha1.ServiceCIDRList{}) + return err +} + +func (c *serviceCIDRsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*networkingv1alpha1.ServiceCIDR, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(serviceCIDRsResource, c.ClusterPath, name), &networkingv1alpha1.ServiceCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1alpha1.ServiceCIDR), err +} + +// List takes label and field selectors, and returns the list of ServiceCIDRs that match those selectors. +func (c *serviceCIDRsClient) List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ServiceCIDRList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(serviceCIDRsResource, serviceCIDRsKind, c.ClusterPath, opts), &networkingv1alpha1.ServiceCIDRList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &networkingv1alpha1.ServiceCIDRList{ListMeta: obj.(*networkingv1alpha1.ServiceCIDRList).ListMeta} + for _, item := range obj.(*networkingv1alpha1.ServiceCIDRList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *serviceCIDRsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(serviceCIDRsResource, c.ClusterPath, opts)) +} + +func (c *serviceCIDRsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*networkingv1alpha1.ServiceCIDR, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(serviceCIDRsResource, c.ClusterPath, name, pt, data, subresources...), &networkingv1alpha1.ServiceCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1alpha1.ServiceCIDR), err +} + +func (c *serviceCIDRsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsnetworkingv1alpha1.ServiceCIDRApplyConfiguration, opts metav1.ApplyOptions) (*networkingv1alpha1.ServiceCIDR, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(serviceCIDRsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &networkingv1alpha1.ServiceCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1alpha1.ServiceCIDR), err +} + +func (c *serviceCIDRsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsnetworkingv1alpha1.ServiceCIDRApplyConfiguration, opts metav1.ApplyOptions) (*networkingv1alpha1.ServiceCIDR, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(serviceCIDRsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &networkingv1alpha1.ServiceCIDR{}) + if obj == nil { + return nil, err + } + return obj.(*networkingv1alpha1.ServiceCIDR), err +} diff --git a/kubernetes/typed/networking/v1alpha1/networking_client.go b/kubernetes/typed/networking/v1alpha1/networking_client.go index de97c2313..afe6d0478 100644 --- a/kubernetes/typed/networking/v1alpha1/networking_client.go +++ b/kubernetes/typed/networking/v1alpha1/networking_client.go @@ -33,8 +33,8 @@ import ( type NetworkingV1alpha1ClusterInterface interface { NetworkingV1alpha1ClusterScoper - ClusterCIDRsClusterGetter IPAddressesClusterGetter + ServiceCIDRsClusterGetter } type NetworkingV1alpha1ClusterScoper interface { @@ -52,14 +52,14 @@ func (c *NetworkingV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Pat return c.clientCache.ClusterOrDie(clusterPath) } -func (c *NetworkingV1alpha1ClusterClient) ClusterCIDRs() ClusterCIDRClusterInterface { - return &clusterCIDRsClusterInterface{clientCache: c.clientCache} -} - func (c *NetworkingV1alpha1ClusterClient) IPAddresses() IPAddressClusterInterface { return &iPAddressesClusterInterface{clientCache: c.clientCache} } +func (c *NetworkingV1alpha1ClusterClient) ServiceCIDRs() ServiceCIDRClusterInterface { + return &serviceCIDRsClusterInterface{clientCache: c.clientCache} +} + // NewForConfig creates a new NetworkingV1alpha1ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/kubernetes/typed/networking/v1alpha1/clustercidr.go b/kubernetes/typed/networking/v1alpha1/servicecidr.go similarity index 60% rename from kubernetes/typed/networking/v1alpha1/clustercidr.go rename to kubernetes/typed/networking/v1alpha1/servicecidr.go index c1991e959..c5293df78 100644 --- a/kubernetes/typed/networking/v1alpha1/clustercidr.go +++ b/kubernetes/typed/networking/v1alpha1/servicecidr.go @@ -33,39 +33,39 @@ import ( networkingv1alpha1client "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" ) -// ClusterCIDRsClusterGetter has a method to return a ClusterCIDRClusterInterface. +// ServiceCIDRsClusterGetter has a method to return a ServiceCIDRClusterInterface. // A group's cluster client should implement this interface. -type ClusterCIDRsClusterGetter interface { - ClusterCIDRs() ClusterCIDRClusterInterface +type ServiceCIDRsClusterGetter interface { + ServiceCIDRs() ServiceCIDRClusterInterface } -// ClusterCIDRClusterInterface can operate on ClusterCIDRs across all clusters, -// or scope down to one cluster and return a networkingv1alpha1client.ClusterCIDRInterface. -type ClusterCIDRClusterInterface interface { - Cluster(logicalcluster.Path) networkingv1alpha1client.ClusterCIDRInterface - List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ClusterCIDRList, error) +// ServiceCIDRClusterInterface can operate on ServiceCIDRs across all clusters, +// or scope down to one cluster and return a networkingv1alpha1client.ServiceCIDRInterface. +type ServiceCIDRClusterInterface interface { + Cluster(logicalcluster.Path) networkingv1alpha1client.ServiceCIDRInterface + List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ServiceCIDRList, error) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) } -type clusterCIDRsClusterInterface struct { +type serviceCIDRsClusterInterface struct { clientCache kcpclient.Cache[*networkingv1alpha1client.NetworkingV1alpha1Client] } // Cluster scopes the client down to a particular cluster. -func (c *clusterCIDRsClusterInterface) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1client.ClusterCIDRInterface { +func (c *serviceCIDRsClusterInterface) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1client.ServiceCIDRInterface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } - return c.clientCache.ClusterOrDie(clusterPath).ClusterCIDRs() + return c.clientCache.ClusterOrDie(clusterPath).ServiceCIDRs() } -// List returns the entire collection of all ClusterCIDRs across all clusters. -func (c *clusterCIDRsClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ClusterCIDRList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterCIDRs().List(ctx, opts) +// List returns the entire collection of all ServiceCIDRs across all clusters. +func (c *serviceCIDRsClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*networkingv1alpha1.ServiceCIDRList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ServiceCIDRs().List(ctx, opts) } -// Watch begins to watch all ClusterCIDRs across all clusters. -func (c *clusterCIDRsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ClusterCIDRs().Watch(ctx, opts) +// Watch begins to watch all ServiceCIDRs across all clusters. +func (c *serviceCIDRsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ServiceCIDRs().Watch(ctx, opts) } diff --git a/kubernetes/typed/policy/v1beta1/fake/podsecuritypolicy.go b/kubernetes/typed/policy/v1beta1/fake/podsecuritypolicy.go deleted file mode 100644 index eee24ded5..000000000 --- a/kubernetes/typed/policy/v1beta1/fake/podsecuritypolicy.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by kcp code-generator. DO NOT EDIT. - -package fake - -import ( - "context" - "encoding/json" - "fmt" - - "github.com/kcp-dev/logicalcluster/v3" - - policyv1beta1 "k8s.io/api/policy/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - applyconfigurationspolicyv1beta1 "k8s.io/client-go/applyconfigurations/policy/v1beta1" - policyv1beta1client "k8s.io/client-go/kubernetes/typed/policy/v1beta1" - "k8s.io/client-go/testing" - - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" -) - -var podSecurityPoliciesResource = schema.GroupVersionResource{Group: "policy", Version: "v1beta1", Resource: "podsecuritypolicies"} -var podSecurityPoliciesKind = schema.GroupVersionKind{Group: "policy", Version: "v1beta1", Kind: "PodSecurityPolicy"} - -type podSecurityPoliciesClusterClient struct { - *kcptesting.Fake -} - -// Cluster scopes the client down to a particular cluster. -func (c *podSecurityPoliciesClusterClient) Cluster(clusterPath logicalcluster.Path) policyv1beta1client.PodSecurityPolicyInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return &podSecurityPoliciesClient{Fake: c.Fake, ClusterPath: clusterPath} -} - -// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors across all clusters. -func (c *podSecurityPoliciesClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*policyv1beta1.PodSecurityPolicyList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(podSecurityPoliciesResource, podSecurityPoliciesKind, logicalcluster.Wildcard, opts), &policyv1beta1.PodSecurityPolicyList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &policyv1beta1.PodSecurityPolicyList{ListMeta: obj.(*policyv1beta1.PodSecurityPolicyList).ListMeta} - for _, item := range obj.(*policyv1beta1.PodSecurityPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested PodSecurityPolicies across all clusters. -func (c *podSecurityPoliciesClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(podSecurityPoliciesResource, logicalcluster.Wildcard, opts)) -} - -type podSecurityPoliciesClient struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *podSecurityPoliciesClient) Create(ctx context.Context, podSecurityPolicy *policyv1beta1.PodSecurityPolicy, opts metav1.CreateOptions) (*policyv1beta1.PodSecurityPolicy, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(podSecurityPoliciesResource, c.ClusterPath, podSecurityPolicy), &policyv1beta1.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policyv1beta1.PodSecurityPolicy), err -} - -func (c *podSecurityPoliciesClient) Update(ctx context.Context, podSecurityPolicy *policyv1beta1.PodSecurityPolicy, opts metav1.UpdateOptions) (*policyv1beta1.PodSecurityPolicy, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(podSecurityPoliciesResource, c.ClusterPath, podSecurityPolicy), &policyv1beta1.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policyv1beta1.PodSecurityPolicy), err -} - -func (c *podSecurityPoliciesClient) UpdateStatus(ctx context.Context, podSecurityPolicy *policyv1beta1.PodSecurityPolicy, opts metav1.UpdateOptions) (*policyv1beta1.PodSecurityPolicy, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(podSecurityPoliciesResource, c.ClusterPath, "status", podSecurityPolicy), &policyv1beta1.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policyv1beta1.PodSecurityPolicy), err -} - -func (c *podSecurityPoliciesClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { - _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(podSecurityPoliciesResource, c.ClusterPath, name, opts), &policyv1beta1.PodSecurityPolicy{}) - return err -} - -func (c *podSecurityPoliciesClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { - action := kcptesting.NewRootDeleteCollectionAction(podSecurityPoliciesResource, c.ClusterPath, listOpts) - - _, err := c.Fake.Invokes(action, &policyv1beta1.PodSecurityPolicyList{}) - return err -} - -func (c *podSecurityPoliciesClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*policyv1beta1.PodSecurityPolicy, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(podSecurityPoliciesResource, c.ClusterPath, name), &policyv1beta1.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policyv1beta1.PodSecurityPolicy), err -} - -// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors. -func (c *podSecurityPoliciesClient) List(ctx context.Context, opts metav1.ListOptions) (*policyv1beta1.PodSecurityPolicyList, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(podSecurityPoliciesResource, podSecurityPoliciesKind, c.ClusterPath, opts), &policyv1beta1.PodSecurityPolicyList{}) - if obj == nil { - return nil, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &policyv1beta1.PodSecurityPolicyList{ListMeta: obj.(*policyv1beta1.PodSecurityPolicyList).ListMeta} - for _, item := range obj.(*policyv1beta1.PodSecurityPolicyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -func (c *podSecurityPoliciesClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(podSecurityPoliciesResource, c.ClusterPath, opts)) -} - -func (c *podSecurityPoliciesClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*policyv1beta1.PodSecurityPolicy, error) { - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(podSecurityPoliciesResource, c.ClusterPath, name, pt, data, subresources...), &policyv1beta1.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policyv1beta1.PodSecurityPolicy), err -} - -func (c *podSecurityPoliciesClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationspolicyv1beta1.PodSecurityPolicyApplyConfiguration, opts metav1.ApplyOptions) (*policyv1beta1.PodSecurityPolicy, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(podSecurityPoliciesResource, c.ClusterPath, *name, types.ApplyPatchType, data), &policyv1beta1.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policyv1beta1.PodSecurityPolicy), err -} - -func (c *podSecurityPoliciesClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationspolicyv1beta1.PodSecurityPolicyApplyConfiguration, opts metav1.ApplyOptions) (*policyv1beta1.PodSecurityPolicy, error) { - if applyConfiguration == nil { - return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") - } - data, err := json.Marshal(applyConfiguration) - if err != nil { - return nil, err - } - name := applyConfiguration.Name - if name == nil { - return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") - } - obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(podSecurityPoliciesResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &policyv1beta1.PodSecurityPolicy{}) - if obj == nil { - return nil, err - } - return obj.(*policyv1beta1.PodSecurityPolicy), err -} diff --git a/kubernetes/typed/policy/v1beta1/fake/policy_client.go b/kubernetes/typed/policy/v1beta1/fake/policy_client.go index 6da0ba5cb..81c9715ac 100644 --- a/kubernetes/typed/policy/v1beta1/fake/policy_client.go +++ b/kubernetes/typed/policy/v1beta1/fake/policy_client.go @@ -52,10 +52,6 @@ func (c *PolicyV1beta1ClusterClient) Evictions() kcppolicyv1beta1.EvictionCluste return &evictionsClusterClient{Fake: c.Fake} } -func (c *PolicyV1beta1ClusterClient) PodSecurityPolicies() kcppolicyv1beta1.PodSecurityPolicyClusterInterface { - return &podSecurityPoliciesClusterClient{Fake: c.Fake} -} - var _ policyv1beta1.PolicyV1beta1Interface = (*PolicyV1beta1Client)(nil) type PolicyV1beta1Client struct { @@ -75,7 +71,3 @@ func (c *PolicyV1beta1Client) PodDisruptionBudgets(namespace string) policyv1bet func (c *PolicyV1beta1Client) Evictions(namespace string) policyv1beta1.EvictionInterface { return &evictionsClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} } - -func (c *PolicyV1beta1Client) PodSecurityPolicies() policyv1beta1.PodSecurityPolicyInterface { - return &podSecurityPoliciesClient{Fake: c.Fake, ClusterPath: c.ClusterPath} -} diff --git a/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go b/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go deleted file mode 100644 index 4b4361c1e..000000000 --- a/kubernetes/typed/policy/v1beta1/podsecuritypolicy.go +++ /dev/null @@ -1,71 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by kcp code-generator. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" - - policyv1beta1 "k8s.io/api/policy/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/watch" - policyv1beta1client "k8s.io/client-go/kubernetes/typed/policy/v1beta1" -) - -// PodSecurityPoliciesClusterGetter has a method to return a PodSecurityPolicyClusterInterface. -// A group's cluster client should implement this interface. -type PodSecurityPoliciesClusterGetter interface { - PodSecurityPolicies() PodSecurityPolicyClusterInterface -} - -// PodSecurityPolicyClusterInterface can operate on PodSecurityPolicies across all clusters, -// or scope down to one cluster and return a policyv1beta1client.PodSecurityPolicyInterface. -type PodSecurityPolicyClusterInterface interface { - Cluster(logicalcluster.Path) policyv1beta1client.PodSecurityPolicyInterface - List(ctx context.Context, opts metav1.ListOptions) (*policyv1beta1.PodSecurityPolicyList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type podSecurityPoliciesClusterInterface struct { - clientCache kcpclient.Cache[*policyv1beta1client.PolicyV1beta1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *podSecurityPoliciesClusterInterface) Cluster(clusterPath logicalcluster.Path) policyv1beta1client.PodSecurityPolicyInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return c.clientCache.ClusterOrDie(clusterPath).PodSecurityPolicies() -} - -// List returns the entire collection of all PodSecurityPolicies across all clusters. -func (c *podSecurityPoliciesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*policyv1beta1.PodSecurityPolicyList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).PodSecurityPolicies().List(ctx, opts) -} - -// Watch begins to watch all PodSecurityPolicies across all clusters. -func (c *podSecurityPoliciesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).PodSecurityPolicies().Watch(ctx, opts) -} diff --git a/kubernetes/typed/policy/v1beta1/policy_client.go b/kubernetes/typed/policy/v1beta1/policy_client.go index b0cbd5460..4b2952b30 100644 --- a/kubernetes/typed/policy/v1beta1/policy_client.go +++ b/kubernetes/typed/policy/v1beta1/policy_client.go @@ -35,7 +35,6 @@ type PolicyV1beta1ClusterInterface interface { PolicyV1beta1ClusterScoper PodDisruptionBudgetsClusterGetter EvictionsClusterGetter - PodSecurityPoliciesClusterGetter } type PolicyV1beta1ClusterScoper interface { @@ -61,10 +60,6 @@ func (c *PolicyV1beta1ClusterClient) Evictions() EvictionClusterInterface { return &evictionsClusterInterface{clientCache: c.clientCache} } -func (c *PolicyV1beta1ClusterClient) PodSecurityPolicies() PodSecurityPolicyClusterInterface { - return &podSecurityPoliciesClusterInterface{clientCache: c.clientCache} -} - // NewForConfig creates a new PolicyV1beta1ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/kubernetes/typed/resource/v1alpha2/fake/resource_client.go b/kubernetes/typed/resource/v1alpha2/fake/resource_client.go index 7a49d4d8f..9634c142a 100644 --- a/kubernetes/typed/resource/v1alpha2/fake/resource_client.go +++ b/kubernetes/typed/resource/v1alpha2/fake/resource_client.go @@ -60,6 +60,18 @@ func (c *ResourceV1alpha2ClusterClient) ResourceClaimTemplates() kcpresourcev1al return &resourceClaimTemplatesClusterClient{Fake: c.Fake} } +func (c *ResourceV1alpha2ClusterClient) ResourceSlices() kcpresourcev1alpha2.ResourceSliceClusterInterface { + return &resourceSlicesClusterClient{Fake: c.Fake} +} + +func (c *ResourceV1alpha2ClusterClient) ResourceClaimParameters() kcpresourcev1alpha2.ResourceClaimParametersClusterInterface { + return &resourceClaimParametersClusterClient{Fake: c.Fake} +} + +func (c *ResourceV1alpha2ClusterClient) ResourceClassParameters() kcpresourcev1alpha2.ResourceClassParametersClusterInterface { + return &resourceClassParametersClusterClient{Fake: c.Fake} +} + var _ resourcev1alpha2.ResourceV1alpha2Interface = (*ResourceV1alpha2Client)(nil) type ResourceV1alpha2Client struct { @@ -87,3 +99,15 @@ func (c *ResourceV1alpha2Client) ResourceClasses() resourcev1alpha2.ResourceClas func (c *ResourceV1alpha2Client) ResourceClaimTemplates(namespace string) resourcev1alpha2.ResourceClaimTemplateInterface { return &resourceClaimTemplatesClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} } + +func (c *ResourceV1alpha2Client) ResourceSlices() resourcev1alpha2.ResourceSliceInterface { + return &resourceSlicesClient{Fake: c.Fake, ClusterPath: c.ClusterPath} +} + +func (c *ResourceV1alpha2Client) ResourceClaimParameters(namespace string) resourcev1alpha2.ResourceClaimParametersInterface { + return &resourceClaimParametersClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} +} + +func (c *ResourceV1alpha2Client) ResourceClassParameters(namespace string) resourcev1alpha2.ResourceClassParametersInterface { + return &resourceClassParametersClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} +} diff --git a/kubernetes/typed/resource/v1alpha2/fake/resourceclaimparameters.go b/kubernetes/typed/resource/v1alpha2/fake/resourceclaimparameters.go new file mode 100644 index 000000000..b35bfeaf9 --- /dev/null +++ b/kubernetes/typed/resource/v1alpha2/fake/resourceclaimparameters.go @@ -0,0 +1,213 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsresourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha2client "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + "k8s.io/client-go/testing" + + kcpresourcev1alpha2 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha2" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var resourceClaimParametersResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha2", Resource: "resourceclaimparameters"} +var resourceClaimParametersKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimParameters"} + +type resourceClaimParametersClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *resourceClaimParametersClusterClient) Cluster(clusterPath logicalcluster.Path) kcpresourcev1alpha2.ResourceClaimParametersNamespacer { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &resourceClaimParametersNamespacer{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors across all clusters. +func (c *resourceClaimParametersClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClaimParametersList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewListAction(resourceClaimParametersResource, resourceClaimParametersKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &resourcev1alpha2.ResourceClaimParametersList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &resourcev1alpha2.ResourceClaimParametersList{ListMeta: obj.(*resourcev1alpha2.ResourceClaimParametersList).ListMeta} + for _, item := range obj.(*resourcev1alpha2.ResourceClaimParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ResourceClaimParameters across all clusters. +func (c *resourceClaimParametersClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewWatchAction(resourceClaimParametersResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) +} + +type resourceClaimParametersNamespacer struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (n *resourceClaimParametersNamespacer) Namespace(namespace string) resourcev1alpha2client.ResourceClaimParametersInterface { + return &resourceClaimParametersClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} +} + +type resourceClaimParametersClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path + Namespace string +} + +func (c *resourceClaimParametersClient) Create(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, opts metav1.CreateOptions) (*resourcev1alpha2.ResourceClaimParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, resourceClaimParameters), &resourcev1alpha2.ResourceClaimParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), err +} + +func (c *resourceClaimParametersClient) Update(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, opts metav1.UpdateOptions) (*resourcev1alpha2.ResourceClaimParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, resourceClaimParameters), &resourcev1alpha2.ResourceClaimParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), err +} + +func (c *resourceClaimParametersClient) UpdateStatus(ctx context.Context, resourceClaimParameters *resourcev1alpha2.ResourceClaimParameters, opts metav1.UpdateOptions) (*resourcev1alpha2.ResourceClaimParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(resourceClaimParametersResource, c.ClusterPath, "status", c.Namespace, resourceClaimParameters), &resourcev1alpha2.ResourceClaimParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), err +} + +func (c *resourceClaimParametersClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(resourceClaimParametersResource, c.ClusterPath, c.Namespace, name, opts), &resourcev1alpha2.ResourceClaimParameters{}) + return err +} + +func (c *resourceClaimParametersClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewDeleteCollectionAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, listOpts) + + _, err := c.Fake.Invokes(action, &resourcev1alpha2.ResourceClaimParametersList{}) + return err +} + +func (c *resourceClaimParametersClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*resourcev1alpha2.ResourceClaimParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewGetAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, name), &resourcev1alpha2.ResourceClaimParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), err +} + +// List takes label and field selectors, and returns the list of ResourceClaimParameters that match those selectors. +func (c *resourceClaimParametersClient) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClaimParametersList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewListAction(resourceClaimParametersResource, resourceClaimParametersKind, c.ClusterPath, c.Namespace, opts), &resourcev1alpha2.ResourceClaimParametersList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &resourcev1alpha2.ResourceClaimParametersList{ListMeta: obj.(*resourcev1alpha2.ResourceClaimParametersList).ListMeta} + for _, item := range obj.(*resourcev1alpha2.ResourceClaimParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *resourceClaimParametersClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewWatchAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, opts)) +} + +func (c *resourceClaimParametersClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*resourcev1alpha2.ResourceClaimParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &resourcev1alpha2.ResourceClaimParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), err +} + +func (c *resourceClaimParametersClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsresourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts metav1.ApplyOptions) (*resourcev1alpha2.ResourceClaimParameters, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &resourcev1alpha2.ResourceClaimParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), err +} + +func (c *resourceClaimParametersClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsresourcev1alpha2.ResourceClaimParametersApplyConfiguration, opts metav1.ApplyOptions) (*resourcev1alpha2.ResourceClaimParameters, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(resourceClaimParametersResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &resourcev1alpha2.ResourceClaimParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), err +} diff --git a/kubernetes/typed/resource/v1alpha2/fake/resourceclassparameters.go b/kubernetes/typed/resource/v1alpha2/fake/resourceclassparameters.go new file mode 100644 index 000000000..6c2f50f3d --- /dev/null +++ b/kubernetes/typed/resource/v1alpha2/fake/resourceclassparameters.go @@ -0,0 +1,213 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsresourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha2client "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + "k8s.io/client-go/testing" + + kcpresourcev1alpha2 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha2" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var resourceClassParametersResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha2", Resource: "resourceclassparameters"} +var resourceClassParametersKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClassParameters"} + +type resourceClassParametersClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *resourceClassParametersClusterClient) Cluster(clusterPath logicalcluster.Path) kcpresourcev1alpha2.ResourceClassParametersNamespacer { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &resourceClassParametersNamespacer{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors across all clusters. +func (c *resourceClassParametersClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClassParametersList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewListAction(resourceClassParametersResource, resourceClassParametersKind, logicalcluster.Wildcard, metav1.NamespaceAll, opts), &resourcev1alpha2.ResourceClassParametersList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &resourcev1alpha2.ResourceClassParametersList{ListMeta: obj.(*resourcev1alpha2.ResourceClassParametersList).ListMeta} + for _, item := range obj.(*resourcev1alpha2.ResourceClassParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ResourceClassParameters across all clusters. +func (c *resourceClassParametersClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewWatchAction(resourceClassParametersResource, logicalcluster.Wildcard, metav1.NamespaceAll, opts)) +} + +type resourceClassParametersNamespacer struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (n *resourceClassParametersNamespacer) Namespace(namespace string) resourcev1alpha2client.ResourceClassParametersInterface { + return &resourceClassParametersClient{Fake: n.Fake, ClusterPath: n.ClusterPath, Namespace: namespace} +} + +type resourceClassParametersClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path + Namespace string +} + +func (c *resourceClassParametersClient) Create(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParameters, opts metav1.CreateOptions) (*resourcev1alpha2.ResourceClassParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewCreateAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, resourceClassParameters), &resourcev1alpha2.ResourceClassParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClassParameters), err +} + +func (c *resourceClassParametersClient) Update(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParameters, opts metav1.UpdateOptions) (*resourcev1alpha2.ResourceClassParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewUpdateAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, resourceClassParameters), &resourcev1alpha2.ResourceClassParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClassParameters), err +} + +func (c *resourceClassParametersClient) UpdateStatus(ctx context.Context, resourceClassParameters *resourcev1alpha2.ResourceClassParameters, opts metav1.UpdateOptions) (*resourcev1alpha2.ResourceClassParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewUpdateSubresourceAction(resourceClassParametersResource, c.ClusterPath, "status", c.Namespace, resourceClassParameters), &resourcev1alpha2.ResourceClassParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClassParameters), err +} + +func (c *resourceClassParametersClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewDeleteActionWithOptions(resourceClassParametersResource, c.ClusterPath, c.Namespace, name, opts), &resourcev1alpha2.ResourceClassParameters{}) + return err +} + +func (c *resourceClassParametersClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewDeleteCollectionAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, listOpts) + + _, err := c.Fake.Invokes(action, &resourcev1alpha2.ResourceClassParametersList{}) + return err +} + +func (c *resourceClassParametersClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*resourcev1alpha2.ResourceClassParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewGetAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, name), &resourcev1alpha2.ResourceClassParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClassParameters), err +} + +// List takes label and field selectors, and returns the list of ResourceClassParameters that match those selectors. +func (c *resourceClassParametersClient) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClassParametersList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewListAction(resourceClassParametersResource, resourceClassParametersKind, c.ClusterPath, c.Namespace, opts), &resourcev1alpha2.ResourceClassParametersList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &resourcev1alpha2.ResourceClassParametersList{ListMeta: obj.(*resourcev1alpha2.ResourceClassParametersList).ListMeta} + for _, item := range obj.(*resourcev1alpha2.ResourceClassParametersList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *resourceClassParametersClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewWatchAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, opts)) +} + +func (c *resourceClassParametersClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*resourcev1alpha2.ResourceClassParameters, error) { + obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, name, pt, data, subresources...), &resourcev1alpha2.ResourceClassParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClassParameters), err +} + +func (c *resourceClassParametersClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsresourcev1alpha2.ResourceClassParametersApplyConfiguration, opts metav1.ApplyOptions) (*resourcev1alpha2.ResourceClassParameters, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data), &resourcev1alpha2.ResourceClassParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClassParameters), err +} + +func (c *resourceClassParametersClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsresourcev1alpha2.ResourceClassParametersApplyConfiguration, opts metav1.ApplyOptions) (*resourcev1alpha2.ResourceClassParameters, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewPatchSubresourceAction(resourceClassParametersResource, c.ClusterPath, c.Namespace, *name, types.ApplyPatchType, data, "status"), &resourcev1alpha2.ResourceClassParameters{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceClassParameters), err +} diff --git a/kubernetes/typed/resource/v1alpha2/fake/resourceslice.go b/kubernetes/typed/resource/v1alpha2/fake/resourceslice.go new file mode 100644 index 000000000..e11a281cd --- /dev/null +++ b/kubernetes/typed/resource/v1alpha2/fake/resourceslice.go @@ -0,0 +1,202 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsresourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2" + resourcev1alpha2client "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" + "k8s.io/client-go/testing" + + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var resourceSlicesResource = schema.GroupVersionResource{Group: "resource.k8s.io", Version: "v1alpha2", Resource: "resourceslices"} +var resourceSlicesKind = schema.GroupVersionKind{Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceSlice"} + +type resourceSlicesClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *resourceSlicesClusterClient) Cluster(clusterPath logicalcluster.Path) resourcev1alpha2client.ResourceSliceInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &resourceSlicesClient{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors across all clusters. +func (c *resourceSlicesClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceSliceList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(resourceSlicesResource, resourceSlicesKind, logicalcluster.Wildcard, opts), &resourcev1alpha2.ResourceSliceList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &resourcev1alpha2.ResourceSliceList{ListMeta: obj.(*resourcev1alpha2.ResourceSliceList).ListMeta} + for _, item := range obj.(*resourcev1alpha2.ResourceSliceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested ResourceSlices across all clusters. +func (c *resourceSlicesClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(resourceSlicesResource, logicalcluster.Wildcard, opts)) +} + +type resourceSlicesClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *resourceSlicesClient) Create(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSlice, opts metav1.CreateOptions) (*resourcev1alpha2.ResourceSlice, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(resourceSlicesResource, c.ClusterPath, resourceSlice), &resourcev1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceSlice), err +} + +func (c *resourceSlicesClient) Update(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSlice, opts metav1.UpdateOptions) (*resourcev1alpha2.ResourceSlice, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(resourceSlicesResource, c.ClusterPath, resourceSlice), &resourcev1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceSlice), err +} + +func (c *resourceSlicesClient) UpdateStatus(ctx context.Context, resourceSlice *resourcev1alpha2.ResourceSlice, opts metav1.UpdateOptions) (*resourcev1alpha2.ResourceSlice, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(resourceSlicesResource, c.ClusterPath, "status", resourceSlice), &resourcev1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceSlice), err +} + +func (c *resourceSlicesClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(resourceSlicesResource, c.ClusterPath, name, opts), &resourcev1alpha2.ResourceSlice{}) + return err +} + +func (c *resourceSlicesClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewRootDeleteCollectionAction(resourceSlicesResource, c.ClusterPath, listOpts) + + _, err := c.Fake.Invokes(action, &resourcev1alpha2.ResourceSliceList{}) + return err +} + +func (c *resourceSlicesClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*resourcev1alpha2.ResourceSlice, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(resourceSlicesResource, c.ClusterPath, name), &resourcev1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceSlice), err +} + +// List takes label and field selectors, and returns the list of ResourceSlices that match those selectors. +func (c *resourceSlicesClient) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceSliceList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(resourceSlicesResource, resourceSlicesKind, c.ClusterPath, opts), &resourcev1alpha2.ResourceSliceList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &resourcev1alpha2.ResourceSliceList{ListMeta: obj.(*resourcev1alpha2.ResourceSliceList).ListMeta} + for _, item := range obj.(*resourcev1alpha2.ResourceSliceList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *resourceSlicesClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(resourceSlicesResource, c.ClusterPath, opts)) +} + +func (c *resourceSlicesClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*resourcev1alpha2.ResourceSlice, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(resourceSlicesResource, c.ClusterPath, name, pt, data, subresources...), &resourcev1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceSlice), err +} + +func (c *resourceSlicesClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsresourcev1alpha2.ResourceSliceApplyConfiguration, opts metav1.ApplyOptions) (*resourcev1alpha2.ResourceSlice, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(resourceSlicesResource, c.ClusterPath, *name, types.ApplyPatchType, data), &resourcev1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceSlice), err +} + +func (c *resourceSlicesClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsresourcev1alpha2.ResourceSliceApplyConfiguration, opts metav1.ApplyOptions) (*resourcev1alpha2.ResourceSlice, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(resourceSlicesResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &resourcev1alpha2.ResourceSlice{}) + if obj == nil { + return nil, err + } + return obj.(*resourcev1alpha2.ResourceSlice), err +} diff --git a/kubernetes/typed/resource/v1alpha2/resource_client.go b/kubernetes/typed/resource/v1alpha2/resource_client.go index df1c0e366..aece24fe2 100644 --- a/kubernetes/typed/resource/v1alpha2/resource_client.go +++ b/kubernetes/typed/resource/v1alpha2/resource_client.go @@ -37,6 +37,9 @@ type ResourceV1alpha2ClusterInterface interface { PodSchedulingContextsClusterGetter ResourceClassesClusterGetter ResourceClaimTemplatesClusterGetter + ResourceSlicesClusterGetter + ResourceClaimParametersClusterGetter + ResourceClassParametersClusterGetter } type ResourceV1alpha2ClusterScoper interface { @@ -70,6 +73,18 @@ func (c *ResourceV1alpha2ClusterClient) ResourceClaimTemplates() ResourceClaimTe return &resourceClaimTemplatesClusterInterface{clientCache: c.clientCache} } +func (c *ResourceV1alpha2ClusterClient) ResourceSlices() ResourceSliceClusterInterface { + return &resourceSlicesClusterInterface{clientCache: c.clientCache} +} + +func (c *ResourceV1alpha2ClusterClient) ResourceClaimParameters() ResourceClaimParametersClusterInterface { + return &resourceClaimParametersClusterInterface{clientCache: c.clientCache} +} + +func (c *ResourceV1alpha2ClusterClient) ResourceClassParameters() ResourceClassParametersClusterInterface { + return &resourceClassParametersClusterInterface{clientCache: c.clientCache} +} + // NewForConfig creates a new ResourceV1alpha2ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go b/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 000000000..90968b4ec --- /dev/null +++ b/kubernetes/typed/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,85 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2client "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" +) + +// ResourceClaimParametersClusterGetter has a method to return a ResourceClaimParametersClusterInterface. +// A group's cluster client should implement this interface. +type ResourceClaimParametersClusterGetter interface { + ResourceClaimParameters() ResourceClaimParametersClusterInterface +} + +// ResourceClaimParametersClusterInterface can operate on ResourceClaimParameters across all clusters, +// or scope down to one cluster and return a ResourceClaimParametersNamespacer. +type ResourceClaimParametersClusterInterface interface { + Cluster(logicalcluster.Path) ResourceClaimParametersNamespacer + List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClaimParametersList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) +} + +type resourceClaimParametersClusterInterface struct { + clientCache kcpclient.Cache[*resourcev1alpha2client.ResourceV1alpha2Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *resourceClaimParametersClusterInterface) Cluster(clusterPath logicalcluster.Path) ResourceClaimParametersNamespacer { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &resourceClaimParametersNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} +} + +// List returns the entire collection of all ResourceClaimParameters across all clusters. +func (c *resourceClaimParametersClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClaimParametersList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaimParameters(metav1.NamespaceAll).List(ctx, opts) +} + +// Watch begins to watch all ResourceClaimParameters across all clusters. +func (c *resourceClaimParametersClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaimParameters(metav1.NamespaceAll).Watch(ctx, opts) +} + +// ResourceClaimParametersNamespacer can scope to objects within a namespace, returning a resourcev1alpha2client.ResourceClaimParametersInterface. +type ResourceClaimParametersNamespacer interface { + Namespace(string) resourcev1alpha2client.ResourceClaimParametersInterface +} + +type resourceClaimParametersNamespacer struct { + clientCache kcpclient.Cache[*resourcev1alpha2client.ResourceV1alpha2Client] + clusterPath logicalcluster.Path +} + +func (n *resourceClaimParametersNamespacer) Namespace(namespace string) resourcev1alpha2client.ResourceClaimParametersInterface { + return n.clientCache.ClusterOrDie(n.clusterPath).ResourceClaimParameters(namespace) +} diff --git a/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go b/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 000000000..e2f9c5e54 --- /dev/null +++ b/kubernetes/typed/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,85 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2client "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" +) + +// ResourceClassParametersClusterGetter has a method to return a ResourceClassParametersClusterInterface. +// A group's cluster client should implement this interface. +type ResourceClassParametersClusterGetter interface { + ResourceClassParameters() ResourceClassParametersClusterInterface +} + +// ResourceClassParametersClusterInterface can operate on ResourceClassParameters across all clusters, +// or scope down to one cluster and return a ResourceClassParametersNamespacer. +type ResourceClassParametersClusterInterface interface { + Cluster(logicalcluster.Path) ResourceClassParametersNamespacer + List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClassParametersList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) +} + +type resourceClassParametersClusterInterface struct { + clientCache kcpclient.Cache[*resourcev1alpha2client.ResourceV1alpha2Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *resourceClassParametersClusterInterface) Cluster(clusterPath logicalcluster.Path) ResourceClassParametersNamespacer { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &resourceClassParametersNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} +} + +// List returns the entire collection of all ResourceClassParameters across all clusters. +func (c *resourceClassParametersClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceClassParametersList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClassParameters(metav1.NamespaceAll).List(ctx, opts) +} + +// Watch begins to watch all ResourceClassParameters across all clusters. +func (c *resourceClassParametersClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClassParameters(metav1.NamespaceAll).Watch(ctx, opts) +} + +// ResourceClassParametersNamespacer can scope to objects within a namespace, returning a resourcev1alpha2client.ResourceClassParametersInterface. +type ResourceClassParametersNamespacer interface { + Namespace(string) resourcev1alpha2client.ResourceClassParametersInterface +} + +type resourceClassParametersNamespacer struct { + clientCache kcpclient.Cache[*resourcev1alpha2client.ResourceV1alpha2Client] + clusterPath logicalcluster.Path +} + +func (n *resourceClassParametersNamespacer) Namespace(namespace string) resourcev1alpha2client.ResourceClassParametersInterface { + return n.clientCache.ClusterOrDie(n.clusterPath).ResourceClassParameters(namespace) +} diff --git a/kubernetes/typed/resource/v1alpha2/resourceslice.go b/kubernetes/typed/resource/v1alpha2/resourceslice.go new file mode 100644 index 000000000..07c324114 --- /dev/null +++ b/kubernetes/typed/resource/v1alpha2/resourceslice.go @@ -0,0 +1,71 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +import ( + "context" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + resourcev1alpha2client "k8s.io/client-go/kubernetes/typed/resource/v1alpha2" +) + +// ResourceSlicesClusterGetter has a method to return a ResourceSliceClusterInterface. +// A group's cluster client should implement this interface. +type ResourceSlicesClusterGetter interface { + ResourceSlices() ResourceSliceClusterInterface +} + +// ResourceSliceClusterInterface can operate on ResourceSlices across all clusters, +// or scope down to one cluster and return a resourcev1alpha2client.ResourceSliceInterface. +type ResourceSliceClusterInterface interface { + Cluster(logicalcluster.Path) resourcev1alpha2client.ResourceSliceInterface + List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceSliceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) +} + +type resourceSlicesClusterInterface struct { + clientCache kcpclient.Cache[*resourcev1alpha2client.ResourceV1alpha2Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *resourceSlicesClusterInterface) Cluster(clusterPath logicalcluster.Path) resourcev1alpha2client.ResourceSliceInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).ResourceSlices() +} + +// List returns the entire collection of all ResourceSlices across all clusters. +func (c *resourceSlicesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1alpha2.ResourceSliceList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceSlices().List(ctx, opts) +} + +// Watch begins to watch all ResourceSlices across all clusters. +func (c *resourceSlicesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceSlices().Watch(ctx, opts) +} diff --git a/kubernetes/typed/storage/v1alpha1/fake/storage_client.go b/kubernetes/typed/storage/v1alpha1/fake/storage_client.go index ac57d3056..f61f006fe 100644 --- a/kubernetes/typed/storage/v1alpha1/fake/storage_client.go +++ b/kubernetes/typed/storage/v1alpha1/fake/storage_client.go @@ -52,6 +52,10 @@ func (c *StorageV1alpha1ClusterClient) CSIStorageCapacities() kcpstoragev1alpha1 return &cSIStorageCapacitiesClusterClient{Fake: c.Fake} } +func (c *StorageV1alpha1ClusterClient) VolumeAttributesClasses() kcpstoragev1alpha1.VolumeAttributesClassClusterInterface { + return &volumeAttributesClassesClusterClient{Fake: c.Fake} +} + var _ storagev1alpha1.StorageV1alpha1Interface = (*StorageV1alpha1Client)(nil) type StorageV1alpha1Client struct { @@ -71,3 +75,7 @@ func (c *StorageV1alpha1Client) VolumeAttachments() storagev1alpha1.VolumeAttach func (c *StorageV1alpha1Client) CSIStorageCapacities(namespace string) storagev1alpha1.CSIStorageCapacityInterface { return &cSIStorageCapacitiesClient{Fake: c.Fake, ClusterPath: c.ClusterPath, Namespace: namespace} } + +func (c *StorageV1alpha1Client) VolumeAttributesClasses() storagev1alpha1.VolumeAttributesClassInterface { + return &volumeAttributesClassesClient{Fake: c.Fake, ClusterPath: c.ClusterPath} +} diff --git a/kubernetes/typed/storage/v1alpha1/fake/volumeattributesclass.go b/kubernetes/typed/storage/v1alpha1/fake/volumeattributesclass.go new file mode 100644 index 000000000..94d5c245f --- /dev/null +++ b/kubernetes/typed/storage/v1alpha1/fake/volumeattributesclass.go @@ -0,0 +1,202 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragev1alpha1 "k8s.io/client-go/applyconfigurations/storage/v1alpha1" + storagev1alpha1client "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" + "k8s.io/client-go/testing" + + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var volumeAttributesClassesResource = schema.GroupVersionResource{Group: "storage.k8s.io", Version: "v1alpha1", Resource: "volumeattributesclasses"} +var volumeAttributesClassesKind = schema.GroupVersionKind{Group: "storage.k8s.io", Version: "v1alpha1", Kind: "VolumeAttributesClass"} + +type volumeAttributesClassesClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *volumeAttributesClassesClusterClient) Cluster(clusterPath logicalcluster.Path) storagev1alpha1client.VolumeAttributesClassInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &volumeAttributesClassesClient{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of VolumeAttributesClasses that match those selectors across all clusters. +func (c *volumeAttributesClassesClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*storagev1alpha1.VolumeAttributesClassList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(volumeAttributesClassesResource, volumeAttributesClassesKind, logicalcluster.Wildcard, opts), &storagev1alpha1.VolumeAttributesClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1alpha1.VolumeAttributesClassList{ListMeta: obj.(*storagev1alpha1.VolumeAttributesClassList).ListMeta} + for _, item := range obj.(*storagev1alpha1.VolumeAttributesClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested VolumeAttributesClasses across all clusters. +func (c *volumeAttributesClassesClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(volumeAttributesClassesResource, logicalcluster.Wildcard, opts)) +} + +type volumeAttributesClassesClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *volumeAttributesClassesClient) Create(ctx context.Context, volumeAttributesClass *storagev1alpha1.VolumeAttributesClass, opts metav1.CreateOptions) (*storagev1alpha1.VolumeAttributesClass, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(volumeAttributesClassesResource, c.ClusterPath, volumeAttributesClass), &storagev1alpha1.VolumeAttributesClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1alpha1.VolumeAttributesClass), err +} + +func (c *volumeAttributesClassesClient) Update(ctx context.Context, volumeAttributesClass *storagev1alpha1.VolumeAttributesClass, opts metav1.UpdateOptions) (*storagev1alpha1.VolumeAttributesClass, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(volumeAttributesClassesResource, c.ClusterPath, volumeAttributesClass), &storagev1alpha1.VolumeAttributesClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1alpha1.VolumeAttributesClass), err +} + +func (c *volumeAttributesClassesClient) UpdateStatus(ctx context.Context, volumeAttributesClass *storagev1alpha1.VolumeAttributesClass, opts metav1.UpdateOptions) (*storagev1alpha1.VolumeAttributesClass, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(volumeAttributesClassesResource, c.ClusterPath, "status", volumeAttributesClass), &storagev1alpha1.VolumeAttributesClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1alpha1.VolumeAttributesClass), err +} + +func (c *volumeAttributesClassesClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(volumeAttributesClassesResource, c.ClusterPath, name, opts), &storagev1alpha1.VolumeAttributesClass{}) + return err +} + +func (c *volumeAttributesClassesClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewRootDeleteCollectionAction(volumeAttributesClassesResource, c.ClusterPath, listOpts) + + _, err := c.Fake.Invokes(action, &storagev1alpha1.VolumeAttributesClassList{}) + return err +} + +func (c *volumeAttributesClassesClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*storagev1alpha1.VolumeAttributesClass, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(volumeAttributesClassesResource, c.ClusterPath, name), &storagev1alpha1.VolumeAttributesClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1alpha1.VolumeAttributesClass), err +} + +// List takes label and field selectors, and returns the list of VolumeAttributesClasses that match those selectors. +func (c *volumeAttributesClassesClient) List(ctx context.Context, opts metav1.ListOptions) (*storagev1alpha1.VolumeAttributesClassList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(volumeAttributesClassesResource, volumeAttributesClassesKind, c.ClusterPath, opts), &storagev1alpha1.VolumeAttributesClassList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagev1alpha1.VolumeAttributesClassList{ListMeta: obj.(*storagev1alpha1.VolumeAttributesClassList).ListMeta} + for _, item := range obj.(*storagev1alpha1.VolumeAttributesClassList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *volumeAttributesClassesClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(volumeAttributesClassesResource, c.ClusterPath, opts)) +} + +func (c *volumeAttributesClassesClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*storagev1alpha1.VolumeAttributesClass, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(volumeAttributesClassesResource, c.ClusterPath, name, pt, data, subresources...), &storagev1alpha1.VolumeAttributesClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1alpha1.VolumeAttributesClass), err +} + +func (c *volumeAttributesClassesClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsstoragev1alpha1.VolumeAttributesClassApplyConfiguration, opts metav1.ApplyOptions) (*storagev1alpha1.VolumeAttributesClass, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(volumeAttributesClassesResource, c.ClusterPath, *name, types.ApplyPatchType, data), &storagev1alpha1.VolumeAttributesClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1alpha1.VolumeAttributesClass), err +} + +func (c *volumeAttributesClassesClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsstoragev1alpha1.VolumeAttributesClassApplyConfiguration, opts metav1.ApplyOptions) (*storagev1alpha1.VolumeAttributesClass, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(volumeAttributesClassesResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &storagev1alpha1.VolumeAttributesClass{}) + if obj == nil { + return nil, err + } + return obj.(*storagev1alpha1.VolumeAttributesClass), err +} diff --git a/kubernetes/typed/storage/v1alpha1/storage_client.go b/kubernetes/typed/storage/v1alpha1/storage_client.go index 034d48373..2a4c901d9 100644 --- a/kubernetes/typed/storage/v1alpha1/storage_client.go +++ b/kubernetes/typed/storage/v1alpha1/storage_client.go @@ -35,6 +35,7 @@ type StorageV1alpha1ClusterInterface interface { StorageV1alpha1ClusterScoper VolumeAttachmentsClusterGetter CSIStorageCapacitiesClusterGetter + VolumeAttributesClassesClusterGetter } type StorageV1alpha1ClusterScoper interface { @@ -60,6 +61,10 @@ func (c *StorageV1alpha1ClusterClient) CSIStorageCapacities() CSIStorageCapacity return &cSIStorageCapacitiesClusterInterface{clientCache: c.clientCache} } +func (c *StorageV1alpha1ClusterClient) VolumeAttributesClasses() VolumeAttributesClassClusterInterface { + return &volumeAttributesClassesClusterInterface{clientCache: c.clientCache} +} + // NewForConfig creates a new StorageV1alpha1ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go b/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go new file mode 100644 index 000000000..f4536e396 --- /dev/null +++ b/kubernetes/typed/storage/v1alpha1/volumeattributesclass.go @@ -0,0 +1,71 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + storagev1alpha1client "k8s.io/client-go/kubernetes/typed/storage/v1alpha1" +) + +// VolumeAttributesClassesClusterGetter has a method to return a VolumeAttributesClassClusterInterface. +// A group's cluster client should implement this interface. +type VolumeAttributesClassesClusterGetter interface { + VolumeAttributesClasses() VolumeAttributesClassClusterInterface +} + +// VolumeAttributesClassClusterInterface can operate on VolumeAttributesClasses across all clusters, +// or scope down to one cluster and return a storagev1alpha1client.VolumeAttributesClassInterface. +type VolumeAttributesClassClusterInterface interface { + Cluster(logicalcluster.Path) storagev1alpha1client.VolumeAttributesClassInterface + List(ctx context.Context, opts metav1.ListOptions) (*storagev1alpha1.VolumeAttributesClassList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) +} + +type volumeAttributesClassesClusterInterface struct { + clientCache kcpclient.Cache[*storagev1alpha1client.StorageV1alpha1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *volumeAttributesClassesClusterInterface) Cluster(clusterPath logicalcluster.Path) storagev1alpha1client.VolumeAttributesClassInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).VolumeAttributesClasses() +} + +// List returns the entire collection of all VolumeAttributesClasses across all clusters. +func (c *volumeAttributesClassesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*storagev1alpha1.VolumeAttributesClassList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).VolumeAttributesClasses().List(ctx, opts) +} + +// Watch begins to watch all VolumeAttributesClasses across all clusters. +func (c *volumeAttributesClassesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).VolumeAttributesClasses().Watch(ctx, opts) +} diff --git a/kubernetes/typed/storagemigration/v1alpha1/fake/storagemigration_client.go b/kubernetes/typed/storagemigration/v1alpha1/fake/storagemigration_client.go new file mode 100644 index 000000000..89fdc291e --- /dev/null +++ b/kubernetes/typed/storagemigration/v1alpha1/fake/storagemigration_client.go @@ -0,0 +1,65 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "github.com/kcp-dev/logicalcluster/v3" + + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + "k8s.io/client-go/rest" + + kcpstoragemigrationv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/storagemigration/v1alpha1" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var _ kcpstoragemigrationv1alpha1.StoragemigrationV1alpha1ClusterInterface = (*StoragemigrationV1alpha1ClusterClient)(nil) + +type StoragemigrationV1alpha1ClusterClient struct { + *kcptesting.Fake +} + +func (c *StoragemigrationV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + return &StoragemigrationV1alpha1Client{Fake: c.Fake, ClusterPath: clusterPath} +} + +func (c *StoragemigrationV1alpha1ClusterClient) StorageVersionMigrations() kcpstoragemigrationv1alpha1.StorageVersionMigrationClusterInterface { + return &storageVersionMigrationsClusterClient{Fake: c.Fake} +} + +var _ storagemigrationv1alpha1.StoragemigrationV1alpha1Interface = (*StoragemigrationV1alpha1Client)(nil) + +type StoragemigrationV1alpha1Client struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *StoragemigrationV1alpha1Client) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} + +func (c *StoragemigrationV1alpha1Client) StorageVersionMigrations() storagemigrationv1alpha1.StorageVersionMigrationInterface { + return &storageVersionMigrationsClient{Fake: c.Fake, ClusterPath: c.ClusterPath} +} diff --git a/kubernetes/typed/storagemigration/v1alpha1/fake/storageversionmigration.go b/kubernetes/typed/storagemigration/v1alpha1/fake/storageversionmigration.go new file mode 100644 index 000000000..9867a25f2 --- /dev/null +++ b/kubernetes/typed/storagemigration/v1alpha1/fake/storageversionmigration.go @@ -0,0 +1,202 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package fake + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/kcp-dev/logicalcluster/v3" + + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + applyconfigurationsstoragemigrationv1alpha1 "k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1" + storagemigrationv1alpha1client "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + "k8s.io/client-go/testing" + + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" +) + +var storageVersionMigrationsResource = schema.GroupVersionResource{Group: "storagemigration.k8s.io", Version: "v1alpha1", Resource: "storageversionmigrations"} +var storageVersionMigrationsKind = schema.GroupVersionKind{Group: "storagemigration.k8s.io", Version: "v1alpha1", Kind: "StorageVersionMigration"} + +type storageVersionMigrationsClusterClient struct { + *kcptesting.Fake +} + +// Cluster scopes the client down to a particular cluster. +func (c *storageVersionMigrationsClusterClient) Cluster(clusterPath logicalcluster.Path) storagemigrationv1alpha1client.StorageVersionMigrationInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &storageVersionMigrationsClient{Fake: c.Fake, ClusterPath: clusterPath} +} + +// List takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors across all clusters. +func (c *storageVersionMigrationsClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*storagemigrationv1alpha1.StorageVersionMigrationList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(storageVersionMigrationsResource, storageVersionMigrationsKind, logicalcluster.Wildcard, opts), &storagemigrationv1alpha1.StorageVersionMigrationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagemigrationv1alpha1.StorageVersionMigrationList{ListMeta: obj.(*storagemigrationv1alpha1.StorageVersionMigrationList).ListMeta} + for _, item := range obj.(*storagemigrationv1alpha1.StorageVersionMigrationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested StorageVersionMigrations across all clusters. +func (c *storageVersionMigrationsClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(storageVersionMigrationsResource, logicalcluster.Wildcard, opts)) +} + +type storageVersionMigrationsClient struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *storageVersionMigrationsClient) Create(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, opts metav1.CreateOptions) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootCreateAction(storageVersionMigrationsResource, c.ClusterPath, storageVersionMigration), &storagemigrationv1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), err +} + +func (c *storageVersionMigrationsClient) Update(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, opts metav1.UpdateOptions) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateAction(storageVersionMigrationsResource, c.ClusterPath, storageVersionMigration), &storagemigrationv1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), err +} + +func (c *storageVersionMigrationsClient) UpdateStatus(ctx context.Context, storageVersionMigration *storagemigrationv1alpha1.StorageVersionMigration, opts metav1.UpdateOptions) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootUpdateSubresourceAction(storageVersionMigrationsResource, c.ClusterPath, "status", storageVersionMigration), &storagemigrationv1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), err +} + +func (c *storageVersionMigrationsClient) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error { + _, err := c.Fake.Invokes(kcptesting.NewRootDeleteActionWithOptions(storageVersionMigrationsResource, c.ClusterPath, name, opts), &storagemigrationv1alpha1.StorageVersionMigration{}) + return err +} + +func (c *storageVersionMigrationsClient) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error { + action := kcptesting.NewRootDeleteCollectionAction(storageVersionMigrationsResource, c.ClusterPath, listOpts) + + _, err := c.Fake.Invokes(action, &storagemigrationv1alpha1.StorageVersionMigrationList{}) + return err +} + +func (c *storageVersionMigrationsClient) Get(ctx context.Context, name string, options metav1.GetOptions) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootGetAction(storageVersionMigrationsResource, c.ClusterPath, name), &storagemigrationv1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), err +} + +// List takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors. +func (c *storageVersionMigrationsClient) List(ctx context.Context, opts metav1.ListOptions) (*storagemigrationv1alpha1.StorageVersionMigrationList, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootListAction(storageVersionMigrationsResource, storageVersionMigrationsKind, c.ClusterPath, opts), &storagemigrationv1alpha1.StorageVersionMigrationList{}) + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &storagemigrationv1alpha1.StorageVersionMigrationList{ListMeta: obj.(*storagemigrationv1alpha1.StorageVersionMigrationList).ListMeta} + for _, item := range obj.(*storagemigrationv1alpha1.StorageVersionMigrationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +func (c *storageVersionMigrationsClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.Fake.InvokesWatch(kcptesting.NewRootWatchAction(storageVersionMigrationsResource, c.ClusterPath, opts)) +} + +func (c *storageVersionMigrationsClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(storageVersionMigrationsResource, c.ClusterPath, name, pt, data, subresources...), &storagemigrationv1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), err +} + +func (c *storageVersionMigrationsClient) Apply(ctx context.Context, applyConfiguration *applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts metav1.ApplyOptions) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(storageVersionMigrationsResource, c.ClusterPath, *name, types.ApplyPatchType, data), &storagemigrationv1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), err +} + +func (c *storageVersionMigrationsClient) ApplyStatus(ctx context.Context, applyConfiguration *applyconfigurationsstoragemigrationv1alpha1.StorageVersionMigrationApplyConfiguration, opts metav1.ApplyOptions) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + if applyConfiguration == nil { + return nil, fmt.Errorf("applyConfiguration provided to Apply must not be nil") + } + data, err := json.Marshal(applyConfiguration) + if err != nil { + return nil, err + } + name := applyConfiguration.Name + if name == nil { + return nil, fmt.Errorf("applyConfiguration.Name must be provided to Apply") + } + obj, err := c.Fake.Invokes(kcptesting.NewRootPatchSubresourceAction(storageVersionMigrationsResource, c.ClusterPath, *name, types.ApplyPatchType, data, "status"), &storagemigrationv1alpha1.StorageVersionMigration{}) + if obj == nil { + return nil, err + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), err +} diff --git a/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go b/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go new file mode 100644 index 000000000..16ac624c3 --- /dev/null +++ b/kubernetes/typed/storagemigration/v1alpha1/storagemigration_client.go @@ -0,0 +1,89 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + storagemigrationv1alpha1 "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" + "k8s.io/client-go/rest" +) + +type StoragemigrationV1alpha1ClusterInterface interface { + StoragemigrationV1alpha1ClusterScoper + StorageVersionMigrationsClusterGetter +} + +type StoragemigrationV1alpha1ClusterScoper interface { + Cluster(logicalcluster.Path) storagemigrationv1alpha1.StoragemigrationV1alpha1Interface +} + +type StoragemigrationV1alpha1ClusterClient struct { + clientCache kcpclient.Cache[*storagemigrationv1alpha1.StoragemigrationV1alpha1Client] +} + +func (c *StoragemigrationV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) storagemigrationv1alpha1.StoragemigrationV1alpha1Interface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + return c.clientCache.ClusterOrDie(clusterPath) +} + +func (c *StoragemigrationV1alpha1ClusterClient) StorageVersionMigrations() StorageVersionMigrationClusterInterface { + return &storageVersionMigrationsClusterInterface{clientCache: c.clientCache} +} + +// NewForConfig creates a new StoragemigrationV1alpha1ClusterClient for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*StoragemigrationV1alpha1ClusterClient, error) { + client, err := rest.HTTPClientFor(c) + if err != nil { + return nil, err + } + return NewForConfigAndClient(c, client) +} + +// NewForConfigAndClient creates a new StoragemigrationV1alpha1ClusterClient for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*StoragemigrationV1alpha1ClusterClient, error) { + cache := kcpclient.NewCache(c, h, &kcpclient.Constructor[*storagemigrationv1alpha1.StoragemigrationV1alpha1Client]{ + NewForConfigAndClient: storagemigrationv1alpha1.NewForConfigAndClient, + }) + if _, err := cache.Cluster(logicalcluster.Name("root").Path()); err != nil { + return nil, err + } + return &StoragemigrationV1alpha1ClusterClient{clientCache: cache}, nil +} + +// NewForConfigOrDie creates a new StoragemigrationV1alpha1ClusterClient for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *StoragemigrationV1alpha1ClusterClient { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} diff --git a/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go b/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 000000000..022eb115e --- /dev/null +++ b/kubernetes/typed/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,71 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" + + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/watch" + storagemigrationv1alpha1client "k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1" +) + +// StorageVersionMigrationsClusterGetter has a method to return a StorageVersionMigrationClusterInterface. +// A group's cluster client should implement this interface. +type StorageVersionMigrationsClusterGetter interface { + StorageVersionMigrations() StorageVersionMigrationClusterInterface +} + +// StorageVersionMigrationClusterInterface can operate on StorageVersionMigrations across all clusters, +// or scope down to one cluster and return a storagemigrationv1alpha1client.StorageVersionMigrationInterface. +type StorageVersionMigrationClusterInterface interface { + Cluster(logicalcluster.Path) storagemigrationv1alpha1client.StorageVersionMigrationInterface + List(ctx context.Context, opts metav1.ListOptions) (*storagemigrationv1alpha1.StorageVersionMigrationList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) +} + +type storageVersionMigrationsClusterInterface struct { + clientCache kcpclient.Cache[*storagemigrationv1alpha1client.StoragemigrationV1alpha1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *storageVersionMigrationsClusterInterface) Cluster(clusterPath logicalcluster.Path) storagemigrationv1alpha1client.StorageVersionMigrationInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).StorageVersionMigrations() +} + +// List returns the entire collection of all StorageVersionMigrations across all clusters. +func (c *storageVersionMigrationsClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*storagemigrationv1alpha1.StorageVersionMigrationList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).StorageVersionMigrations().List(ctx, opts) +} + +// Watch begins to watch all StorageVersionMigrations across all clusters. +func (c *storageVersionMigrationsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).StorageVersionMigrations().Watch(ctx, opts) +} diff --git a/listers/admissionregistration/v1/validatingadmissionpolicy.go b/listers/admissionregistration/v1/validatingadmissionpolicy.go new file mode 100644 index 000000000..a6a1faebe --- /dev/null +++ b/listers/admissionregistration/v1/validatingadmissionpolicy.go @@ -0,0 +1,97 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +import ( + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + admissionregistrationv1listers "k8s.io/client-go/listers/admissionregistration/v1" + "k8s.io/client-go/tools/cache" +) + +// ValidatingAdmissionPolicyClusterLister can list ValidatingAdmissionPolicies across all workspaces, or scope down to a ValidatingAdmissionPolicyLister for one workspace. +// All objects returned here must be treated as read-only. +type ValidatingAdmissionPolicyClusterLister interface { + // List lists all ValidatingAdmissionPolicies in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*admissionregistrationv1.ValidatingAdmissionPolicy, err error) + // Cluster returns a lister that can list and get ValidatingAdmissionPolicies in one workspace. + Cluster(clusterName logicalcluster.Name) admissionregistrationv1listers.ValidatingAdmissionPolicyLister + ValidatingAdmissionPolicyClusterListerExpansion +} + +type validatingAdmissionPolicyClusterLister struct { + indexer cache.Indexer +} + +// NewValidatingAdmissionPolicyClusterLister returns a new ValidatingAdmissionPolicyClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewValidatingAdmissionPolicyClusterLister(indexer cache.Indexer) *validatingAdmissionPolicyClusterLister { + return &validatingAdmissionPolicyClusterLister{indexer: indexer} +} + +// List lists all ValidatingAdmissionPolicies in the indexer across all workspaces. +func (s *validatingAdmissionPolicyClusterLister) List(selector labels.Selector) (ret []*admissionregistrationv1.ValidatingAdmissionPolicy, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*admissionregistrationv1.ValidatingAdmissionPolicy)) + }) + return ret, err +} + +// Cluster scopes the lister to one workspace, allowing users to list and get ValidatingAdmissionPolicies. +func (s *validatingAdmissionPolicyClusterLister) Cluster(clusterName logicalcluster.Name) admissionregistrationv1listers.ValidatingAdmissionPolicyLister { + return &validatingAdmissionPolicyLister{indexer: s.indexer, clusterName: clusterName} +} + +// validatingAdmissionPolicyLister implements the admissionregistrationv1listers.ValidatingAdmissionPolicyLister interface. +type validatingAdmissionPolicyLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name +} + +// List lists all ValidatingAdmissionPolicies in the indexer for a workspace. +func (s *validatingAdmissionPolicyLister) List(selector labels.Selector) (ret []*admissionregistrationv1.ValidatingAdmissionPolicy, err error) { + err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { + ret = append(ret, i.(*admissionregistrationv1.ValidatingAdmissionPolicy)) + }) + return ret, err +} + +// Get retrieves the ValidatingAdmissionPolicy from the indexer for a given workspace and name. +func (s *validatingAdmissionPolicyLister) Get(name string) (*admissionregistrationv1.ValidatingAdmissionPolicy, error) { + key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) + obj, exists, err := s.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(admissionregistrationv1.Resource("validatingadmissionpolicies"), name) + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicy), nil +} diff --git a/listers/admissionregistration/v1/validatingadmissionpolicy_expansion.go b/listers/admissionregistration/v1/validatingadmissionpolicy_expansion.go new file mode 100644 index 000000000..29fbe81fa --- /dev/null +++ b/listers/admissionregistration/v1/validatingadmissionpolicy_expansion.go @@ -0,0 +1,25 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +// ValidatingAdmissionPolicyClusterListerExpansion allows custom methods to be added to ValidatingAdmissionPolicyClusterLister. +type ValidatingAdmissionPolicyClusterListerExpansion interface{} diff --git a/listers/admissionregistration/v1/validatingadmissionpolicybinding.go b/listers/admissionregistration/v1/validatingadmissionpolicybinding.go new file mode 100644 index 000000000..3e7c35fd6 --- /dev/null +++ b/listers/admissionregistration/v1/validatingadmissionpolicybinding.go @@ -0,0 +1,97 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +import ( + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + "github.com/kcp-dev/logicalcluster/v3" + + admissionregistrationv1 "k8s.io/api/admissionregistration/v1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + admissionregistrationv1listers "k8s.io/client-go/listers/admissionregistration/v1" + "k8s.io/client-go/tools/cache" +) + +// ValidatingAdmissionPolicyBindingClusterLister can list ValidatingAdmissionPolicyBindings across all workspaces, or scope down to a ValidatingAdmissionPolicyBindingLister for one workspace. +// All objects returned here must be treated as read-only. +type ValidatingAdmissionPolicyBindingClusterLister interface { + // List lists all ValidatingAdmissionPolicyBindings in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*admissionregistrationv1.ValidatingAdmissionPolicyBinding, err error) + // Cluster returns a lister that can list and get ValidatingAdmissionPolicyBindings in one workspace. + Cluster(clusterName logicalcluster.Name) admissionregistrationv1listers.ValidatingAdmissionPolicyBindingLister + ValidatingAdmissionPolicyBindingClusterListerExpansion +} + +type validatingAdmissionPolicyBindingClusterLister struct { + indexer cache.Indexer +} + +// NewValidatingAdmissionPolicyBindingClusterLister returns a new ValidatingAdmissionPolicyBindingClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewValidatingAdmissionPolicyBindingClusterLister(indexer cache.Indexer) *validatingAdmissionPolicyBindingClusterLister { + return &validatingAdmissionPolicyBindingClusterLister{indexer: indexer} +} + +// List lists all ValidatingAdmissionPolicyBindings in the indexer across all workspaces. +func (s *validatingAdmissionPolicyBindingClusterLister) List(selector labels.Selector) (ret []*admissionregistrationv1.ValidatingAdmissionPolicyBinding, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding)) + }) + return ret, err +} + +// Cluster scopes the lister to one workspace, allowing users to list and get ValidatingAdmissionPolicyBindings. +func (s *validatingAdmissionPolicyBindingClusterLister) Cluster(clusterName logicalcluster.Name) admissionregistrationv1listers.ValidatingAdmissionPolicyBindingLister { + return &validatingAdmissionPolicyBindingLister{indexer: s.indexer, clusterName: clusterName} +} + +// validatingAdmissionPolicyBindingLister implements the admissionregistrationv1listers.ValidatingAdmissionPolicyBindingLister interface. +type validatingAdmissionPolicyBindingLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name +} + +// List lists all ValidatingAdmissionPolicyBindings in the indexer for a workspace. +func (s *validatingAdmissionPolicyBindingLister) List(selector labels.Selector) (ret []*admissionregistrationv1.ValidatingAdmissionPolicyBinding, err error) { + err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { + ret = append(ret, i.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding)) + }) + return ret, err +} + +// Get retrieves the ValidatingAdmissionPolicyBinding from the indexer for a given workspace and name. +func (s *validatingAdmissionPolicyBindingLister) Get(name string) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, error) { + key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) + obj, exists, err := s.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(admissionregistrationv1.Resource("validatingadmissionpolicybindings"), name) + } + return obj.(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), nil +} diff --git a/listers/admissionregistration/v1/validatingadmissionpolicybinding_expansion.go b/listers/admissionregistration/v1/validatingadmissionpolicybinding_expansion.go new file mode 100644 index 000000000..0adb47da3 --- /dev/null +++ b/listers/admissionregistration/v1/validatingadmissionpolicybinding_expansion.go @@ -0,0 +1,25 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1 + +// ValidatingAdmissionPolicyBindingClusterListerExpansion allows custom methods to be added to ValidatingAdmissionPolicyBindingClusterLister. +type ValidatingAdmissionPolicyBindingClusterListerExpansion interface{} diff --git a/listers/flowcontrol/v1alpha1/flowschema.go b/listers/flowcontrol/v1/flowschema.go similarity index 75% rename from listers/flowcontrol/v1alpha1/flowschema.go rename to listers/flowcontrol/v1/flowschema.go index f76bd5868..bd78edf97 100644 --- a/listers/flowcontrol/v1alpha1/flowschema.go +++ b/listers/flowcontrol/v1/flowschema.go @@ -19,16 +19,16 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" - flowcontrolv1alpha1listers "k8s.io/client-go/listers/flowcontrol/v1alpha1" + flowcontrolv1listers "k8s.io/client-go/listers/flowcontrol/v1" "k8s.io/client-go/tools/cache" ) @@ -37,9 +37,9 @@ import ( type FlowSchemaClusterLister interface { // List lists all FlowSchemas in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*flowcontrolv1alpha1.FlowSchema, err error) + List(selector labels.Selector) (ret []*flowcontrolv1.FlowSchema, err error) // Cluster returns a lister that can list and get FlowSchemas in one workspace. - Cluster(clusterName logicalcluster.Name) flowcontrolv1alpha1listers.FlowSchemaLister + Cluster(clusterName logicalcluster.Name) flowcontrolv1listers.FlowSchemaLister FlowSchemaClusterListerExpansion } @@ -57,41 +57,41 @@ func NewFlowSchemaClusterLister(indexer cache.Indexer) *flowSchemaClusterLister } // List lists all FlowSchemas in the indexer across all workspaces. -func (s *flowSchemaClusterLister) List(selector labels.Selector) (ret []*flowcontrolv1alpha1.FlowSchema, err error) { +func (s *flowSchemaClusterLister) List(selector labels.Selector) (ret []*flowcontrolv1.FlowSchema, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*flowcontrolv1alpha1.FlowSchema)) + ret = append(ret, m.(*flowcontrolv1.FlowSchema)) }) return ret, err } // Cluster scopes the lister to one workspace, allowing users to list and get FlowSchemas. -func (s *flowSchemaClusterLister) Cluster(clusterName logicalcluster.Name) flowcontrolv1alpha1listers.FlowSchemaLister { +func (s *flowSchemaClusterLister) Cluster(clusterName logicalcluster.Name) flowcontrolv1listers.FlowSchemaLister { return &flowSchemaLister{indexer: s.indexer, clusterName: clusterName} } -// flowSchemaLister implements the flowcontrolv1alpha1listers.FlowSchemaLister interface. +// flowSchemaLister implements the flowcontrolv1listers.FlowSchemaLister interface. type flowSchemaLister struct { indexer cache.Indexer clusterName logicalcluster.Name } // List lists all FlowSchemas in the indexer for a workspace. -func (s *flowSchemaLister) List(selector labels.Selector) (ret []*flowcontrolv1alpha1.FlowSchema, err error) { +func (s *flowSchemaLister) List(selector labels.Selector) (ret []*flowcontrolv1.FlowSchema, err error) { err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*flowcontrolv1alpha1.FlowSchema)) + ret = append(ret, i.(*flowcontrolv1.FlowSchema)) }) return ret, err } // Get retrieves the FlowSchema from the indexer for a given workspace and name. -func (s *flowSchemaLister) Get(name string) (*flowcontrolv1alpha1.FlowSchema, error) { +func (s *flowSchemaLister) Get(name string) (*flowcontrolv1.FlowSchema, error) { key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) obj, exists, err := s.indexer.GetByKey(key) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(flowcontrolv1alpha1.Resource("flowschemas"), name) + return nil, errors.NewNotFound(flowcontrolv1.Resource("flowschemas"), name) } - return obj.(*flowcontrolv1alpha1.FlowSchema), nil + return obj.(*flowcontrolv1.FlowSchema), nil } diff --git a/listers/flowcontrol/v1alpha1/flowschema_expansion.go b/listers/flowcontrol/v1/flowschema_expansion.go similarity index 97% rename from listers/flowcontrol/v1alpha1/flowschema_expansion.go rename to listers/flowcontrol/v1/flowschema_expansion.go index 4da91d226..daadff169 100644 --- a/listers/flowcontrol/v1alpha1/flowschema_expansion.go +++ b/listers/flowcontrol/v1/flowschema_expansion.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 // FlowSchemaClusterListerExpansion allows custom methods to be added to FlowSchemaClusterLister. type FlowSchemaClusterListerExpansion interface{} diff --git a/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go b/listers/flowcontrol/v1/prioritylevelconfiguration.go similarity index 76% rename from listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go rename to listers/flowcontrol/v1/prioritylevelconfiguration.go index 9429d37fb..b005558e7 100644 --- a/listers/flowcontrol/v1alpha1/prioritylevelconfiguration.go +++ b/listers/flowcontrol/v1/prioritylevelconfiguration.go @@ -19,16 +19,16 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 import ( kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" "github.com/kcp-dev/logicalcluster/v3" - flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1" + flowcontrolv1 "k8s.io/api/flowcontrol/v1" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" - flowcontrolv1alpha1listers "k8s.io/client-go/listers/flowcontrol/v1alpha1" + flowcontrolv1listers "k8s.io/client-go/listers/flowcontrol/v1" "k8s.io/client-go/tools/cache" ) @@ -37,9 +37,9 @@ import ( type PriorityLevelConfigurationClusterLister interface { // List lists all PriorityLevelConfigurations in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*flowcontrolv1alpha1.PriorityLevelConfiguration, err error) + List(selector labels.Selector) (ret []*flowcontrolv1.PriorityLevelConfiguration, err error) // Cluster returns a lister that can list and get PriorityLevelConfigurations in one workspace. - Cluster(clusterName logicalcluster.Name) flowcontrolv1alpha1listers.PriorityLevelConfigurationLister + Cluster(clusterName logicalcluster.Name) flowcontrolv1listers.PriorityLevelConfigurationLister PriorityLevelConfigurationClusterListerExpansion } @@ -57,41 +57,41 @@ func NewPriorityLevelConfigurationClusterLister(indexer cache.Indexer) *priority } // List lists all PriorityLevelConfigurations in the indexer across all workspaces. -func (s *priorityLevelConfigurationClusterLister) List(selector labels.Selector) (ret []*flowcontrolv1alpha1.PriorityLevelConfiguration, err error) { +func (s *priorityLevelConfigurationClusterLister) List(selector labels.Selector) (ret []*flowcontrolv1.PriorityLevelConfiguration, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*flowcontrolv1alpha1.PriorityLevelConfiguration)) + ret = append(ret, m.(*flowcontrolv1.PriorityLevelConfiguration)) }) return ret, err } // Cluster scopes the lister to one workspace, allowing users to list and get PriorityLevelConfigurations. -func (s *priorityLevelConfigurationClusterLister) Cluster(clusterName logicalcluster.Name) flowcontrolv1alpha1listers.PriorityLevelConfigurationLister { +func (s *priorityLevelConfigurationClusterLister) Cluster(clusterName logicalcluster.Name) flowcontrolv1listers.PriorityLevelConfigurationLister { return &priorityLevelConfigurationLister{indexer: s.indexer, clusterName: clusterName} } -// priorityLevelConfigurationLister implements the flowcontrolv1alpha1listers.PriorityLevelConfigurationLister interface. +// priorityLevelConfigurationLister implements the flowcontrolv1listers.PriorityLevelConfigurationLister interface. type priorityLevelConfigurationLister struct { indexer cache.Indexer clusterName logicalcluster.Name } // List lists all PriorityLevelConfigurations in the indexer for a workspace. -func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret []*flowcontrolv1alpha1.PriorityLevelConfiguration, err error) { +func (s *priorityLevelConfigurationLister) List(selector labels.Selector) (ret []*flowcontrolv1.PriorityLevelConfiguration, err error) { err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*flowcontrolv1alpha1.PriorityLevelConfiguration)) + ret = append(ret, i.(*flowcontrolv1.PriorityLevelConfiguration)) }) return ret, err } // Get retrieves the PriorityLevelConfiguration from the indexer for a given workspace and name. -func (s *priorityLevelConfigurationLister) Get(name string) (*flowcontrolv1alpha1.PriorityLevelConfiguration, error) { +func (s *priorityLevelConfigurationLister) Get(name string) (*flowcontrolv1.PriorityLevelConfiguration, error) { key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) obj, exists, err := s.indexer.GetByKey(key) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(flowcontrolv1alpha1.Resource("prioritylevelconfigurations"), name) + return nil, errors.NewNotFound(flowcontrolv1.Resource("prioritylevelconfigurations"), name) } - return obj.(*flowcontrolv1alpha1.PriorityLevelConfiguration), nil + return obj.(*flowcontrolv1.PriorityLevelConfiguration), nil } diff --git a/listers/flowcontrol/v1alpha1/prioritylevelconfiguration_expansion.go b/listers/flowcontrol/v1/prioritylevelconfiguration_expansion.go similarity index 98% rename from listers/flowcontrol/v1alpha1/prioritylevelconfiguration_expansion.go rename to listers/flowcontrol/v1/prioritylevelconfiguration_expansion.go index 9179ae0d6..cd43625e2 100644 --- a/listers/flowcontrol/v1alpha1/prioritylevelconfiguration_expansion.go +++ b/listers/flowcontrol/v1/prioritylevelconfiguration_expansion.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1alpha1 +package v1 // PriorityLevelConfigurationClusterListerExpansion allows custom methods to be added to PriorityLevelConfigurationClusterLister. type PriorityLevelConfigurationClusterListerExpansion interface{} diff --git a/listers/networking/v1alpha1/clustercidr.go b/listers/networking/v1alpha1/servicecidr.go similarity index 53% rename from listers/networking/v1alpha1/clustercidr.go rename to listers/networking/v1alpha1/servicecidr.go index ef9fa963f..ee888048d 100644 --- a/listers/networking/v1alpha1/clustercidr.go +++ b/listers/networking/v1alpha1/servicecidr.go @@ -32,66 +32,66 @@ import ( "k8s.io/client-go/tools/cache" ) -// ClusterCIDRClusterLister can list ClusterCIDRs across all workspaces, or scope down to a ClusterCIDRLister for one workspace. +// ServiceCIDRClusterLister can list ServiceCIDRs across all workspaces, or scope down to a ServiceCIDRLister for one workspace. // All objects returned here must be treated as read-only. -type ClusterCIDRClusterLister interface { - // List lists all ClusterCIDRs in the indexer. +type ServiceCIDRClusterLister interface { + // List lists all ServiceCIDRs in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*networkingv1alpha1.ClusterCIDR, err error) - // Cluster returns a lister that can list and get ClusterCIDRs in one workspace. - Cluster(clusterName logicalcluster.Name) networkingv1alpha1listers.ClusterCIDRLister - ClusterCIDRClusterListerExpansion + List(selector labels.Selector) (ret []*networkingv1alpha1.ServiceCIDR, err error) + // Cluster returns a lister that can list and get ServiceCIDRs in one workspace. + Cluster(clusterName logicalcluster.Name) networkingv1alpha1listers.ServiceCIDRLister + ServiceCIDRClusterListerExpansion } -type clusterCIDRClusterLister struct { +type serviceCIDRClusterLister struct { indexer cache.Indexer } -// NewClusterCIDRClusterLister returns a new ClusterCIDRClusterLister. +// NewServiceCIDRClusterLister returns a new ServiceCIDRClusterLister. // We assume that the indexer: // - is fed by a cross-workspace LIST+WATCH // - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function // - has the kcpcache.ClusterIndex as an index -func NewClusterCIDRClusterLister(indexer cache.Indexer) *clusterCIDRClusterLister { - return &clusterCIDRClusterLister{indexer: indexer} +func NewServiceCIDRClusterLister(indexer cache.Indexer) *serviceCIDRClusterLister { + return &serviceCIDRClusterLister{indexer: indexer} } -// List lists all ClusterCIDRs in the indexer across all workspaces. -func (s *clusterCIDRClusterLister) List(selector labels.Selector) (ret []*networkingv1alpha1.ClusterCIDR, err error) { +// List lists all ServiceCIDRs in the indexer across all workspaces. +func (s *serviceCIDRClusterLister) List(selector labels.Selector) (ret []*networkingv1alpha1.ServiceCIDR, err error) { err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*networkingv1alpha1.ClusterCIDR)) + ret = append(ret, m.(*networkingv1alpha1.ServiceCIDR)) }) return ret, err } -// Cluster scopes the lister to one workspace, allowing users to list and get ClusterCIDRs. -func (s *clusterCIDRClusterLister) Cluster(clusterName logicalcluster.Name) networkingv1alpha1listers.ClusterCIDRLister { - return &clusterCIDRLister{indexer: s.indexer, clusterName: clusterName} +// Cluster scopes the lister to one workspace, allowing users to list and get ServiceCIDRs. +func (s *serviceCIDRClusterLister) Cluster(clusterName logicalcluster.Name) networkingv1alpha1listers.ServiceCIDRLister { + return &serviceCIDRLister{indexer: s.indexer, clusterName: clusterName} } -// clusterCIDRLister implements the networkingv1alpha1listers.ClusterCIDRLister interface. -type clusterCIDRLister struct { +// serviceCIDRLister implements the networkingv1alpha1listers.ServiceCIDRLister interface. +type serviceCIDRLister struct { indexer cache.Indexer clusterName logicalcluster.Name } -// List lists all ClusterCIDRs in the indexer for a workspace. -func (s *clusterCIDRLister) List(selector labels.Selector) (ret []*networkingv1alpha1.ClusterCIDR, err error) { +// List lists all ServiceCIDRs in the indexer for a workspace. +func (s *serviceCIDRLister) List(selector labels.Selector) (ret []*networkingv1alpha1.ServiceCIDR, err error) { err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*networkingv1alpha1.ClusterCIDR)) + ret = append(ret, i.(*networkingv1alpha1.ServiceCIDR)) }) return ret, err } -// Get retrieves the ClusterCIDR from the indexer for a given workspace and name. -func (s *clusterCIDRLister) Get(name string) (*networkingv1alpha1.ClusterCIDR, error) { +// Get retrieves the ServiceCIDR from the indexer for a given workspace and name. +func (s *serviceCIDRLister) Get(name string) (*networkingv1alpha1.ServiceCIDR, error) { key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) obj, exists, err := s.indexer.GetByKey(key) if err != nil { return nil, err } if !exists { - return nil, errors.NewNotFound(networkingv1alpha1.Resource("clustercidrs"), name) + return nil, errors.NewNotFound(networkingv1alpha1.Resource("servicecidrs"), name) } - return obj.(*networkingv1alpha1.ClusterCIDR), nil + return obj.(*networkingv1alpha1.ServiceCIDR), nil } diff --git a/listers/networking/v1alpha1/clustercidr_expansion.go b/listers/networking/v1alpha1/servicecidr_expansion.go similarity index 82% rename from listers/networking/v1alpha1/clustercidr_expansion.go rename to listers/networking/v1alpha1/servicecidr_expansion.go index 3c4e409dd..1c2513923 100644 --- a/listers/networking/v1alpha1/clustercidr_expansion.go +++ b/listers/networking/v1alpha1/servicecidr_expansion.go @@ -21,5 +21,5 @@ limitations under the License. package v1alpha1 -// ClusterCIDRClusterListerExpansion allows custom methods to be added to ClusterCIDRClusterLister. -type ClusterCIDRClusterListerExpansion interface{} +// ServiceCIDRClusterListerExpansion allows custom methods to be added to ServiceCIDRClusterLister. +type ServiceCIDRClusterListerExpansion interface{} diff --git a/listers/policy/v1beta1/podsecuritypolicy.go b/listers/policy/v1beta1/podsecuritypolicy.go deleted file mode 100644 index a1c8097b2..000000000 --- a/listers/policy/v1beta1/podsecuritypolicy.go +++ /dev/null @@ -1,97 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright The KCP Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by kcp code-generator. DO NOT EDIT. - -package v1beta1 - -import ( - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - "github.com/kcp-dev/logicalcluster/v3" - - policyv1beta1 "k8s.io/api/policy/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/labels" - policyv1beta1listers "k8s.io/client-go/listers/policy/v1beta1" - "k8s.io/client-go/tools/cache" -) - -// PodSecurityPolicyClusterLister can list PodSecurityPolicies across all workspaces, or scope down to a PodSecurityPolicyLister for one workspace. -// All objects returned here must be treated as read-only. -type PodSecurityPolicyClusterLister interface { - // List lists all PodSecurityPolicies in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*policyv1beta1.PodSecurityPolicy, err error) - // Cluster returns a lister that can list and get PodSecurityPolicies in one workspace. - Cluster(clusterName logicalcluster.Name) policyv1beta1listers.PodSecurityPolicyLister - PodSecurityPolicyClusterListerExpansion -} - -type podSecurityPolicyClusterLister struct { - indexer cache.Indexer -} - -// NewPodSecurityPolicyClusterLister returns a new PodSecurityPolicyClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewPodSecurityPolicyClusterLister(indexer cache.Indexer) *podSecurityPolicyClusterLister { - return &podSecurityPolicyClusterLister{indexer: indexer} -} - -// List lists all PodSecurityPolicies in the indexer across all workspaces. -func (s *podSecurityPolicyClusterLister) List(selector labels.Selector) (ret []*policyv1beta1.PodSecurityPolicy, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*policyv1beta1.PodSecurityPolicy)) - }) - return ret, err -} - -// Cluster scopes the lister to one workspace, allowing users to list and get PodSecurityPolicies. -func (s *podSecurityPolicyClusterLister) Cluster(clusterName logicalcluster.Name) policyv1beta1listers.PodSecurityPolicyLister { - return &podSecurityPolicyLister{indexer: s.indexer, clusterName: clusterName} -} - -// podSecurityPolicyLister implements the policyv1beta1listers.PodSecurityPolicyLister interface. -type podSecurityPolicyLister struct { - indexer cache.Indexer - clusterName logicalcluster.Name -} - -// List lists all PodSecurityPolicies in the indexer for a workspace. -func (s *podSecurityPolicyLister) List(selector labels.Selector) (ret []*policyv1beta1.PodSecurityPolicy, err error) { - err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { - ret = append(ret, i.(*policyv1beta1.PodSecurityPolicy)) - }) - return ret, err -} - -// Get retrieves the PodSecurityPolicy from the indexer for a given workspace and name. -func (s *podSecurityPolicyLister) Get(name string) (*policyv1beta1.PodSecurityPolicy, error) { - key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) - obj, exists, err := s.indexer.GetByKey(key) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(policyv1beta1.Resource("podsecuritypolicies"), name) - } - return obj.(*policyv1beta1.PodSecurityPolicy), nil -} diff --git a/listers/resource/v1alpha2/resourceclaimparameters.go b/listers/resource/v1alpha2/resourceclaimparameters.go new file mode 100644 index 000000000..88dd300dc --- /dev/null +++ b/listers/resource/v1alpha2/resourceclaimparameters.go @@ -0,0 +1,118 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +import ( + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + resourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2" + "k8s.io/client-go/tools/cache" +) + +// ResourceClaimParametersClusterLister can list ResourceClaimParameters across all workspaces, or scope down to a ResourceClaimParametersLister for one workspace. +// All objects returned here must be treated as read-only. +type ResourceClaimParametersClusterLister interface { + // List lists all ResourceClaimParameters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClaimParameters, err error) + // Cluster returns a lister that can list and get ResourceClaimParameters in one workspace. + Cluster(clusterName logicalcluster.Name) resourcev1alpha2listers.ResourceClaimParametersLister + ResourceClaimParametersClusterListerExpansion +} + +type resourceClaimParametersClusterLister struct { + indexer cache.Indexer +} + +// NewResourceClaimParametersClusterLister returns a new ResourceClaimParametersClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +// - has the kcpcache.ClusterAndNamespaceIndex as an index +func NewResourceClaimParametersClusterLister(indexer cache.Indexer) *resourceClaimParametersClusterLister { + return &resourceClaimParametersClusterLister{indexer: indexer} +} + +// List lists all ResourceClaimParameters in the indexer across all workspaces. +func (s *resourceClaimParametersClusterLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClaimParameters, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*resourcev1alpha2.ResourceClaimParameters)) + }) + return ret, err +} + +// Cluster scopes the lister to one workspace, allowing users to list and get ResourceClaimParameters. +func (s *resourceClaimParametersClusterLister) Cluster(clusterName logicalcluster.Name) resourcev1alpha2listers.ResourceClaimParametersLister { + return &resourceClaimParametersLister{indexer: s.indexer, clusterName: clusterName} +} + +// resourceClaimParametersLister implements the resourcev1alpha2listers.ResourceClaimParametersLister interface. +type resourceClaimParametersLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name +} + +// List lists all ResourceClaimParameters in the indexer for a workspace. +func (s *resourceClaimParametersLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClaimParameters, err error) { + err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { + ret = append(ret, i.(*resourcev1alpha2.ResourceClaimParameters)) + }) + return ret, err +} + +// ResourceClaimParameters returns an object that can list and get ResourceClaimParameters in one namespace. +func (s *resourceClaimParametersLister) ResourceClaimParameters(namespace string) resourcev1alpha2listers.ResourceClaimParametersNamespaceLister { + return &resourceClaimParametersNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} +} + +// resourceClaimParametersNamespaceLister implements the resourcev1alpha2listers.ResourceClaimParametersNamespaceLister interface. +type resourceClaimParametersNamespaceLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name + namespace string +} + +// List lists all ResourceClaimParameters in the indexer for a given workspace and namespace. +func (s *resourceClaimParametersNamespaceLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClaimParameters, err error) { + err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { + ret = append(ret, i.(*resourcev1alpha2.ResourceClaimParameters)) + }) + return ret, err +} + +// Get retrieves the ResourceClaimParameters from the indexer for a given workspace, namespace and name. +func (s *resourceClaimParametersNamespaceLister) Get(name string) (*resourcev1alpha2.ResourceClaimParameters, error) { + key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) + obj, exists, err := s.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(resourcev1alpha2.Resource("resourceclaimparameters"), name) + } + return obj.(*resourcev1alpha2.ResourceClaimParameters), nil +} diff --git a/listers/resource/v1alpha2/resourceclaimparameters_expansion.go b/listers/resource/v1alpha2/resourceclaimparameters_expansion.go new file mode 100644 index 000000000..ac7886a6d --- /dev/null +++ b/listers/resource/v1alpha2/resourceclaimparameters_expansion.go @@ -0,0 +1,25 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +// ResourceClaimParametersClusterListerExpansion allows custom methods to be added to ResourceClaimParametersClusterLister. +type ResourceClaimParametersClusterListerExpansion interface{} diff --git a/listers/resource/v1alpha2/resourceclassparameters.go b/listers/resource/v1alpha2/resourceclassparameters.go new file mode 100644 index 000000000..7c46129ff --- /dev/null +++ b/listers/resource/v1alpha2/resourceclassparameters.go @@ -0,0 +1,118 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +import ( + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + resourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2" + "k8s.io/client-go/tools/cache" +) + +// ResourceClassParametersClusterLister can list ResourceClassParameters across all workspaces, or scope down to a ResourceClassParametersLister for one workspace. +// All objects returned here must be treated as read-only. +type ResourceClassParametersClusterLister interface { + // List lists all ResourceClassParameters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClassParameters, err error) + // Cluster returns a lister that can list and get ResourceClassParameters in one workspace. + Cluster(clusterName logicalcluster.Name) resourcev1alpha2listers.ResourceClassParametersLister + ResourceClassParametersClusterListerExpansion +} + +type resourceClassParametersClusterLister struct { + indexer cache.Indexer +} + +// NewResourceClassParametersClusterLister returns a new ResourceClassParametersClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +// - has the kcpcache.ClusterAndNamespaceIndex as an index +func NewResourceClassParametersClusterLister(indexer cache.Indexer) *resourceClassParametersClusterLister { + return &resourceClassParametersClusterLister{indexer: indexer} +} + +// List lists all ResourceClassParameters in the indexer across all workspaces. +func (s *resourceClassParametersClusterLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClassParameters, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*resourcev1alpha2.ResourceClassParameters)) + }) + return ret, err +} + +// Cluster scopes the lister to one workspace, allowing users to list and get ResourceClassParameters. +func (s *resourceClassParametersClusterLister) Cluster(clusterName logicalcluster.Name) resourcev1alpha2listers.ResourceClassParametersLister { + return &resourceClassParametersLister{indexer: s.indexer, clusterName: clusterName} +} + +// resourceClassParametersLister implements the resourcev1alpha2listers.ResourceClassParametersLister interface. +type resourceClassParametersLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name +} + +// List lists all ResourceClassParameters in the indexer for a workspace. +func (s *resourceClassParametersLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClassParameters, err error) { + err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { + ret = append(ret, i.(*resourcev1alpha2.ResourceClassParameters)) + }) + return ret, err +} + +// ResourceClassParameters returns an object that can list and get ResourceClassParameters in one namespace. +func (s *resourceClassParametersLister) ResourceClassParameters(namespace string) resourcev1alpha2listers.ResourceClassParametersNamespaceLister { + return &resourceClassParametersNamespaceLister{indexer: s.indexer, clusterName: s.clusterName, namespace: namespace} +} + +// resourceClassParametersNamespaceLister implements the resourcev1alpha2listers.ResourceClassParametersNamespaceLister interface. +type resourceClassParametersNamespaceLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name + namespace string +} + +// List lists all ResourceClassParameters in the indexer for a given workspace and namespace. +func (s *resourceClassParametersNamespaceLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceClassParameters, err error) { + err = kcpcache.ListAllByClusterAndNamespace(s.indexer, s.clusterName, s.namespace, selector, func(i interface{}) { + ret = append(ret, i.(*resourcev1alpha2.ResourceClassParameters)) + }) + return ret, err +} + +// Get retrieves the ResourceClassParameters from the indexer for a given workspace, namespace and name. +func (s *resourceClassParametersNamespaceLister) Get(name string) (*resourcev1alpha2.ResourceClassParameters, error) { + key := kcpcache.ToClusterAwareKey(s.clusterName.String(), s.namespace, name) + obj, exists, err := s.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(resourcev1alpha2.Resource("resourceclassparameters"), name) + } + return obj.(*resourcev1alpha2.ResourceClassParameters), nil +} diff --git a/listers/resource/v1alpha2/resourceclassparameters_expansion.go b/listers/resource/v1alpha2/resourceclassparameters_expansion.go new file mode 100644 index 000000000..d98eb7e12 --- /dev/null +++ b/listers/resource/v1alpha2/resourceclassparameters_expansion.go @@ -0,0 +1,25 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +// ResourceClassParametersClusterListerExpansion allows custom methods to be added to ResourceClassParametersClusterLister. +type ResourceClassParametersClusterListerExpansion interface{} diff --git a/listers/resource/v1alpha2/resourceslice.go b/listers/resource/v1alpha2/resourceslice.go new file mode 100644 index 000000000..36f450e29 --- /dev/null +++ b/listers/resource/v1alpha2/resourceslice.go @@ -0,0 +1,97 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha2 + +import ( + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + "github.com/kcp-dev/logicalcluster/v3" + + resourcev1alpha2 "k8s.io/api/resource/v1alpha2" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + resourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2" + "k8s.io/client-go/tools/cache" +) + +// ResourceSliceClusterLister can list ResourceSlices across all workspaces, or scope down to a ResourceSliceLister for one workspace. +// All objects returned here must be treated as read-only. +type ResourceSliceClusterLister interface { + // List lists all ResourceSlices in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceSlice, err error) + // Cluster returns a lister that can list and get ResourceSlices in one workspace. + Cluster(clusterName logicalcluster.Name) resourcev1alpha2listers.ResourceSliceLister + ResourceSliceClusterListerExpansion +} + +type resourceSliceClusterLister struct { + indexer cache.Indexer +} + +// NewResourceSliceClusterLister returns a new ResourceSliceClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewResourceSliceClusterLister(indexer cache.Indexer) *resourceSliceClusterLister { + return &resourceSliceClusterLister{indexer: indexer} +} + +// List lists all ResourceSlices in the indexer across all workspaces. +func (s *resourceSliceClusterLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceSlice, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*resourcev1alpha2.ResourceSlice)) + }) + return ret, err +} + +// Cluster scopes the lister to one workspace, allowing users to list and get ResourceSlices. +func (s *resourceSliceClusterLister) Cluster(clusterName logicalcluster.Name) resourcev1alpha2listers.ResourceSliceLister { + return &resourceSliceLister{indexer: s.indexer, clusterName: clusterName} +} + +// resourceSliceLister implements the resourcev1alpha2listers.ResourceSliceLister interface. +type resourceSliceLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name +} + +// List lists all ResourceSlices in the indexer for a workspace. +func (s *resourceSliceLister) List(selector labels.Selector) (ret []*resourcev1alpha2.ResourceSlice, err error) { + err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { + ret = append(ret, i.(*resourcev1alpha2.ResourceSlice)) + }) + return ret, err +} + +// Get retrieves the ResourceSlice from the indexer for a given workspace and name. +func (s *resourceSliceLister) Get(name string) (*resourcev1alpha2.ResourceSlice, error) { + key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) + obj, exists, err := s.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(resourcev1alpha2.Resource("resourceslices"), name) + } + return obj.(*resourcev1alpha2.ResourceSlice), nil +} diff --git a/listers/extensions/v1beta1/podsecuritypolicy_expansion.go b/listers/resource/v1alpha2/resourceslice_expansion.go similarity index 78% rename from listers/extensions/v1beta1/podsecuritypolicy_expansion.go rename to listers/resource/v1alpha2/resourceslice_expansion.go index 775adac81..c577f30e6 100644 --- a/listers/extensions/v1beta1/podsecuritypolicy_expansion.go +++ b/listers/resource/v1alpha2/resourceslice_expansion.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1beta1 +package v1alpha2 -// PodSecurityPolicyClusterListerExpansion allows custom methods to be added to PodSecurityPolicyClusterLister. -type PodSecurityPolicyClusterListerExpansion interface{} +// ResourceSliceClusterListerExpansion allows custom methods to be added to ResourceSliceClusterLister. +type ResourceSliceClusterListerExpansion interface{} diff --git a/listers/storage/v1alpha1/volumeattributesclass.go b/listers/storage/v1alpha1/volumeattributesclass.go new file mode 100644 index 000000000..847814db2 --- /dev/null +++ b/listers/storage/v1alpha1/volumeattributesclass.go @@ -0,0 +1,97 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +import ( + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + "github.com/kcp-dev/logicalcluster/v3" + + storagev1alpha1 "k8s.io/api/storage/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + storagev1alpha1listers "k8s.io/client-go/listers/storage/v1alpha1" + "k8s.io/client-go/tools/cache" +) + +// VolumeAttributesClassClusterLister can list VolumeAttributesClasses across all workspaces, or scope down to a VolumeAttributesClassLister for one workspace. +// All objects returned here must be treated as read-only. +type VolumeAttributesClassClusterLister interface { + // List lists all VolumeAttributesClasses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*storagev1alpha1.VolumeAttributesClass, err error) + // Cluster returns a lister that can list and get VolumeAttributesClasses in one workspace. + Cluster(clusterName logicalcluster.Name) storagev1alpha1listers.VolumeAttributesClassLister + VolumeAttributesClassClusterListerExpansion +} + +type volumeAttributesClassClusterLister struct { + indexer cache.Indexer +} + +// NewVolumeAttributesClassClusterLister returns a new VolumeAttributesClassClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewVolumeAttributesClassClusterLister(indexer cache.Indexer) *volumeAttributesClassClusterLister { + return &volumeAttributesClassClusterLister{indexer: indexer} +} + +// List lists all VolumeAttributesClasses in the indexer across all workspaces. +func (s *volumeAttributesClassClusterLister) List(selector labels.Selector) (ret []*storagev1alpha1.VolumeAttributesClass, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*storagev1alpha1.VolumeAttributesClass)) + }) + return ret, err +} + +// Cluster scopes the lister to one workspace, allowing users to list and get VolumeAttributesClasses. +func (s *volumeAttributesClassClusterLister) Cluster(clusterName logicalcluster.Name) storagev1alpha1listers.VolumeAttributesClassLister { + return &volumeAttributesClassLister{indexer: s.indexer, clusterName: clusterName} +} + +// volumeAttributesClassLister implements the storagev1alpha1listers.VolumeAttributesClassLister interface. +type volumeAttributesClassLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name +} + +// List lists all VolumeAttributesClasses in the indexer for a workspace. +func (s *volumeAttributesClassLister) List(selector labels.Selector) (ret []*storagev1alpha1.VolumeAttributesClass, err error) { + err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { + ret = append(ret, i.(*storagev1alpha1.VolumeAttributesClass)) + }) + return ret, err +} + +// Get retrieves the VolumeAttributesClass from the indexer for a given workspace and name. +func (s *volumeAttributesClassLister) Get(name string) (*storagev1alpha1.VolumeAttributesClass, error) { + key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) + obj, exists, err := s.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(storagev1alpha1.Resource("volumeattributesclasses"), name) + } + return obj.(*storagev1alpha1.VolumeAttributesClass), nil +} diff --git a/listers/policy/v1beta1/podsecuritypolicy_expansion.go b/listers/storage/v1alpha1/volumeattributesclass_expansion.go similarity index 77% rename from listers/policy/v1beta1/podsecuritypolicy_expansion.go rename to listers/storage/v1alpha1/volumeattributesclass_expansion.go index 775adac81..5d3e3113b 100644 --- a/listers/policy/v1beta1/podsecuritypolicy_expansion.go +++ b/listers/storage/v1alpha1/volumeattributesclass_expansion.go @@ -19,7 +19,7 @@ limitations under the License. // Code generated by kcp code-generator. DO NOT EDIT. -package v1beta1 +package v1alpha1 -// PodSecurityPolicyClusterListerExpansion allows custom methods to be added to PodSecurityPolicyClusterLister. -type PodSecurityPolicyClusterListerExpansion interface{} +// VolumeAttributesClassClusterListerExpansion allows custom methods to be added to VolumeAttributesClassClusterLister. +type VolumeAttributesClassClusterListerExpansion interface{} diff --git a/listers/storagemigration/v1alpha1/storageversionmigration.go b/listers/storagemigration/v1alpha1/storageversionmigration.go new file mode 100644 index 000000000..eab929412 --- /dev/null +++ b/listers/storagemigration/v1alpha1/storageversionmigration.go @@ -0,0 +1,97 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +import ( + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + "github.com/kcp-dev/logicalcluster/v3" + + storagemigrationv1alpha1 "k8s.io/api/storagemigration/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + storagemigrationv1alpha1listers "k8s.io/client-go/listers/storagemigration/v1alpha1" + "k8s.io/client-go/tools/cache" +) + +// StorageVersionMigrationClusterLister can list StorageVersionMigrations across all workspaces, or scope down to a StorageVersionMigrationLister for one workspace. +// All objects returned here must be treated as read-only. +type StorageVersionMigrationClusterLister interface { + // List lists all StorageVersionMigrations in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*storagemigrationv1alpha1.StorageVersionMigration, err error) + // Cluster returns a lister that can list and get StorageVersionMigrations in one workspace. + Cluster(clusterName logicalcluster.Name) storagemigrationv1alpha1listers.StorageVersionMigrationLister + StorageVersionMigrationClusterListerExpansion +} + +type storageVersionMigrationClusterLister struct { + indexer cache.Indexer +} + +// NewStorageVersionMigrationClusterLister returns a new StorageVersionMigrationClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewStorageVersionMigrationClusterLister(indexer cache.Indexer) *storageVersionMigrationClusterLister { + return &storageVersionMigrationClusterLister{indexer: indexer} +} + +// List lists all StorageVersionMigrations in the indexer across all workspaces. +func (s *storageVersionMigrationClusterLister) List(selector labels.Selector) (ret []*storagemigrationv1alpha1.StorageVersionMigration, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*storagemigrationv1alpha1.StorageVersionMigration)) + }) + return ret, err +} + +// Cluster scopes the lister to one workspace, allowing users to list and get StorageVersionMigrations. +func (s *storageVersionMigrationClusterLister) Cluster(clusterName logicalcluster.Name) storagemigrationv1alpha1listers.StorageVersionMigrationLister { + return &storageVersionMigrationLister{indexer: s.indexer, clusterName: clusterName} +} + +// storageVersionMigrationLister implements the storagemigrationv1alpha1listers.StorageVersionMigrationLister interface. +type storageVersionMigrationLister struct { + indexer cache.Indexer + clusterName logicalcluster.Name +} + +// List lists all StorageVersionMigrations in the indexer for a workspace. +func (s *storageVersionMigrationLister) List(selector labels.Selector) (ret []*storagemigrationv1alpha1.StorageVersionMigration, err error) { + err = kcpcache.ListAllByCluster(s.indexer, s.clusterName, selector, func(i interface{}) { + ret = append(ret, i.(*storagemigrationv1alpha1.StorageVersionMigration)) + }) + return ret, err +} + +// Get retrieves the StorageVersionMigration from the indexer for a given workspace and name. +func (s *storageVersionMigrationLister) Get(name string) (*storagemigrationv1alpha1.StorageVersionMigration, error) { + key := kcpcache.ToClusterAwareKey(s.clusterName.String(), "", name) + obj, exists, err := s.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(storagemigrationv1alpha1.Resource("storageversionmigrations"), name) + } + return obj.(*storagemigrationv1alpha1.StorageVersionMigration), nil +} diff --git a/listers/storagemigration/v1alpha1/storageversionmigration_expansion.go b/listers/storagemigration/v1alpha1/storageversionmigration_expansion.go new file mode 100644 index 000000000..dbd4b6c1b --- /dev/null +++ b/listers/storagemigration/v1alpha1/storageversionmigration_expansion.go @@ -0,0 +1,25 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by kcp code-generator. DO NOT EDIT. + +package v1alpha1 + +// StorageVersionMigrationClusterListerExpansion allows custom methods to be added to StorageVersionMigrationClusterLister. +type StorageVersionMigrationClusterListerExpansion interface{}