1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Maintenance] Kubernetes 1.31.1 libraries (#1741)

This commit is contained in:
Adam Janikowski 2024-10-15 16:52:15 +02:00 committed by GitHub
parent 0da4798a50
commit e1c14d30a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
98 changed files with 1240 additions and 5429 deletions

View file

@ -1,6 +1,7 @@
# Change Log
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- (Maintenance) Kubernetes 1.31.1 libraries
## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
- (Feature) ArangoRoute CRD

View file

@ -9,8 +9,8 @@ ifeq ($(shell uname),Darwin)
REALPATH ?= grealpath
endif
KUBERNETES_VERSION_MINOR:=29
KUBERNETES_VERSION_PATCH:=6
KUBERNETES_VERSION_MINOR:=31
KUBERNETES_VERSION_PATCH:=1
PROJECT := arangodb_operator
SCRIPTDIR := $(shell pwd)
@ -431,30 +431,7 @@ update-generated:
@mkdir -p $(ORGDIR)
@ln -s -f $(SCRIPTDIR) $(ORGDIR)/kube-arangodb
@$(SED) -e 's/^/\/\/ /' -e 's/ *$$//' $(ROOTDIR)/tools/codegen/license-header.txt > $(ROOTDIR)/tools/codegen/boilerplate.go.txt
GOPATH=$(GOBUILDDIR) $(VENDORDIR)/k8s.io/code-generator/generate-groups.sh \
"client lister informer deepcopy" \
"github.com/arangodb/kube-arangodb/pkg/generated" \
"github.com/arangodb/kube-arangodb/pkg/apis" \
"deployment:v1 deployment:v2alpha1 \
replication:v1 replication:v2alpha1 \
storage:v1alpha \
backup:v1 \
apps:v1 \
ml:v1alpha1 ml:v1beta1 \
scheduler:v1alpha1 scheduler:v1beta1 \
analytics:v1alpha1 \
networking:v1alpha1" \
--go-header-file "./tools/codegen/boilerplate.go.txt" \
$(VERIFYARGS)
GOPATH=$(GOBUILDDIR) $(VENDORDIR)/k8s.io/code-generator/generate-groups.sh \
"deepcopy" \
"github.com/arangodb/kube-arangodb/pkg/generated" \
"github.com/arangodb/kube-arangodb/pkg/apis" \
"shared:v1 \
scheduler:v1alpha1/container scheduler:v1alpha1/container/resources scheduler:v1alpha1/pod scheduler:v1alpha1/pod/resources \
scheduler:v1beta1/integration scheduler:v1beta1/policy scheduler:v1beta1/container scheduler:v1beta1/container/resources scheduler:v1beta1/pod scheduler:v1beta1/pod/resources" \
--go-header-file "./tools/codegen/boilerplate.go.txt" \
$(VERIFYARGS)
GOPATH=$(GOBUILDDIR) bash "${ROOTDIR}/scripts/codegen.sh" "${ROOTDIR}"
dashboard/assets.go:
cd $(DASHBOARDDIR) && docker build -t $(DASHBOARDBUILDIMAGE) -f Dockerfile.build $(DASHBOARDDIR)

98
go.mod
View file

@ -1,8 +1,8 @@
module github.com/arangodb/kube-arangodb
go 1.22
go 1.22.0
toolchain go1.22.4
toolchain go1.22.7
replace (
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring => github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.71.2
@ -10,17 +10,17 @@ replace (
github.com/stretchr/testify => github.com/stretchr/testify v1.9.0
github.com/ugorji/go => github.com/ugorji/go v0.0.0-20181209151446-772ced7fd4c2
k8s.io/api => k8s.io/api v0.29.6
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.29.6
k8s.io/apimachinery => k8s.io/apimachinery v0.29.6
k8s.io/apiserver => k8s.io/apiserver v0.29.6
k8s.io/client-go => k8s.io/client-go v0.29.6
k8s.io/cloud-provider => k8s.io/cloud-provider v0.29.6
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.29.6
k8s.io/api => k8s.io/api v0.31.1
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.31.1
k8s.io/apimachinery => k8s.io/apimachinery v0.31.1
k8s.io/apiserver => k8s.io/apiserver v0.31.1
k8s.io/client-go => k8s.io/client-go v0.31.1
k8s.io/cloud-provider => k8s.io/cloud-provider v0.31.1
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.31.1
k8s.io/code-generator => ./deps/k8s.io/code-generator
k8s.io/component-base => k8s.io/component-base v0.29.6
k8s.io/kubernetes => k8s.io/kubernetes v0.29.6
k8s.io/metrics => k8s.io/metrics v0.29.6
k8s.io/component-base => k8s.io/component-base v0.31.1
k8s.io/kubernetes => k8s.io/kubernetes v0.31.1
k8s.io/metrics => k8s.io/metrics v0.31.1
)
require (
@ -35,11 +35,12 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-semver v0.3.1
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9
github.com/envoyproxy/go-control-plane v0.11.1
github.com/envoyproxy/go-control-plane v0.12.0
github.com/fsnotify/fsnotify v1.7.0
github.com/gin-gonic/gin v1.9.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.4.0
github.com/golang/protobuf v1.5.4
github.com/google/uuid v1.6.0
github.com/jessevdk/go-assets v0.0.0-20160921144138-4f4301a06e15
github.com/josephburnett/jd v1.6.1
github.com/julienschmidt/httprouter v1.3.0
@ -47,48 +48,48 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.71.2
github.com/prometheus-operator/prometheus-operator/pkg/client v0.0.0-00010101000000-000000000000
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/client_model v0.4.0
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1
github.com/prometheus/prom2json v1.3.3
github.com/robfig/cron v1.2.0
github.com/rs/zerolog v1.19.0
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
golang.org/x/sync v0.6.0
golang.org/x/sys v0.18.0
golang.org/x/text v0.14.0
github.com/stretchr/testify v1.9.0
golang.org/x/sync v0.7.0
golang.org/x/sys v0.21.0
golang.org/x/text v0.16.0
golang.org/x/time v0.5.0
google.golang.org/grpc v1.60.1
google.golang.org/protobuf v1.33.0
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.29.6
k8s.io/apiextensions-apiserver v0.29.6
k8s.io/apimachinery v0.29.6
k8s.io/client-go v0.29.6
k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a
k8s.io/api v0.31.1
k8s.io/apiextensions-apiserver v0.31.1
k8s.io/apimachinery v0.31.1
k8s.io/client-go v0.31.1
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
sigs.k8s.io/yaml v1.4.0
github.com/golang/protobuf v1.5.4
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917
)
require (
cel.dev/expr v0.15.0 // indirect
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dchest/siphash v1.2.2 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/envoyproxy/protoc-gen-validate v1.0.4 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
@ -112,31 +113,32 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/spdystream v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/onsi/gomega v1.33.1 // indirect
github.com/pavel-v-chernykh/keystore-go v2.1.0+incompatible // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/tools v0.17.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/controller-runtime v0.16.3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect

221
go.sum
View file

@ -1,5 +1,5 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
cel.dev/expr v0.15.0 h1:O1jzfJCQBfL5BFoYktaxwIhuttaQPsVWerH9/EEKx0w=
cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg=
github.com/arangodb-helper/go-certificates v0.0.0-20180821055445-9fca24fc2680 h1:5YCGq0gkf/sCEkDFIsMBPj59GOm5cMibGqDBH2OWWfQ=
github.com/arangodb-helper/go-certificates v0.0.0-20180821055445-9fca24fc2680/go.mod h1:xDyzBwyYzcEhsaDXtmxCNM4p5BrtuoVYYsRTuJqmCeg=
github.com/arangodb-helper/go-helper v0.4.2 h1:Ekf8EtPYQdhlwtqJAEn17i7zbtuavksWamasxcyOGWQ=
@ -23,23 +23,21 @@ github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
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/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
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/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k=
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw=
github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=
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 v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@ -50,25 +48,22 @@ github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9 h1:74lLNRzvsdIlkTgfD
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9/go.mod h1:GgB8SF9nRG+GqaDtLcwJZsQFhcogVCJ79j4EdT0c2V4=
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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM=
github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI=
github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI=
github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0=
github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
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/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ=
github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA=
@ -86,38 +81,31 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
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/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
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.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
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.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
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/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM=
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
@ -158,8 +146,8 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8=
github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@ -169,10 +157,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
github.com/pavel-v-chernykh/keystore-go v2.1.0+incompatible h1:Jd6xfriVlJ6hWPvYOE0Ni0QWcNTLRehfGPFxr3eSL80=
github.com/pavel-v-chernykh/keystore-go v2.1.0+incompatible/go.mod h1:xlUlxe/2ItGlQyMTstqeDv9r3U4obH7xYd26TbDQutY=
github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI=
@ -187,27 +175,26 @@ github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.71.2 h
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.71.2/go.mod h1:3RiUkFmR9kmPZi9r/8a5jw0a9yg+LMmr7qa0wjqvSiI=
github.com/prometheus-operator/prometheus-operator/pkg/client v0.71.2 h1:7eyX8MypewjShiOFj6sOX+Ad+EJUIQ5qzdvM/U76cHs=
github.com/prometheus-operator/prometheus-operator/pkg/client v0.71.2/go.mod h1:dH5cun6jo8vesIzplptAQpdXW9dL8rD2jpvWylG4B6s=
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/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/prometheus/prom2json v1.3.3 h1:IYfSMiZ7sSOfliBoo89PcufjWO4eAR0gznGcETyaUgo=
github.com/prometheus/prom2json v1.3.3/go.mod h1:Pv4yIPktEkK7btWsrUTWDDDrnpUrAELaOCj+oFwlgmc=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.19.0 h1:hYz4ZVdUgjXTBUmrkrw55j1nHx68LfOKIQk5IYtyScg=
github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
@ -218,111 +205,75 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
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-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
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/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
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-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-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
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.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ=
golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM=
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/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
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-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.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-20190412213103-97732733099d/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-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
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.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
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/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
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/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/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-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.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.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU=
google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
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.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw=
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@ -330,22 +281,20 @@ 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.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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.29.6 h1:eDxIl8+PeEpwbe2YyS5RXJ9vdn4hnKWMBf4WUJP9DQM=
k8s.io/api v0.29.6/go.mod h1:ZuUPMhJV74DJXapldbg6upaHfiOjrBb+0ffUbBi1jaw=
k8s.io/apiextensions-apiserver v0.29.6 h1:tUu1N6Zt9GT8KVcPF5aGDqfISz1mveM4yFh7eL5bxmE=
k8s.io/apiextensions-apiserver v0.29.6/go.mod h1:iw1EbwZat08I219qrQKoFMHGo7J9KxPqMpVKxCbNbCs=
k8s.io/apimachinery v0.29.6 h1:CLjJ5b0hWW7531n/njRE3rnusw3rhVGCFftPfnG54CI=
k8s.io/apimachinery v0.29.6/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y=
k8s.io/client-go v0.29.6 h1:5E2ebuB/p0F0THuQatyvhDvPL2SIeqwTPrtnrwKob/8=
k8s.io/client-go v0.29.6/go.mod h1:jHZcrQqDplyv20v7eu+iFM4gTpglZSZoMVcKrh8sRGg=
k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a h1:ZeIPbyHHqahGIbeyLJJjAUhnxCKqXaDY+n89Ms8szyA=
k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI=
k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU=
k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI=
k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40=
k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ=
k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U=
k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0=
k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4=
sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=

View file

@ -2907,6 +2907,11 @@ func (in *ServerGroupSpecVolumeHostPath) DeepCopy() *ServerGroupSpecVolumeHostPa
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServerGroupSpecVolumeMount) DeepCopyInto(out *ServerGroupSpecVolumeMount) {
*out = *in
if in.RecursiveReadOnly != nil {
in, out := &in.RecursiveReadOnly, &out.RecursiveReadOnly
*out = new(corev1.RecursiveReadOnlyMode)
**out = **in
}
if in.MountPropagation != nil {
in, out := &in.MountPropagation, &out.MountPropagation
*out = new(corev1.MountPropagationMode)

View file

@ -2907,6 +2907,11 @@ func (in *ServerGroupSpecVolumeHostPath) DeepCopy() *ServerGroupSpecVolumeHostPa
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServerGroupSpecVolumeMount) DeepCopyInto(out *ServerGroupSpecVolumeMount) {
*out = *in
if in.RecursiveReadOnly != nil {
in, out := &in.RecursiveReadOnly, &out.RecursiveReadOnly
*out = new(v1.RecursiveReadOnlyMode)
**out = **in
}
if in.MountPropagation != nil {
in, out := &in.MountPropagation, &out.MountPropagation
*out = new(v1.MountPropagationMode)

View file

@ -59,8 +59,12 @@ import (
// NewSimpleClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement
// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
//
// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves
// server side apply testing. NewClientset is only available when apply configurations are generated (e.g.
// via --with-applyconfig).
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
for _, obj := range objects {

View file

@ -45,22 +45,24 @@ var graphanalyticsenginesKind = v1alpha1.SchemeGroupVersion.WithKind("GraphAnaly
// Get takes name of the graphAnalyticsEngine, and returns the corresponding graphAnalyticsEngine object, and an error if there is any.
func (c *FakeGraphAnalyticsEngines) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
emptyResult := &v1alpha1.GraphAnalyticsEngine{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(graphanalyticsenginesResource, c.ns, name), &v1alpha1.GraphAnalyticsEngine{})
Invokes(testing.NewGetActionWithOptions(graphanalyticsenginesResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.GraphAnalyticsEngine), err
}
// List takes label and field selectors, and returns the list of GraphAnalyticsEngines that match those selectors.
func (c *FakeGraphAnalyticsEngines) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GraphAnalyticsEngineList, err error) {
emptyResult := &v1alpha1.GraphAnalyticsEngineList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(graphanalyticsenginesResource, graphanalyticsenginesKind, c.ns, opts), &v1alpha1.GraphAnalyticsEngineList{})
Invokes(testing.NewListActionWithOptions(graphanalyticsenginesResource, graphanalyticsenginesKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeGraphAnalyticsEngines) List(ctx context.Context, opts v1.ListOption
// Watch returns a watch.Interface that watches the requested graphAnalyticsEngines.
func (c *FakeGraphAnalyticsEngines) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(graphanalyticsenginesResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(graphanalyticsenginesResource, c.ns, opts))
}
// Create takes the representation of a graphAnalyticsEngine and creates it. Returns the server's representation of the graphAnalyticsEngine, and an error, if there is any.
func (c *FakeGraphAnalyticsEngines) Create(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.CreateOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
emptyResult := &v1alpha1.GraphAnalyticsEngine{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(graphanalyticsenginesResource, c.ns, graphAnalyticsEngine), &v1alpha1.GraphAnalyticsEngine{})
Invokes(testing.NewCreateActionWithOptions(graphanalyticsenginesResource, c.ns, graphAnalyticsEngine, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.GraphAnalyticsEngine), err
}
// Update takes the representation of a graphAnalyticsEngine and updates it. Returns the server's representation of the graphAnalyticsEngine, and an error, if there is any.
func (c *FakeGraphAnalyticsEngines) Update(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.UpdateOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
emptyResult := &v1alpha1.GraphAnalyticsEngine{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(graphanalyticsenginesResource, c.ns, graphAnalyticsEngine), &v1alpha1.GraphAnalyticsEngine{})
Invokes(testing.NewUpdateActionWithOptions(graphanalyticsenginesResource, c.ns, graphAnalyticsEngine, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.GraphAnalyticsEngine), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeGraphAnalyticsEngines) UpdateStatus(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.UpdateOptions) (*v1alpha1.GraphAnalyticsEngine, error) {
func (c *FakeGraphAnalyticsEngines) UpdateStatus(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.UpdateOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
emptyResult := &v1alpha1.GraphAnalyticsEngine{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(graphanalyticsenginesResource, "status", c.ns, graphAnalyticsEngine), &v1alpha1.GraphAnalyticsEngine{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(graphanalyticsenginesResource, "status", c.ns, graphAnalyticsEngine, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.GraphAnalyticsEngine), err
}
@ -127,7 +132,7 @@ func (c *FakeGraphAnalyticsEngines) Delete(ctx context.Context, name string, opt
// DeleteCollection deletes a collection of objects.
func (c *FakeGraphAnalyticsEngines) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(graphanalyticsenginesResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(graphanalyticsenginesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.GraphAnalyticsEngineList{})
return err
@ -135,11 +140,12 @@ func (c *FakeGraphAnalyticsEngines) DeleteCollection(ctx context.Context, opts v
// Patch applies the patch and returns the patched graphAnalyticsEngine.
func (c *FakeGraphAnalyticsEngines) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GraphAnalyticsEngine, err error) {
emptyResult := &v1alpha1.GraphAnalyticsEngine{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(graphanalyticsenginesResource, c.ns, name, pt, data, subresources...), &v1alpha1.GraphAnalyticsEngine{})
Invokes(testing.NewPatchSubresourceActionWithOptions(graphanalyticsenginesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.GraphAnalyticsEngine), err
}

View file

@ -24,14 +24,13 @@ package v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/analytics/v1alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// GraphAnalyticsEnginesGetter has a method to return a GraphAnalyticsEngineInterface.
@ -44,6 +43,7 @@ type GraphAnalyticsEnginesGetter interface {
type GraphAnalyticsEngineInterface interface {
Create(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.CreateOptions) (*v1alpha1.GraphAnalyticsEngine, error)
Update(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.UpdateOptions) (*v1alpha1.GraphAnalyticsEngine, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.UpdateOptions) (*v1alpha1.GraphAnalyticsEngine, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type GraphAnalyticsEngineInterface interface {
// graphAnalyticsEngines implements GraphAnalyticsEngineInterface
type graphAnalyticsEngines struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1alpha1.GraphAnalyticsEngine, *v1alpha1.GraphAnalyticsEngineList]
}
// newGraphAnalyticsEngines returns a GraphAnalyticsEngines
func newGraphAnalyticsEngines(c *AnalyticsV1alpha1Client, namespace string) *graphAnalyticsEngines {
return &graphAnalyticsEngines{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1alpha1.GraphAnalyticsEngine, *v1alpha1.GraphAnalyticsEngineList](
"graphanalyticsengines",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha1.GraphAnalyticsEngine { return &v1alpha1.GraphAnalyticsEngine{} },
func() *v1alpha1.GraphAnalyticsEngineList { return &v1alpha1.GraphAnalyticsEngineList{} }),
}
}
// Get takes name of the graphAnalyticsEngine, and returns the corresponding graphAnalyticsEngine object, and an error if there is any.
func (c *graphAnalyticsEngines) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
result = &v1alpha1.GraphAnalyticsEngine{}
err = c.client.Get().
Namespace(c.ns).
Resource("graphanalyticsengines").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of GraphAnalyticsEngines that match those selectors.
func (c *graphAnalyticsEngines) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GraphAnalyticsEngineList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.GraphAnalyticsEngineList{}
err = c.client.Get().
Namespace(c.ns).
Resource("graphanalyticsengines").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested graphAnalyticsEngines.
func (c *graphAnalyticsEngines) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("graphanalyticsengines").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a graphAnalyticsEngine and creates it. Returns the server's representation of the graphAnalyticsEngine, and an error, if there is any.
func (c *graphAnalyticsEngines) Create(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.CreateOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
result = &v1alpha1.GraphAnalyticsEngine{}
err = c.client.Post().
Namespace(c.ns).
Resource("graphanalyticsengines").
VersionedParams(&opts, scheme.ParameterCodec).
Body(graphAnalyticsEngine).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a graphAnalyticsEngine and updates it. Returns the server's representation of the graphAnalyticsEngine, and an error, if there is any.
func (c *graphAnalyticsEngines) Update(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.UpdateOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
result = &v1alpha1.GraphAnalyticsEngine{}
err = c.client.Put().
Namespace(c.ns).
Resource("graphanalyticsengines").
Name(graphAnalyticsEngine.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(graphAnalyticsEngine).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *graphAnalyticsEngines) UpdateStatus(ctx context.Context, graphAnalyticsEngine *v1alpha1.GraphAnalyticsEngine, opts v1.UpdateOptions) (result *v1alpha1.GraphAnalyticsEngine, err error) {
result = &v1alpha1.GraphAnalyticsEngine{}
err = c.client.Put().
Namespace(c.ns).
Resource("graphanalyticsengines").
Name(graphAnalyticsEngine.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(graphAnalyticsEngine).
Do(ctx).
Into(result)
return
}
// Delete takes name of the graphAnalyticsEngine and deletes it. Returns an error if one occurs.
func (c *graphAnalyticsEngines) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("graphanalyticsengines").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *graphAnalyticsEngines) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("graphanalyticsengines").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched graphAnalyticsEngine.
func (c *graphAnalyticsEngines) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GraphAnalyticsEngine, err error) {
result = &v1alpha1.GraphAnalyticsEngine{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("graphanalyticsengines").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/apps/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoJobsGetter has a method to return a ArangoJobInterface.
@ -44,6 +43,7 @@ type ArangoJobsGetter interface {
type ArangoJobInterface interface {
Create(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.CreateOptions) (*v1.ArangoJob, error)
Update(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.UpdateOptions) (*v1.ArangoJob, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.UpdateOptions) (*v1.ArangoJob, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoJobInterface interface {
// arangoJobs implements ArangoJobInterface
type arangoJobs struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoJob, *v1.ArangoJobList]
}
// newArangoJobs returns a ArangoJobs
func newArangoJobs(c *AppsV1Client, namespace string) *arangoJobs {
return &arangoJobs{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoJob, *v1.ArangoJobList](
"arangojobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoJob { return &v1.ArangoJob{} },
func() *v1.ArangoJobList { return &v1.ArangoJobList{} }),
}
}
// Get takes name of the arangoJob, and returns the corresponding arangoJob object, and an error if there is any.
func (c *arangoJobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoJob, err error) {
result = &v1.ArangoJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangojobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoJobs that match those selectors.
func (c *arangoJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangojobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoJobs.
func (c *arangoJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangojobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoJob and creates it. Returns the server's representation of the arangoJob, and an error, if there is any.
func (c *arangoJobs) Create(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.CreateOptions) (result *v1.ArangoJob, err error) {
result = &v1.ArangoJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangojobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoJob and updates it. Returns the server's representation of the arangoJob, and an error, if there is any.
func (c *arangoJobs) Update(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.UpdateOptions) (result *v1.ArangoJob, err error) {
result = &v1.ArangoJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangojobs").
Name(arangoJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoJobs) UpdateStatus(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.UpdateOptions) (result *v1.ArangoJob, err error) {
result = &v1.ArangoJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangojobs").
Name(arangoJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoJob and deletes it. Returns an error if one occurs.
func (c *arangoJobs) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangojobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangojobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoJob.
func (c *arangoJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoJob, err error) {
result = &v1.ArangoJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangojobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangojobsKind = v1.SchemeGroupVersion.WithKind("ArangoJob")
// Get takes name of the arangoJob, and returns the corresponding arangoJob object, and an error if there is any.
func (c *FakeArangoJobs) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoJob, err error) {
emptyResult := &v1.ArangoJob{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangojobsResource, c.ns, name), &v1.ArangoJob{})
Invokes(testing.NewGetActionWithOptions(arangojobsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoJob), err
}
// List takes label and field selectors, and returns the list of ArangoJobs that match those selectors.
func (c *FakeArangoJobs) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoJobList, err error) {
emptyResult := &v1.ArangoJobList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangojobsResource, arangojobsKind, c.ns, opts), &v1.ArangoJobList{})
Invokes(testing.NewListActionWithOptions(arangojobsResource, arangojobsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoJobs) List(ctx context.Context, opts metav1.ListOptions) (res
// Watch returns a watch.Interface that watches the requested arangoJobs.
func (c *FakeArangoJobs) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangojobsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangojobsResource, c.ns, opts))
}
// Create takes the representation of a arangoJob and creates it. Returns the server's representation of the arangoJob, and an error, if there is any.
func (c *FakeArangoJobs) Create(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.CreateOptions) (result *v1.ArangoJob, err error) {
emptyResult := &v1.ArangoJob{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangojobsResource, c.ns, arangoJob), &v1.ArangoJob{})
Invokes(testing.NewCreateActionWithOptions(arangojobsResource, c.ns, arangoJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoJob), err
}
// Update takes the representation of a arangoJob and updates it. Returns the server's representation of the arangoJob, and an error, if there is any.
func (c *FakeArangoJobs) Update(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.UpdateOptions) (result *v1.ArangoJob, err error) {
emptyResult := &v1.ArangoJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangojobsResource, c.ns, arangoJob), &v1.ArangoJob{})
Invokes(testing.NewUpdateActionWithOptions(arangojobsResource, c.ns, arangoJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoJobs) UpdateStatus(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.UpdateOptions) (*v1.ArangoJob, error) {
func (c *FakeArangoJobs) UpdateStatus(ctx context.Context, arangoJob *v1.ArangoJob, opts metav1.UpdateOptions) (result *v1.ArangoJob, err error) {
emptyResult := &v1.ArangoJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangojobsResource, "status", c.ns, arangoJob), &v1.ArangoJob{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangojobsResource, "status", c.ns, arangoJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoJob), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoJobs) Delete(ctx context.Context, name string, opts metav1.De
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoJobs) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangojobsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangojobsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoJobList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoJobs) DeleteCollection(ctx context.Context, opts metav1.Delet
// Patch applies the patch and returns the patched arangoJob.
func (c *FakeArangoJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoJob, err error) {
emptyResult := &v1.ArangoJob{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangojobsResource, c.ns, name, pt, data, subresources...), &v1.ArangoJob{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangojobsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoJob), err
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoBackupsGetter has a method to return a ArangoBackupInterface.
@ -44,6 +43,7 @@ type ArangoBackupsGetter interface {
type ArangoBackupInterface interface {
Create(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.CreateOptions) (*v1.ArangoBackup, error)
Update(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.UpdateOptions) (*v1.ArangoBackup, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.UpdateOptions) (*v1.ArangoBackup, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoBackupInterface interface {
// arangoBackups implements ArangoBackupInterface
type arangoBackups struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoBackup, *v1.ArangoBackupList]
}
// newArangoBackups returns a ArangoBackups
func newArangoBackups(c *BackupV1Client, namespace string) *arangoBackups {
return &arangoBackups{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoBackup, *v1.ArangoBackupList](
"arangobackups",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoBackup { return &v1.ArangoBackup{} },
func() *v1.ArangoBackupList { return &v1.ArangoBackupList{} }),
}
}
// Get takes name of the arangoBackup, and returns the corresponding arangoBackup object, and an error if there is any.
func (c *arangoBackups) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoBackup, err error) {
result = &v1.ArangoBackup{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangobackups").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoBackups that match those selectors.
func (c *arangoBackups) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoBackupList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoBackupList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangobackups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoBackups.
func (c *arangoBackups) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangobackups").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoBackup and creates it. Returns the server's representation of the arangoBackup, and an error, if there is any.
func (c *arangoBackups) Create(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.CreateOptions) (result *v1.ArangoBackup, err error) {
result = &v1.ArangoBackup{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangobackups").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoBackup).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoBackup and updates it. Returns the server's representation of the arangoBackup, and an error, if there is any.
func (c *arangoBackups) Update(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.UpdateOptions) (result *v1.ArangoBackup, err error) {
result = &v1.ArangoBackup{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangobackups").
Name(arangoBackup.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoBackup).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoBackups) UpdateStatus(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.UpdateOptions) (result *v1.ArangoBackup, err error) {
result = &v1.ArangoBackup{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangobackups").
Name(arangoBackup.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoBackup).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoBackup and deletes it. Returns an error if one occurs.
func (c *arangoBackups) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangobackups").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoBackups) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangobackups").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoBackup.
func (c *arangoBackups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoBackup, err error) {
result = &v1.ArangoBackup{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangobackups").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoBackupPoliciesGetter has a method to return a ArangoBackupPolicyInterface.
@ -44,6 +43,7 @@ type ArangoBackupPoliciesGetter interface {
type ArangoBackupPolicyInterface interface {
Create(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.CreateOptions) (*v1.ArangoBackupPolicy, error)
Update(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.UpdateOptions) (*v1.ArangoBackupPolicy, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.UpdateOptions) (*v1.ArangoBackupPolicy, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoBackupPolicyInterface interface {
// arangoBackupPolicies implements ArangoBackupPolicyInterface
type arangoBackupPolicies struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoBackupPolicy, *v1.ArangoBackupPolicyList]
}
// newArangoBackupPolicies returns a ArangoBackupPolicies
func newArangoBackupPolicies(c *BackupV1Client, namespace string) *arangoBackupPolicies {
return &arangoBackupPolicies{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoBackupPolicy, *v1.ArangoBackupPolicyList](
"arangobackuppolicies",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoBackupPolicy { return &v1.ArangoBackupPolicy{} },
func() *v1.ArangoBackupPolicyList { return &v1.ArangoBackupPolicyList{} }),
}
}
// Get takes name of the arangoBackupPolicy, and returns the corresponding arangoBackupPolicy object, and an error if there is any.
func (c *arangoBackupPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoBackupPolicy, err error) {
result = &v1.ArangoBackupPolicy{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangobackuppolicies").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoBackupPolicies that match those selectors.
func (c *arangoBackupPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoBackupPolicyList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoBackupPolicyList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangobackuppolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoBackupPolicies.
func (c *arangoBackupPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangobackuppolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoBackupPolicy and creates it. Returns the server's representation of the arangoBackupPolicy, and an error, if there is any.
func (c *arangoBackupPolicies) Create(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.CreateOptions) (result *v1.ArangoBackupPolicy, err error) {
result = &v1.ArangoBackupPolicy{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangobackuppolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoBackupPolicy).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoBackupPolicy and updates it. Returns the server's representation of the arangoBackupPolicy, and an error, if there is any.
func (c *arangoBackupPolicies) Update(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.UpdateOptions) (result *v1.ArangoBackupPolicy, err error) {
result = &v1.ArangoBackupPolicy{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangobackuppolicies").
Name(arangoBackupPolicy.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoBackupPolicy).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoBackupPolicies) UpdateStatus(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.UpdateOptions) (result *v1.ArangoBackupPolicy, err error) {
result = &v1.ArangoBackupPolicy{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangobackuppolicies").
Name(arangoBackupPolicy.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoBackupPolicy).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoBackupPolicy and deletes it. Returns an error if one occurs.
func (c *arangoBackupPolicies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangobackuppolicies").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoBackupPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangobackuppolicies").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoBackupPolicy.
func (c *arangoBackupPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoBackupPolicy, err error) {
result = &v1.ArangoBackupPolicy{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangobackuppolicies").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangobackupsKind = v1.SchemeGroupVersion.WithKind("ArangoBackup")
// Get takes name of the arangoBackup, and returns the corresponding arangoBackup object, and an error if there is any.
func (c *FakeArangoBackups) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoBackup, err error) {
emptyResult := &v1.ArangoBackup{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangobackupsResource, c.ns, name), &v1.ArangoBackup{})
Invokes(testing.NewGetActionWithOptions(arangobackupsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackup), err
}
// List takes label and field selectors, and returns the list of ArangoBackups that match those selectors.
func (c *FakeArangoBackups) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoBackupList, err error) {
emptyResult := &v1.ArangoBackupList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangobackupsResource, arangobackupsKind, c.ns, opts), &v1.ArangoBackupList{})
Invokes(testing.NewListActionWithOptions(arangobackupsResource, arangobackupsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoBackups) List(ctx context.Context, opts metav1.ListOptions) (
// Watch returns a watch.Interface that watches the requested arangoBackups.
func (c *FakeArangoBackups) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangobackupsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangobackupsResource, c.ns, opts))
}
// Create takes the representation of a arangoBackup and creates it. Returns the server's representation of the arangoBackup, and an error, if there is any.
func (c *FakeArangoBackups) Create(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.CreateOptions) (result *v1.ArangoBackup, err error) {
emptyResult := &v1.ArangoBackup{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangobackupsResource, c.ns, arangoBackup), &v1.ArangoBackup{})
Invokes(testing.NewCreateActionWithOptions(arangobackupsResource, c.ns, arangoBackup, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackup), err
}
// Update takes the representation of a arangoBackup and updates it. Returns the server's representation of the arangoBackup, and an error, if there is any.
func (c *FakeArangoBackups) Update(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.UpdateOptions) (result *v1.ArangoBackup, err error) {
emptyResult := &v1.ArangoBackup{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangobackupsResource, c.ns, arangoBackup), &v1.ArangoBackup{})
Invokes(testing.NewUpdateActionWithOptions(arangobackupsResource, c.ns, arangoBackup, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackup), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoBackups) UpdateStatus(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.UpdateOptions) (*v1.ArangoBackup, error) {
func (c *FakeArangoBackups) UpdateStatus(ctx context.Context, arangoBackup *v1.ArangoBackup, opts metav1.UpdateOptions) (result *v1.ArangoBackup, err error) {
emptyResult := &v1.ArangoBackup{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangobackupsResource, "status", c.ns, arangoBackup), &v1.ArangoBackup{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangobackupsResource, "status", c.ns, arangoBackup, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackup), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoBackups) Delete(ctx context.Context, name string, opts metav1
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoBackups) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangobackupsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangobackupsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoBackupList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoBackups) DeleteCollection(ctx context.Context, opts metav1.De
// Patch applies the patch and returns the patched arangoBackup.
func (c *FakeArangoBackups) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoBackup, err error) {
emptyResult := &v1.ArangoBackup{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangobackupsResource, c.ns, name, pt, data, subresources...), &v1.ArangoBackup{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangobackupsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackup), err
}

View file

@ -45,22 +45,24 @@ var arangobackuppoliciesKind = v1.SchemeGroupVersion.WithKind("ArangoBackupPolic
// Get takes name of the arangoBackupPolicy, and returns the corresponding arangoBackupPolicy object, and an error if there is any.
func (c *FakeArangoBackupPolicies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoBackupPolicy, err error) {
emptyResult := &v1.ArangoBackupPolicy{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangobackuppoliciesResource, c.ns, name), &v1.ArangoBackupPolicy{})
Invokes(testing.NewGetActionWithOptions(arangobackuppoliciesResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackupPolicy), err
}
// List takes label and field selectors, and returns the list of ArangoBackupPolicies that match those selectors.
func (c *FakeArangoBackupPolicies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoBackupPolicyList, err error) {
emptyResult := &v1.ArangoBackupPolicyList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangobackuppoliciesResource, arangobackuppoliciesKind, c.ns, opts), &v1.ArangoBackupPolicyList{})
Invokes(testing.NewListActionWithOptions(arangobackuppoliciesResource, arangobackuppoliciesKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoBackupPolicies) List(ctx context.Context, opts metav1.ListOpt
// Watch returns a watch.Interface that watches the requested arangoBackupPolicies.
func (c *FakeArangoBackupPolicies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangobackuppoliciesResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangobackuppoliciesResource, c.ns, opts))
}
// Create takes the representation of a arangoBackupPolicy and creates it. Returns the server's representation of the arangoBackupPolicy, and an error, if there is any.
func (c *FakeArangoBackupPolicies) Create(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.CreateOptions) (result *v1.ArangoBackupPolicy, err error) {
emptyResult := &v1.ArangoBackupPolicy{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangobackuppoliciesResource, c.ns, arangoBackupPolicy), &v1.ArangoBackupPolicy{})
Invokes(testing.NewCreateActionWithOptions(arangobackuppoliciesResource, c.ns, arangoBackupPolicy, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackupPolicy), err
}
// Update takes the representation of a arangoBackupPolicy and updates it. Returns the server's representation of the arangoBackupPolicy, and an error, if there is any.
func (c *FakeArangoBackupPolicies) Update(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.UpdateOptions) (result *v1.ArangoBackupPolicy, err error) {
emptyResult := &v1.ArangoBackupPolicy{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangobackuppoliciesResource, c.ns, arangoBackupPolicy), &v1.ArangoBackupPolicy{})
Invokes(testing.NewUpdateActionWithOptions(arangobackuppoliciesResource, c.ns, arangoBackupPolicy, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackupPolicy), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoBackupPolicies) UpdateStatus(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.UpdateOptions) (*v1.ArangoBackupPolicy, error) {
func (c *FakeArangoBackupPolicies) UpdateStatus(ctx context.Context, arangoBackupPolicy *v1.ArangoBackupPolicy, opts metav1.UpdateOptions) (result *v1.ArangoBackupPolicy, err error) {
emptyResult := &v1.ArangoBackupPolicy{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangobackuppoliciesResource, "status", c.ns, arangoBackupPolicy), &v1.ArangoBackupPolicy{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangobackuppoliciesResource, "status", c.ns, arangoBackupPolicy, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackupPolicy), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoBackupPolicies) Delete(ctx context.Context, name string, opts
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoBackupPolicies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangobackuppoliciesResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangobackuppoliciesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoBackupPolicyList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoBackupPolicies) DeleteCollection(ctx context.Context, opts me
// Patch applies the patch and returns the patched arangoBackupPolicy.
func (c *FakeArangoBackupPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoBackupPolicy, err error) {
emptyResult := &v1.ArangoBackupPolicy{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangobackuppoliciesResource, c.ns, name, pt, data, subresources...), &v1.ArangoBackupPolicy{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangobackuppoliciesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoBackupPolicy), err
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoClusterSynchronizationsGetter has a method to return a ArangoClusterSynchronizationInterface.
@ -44,6 +43,7 @@ type ArangoClusterSynchronizationsGetter interface {
type ArangoClusterSynchronizationInterface interface {
Create(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.CreateOptions) (*v1.ArangoClusterSynchronization, error)
Update(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (*v1.ArangoClusterSynchronization, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (*v1.ArangoClusterSynchronization, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoClusterSynchronizationInterface interface {
// arangoClusterSynchronizations implements ArangoClusterSynchronizationInterface
type arangoClusterSynchronizations struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoClusterSynchronization, *v1.ArangoClusterSynchronizationList]
}
// newArangoClusterSynchronizations returns a ArangoClusterSynchronizations
func newArangoClusterSynchronizations(c *DatabaseV1Client, namespace string) *arangoClusterSynchronizations {
return &arangoClusterSynchronizations{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoClusterSynchronization, *v1.ArangoClusterSynchronizationList](
"arangoclustersynchronizations",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoClusterSynchronization { return &v1.ArangoClusterSynchronization{} },
func() *v1.ArangoClusterSynchronizationList { return &v1.ArangoClusterSynchronizationList{} }),
}
}
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
func (c *arangoClusterSynchronizations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoClusterSynchronization, err error) {
result = &v1.ArangoClusterSynchronization{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
func (c *arangoClusterSynchronizations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoClusterSynchronizationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoClusterSynchronizationList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
func (c *arangoClusterSynchronizations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *arangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.CreateOptions) (result *v1.ArangoClusterSynchronization, err error) {
result = &v1.ArangoClusterSynchronization{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoClusterSynchronization).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *arangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (result *v1.ArangoClusterSynchronization, err error) {
result = &v1.ArangoClusterSynchronization{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(arangoClusterSynchronization.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoClusterSynchronization).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (result *v1.ArangoClusterSynchronization, err error) {
result = &v1.ArangoClusterSynchronization{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(arangoClusterSynchronization.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoClusterSynchronization).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoClusterSynchronization and deletes it. Returns an error if one occurs.
func (c *arangoClusterSynchronizations) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoClusterSynchronization.
func (c *arangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoClusterSynchronization, err error) {
result = &v1.ArangoClusterSynchronization{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoDeploymentsGetter has a method to return a ArangoDeploymentInterface.
@ -44,6 +43,7 @@ type ArangoDeploymentsGetter interface {
type ArangoDeploymentInterface interface {
Create(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.CreateOptions) (*v1.ArangoDeployment, error)
Update(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.UpdateOptions) (*v1.ArangoDeployment, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.UpdateOptions) (*v1.ArangoDeployment, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoDeploymentInterface interface {
// arangoDeployments implements ArangoDeploymentInterface
type arangoDeployments struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoDeployment, *v1.ArangoDeploymentList]
}
// newArangoDeployments returns a ArangoDeployments
func newArangoDeployments(c *DatabaseV1Client, namespace string) *arangoDeployments {
return &arangoDeployments{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoDeployment, *v1.ArangoDeploymentList](
"arangodeployments",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoDeployment { return &v1.ArangoDeployment{} },
func() *v1.ArangoDeploymentList { return &v1.ArangoDeploymentList{} }),
}
}
// Get takes name of the arangoDeployment, and returns the corresponding arangoDeployment object, and an error if there is any.
func (c *arangoDeployments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoDeployment, err error) {
result = &v1.ArangoDeployment{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeployments").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoDeployments that match those selectors.
func (c *arangoDeployments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoDeploymentList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoDeploymentList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoDeployments.
func (c *arangoDeployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoDeployment and creates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *arangoDeployments) Create(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.CreateOptions) (result *v1.ArangoDeployment, err error) {
result = &v1.ArangoDeployment{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeployment).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoDeployment and updates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *arangoDeployments) Update(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.UpdateOptions) (result *v1.ArangoDeployment, err error) {
result = &v1.ArangoDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeployments").
Name(arangoDeployment.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeployment).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoDeployments) UpdateStatus(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.UpdateOptions) (result *v1.ArangoDeployment, err error) {
result = &v1.ArangoDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeployments").
Name(arangoDeployment.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeployment).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoDeployment and deletes it. Returns an error if one occurs.
func (c *arangoDeployments) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeployments").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoDeployments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoDeployment.
func (c *arangoDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoDeployment, err error) {
result = &v1.ArangoDeployment{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangodeployments").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMembersGetter has a method to return a ArangoMemberInterface.
@ -44,6 +43,7 @@ type ArangoMembersGetter interface {
type ArangoMemberInterface interface {
Create(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.CreateOptions) (*v1.ArangoMember, error)
Update(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.UpdateOptions) (*v1.ArangoMember, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.UpdateOptions) (*v1.ArangoMember, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMemberInterface interface {
// arangoMembers implements ArangoMemberInterface
type arangoMembers struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoMember, *v1.ArangoMemberList]
}
// newArangoMembers returns a ArangoMembers
func newArangoMembers(c *DatabaseV1Client, namespace string) *arangoMembers {
return &arangoMembers{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoMember, *v1.ArangoMemberList](
"arangomembers",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoMember { return &v1.ArangoMember{} },
func() *v1.ArangoMemberList { return &v1.ArangoMemberList{} }),
}
}
// Get takes name of the arangoMember, and returns the corresponding arangoMember object, and an error if there is any.
func (c *arangoMembers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoMember, err error) {
result = &v1.ArangoMember{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomembers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMembers that match those selectors.
func (c *arangoMembers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoMemberList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoMemberList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMembers.
func (c *arangoMembers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMember and creates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *arangoMembers) Create(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.CreateOptions) (result *v1.ArangoMember, err error) {
result = &v1.ArangoMember{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMember).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMember and updates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *arangoMembers) Update(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.UpdateOptions) (result *v1.ArangoMember, err error) {
result = &v1.ArangoMember{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomembers").
Name(arangoMember.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMember).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMembers) UpdateStatus(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.UpdateOptions) (result *v1.ArangoMember, err error) {
result = &v1.ArangoMember{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomembers").
Name(arangoMember.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMember).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMember and deletes it. Returns an error if one occurs.
func (c *arangoMembers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomembers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMembers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMember.
func (c *arangoMembers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoMember, err error) {
result = &v1.ArangoMember{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomembers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoTasksGetter has a method to return a ArangoTaskInterface.
@ -44,6 +43,7 @@ type ArangoTasksGetter interface {
type ArangoTaskInterface interface {
Create(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.CreateOptions) (*v1.ArangoTask, error)
Update(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.UpdateOptions) (*v1.ArangoTask, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.UpdateOptions) (*v1.ArangoTask, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoTaskInterface interface {
// arangoTasks implements ArangoTaskInterface
type arangoTasks struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoTask, *v1.ArangoTaskList]
}
// newArangoTasks returns a ArangoTasks
func newArangoTasks(c *DatabaseV1Client, namespace string) *arangoTasks {
return &arangoTasks{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoTask, *v1.ArangoTaskList](
"arangotasks",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoTask { return &v1.ArangoTask{} },
func() *v1.ArangoTaskList { return &v1.ArangoTaskList{} }),
}
}
// Get takes name of the arangoTask, and returns the corresponding arangoTask object, and an error if there is any.
func (c *arangoTasks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoTask, err error) {
result = &v1.ArangoTask{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangotasks").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoTasks that match those selectors.
func (c *arangoTasks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoTaskList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoTaskList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoTasks.
func (c *arangoTasks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoTask and creates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *arangoTasks) Create(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.CreateOptions) (result *v1.ArangoTask, err error) {
result = &v1.ArangoTask{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoTask).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoTask and updates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *arangoTasks) Update(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.UpdateOptions) (result *v1.ArangoTask, err error) {
result = &v1.ArangoTask{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangotasks").
Name(arangoTask.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoTask).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoTasks) UpdateStatus(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.UpdateOptions) (result *v1.ArangoTask, err error) {
result = &v1.ArangoTask{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangotasks").
Name(arangoTask.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoTask).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoTask and deletes it. Returns an error if one occurs.
func (c *arangoTasks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangotasks").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoTasks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoTask.
func (c *arangoTasks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoTask, err error) {
result = &v1.ArangoTask{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangotasks").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangoclustersynchronizationsKind = v1.SchemeGroupVersion.WithKind("ArangoCl
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
func (c *FakeArangoClusterSynchronizations) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoClusterSynchronization, err error) {
emptyResult := &v1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoclustersynchronizationsResource, c.ns, name), &v1.ArangoClusterSynchronization{})
Invokes(testing.NewGetActionWithOptions(arangoclustersynchronizationsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoClusterSynchronization), err
}
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
func (c *FakeArangoClusterSynchronizations) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoClusterSynchronizationList, err error) {
emptyResult := &v1.ArangoClusterSynchronizationList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoclustersynchronizationsResource, arangoclustersynchronizationsKind, c.ns, opts), &v1.ArangoClusterSynchronizationList{})
Invokes(testing.NewListActionWithOptions(arangoclustersynchronizationsResource, arangoclustersynchronizationsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoClusterSynchronizations) List(ctx context.Context, opts metav
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
func (c *FakeArangoClusterSynchronizations) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoclustersynchronizationsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoclustersynchronizationsResource, c.ns, opts))
}
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *FakeArangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.CreateOptions) (result *v1.ArangoClusterSynchronization, err error) {
emptyResult := &v1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &v1.ArangoClusterSynchronization{})
Invokes(testing.NewCreateActionWithOptions(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoClusterSynchronization), err
}
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *FakeArangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (result *v1.ArangoClusterSynchronization, err error) {
emptyResult := &v1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &v1.ArangoClusterSynchronization{})
Invokes(testing.NewUpdateActionWithOptions(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoClusterSynchronization), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (*v1.ArangoClusterSynchronization, error) {
func (c *FakeArangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v1.ArangoClusterSynchronization, opts metav1.UpdateOptions) (result *v1.ArangoClusterSynchronization, err error) {
emptyResult := &v1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoclustersynchronizationsResource, "status", c.ns, arangoClusterSynchronization), &v1.ArangoClusterSynchronization{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoclustersynchronizationsResource, "status", c.ns, arangoClusterSynchronization, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoClusterSynchronization), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoClusterSynchronizations) Delete(ctx context.Context, name str
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoclustersynchronizationsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoclustersynchronizationsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoClusterSynchronizationList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoClusterSynchronizations) DeleteCollection(ctx context.Context
// Patch applies the patch and returns the patched arangoClusterSynchronization.
func (c *FakeArangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoClusterSynchronization, err error) {
emptyResult := &v1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoclustersynchronizationsResource, c.ns, name, pt, data, subresources...), &v1.ArangoClusterSynchronization{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoclustersynchronizationsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoClusterSynchronization), err
}

View file

@ -45,22 +45,24 @@ var arangodeploymentsKind = v1.SchemeGroupVersion.WithKind("ArangoDeployment")
// Get takes name of the arangoDeployment, and returns the corresponding arangoDeployment object, and an error if there is any.
func (c *FakeArangoDeployments) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoDeployment, err error) {
emptyResult := &v1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangodeploymentsResource, c.ns, name), &v1.ArangoDeployment{})
Invokes(testing.NewGetActionWithOptions(arangodeploymentsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeployment), err
}
// List takes label and field selectors, and returns the list of ArangoDeployments that match those selectors.
func (c *FakeArangoDeployments) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoDeploymentList, err error) {
emptyResult := &v1.ArangoDeploymentList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangodeploymentsResource, arangodeploymentsKind, c.ns, opts), &v1.ArangoDeploymentList{})
Invokes(testing.NewListActionWithOptions(arangodeploymentsResource, arangodeploymentsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoDeployments) List(ctx context.Context, opts metav1.ListOption
// Watch returns a watch.Interface that watches the requested arangoDeployments.
func (c *FakeArangoDeployments) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangodeploymentsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangodeploymentsResource, c.ns, opts))
}
// Create takes the representation of a arangoDeployment and creates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *FakeArangoDeployments) Create(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.CreateOptions) (result *v1.ArangoDeployment, err error) {
emptyResult := &v1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangodeploymentsResource, c.ns, arangoDeployment), &v1.ArangoDeployment{})
Invokes(testing.NewCreateActionWithOptions(arangodeploymentsResource, c.ns, arangoDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeployment), err
}
// Update takes the representation of a arangoDeployment and updates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *FakeArangoDeployments) Update(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.UpdateOptions) (result *v1.ArangoDeployment, err error) {
emptyResult := &v1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangodeploymentsResource, c.ns, arangoDeployment), &v1.ArangoDeployment{})
Invokes(testing.NewUpdateActionWithOptions(arangodeploymentsResource, c.ns, arangoDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeployment), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoDeployments) UpdateStatus(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.UpdateOptions) (*v1.ArangoDeployment, error) {
func (c *FakeArangoDeployments) UpdateStatus(ctx context.Context, arangoDeployment *v1.ArangoDeployment, opts metav1.UpdateOptions) (result *v1.ArangoDeployment, err error) {
emptyResult := &v1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangodeploymentsResource, "status", c.ns, arangoDeployment), &v1.ArangoDeployment{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangodeploymentsResource, "status", c.ns, arangoDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeployment), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoDeployments) Delete(ctx context.Context, name string, opts me
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoDeployments) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangodeploymentsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangodeploymentsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoDeploymentList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoDeployments) DeleteCollection(ctx context.Context, opts metav
// Patch applies the patch and returns the patched arangoDeployment.
func (c *FakeArangoDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoDeployment, err error) {
emptyResult := &v1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangodeploymentsResource, c.ns, name, pt, data, subresources...), &v1.ArangoDeployment{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangodeploymentsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeployment), err
}

View file

@ -45,22 +45,24 @@ var arangomembersKind = v1.SchemeGroupVersion.WithKind("ArangoMember")
// Get takes name of the arangoMember, and returns the corresponding arangoMember object, and an error if there is any.
func (c *FakeArangoMembers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoMember, err error) {
emptyResult := &v1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomembersResource, c.ns, name), &v1.ArangoMember{})
Invokes(testing.NewGetActionWithOptions(arangomembersResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoMember), err
}
// List takes label and field selectors, and returns the list of ArangoMembers that match those selectors.
func (c *FakeArangoMembers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoMemberList, err error) {
emptyResult := &v1.ArangoMemberList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomembersResource, arangomembersKind, c.ns, opts), &v1.ArangoMemberList{})
Invokes(testing.NewListActionWithOptions(arangomembersResource, arangomembersKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMembers) List(ctx context.Context, opts metav1.ListOptions) (
// Watch returns a watch.Interface that watches the requested arangoMembers.
func (c *FakeArangoMembers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomembersResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomembersResource, c.ns, opts))
}
// Create takes the representation of a arangoMember and creates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *FakeArangoMembers) Create(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.CreateOptions) (result *v1.ArangoMember, err error) {
emptyResult := &v1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomembersResource, c.ns, arangoMember), &v1.ArangoMember{})
Invokes(testing.NewCreateActionWithOptions(arangomembersResource, c.ns, arangoMember, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoMember), err
}
// Update takes the representation of a arangoMember and updates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *FakeArangoMembers) Update(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.UpdateOptions) (result *v1.ArangoMember, err error) {
emptyResult := &v1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomembersResource, c.ns, arangoMember), &v1.ArangoMember{})
Invokes(testing.NewUpdateActionWithOptions(arangomembersResource, c.ns, arangoMember, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoMember), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMembers) UpdateStatus(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.UpdateOptions) (*v1.ArangoMember, error) {
func (c *FakeArangoMembers) UpdateStatus(ctx context.Context, arangoMember *v1.ArangoMember, opts metav1.UpdateOptions) (result *v1.ArangoMember, err error) {
emptyResult := &v1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomembersResource, "status", c.ns, arangoMember), &v1.ArangoMember{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomembersResource, "status", c.ns, arangoMember, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoMember), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMembers) Delete(ctx context.Context, name string, opts metav1
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMembers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomembersResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomembersResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoMemberList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMembers) DeleteCollection(ctx context.Context, opts metav1.De
// Patch applies the patch and returns the patched arangoMember.
func (c *FakeArangoMembers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoMember, err error) {
emptyResult := &v1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomembersResource, c.ns, name, pt, data, subresources...), &v1.ArangoMember{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomembersResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoMember), err
}

View file

@ -45,22 +45,24 @@ var arangotasksKind = v1.SchemeGroupVersion.WithKind("ArangoTask")
// Get takes name of the arangoTask, and returns the corresponding arangoTask object, and an error if there is any.
func (c *FakeArangoTasks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoTask, err error) {
emptyResult := &v1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangotasksResource, c.ns, name), &v1.ArangoTask{})
Invokes(testing.NewGetActionWithOptions(arangotasksResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoTask), err
}
// List takes label and field selectors, and returns the list of ArangoTasks that match those selectors.
func (c *FakeArangoTasks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoTaskList, err error) {
emptyResult := &v1.ArangoTaskList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangotasksResource, arangotasksKind, c.ns, opts), &v1.ArangoTaskList{})
Invokes(testing.NewListActionWithOptions(arangotasksResource, arangotasksKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoTasks) List(ctx context.Context, opts metav1.ListOptions) (re
// Watch returns a watch.Interface that watches the requested arangoTasks.
func (c *FakeArangoTasks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangotasksResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangotasksResource, c.ns, opts))
}
// Create takes the representation of a arangoTask and creates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *FakeArangoTasks) Create(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.CreateOptions) (result *v1.ArangoTask, err error) {
emptyResult := &v1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangotasksResource, c.ns, arangoTask), &v1.ArangoTask{})
Invokes(testing.NewCreateActionWithOptions(arangotasksResource, c.ns, arangoTask, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoTask), err
}
// Update takes the representation of a arangoTask and updates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *FakeArangoTasks) Update(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.UpdateOptions) (result *v1.ArangoTask, err error) {
emptyResult := &v1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangotasksResource, c.ns, arangoTask), &v1.ArangoTask{})
Invokes(testing.NewUpdateActionWithOptions(arangotasksResource, c.ns, arangoTask, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoTask), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoTasks) UpdateStatus(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.UpdateOptions) (*v1.ArangoTask, error) {
func (c *FakeArangoTasks) UpdateStatus(ctx context.Context, arangoTask *v1.ArangoTask, opts metav1.UpdateOptions) (result *v1.ArangoTask, err error) {
emptyResult := &v1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangotasksResource, "status", c.ns, arangoTask), &v1.ArangoTask{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangotasksResource, "status", c.ns, arangoTask, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoTask), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoTasks) Delete(ctx context.Context, name string, opts metav1.D
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoTasks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangotasksResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangotasksResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoTaskList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoTasks) DeleteCollection(ctx context.Context, opts metav1.Dele
// Patch applies the patch and returns the patched arangoTask.
func (c *FakeArangoTasks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoTask, err error) {
emptyResult := &v1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangotasksResource, c.ns, name, pt, data, subresources...), &v1.ArangoTask{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangotasksResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoTask), err
}

View file

@ -24,14 +24,13 @@ package v2alpha1
import (
"context"
"time"
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoClusterSynchronizationsGetter has a method to return a ArangoClusterSynchronizationInterface.
@ -44,6 +43,7 @@ type ArangoClusterSynchronizationsGetter interface {
type ArangoClusterSynchronizationInterface interface {
Create(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.CreateOptions) (*v2alpha1.ArangoClusterSynchronization, error)
Update(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (*v2alpha1.ArangoClusterSynchronization, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (*v2alpha1.ArangoClusterSynchronization, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoClusterSynchronizationInterface interface {
// arangoClusterSynchronizations implements ArangoClusterSynchronizationInterface
type arangoClusterSynchronizations struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v2alpha1.ArangoClusterSynchronization, *v2alpha1.ArangoClusterSynchronizationList]
}
// newArangoClusterSynchronizations returns a ArangoClusterSynchronizations
func newArangoClusterSynchronizations(c *DatabaseV2alpha1Client, namespace string) *arangoClusterSynchronizations {
return &arangoClusterSynchronizations{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v2alpha1.ArangoClusterSynchronization, *v2alpha1.ArangoClusterSynchronizationList](
"arangoclustersynchronizations",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v2alpha1.ArangoClusterSynchronization { return &v2alpha1.ArangoClusterSynchronization{} },
func() *v2alpha1.ArangoClusterSynchronizationList { return &v2alpha1.ArangoClusterSynchronizationList{} }),
}
}
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
func (c *arangoClusterSynchronizations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
result = &v2alpha1.ArangoClusterSynchronization{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
func (c *arangoClusterSynchronizations) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoClusterSynchronizationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v2alpha1.ArangoClusterSynchronizationList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
func (c *arangoClusterSynchronizations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *arangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.CreateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
result = &v2alpha1.ArangoClusterSynchronization{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoClusterSynchronization).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *arangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
result = &v2alpha1.ArangoClusterSynchronization{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(arangoClusterSynchronization.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoClusterSynchronization).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
result = &v2alpha1.ArangoClusterSynchronization{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(arangoClusterSynchronization.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoClusterSynchronization).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoClusterSynchronization and deletes it. Returns an error if one occurs.
func (c *arangoClusterSynchronizations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoclustersynchronizations").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoClusterSynchronization.
func (c *arangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoClusterSynchronization, err error) {
result = &v2alpha1.ArangoClusterSynchronization{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoclustersynchronizations").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v2alpha1
import (
"context"
"time"
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoDeploymentsGetter has a method to return a ArangoDeploymentInterface.
@ -44,6 +43,7 @@ type ArangoDeploymentsGetter interface {
type ArangoDeploymentInterface interface {
Create(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.CreateOptions) (*v2alpha1.ArangoDeployment, error)
Update(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.UpdateOptions) (*v2alpha1.ArangoDeployment, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.UpdateOptions) (*v2alpha1.ArangoDeployment, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoDeploymentInterface interface {
// arangoDeployments implements ArangoDeploymentInterface
type arangoDeployments struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v2alpha1.ArangoDeployment, *v2alpha1.ArangoDeploymentList]
}
// newArangoDeployments returns a ArangoDeployments
func newArangoDeployments(c *DatabaseV2alpha1Client, namespace string) *arangoDeployments {
return &arangoDeployments{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v2alpha1.ArangoDeployment, *v2alpha1.ArangoDeploymentList](
"arangodeployments",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v2alpha1.ArangoDeployment { return &v2alpha1.ArangoDeployment{} },
func() *v2alpha1.ArangoDeploymentList { return &v2alpha1.ArangoDeploymentList{} }),
}
}
// Get takes name of the arangoDeployment, and returns the corresponding arangoDeployment object, and an error if there is any.
func (c *arangoDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoDeployment, err error) {
result = &v2alpha1.ArangoDeployment{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeployments").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoDeployments that match those selectors.
func (c *arangoDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoDeploymentList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v2alpha1.ArangoDeploymentList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoDeployments.
func (c *arangoDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoDeployment and creates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *arangoDeployments) Create(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.CreateOptions) (result *v2alpha1.ArangoDeployment, err error) {
result = &v2alpha1.ArangoDeployment{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeployment).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoDeployment and updates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *arangoDeployments) Update(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeployment, err error) {
result = &v2alpha1.ArangoDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeployments").
Name(arangoDeployment.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeployment).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoDeployments) UpdateStatus(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeployment, err error) {
result = &v2alpha1.ArangoDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeployments").
Name(arangoDeployment.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeployment).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoDeployment and deletes it. Returns an error if one occurs.
func (c *arangoDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeployments").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeployments").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoDeployment.
func (c *arangoDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoDeployment, err error) {
result = &v2alpha1.ArangoDeployment{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangodeployments").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v2alpha1
import (
"context"
"time"
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMembersGetter has a method to return a ArangoMemberInterface.
@ -44,6 +43,7 @@ type ArangoMembersGetter interface {
type ArangoMemberInterface interface {
Create(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.CreateOptions) (*v2alpha1.ArangoMember, error)
Update(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.UpdateOptions) (*v2alpha1.ArangoMember, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.UpdateOptions) (*v2alpha1.ArangoMember, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMemberInterface interface {
// arangoMembers implements ArangoMemberInterface
type arangoMembers struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v2alpha1.ArangoMember, *v2alpha1.ArangoMemberList]
}
// newArangoMembers returns a ArangoMembers
func newArangoMembers(c *DatabaseV2alpha1Client, namespace string) *arangoMembers {
return &arangoMembers{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v2alpha1.ArangoMember, *v2alpha1.ArangoMemberList](
"arangomembers",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v2alpha1.ArangoMember { return &v2alpha1.ArangoMember{} },
func() *v2alpha1.ArangoMemberList { return &v2alpha1.ArangoMemberList{} }),
}
}
// Get takes name of the arangoMember, and returns the corresponding arangoMember object, and an error if there is any.
func (c *arangoMembers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoMember, err error) {
result = &v2alpha1.ArangoMember{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomembers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMembers that match those selectors.
func (c *arangoMembers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoMemberList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v2alpha1.ArangoMemberList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMembers.
func (c *arangoMembers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMember and creates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *arangoMembers) Create(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.CreateOptions) (result *v2alpha1.ArangoMember, err error) {
result = &v2alpha1.ArangoMember{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMember).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMember and updates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *arangoMembers) Update(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.UpdateOptions) (result *v2alpha1.ArangoMember, err error) {
result = &v2alpha1.ArangoMember{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomembers").
Name(arangoMember.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMember).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMembers) UpdateStatus(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.UpdateOptions) (result *v2alpha1.ArangoMember, err error) {
result = &v2alpha1.ArangoMember{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomembers").
Name(arangoMember.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMember).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMember and deletes it. Returns an error if one occurs.
func (c *arangoMembers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomembers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMembers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomembers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMember.
func (c *arangoMembers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoMember, err error) {
result = &v2alpha1.ArangoMember{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomembers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v2alpha1
import (
"context"
"time"
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoTasksGetter has a method to return a ArangoTaskInterface.
@ -44,6 +43,7 @@ type ArangoTasksGetter interface {
type ArangoTaskInterface interface {
Create(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.CreateOptions) (*v2alpha1.ArangoTask, error)
Update(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.UpdateOptions) (*v2alpha1.ArangoTask, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.UpdateOptions) (*v2alpha1.ArangoTask, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoTaskInterface interface {
// arangoTasks implements ArangoTaskInterface
type arangoTasks struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v2alpha1.ArangoTask, *v2alpha1.ArangoTaskList]
}
// newArangoTasks returns a ArangoTasks
func newArangoTasks(c *DatabaseV2alpha1Client, namespace string) *arangoTasks {
return &arangoTasks{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v2alpha1.ArangoTask, *v2alpha1.ArangoTaskList](
"arangotasks",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v2alpha1.ArangoTask { return &v2alpha1.ArangoTask{} },
func() *v2alpha1.ArangoTaskList { return &v2alpha1.ArangoTaskList{} }),
}
}
// Get takes name of the arangoTask, and returns the corresponding arangoTask object, and an error if there is any.
func (c *arangoTasks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoTask, err error) {
result = &v2alpha1.ArangoTask{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangotasks").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoTasks that match those selectors.
func (c *arangoTasks) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoTaskList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v2alpha1.ArangoTaskList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoTasks.
func (c *arangoTasks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoTask and creates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *arangoTasks) Create(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.CreateOptions) (result *v2alpha1.ArangoTask, err error) {
result = &v2alpha1.ArangoTask{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoTask).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoTask and updates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *arangoTasks) Update(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.UpdateOptions) (result *v2alpha1.ArangoTask, err error) {
result = &v2alpha1.ArangoTask{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangotasks").
Name(arangoTask.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoTask).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoTasks) UpdateStatus(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.UpdateOptions) (result *v2alpha1.ArangoTask, err error) {
result = &v2alpha1.ArangoTask{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangotasks").
Name(arangoTask.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoTask).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoTask and deletes it. Returns an error if one occurs.
func (c *arangoTasks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangotasks").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoTasks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangotasks").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoTask.
func (c *arangoTasks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoTask, err error) {
result = &v2alpha1.ArangoTask{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangotasks").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangoclustersynchronizationsKind = v2alpha1.SchemeGroupVersion.WithKind("Ar
// Get takes name of the arangoClusterSynchronization, and returns the corresponding arangoClusterSynchronization object, and an error if there is any.
func (c *FakeArangoClusterSynchronizations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
emptyResult := &v2alpha1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoclustersynchronizationsResource, c.ns, name), &v2alpha1.ArangoClusterSynchronization{})
Invokes(testing.NewGetActionWithOptions(arangoclustersynchronizationsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoClusterSynchronization), err
}
// List takes label and field selectors, and returns the list of ArangoClusterSynchronizations that match those selectors.
func (c *FakeArangoClusterSynchronizations) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoClusterSynchronizationList, err error) {
emptyResult := &v2alpha1.ArangoClusterSynchronizationList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoclustersynchronizationsResource, arangoclustersynchronizationsKind, c.ns, opts), &v2alpha1.ArangoClusterSynchronizationList{})
Invokes(testing.NewListActionWithOptions(arangoclustersynchronizationsResource, arangoclustersynchronizationsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoClusterSynchronizations) List(ctx context.Context, opts v1.Li
// Watch returns a watch.Interface that watches the requested arangoClusterSynchronizations.
func (c *FakeArangoClusterSynchronizations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoclustersynchronizationsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoclustersynchronizationsResource, c.ns, opts))
}
// Create takes the representation of a arangoClusterSynchronization and creates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *FakeArangoClusterSynchronizations) Create(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.CreateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
emptyResult := &v2alpha1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &v2alpha1.ArangoClusterSynchronization{})
Invokes(testing.NewCreateActionWithOptions(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoClusterSynchronization), err
}
// Update takes the representation of a arangoClusterSynchronization and updates it. Returns the server's representation of the arangoClusterSynchronization, and an error, if there is any.
func (c *FakeArangoClusterSynchronizations) Update(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
emptyResult := &v2alpha1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization), &v2alpha1.ArangoClusterSynchronization{})
Invokes(testing.NewUpdateActionWithOptions(arangoclustersynchronizationsResource, c.ns, arangoClusterSynchronization, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoClusterSynchronization), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (*v2alpha1.ArangoClusterSynchronization, error) {
func (c *FakeArangoClusterSynchronizations) UpdateStatus(ctx context.Context, arangoClusterSynchronization *v2alpha1.ArangoClusterSynchronization, opts v1.UpdateOptions) (result *v2alpha1.ArangoClusterSynchronization, err error) {
emptyResult := &v2alpha1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoclustersynchronizationsResource, "status", c.ns, arangoClusterSynchronization), &v2alpha1.ArangoClusterSynchronization{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoclustersynchronizationsResource, "status", c.ns, arangoClusterSynchronization, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoClusterSynchronization), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoClusterSynchronizations) Delete(ctx context.Context, name str
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoClusterSynchronizations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoclustersynchronizationsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoclustersynchronizationsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v2alpha1.ArangoClusterSynchronizationList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoClusterSynchronizations) DeleteCollection(ctx context.Context
// Patch applies the patch and returns the patched arangoClusterSynchronization.
func (c *FakeArangoClusterSynchronizations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoClusterSynchronization, err error) {
emptyResult := &v2alpha1.ArangoClusterSynchronization{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoclustersynchronizationsResource, c.ns, name, pt, data, subresources...), &v2alpha1.ArangoClusterSynchronization{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoclustersynchronizationsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoClusterSynchronization), err
}

View file

@ -45,22 +45,24 @@ var arangodeploymentsKind = v2alpha1.SchemeGroupVersion.WithKind("ArangoDeployme
// Get takes name of the arangoDeployment, and returns the corresponding arangoDeployment object, and an error if there is any.
func (c *FakeArangoDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoDeployment, err error) {
emptyResult := &v2alpha1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangodeploymentsResource, c.ns, name), &v2alpha1.ArangoDeployment{})
Invokes(testing.NewGetActionWithOptions(arangodeploymentsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeployment), err
}
// List takes label and field selectors, and returns the list of ArangoDeployments that match those selectors.
func (c *FakeArangoDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoDeploymentList, err error) {
emptyResult := &v2alpha1.ArangoDeploymentList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangodeploymentsResource, arangodeploymentsKind, c.ns, opts), &v2alpha1.ArangoDeploymentList{})
Invokes(testing.NewListActionWithOptions(arangodeploymentsResource, arangodeploymentsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoDeployments) List(ctx context.Context, opts v1.ListOptions) (
// Watch returns a watch.Interface that watches the requested arangoDeployments.
func (c *FakeArangoDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangodeploymentsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangodeploymentsResource, c.ns, opts))
}
// Create takes the representation of a arangoDeployment and creates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *FakeArangoDeployments) Create(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.CreateOptions) (result *v2alpha1.ArangoDeployment, err error) {
emptyResult := &v2alpha1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangodeploymentsResource, c.ns, arangoDeployment), &v2alpha1.ArangoDeployment{})
Invokes(testing.NewCreateActionWithOptions(arangodeploymentsResource, c.ns, arangoDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeployment), err
}
// Update takes the representation of a arangoDeployment and updates it. Returns the server's representation of the arangoDeployment, and an error, if there is any.
func (c *FakeArangoDeployments) Update(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeployment, err error) {
emptyResult := &v2alpha1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangodeploymentsResource, c.ns, arangoDeployment), &v2alpha1.ArangoDeployment{})
Invokes(testing.NewUpdateActionWithOptions(arangodeploymentsResource, c.ns, arangoDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeployment), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoDeployments) UpdateStatus(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.UpdateOptions) (*v2alpha1.ArangoDeployment, error) {
func (c *FakeArangoDeployments) UpdateStatus(ctx context.Context, arangoDeployment *v2alpha1.ArangoDeployment, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeployment, err error) {
emptyResult := &v2alpha1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangodeploymentsResource, "status", c.ns, arangoDeployment), &v2alpha1.ArangoDeployment{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangodeploymentsResource, "status", c.ns, arangoDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeployment), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoDeployments) Delete(ctx context.Context, name string, opts v1
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangodeploymentsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangodeploymentsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v2alpha1.ArangoDeploymentList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoDeployments) DeleteCollection(ctx context.Context, opts v1.De
// Patch applies the patch and returns the patched arangoDeployment.
func (c *FakeArangoDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoDeployment, err error) {
emptyResult := &v2alpha1.ArangoDeployment{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangodeploymentsResource, c.ns, name, pt, data, subresources...), &v2alpha1.ArangoDeployment{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangodeploymentsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeployment), err
}

View file

@ -45,22 +45,24 @@ var arangomembersKind = v2alpha1.SchemeGroupVersion.WithKind("ArangoMember")
// Get takes name of the arangoMember, and returns the corresponding arangoMember object, and an error if there is any.
func (c *FakeArangoMembers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoMember, err error) {
emptyResult := &v2alpha1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomembersResource, c.ns, name), &v2alpha1.ArangoMember{})
Invokes(testing.NewGetActionWithOptions(arangomembersResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoMember), err
}
// List takes label and field selectors, and returns the list of ArangoMembers that match those selectors.
func (c *FakeArangoMembers) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoMemberList, err error) {
emptyResult := &v2alpha1.ArangoMemberList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomembersResource, arangomembersKind, c.ns, opts), &v2alpha1.ArangoMemberList{})
Invokes(testing.NewListActionWithOptions(arangomembersResource, arangomembersKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMembers) List(ctx context.Context, opts v1.ListOptions) (resu
// Watch returns a watch.Interface that watches the requested arangoMembers.
func (c *FakeArangoMembers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomembersResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomembersResource, c.ns, opts))
}
// Create takes the representation of a arangoMember and creates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *FakeArangoMembers) Create(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.CreateOptions) (result *v2alpha1.ArangoMember, err error) {
emptyResult := &v2alpha1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomembersResource, c.ns, arangoMember), &v2alpha1.ArangoMember{})
Invokes(testing.NewCreateActionWithOptions(arangomembersResource, c.ns, arangoMember, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoMember), err
}
// Update takes the representation of a arangoMember and updates it. Returns the server's representation of the arangoMember, and an error, if there is any.
func (c *FakeArangoMembers) Update(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.UpdateOptions) (result *v2alpha1.ArangoMember, err error) {
emptyResult := &v2alpha1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomembersResource, c.ns, arangoMember), &v2alpha1.ArangoMember{})
Invokes(testing.NewUpdateActionWithOptions(arangomembersResource, c.ns, arangoMember, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoMember), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMembers) UpdateStatus(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.UpdateOptions) (*v2alpha1.ArangoMember, error) {
func (c *FakeArangoMembers) UpdateStatus(ctx context.Context, arangoMember *v2alpha1.ArangoMember, opts v1.UpdateOptions) (result *v2alpha1.ArangoMember, err error) {
emptyResult := &v2alpha1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomembersResource, "status", c.ns, arangoMember), &v2alpha1.ArangoMember{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomembersResource, "status", c.ns, arangoMember, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoMember), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMembers) Delete(ctx context.Context, name string, opts v1.Del
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMembers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomembersResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomembersResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v2alpha1.ArangoMemberList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMembers) DeleteCollection(ctx context.Context, opts v1.Delete
// Patch applies the patch and returns the patched arangoMember.
func (c *FakeArangoMembers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoMember, err error) {
emptyResult := &v2alpha1.ArangoMember{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomembersResource, c.ns, name, pt, data, subresources...), &v2alpha1.ArangoMember{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomembersResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoMember), err
}

View file

@ -45,22 +45,24 @@ var arangotasksKind = v2alpha1.SchemeGroupVersion.WithKind("ArangoTask")
// Get takes name of the arangoTask, and returns the corresponding arangoTask object, and an error if there is any.
func (c *FakeArangoTasks) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoTask, err error) {
emptyResult := &v2alpha1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangotasksResource, c.ns, name), &v2alpha1.ArangoTask{})
Invokes(testing.NewGetActionWithOptions(arangotasksResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoTask), err
}
// List takes label and field selectors, and returns the list of ArangoTasks that match those selectors.
func (c *FakeArangoTasks) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoTaskList, err error) {
emptyResult := &v2alpha1.ArangoTaskList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangotasksResource, arangotasksKind, c.ns, opts), &v2alpha1.ArangoTaskList{})
Invokes(testing.NewListActionWithOptions(arangotasksResource, arangotasksKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoTasks) List(ctx context.Context, opts v1.ListOptions) (result
// Watch returns a watch.Interface that watches the requested arangoTasks.
func (c *FakeArangoTasks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangotasksResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangotasksResource, c.ns, opts))
}
// Create takes the representation of a arangoTask and creates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *FakeArangoTasks) Create(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.CreateOptions) (result *v2alpha1.ArangoTask, err error) {
emptyResult := &v2alpha1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangotasksResource, c.ns, arangoTask), &v2alpha1.ArangoTask{})
Invokes(testing.NewCreateActionWithOptions(arangotasksResource, c.ns, arangoTask, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoTask), err
}
// Update takes the representation of a arangoTask and updates it. Returns the server's representation of the arangoTask, and an error, if there is any.
func (c *FakeArangoTasks) Update(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.UpdateOptions) (result *v2alpha1.ArangoTask, err error) {
emptyResult := &v2alpha1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangotasksResource, c.ns, arangoTask), &v2alpha1.ArangoTask{})
Invokes(testing.NewUpdateActionWithOptions(arangotasksResource, c.ns, arangoTask, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoTask), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoTasks) UpdateStatus(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.UpdateOptions) (*v2alpha1.ArangoTask, error) {
func (c *FakeArangoTasks) UpdateStatus(ctx context.Context, arangoTask *v2alpha1.ArangoTask, opts v1.UpdateOptions) (result *v2alpha1.ArangoTask, err error) {
emptyResult := &v2alpha1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangotasksResource, "status", c.ns, arangoTask), &v2alpha1.ArangoTask{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangotasksResource, "status", c.ns, arangoTask, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoTask), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoTasks) Delete(ctx context.Context, name string, opts v1.Delet
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoTasks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangotasksResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangotasksResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v2alpha1.ArangoTaskList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoTasks) DeleteCollection(ctx context.Context, opts v1.DeleteOp
// Patch applies the patch and returns the patched arangoTask.
func (c *FakeArangoTasks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoTask, err error) {
emptyResult := &v2alpha1.ArangoTask{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangotasksResource, c.ns, name, pt, data, subresources...), &v2alpha1.ArangoTask{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangotasksResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoTask), err
}

View file

@ -24,14 +24,13 @@ package v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMLBatchJobsGetter has a method to return a ArangoMLBatchJobInterface.
@ -44,6 +43,7 @@ type ArangoMLBatchJobsGetter interface {
type ArangoMLBatchJobInterface interface {
Create(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.CreateOptions) (*v1alpha1.ArangoMLBatchJob, error)
Update(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLBatchJob, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLBatchJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMLBatchJobInterface interface {
// arangoMLBatchJobs implements ArangoMLBatchJobInterface
type arangoMLBatchJobs struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1alpha1.ArangoMLBatchJob, *v1alpha1.ArangoMLBatchJobList]
}
// newArangoMLBatchJobs returns a ArangoMLBatchJobs
func newArangoMLBatchJobs(c *MlV1alpha1Client, namespace string) *arangoMLBatchJobs {
return &arangoMLBatchJobs{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1alpha1.ArangoMLBatchJob, *v1alpha1.ArangoMLBatchJobList](
"arangomlbatchjobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha1.ArangoMLBatchJob { return &v1alpha1.ArangoMLBatchJob{} },
func() *v1alpha1.ArangoMLBatchJobList { return &v1alpha1.ArangoMLBatchJobList{} }),
}
}
// Get takes name of the arangoMLBatchJob, and returns the corresponding arangoMLBatchJob object, and an error if there is any.
func (c *arangoMLBatchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLBatchJobs that match those selectors.
func (c *arangoMLBatchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLBatchJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLBatchJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLBatchJobs.
func (c *arangoMLBatchJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomlbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLBatchJob and creates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *arangoMLBatchJobs) Create(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLBatchJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLBatchJob and updates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *arangoMLBatchJobs) Update(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(arangoMLBatchJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLBatchJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMLBatchJobs) UpdateStatus(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(arangoMLBatchJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLBatchJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLBatchJob and deletes it. Returns an error if one occurs.
func (c *arangoMLBatchJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLBatchJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlbatchjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLBatchJob.
func (c *arangoMLBatchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLBatchJob, err error) {
result = &v1alpha1.ArangoMLBatchJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlbatchjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMLCronJobsGetter has a method to return a ArangoMLCronJobInterface.
@ -44,6 +43,7 @@ type ArangoMLCronJobsGetter interface {
type ArangoMLCronJobInterface interface {
Create(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.CreateOptions) (*v1alpha1.ArangoMLCronJob, error)
Update(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLCronJob, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLCronJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMLCronJobInterface interface {
// arangoMLCronJobs implements ArangoMLCronJobInterface
type arangoMLCronJobs struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1alpha1.ArangoMLCronJob, *v1alpha1.ArangoMLCronJobList]
}
// newArangoMLCronJobs returns a ArangoMLCronJobs
func newArangoMLCronJobs(c *MlV1alpha1Client, namespace string) *arangoMLCronJobs {
return &arangoMLCronJobs{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1alpha1.ArangoMLCronJob, *v1alpha1.ArangoMLCronJobList](
"arangomlcronjobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha1.ArangoMLCronJob { return &v1alpha1.ArangoMLCronJob{} },
func() *v1alpha1.ArangoMLCronJobList { return &v1alpha1.ArangoMLCronJobList{} }),
}
}
// Get takes name of the arangoMLCronJob, and returns the corresponding arangoMLCronJob object, and an error if there is any.
func (c *arangoMLCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLCronJobs that match those selectors.
func (c *arangoMLCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLCronJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLCronJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLCronJobs.
func (c *arangoMLCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomlcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLCronJob and creates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *arangoMLCronJobs) Create(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLCronJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLCronJob and updates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *arangoMLCronJobs) Update(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(arangoMLCronJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLCronJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMLCronJobs) UpdateStatus(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(arangoMLCronJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLCronJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLCronJob and deletes it. Returns an error if one occurs.
func (c *arangoMLCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlcronjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLCronJob.
func (c *arangoMLCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLCronJob, err error) {
result = &v1alpha1.ArangoMLCronJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlcronjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMLExtensionsGetter has a method to return a ArangoMLExtensionInterface.
@ -44,6 +43,7 @@ type ArangoMLExtensionsGetter interface {
type ArangoMLExtensionInterface interface {
Create(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.CreateOptions) (*v1alpha1.ArangoMLExtension, error)
Update(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (*v1alpha1.ArangoMLExtension, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (*v1alpha1.ArangoMLExtension, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMLExtensionInterface interface {
// arangoMLExtensions implements ArangoMLExtensionInterface
type arangoMLExtensions struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1alpha1.ArangoMLExtension, *v1alpha1.ArangoMLExtensionList]
}
// newArangoMLExtensions returns a ArangoMLExtensions
func newArangoMLExtensions(c *MlV1alpha1Client, namespace string) *arangoMLExtensions {
return &arangoMLExtensions{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1alpha1.ArangoMLExtension, *v1alpha1.ArangoMLExtensionList](
"arangomlextensions",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha1.ArangoMLExtension { return &v1alpha1.ArangoMLExtension{} },
func() *v1alpha1.ArangoMLExtensionList { return &v1alpha1.ArangoMLExtensionList{} }),
}
}
// Get takes name of the arangoMLExtension, and returns the corresponding arangoMLExtension object, and an error if there is any.
func (c *arangoMLExtensions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLExtensions that match those selectors.
func (c *arangoMLExtensions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLExtensionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLExtensionList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLExtensions.
func (c *arangoMLExtensions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLExtension and creates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *arangoMLExtensions) Create(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.CreateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLExtension and updates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *arangoMLExtensions) Update(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlextensions").
Name(arangoMLExtension.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlextensions").
Name(arangoMLExtension.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLExtension and deletes it. Returns an error if one occurs.
func (c *arangoMLExtensions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLExtensions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLExtension.
func (c *arangoMLExtensions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLExtension, err error) {
result = &v1alpha1.ArangoMLExtension{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMLStoragesGetter has a method to return a ArangoMLStorageInterface.
@ -44,6 +43,7 @@ type ArangoMLStoragesGetter interface {
type ArangoMLStorageInterface interface {
Create(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.CreateOptions) (*v1alpha1.ArangoMLStorage, error)
Update(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (*v1alpha1.ArangoMLStorage, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (*v1alpha1.ArangoMLStorage, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMLStorageInterface interface {
// arangoMLStorages implements ArangoMLStorageInterface
type arangoMLStorages struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1alpha1.ArangoMLStorage, *v1alpha1.ArangoMLStorageList]
}
// newArangoMLStorages returns a ArangoMLStorages
func newArangoMLStorages(c *MlV1alpha1Client, namespace string) *arangoMLStorages {
return &arangoMLStorages{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1alpha1.ArangoMLStorage, *v1alpha1.ArangoMLStorageList](
"arangomlstorages",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha1.ArangoMLStorage { return &v1alpha1.ArangoMLStorage{} },
func() *v1alpha1.ArangoMLStorageList { return &v1alpha1.ArangoMLStorageList{} }),
}
}
// Get takes name of the arangoMLStorage, and returns the corresponding arangoMLStorage object, and an error if there is any.
func (c *arangoMLStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLStorages that match those selectors.
func (c *arangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLStorageList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoMLStorageList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLStorages.
func (c *arangoMLStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLStorage and creates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *arangoMLStorages) Create(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.CreateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLStorage and updates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *arangoMLStorages) Update(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlstorages").
Name(arangoMLStorage.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlstorages").
Name(arangoMLStorage.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLStorage and deletes it. Returns an error if one occurs.
func (c *arangoMLStorages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLStorage.
func (c *arangoMLStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLStorage, err error) {
result = &v1alpha1.ArangoMLStorage{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangomlbatchjobsKind = v1alpha1.SchemeGroupVersion.WithKind("ArangoMLBatchJ
// Get takes name of the arangoMLBatchJob, and returns the corresponding arangoMLBatchJob object, and an error if there is any.
func (c *FakeArangoMLBatchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
emptyResult := &v1alpha1.ArangoMLBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlbatchjobsResource, c.ns, name), &v1alpha1.ArangoMLBatchJob{})
Invokes(testing.NewGetActionWithOptions(arangomlbatchjobsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}
// List takes label and field selectors, and returns the list of ArangoMLBatchJobs that match those selectors.
func (c *FakeArangoMLBatchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLBatchJobList, err error) {
emptyResult := &v1alpha1.ArangoMLBatchJobList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlbatchjobsResource, arangomlbatchjobsKind, c.ns, opts), &v1alpha1.ArangoMLBatchJobList{})
Invokes(testing.NewListActionWithOptions(arangomlbatchjobsResource, arangomlbatchjobsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMLBatchJobs) List(ctx context.Context, opts v1.ListOptions) (
// Watch returns a watch.Interface that watches the requested arangoMLBatchJobs.
func (c *FakeArangoMLBatchJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlbatchjobsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomlbatchjobsResource, c.ns, opts))
}
// Create takes the representation of a arangoMLBatchJob and creates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *FakeArangoMLBatchJobs) Create(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
emptyResult := &v1alpha1.ArangoMLBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlbatchjobsResource, c.ns, arangoMLBatchJob), &v1alpha1.ArangoMLBatchJob{})
Invokes(testing.NewCreateActionWithOptions(arangomlbatchjobsResource, c.ns, arangoMLBatchJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}
// Update takes the representation of a arangoMLBatchJob and updates it. Returns the server's representation of the arangoMLBatchJob, and an error, if there is any.
func (c *FakeArangoMLBatchJobs) Update(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
emptyResult := &v1alpha1.ArangoMLBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlbatchjobsResource, c.ns, arangoMLBatchJob), &v1alpha1.ArangoMLBatchJob{})
Invokes(testing.NewUpdateActionWithOptions(arangomlbatchjobsResource, c.ns, arangoMLBatchJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMLBatchJobs) UpdateStatus(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLBatchJob, error) {
func (c *FakeArangoMLBatchJobs) UpdateStatus(ctx context.Context, arangoMLBatchJob *v1alpha1.ArangoMLBatchJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLBatchJob, err error) {
emptyResult := &v1alpha1.ArangoMLBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlbatchjobsResource, "status", c.ns, arangoMLBatchJob), &v1alpha1.ArangoMLBatchJob{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomlbatchjobsResource, "status", c.ns, arangoMLBatchJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMLBatchJobs) Delete(ctx context.Context, name string, opts v1
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLBatchJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlbatchjobsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomlbatchjobsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLBatchJobList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMLBatchJobs) DeleteCollection(ctx context.Context, opts v1.De
// Patch applies the patch and returns the patched arangoMLBatchJob.
func (c *FakeArangoMLBatchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLBatchJob, err error) {
emptyResult := &v1alpha1.ArangoMLBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlbatchjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLBatchJob{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomlbatchjobsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLBatchJob), err
}

View file

@ -45,22 +45,24 @@ var arangomlcronjobsKind = v1alpha1.SchemeGroupVersion.WithKind("ArangoMLCronJob
// Get takes name of the arangoMLCronJob, and returns the corresponding arangoMLCronJob object, and an error if there is any.
func (c *FakeArangoMLCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
emptyResult := &v1alpha1.ArangoMLCronJob{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlcronjobsResource, c.ns, name), &v1alpha1.ArangoMLCronJob{})
Invokes(testing.NewGetActionWithOptions(arangomlcronjobsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}
// List takes label and field selectors, and returns the list of ArangoMLCronJobs that match those selectors.
func (c *FakeArangoMLCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLCronJobList, err error) {
emptyResult := &v1alpha1.ArangoMLCronJobList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlcronjobsResource, arangomlcronjobsKind, c.ns, opts), &v1alpha1.ArangoMLCronJobList{})
Invokes(testing.NewListActionWithOptions(arangomlcronjobsResource, arangomlcronjobsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMLCronJobs) List(ctx context.Context, opts v1.ListOptions) (r
// Watch returns a watch.Interface that watches the requested arangoMLCronJobs.
func (c *FakeArangoMLCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlcronjobsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomlcronjobsResource, c.ns, opts))
}
// Create takes the representation of a arangoMLCronJob and creates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *FakeArangoMLCronJobs) Create(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.CreateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
emptyResult := &v1alpha1.ArangoMLCronJob{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlcronjobsResource, c.ns, arangoMLCronJob), &v1alpha1.ArangoMLCronJob{})
Invokes(testing.NewCreateActionWithOptions(arangomlcronjobsResource, c.ns, arangoMLCronJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}
// Update takes the representation of a arangoMLCronJob and updates it. Returns the server's representation of the arangoMLCronJob, and an error, if there is any.
func (c *FakeArangoMLCronJobs) Update(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
emptyResult := &v1alpha1.ArangoMLCronJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlcronjobsResource, c.ns, arangoMLCronJob), &v1alpha1.ArangoMLCronJob{})
Invokes(testing.NewUpdateActionWithOptions(arangomlcronjobsResource, c.ns, arangoMLCronJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMLCronJobs) UpdateStatus(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (*v1alpha1.ArangoMLCronJob, error) {
func (c *FakeArangoMLCronJobs) UpdateStatus(ctx context.Context, arangoMLCronJob *v1alpha1.ArangoMLCronJob, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLCronJob, err error) {
emptyResult := &v1alpha1.ArangoMLCronJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlcronjobsResource, "status", c.ns, arangoMLCronJob), &v1alpha1.ArangoMLCronJob{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomlcronjobsResource, "status", c.ns, arangoMLCronJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMLCronJobs) Delete(ctx context.Context, name string, opts v1.
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlcronjobsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomlcronjobsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLCronJobList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMLCronJobs) DeleteCollection(ctx context.Context, opts v1.Del
// Patch applies the patch and returns the patched arangoMLCronJob.
func (c *FakeArangoMLCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLCronJob, err error) {
emptyResult := &v1alpha1.ArangoMLCronJob{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlcronjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLCronJob{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomlcronjobsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLCronJob), err
}

View file

@ -45,22 +45,24 @@ var arangomlextensionsKind = v1alpha1.SchemeGroupVersion.WithKind("ArangoMLExten
// Get takes name of the arangoMLExtension, and returns the corresponding arangoMLExtension object, and an error if there is any.
func (c *FakeArangoMLExtensions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLExtension, err error) {
emptyResult := &v1alpha1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlextensionsResource, c.ns, name), &v1alpha1.ArangoMLExtension{})
Invokes(testing.NewGetActionWithOptions(arangomlextensionsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}
// List takes label and field selectors, and returns the list of ArangoMLExtensions that match those selectors.
func (c *FakeArangoMLExtensions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLExtensionList, err error) {
emptyResult := &v1alpha1.ArangoMLExtensionList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlextensionsResource, arangomlextensionsKind, c.ns, opts), &v1alpha1.ArangoMLExtensionList{})
Invokes(testing.NewListActionWithOptions(arangomlextensionsResource, arangomlextensionsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMLExtensions) List(ctx context.Context, opts v1.ListOptions)
// Watch returns a watch.Interface that watches the requested arangoMLExtensions.
func (c *FakeArangoMLExtensions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlextensionsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomlextensionsResource, c.ns, opts))
}
// Create takes the representation of a arangoMLExtension and creates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *FakeArangoMLExtensions) Create(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.CreateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
emptyResult := &v1alpha1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlextensionsResource, c.ns, arangoMLExtension), &v1alpha1.ArangoMLExtension{})
Invokes(testing.NewCreateActionWithOptions(arangomlextensionsResource, c.ns, arangoMLExtension, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}
// Update takes the representation of a arangoMLExtension and updates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *FakeArangoMLExtensions) Update(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
emptyResult := &v1alpha1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlextensionsResource, c.ns, arangoMLExtension), &v1alpha1.ArangoMLExtension{})
Invokes(testing.NewUpdateActionWithOptions(arangomlextensionsResource, c.ns, arangoMLExtension, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (*v1alpha1.ArangoMLExtension, error) {
func (c *FakeArangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1alpha1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLExtension, err error) {
emptyResult := &v1alpha1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlextensionsResource, "status", c.ns, arangoMLExtension), &v1alpha1.ArangoMLExtension{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomlextensionsResource, "status", c.ns, arangoMLExtension, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMLExtensions) Delete(ctx context.Context, name string, opts v
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLExtensions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlextensionsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomlextensionsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLExtensionList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMLExtensions) DeleteCollection(ctx context.Context, opts v1.D
// Patch applies the patch and returns the patched arangoMLExtension.
func (c *FakeArangoMLExtensions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLExtension, err error) {
emptyResult := &v1alpha1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlextensionsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLExtension{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomlextensionsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLExtension), err
}

View file

@ -45,22 +45,24 @@ var arangomlstoragesKind = v1alpha1.SchemeGroupVersion.WithKind("ArangoMLStorage
// Get takes name of the arangoMLStorage, and returns the corresponding arangoMLStorage object, and an error if there is any.
func (c *FakeArangoMLStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoMLStorage, err error) {
emptyResult := &v1alpha1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlstoragesResource, c.ns, name), &v1alpha1.ArangoMLStorage{})
Invokes(testing.NewGetActionWithOptions(arangomlstoragesResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}
// List takes label and field selectors, and returns the list of ArangoMLStorages that match those selectors.
func (c *FakeArangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoMLStorageList, err error) {
emptyResult := &v1alpha1.ArangoMLStorageList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlstoragesResource, arangomlstoragesKind, c.ns, opts), &v1alpha1.ArangoMLStorageList{})
Invokes(testing.NewListActionWithOptions(arangomlstoragesResource, arangomlstoragesKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (r
// Watch returns a watch.Interface that watches the requested arangoMLStorages.
func (c *FakeArangoMLStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlstoragesResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomlstoragesResource, c.ns, opts))
}
// Create takes the representation of a arangoMLStorage and creates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *FakeArangoMLStorages) Create(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.CreateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
emptyResult := &v1alpha1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlstoragesResource, c.ns, arangoMLStorage), &v1alpha1.ArangoMLStorage{})
Invokes(testing.NewCreateActionWithOptions(arangomlstoragesResource, c.ns, arangoMLStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}
// Update takes the representation of a arangoMLStorage and updates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *FakeArangoMLStorages) Update(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
emptyResult := &v1alpha1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlstoragesResource, c.ns, arangoMLStorage), &v1alpha1.ArangoMLStorage{})
Invokes(testing.NewUpdateActionWithOptions(arangomlstoragesResource, c.ns, arangoMLStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (*v1alpha1.ArangoMLStorage, error) {
func (c *FakeArangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1alpha1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1alpha1.ArangoMLStorage, err error) {
emptyResult := &v1alpha1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlstoragesResource, "status", c.ns, arangoMLStorage), &v1alpha1.ArangoMLStorage{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomlstoragesResource, "status", c.ns, arangoMLStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMLStorages) Delete(ctx context.Context, name string, opts v1.
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlstoragesResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomlstoragesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoMLStorageList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMLStorages) DeleteCollection(ctx context.Context, opts v1.Del
// Patch applies the patch and returns the patched arangoMLStorage.
func (c *FakeArangoMLStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoMLStorage, err error) {
emptyResult := &v1alpha1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlstoragesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoMLStorage{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomlstoragesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoMLStorage), err
}

View file

@ -24,14 +24,13 @@ package v1beta1
import (
"context"
"time"
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1beta1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMLExtensionsGetter has a method to return a ArangoMLExtensionInterface.
@ -44,6 +43,7 @@ type ArangoMLExtensionsGetter interface {
type ArangoMLExtensionInterface interface {
Create(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.CreateOptions) (*v1beta1.ArangoMLExtension, error)
Update(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.UpdateOptions) (*v1beta1.ArangoMLExtension, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.UpdateOptions) (*v1beta1.ArangoMLExtension, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMLExtensionInterface interface {
// arangoMLExtensions implements ArangoMLExtensionInterface
type arangoMLExtensions struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1beta1.ArangoMLExtension, *v1beta1.ArangoMLExtensionList]
}
// newArangoMLExtensions returns a ArangoMLExtensions
func newArangoMLExtensions(c *MlV1beta1Client, namespace string) *arangoMLExtensions {
return &arangoMLExtensions{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1beta1.ArangoMLExtension, *v1beta1.ArangoMLExtensionList](
"arangomlextensions",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1beta1.ArangoMLExtension { return &v1beta1.ArangoMLExtension{} },
func() *v1beta1.ArangoMLExtensionList { return &v1beta1.ArangoMLExtensionList{} }),
}
}
// Get takes name of the arangoMLExtension, and returns the corresponding arangoMLExtension object, and an error if there is any.
func (c *arangoMLExtensions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoMLExtension, err error) {
result = &v1beta1.ArangoMLExtension{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLExtensions that match those selectors.
func (c *arangoMLExtensions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoMLExtensionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ArangoMLExtensionList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLExtensions.
func (c *arangoMLExtensions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLExtension and creates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *arangoMLExtensions) Create(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.CreateOptions) (result *v1beta1.ArangoMLExtension, err error) {
result = &v1beta1.ArangoMLExtension{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLExtension and updates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *arangoMLExtensions) Update(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1beta1.ArangoMLExtension, err error) {
result = &v1beta1.ArangoMLExtension{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlextensions").
Name(arangoMLExtension.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1beta1.ArangoMLExtension, err error) {
result = &v1beta1.ArangoMLExtension{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlextensions").
Name(arangoMLExtension.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLExtension).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLExtension and deletes it. Returns an error if one occurs.
func (c *arangoMLExtensions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLExtensions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlextensions").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLExtension.
func (c *arangoMLExtensions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoMLExtension, err error) {
result = &v1beta1.ArangoMLExtension{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlextensions").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1beta1
import (
"context"
"time"
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1beta1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoMLStoragesGetter has a method to return a ArangoMLStorageInterface.
@ -44,6 +43,7 @@ type ArangoMLStoragesGetter interface {
type ArangoMLStorageInterface interface {
Create(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.CreateOptions) (*v1beta1.ArangoMLStorage, error)
Update(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.UpdateOptions) (*v1beta1.ArangoMLStorage, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.UpdateOptions) (*v1beta1.ArangoMLStorage, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoMLStorageInterface interface {
// arangoMLStorages implements ArangoMLStorageInterface
type arangoMLStorages struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1beta1.ArangoMLStorage, *v1beta1.ArangoMLStorageList]
}
// newArangoMLStorages returns a ArangoMLStorages
func newArangoMLStorages(c *MlV1beta1Client, namespace string) *arangoMLStorages {
return &arangoMLStorages{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1beta1.ArangoMLStorage, *v1beta1.ArangoMLStorageList](
"arangomlstorages",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1beta1.ArangoMLStorage { return &v1beta1.ArangoMLStorage{} },
func() *v1beta1.ArangoMLStorageList { return &v1beta1.ArangoMLStorageList{} }),
}
}
// Get takes name of the arangoMLStorage, and returns the corresponding arangoMLStorage object, and an error if there is any.
func (c *arangoMLStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoMLStorage, err error) {
result = &v1beta1.ArangoMLStorage{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoMLStorages that match those selectors.
func (c *arangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoMLStorageList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ArangoMLStorageList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoMLStorages.
func (c *arangoMLStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoMLStorage and creates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *arangoMLStorages) Create(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.CreateOptions) (result *v1beta1.ArangoMLStorage, err error) {
result = &v1beta1.ArangoMLStorage{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoMLStorage and updates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *arangoMLStorages) Update(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1beta1.ArangoMLStorage, err error) {
result = &v1beta1.ArangoMLStorage{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlstorages").
Name(arangoMLStorage.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1beta1.ArangoMLStorage, err error) {
result = &v1beta1.ArangoMLStorage{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangomlstorages").
Name(arangoMLStorage.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoMLStorage).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoMLStorage and deletes it. Returns an error if one occurs.
func (c *arangoMLStorages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoMLStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangomlstorages").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoMLStorage.
func (c *arangoMLStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoMLStorage, err error) {
result = &v1beta1.ArangoMLStorage{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangomlstorages").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangomlextensionsKind = v1beta1.SchemeGroupVersion.WithKind("ArangoMLExtens
// Get takes name of the arangoMLExtension, and returns the corresponding arangoMLExtension object, and an error if there is any.
func (c *FakeArangoMLExtensions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoMLExtension, err error) {
emptyResult := &v1beta1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlextensionsResource, c.ns, name), &v1beta1.ArangoMLExtension{})
Invokes(testing.NewGetActionWithOptions(arangomlextensionsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLExtension), err
}
// List takes label and field selectors, and returns the list of ArangoMLExtensions that match those selectors.
func (c *FakeArangoMLExtensions) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoMLExtensionList, err error) {
emptyResult := &v1beta1.ArangoMLExtensionList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlextensionsResource, arangomlextensionsKind, c.ns, opts), &v1beta1.ArangoMLExtensionList{})
Invokes(testing.NewListActionWithOptions(arangomlextensionsResource, arangomlextensionsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMLExtensions) List(ctx context.Context, opts v1.ListOptions)
// Watch returns a watch.Interface that watches the requested arangoMLExtensions.
func (c *FakeArangoMLExtensions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlextensionsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomlextensionsResource, c.ns, opts))
}
// Create takes the representation of a arangoMLExtension and creates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *FakeArangoMLExtensions) Create(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.CreateOptions) (result *v1beta1.ArangoMLExtension, err error) {
emptyResult := &v1beta1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlextensionsResource, c.ns, arangoMLExtension), &v1beta1.ArangoMLExtension{})
Invokes(testing.NewCreateActionWithOptions(arangomlextensionsResource, c.ns, arangoMLExtension, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLExtension), err
}
// Update takes the representation of a arangoMLExtension and updates it. Returns the server's representation of the arangoMLExtension, and an error, if there is any.
func (c *FakeArangoMLExtensions) Update(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1beta1.ArangoMLExtension, err error) {
emptyResult := &v1beta1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlextensionsResource, c.ns, arangoMLExtension), &v1beta1.ArangoMLExtension{})
Invokes(testing.NewUpdateActionWithOptions(arangomlextensionsResource, c.ns, arangoMLExtension, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLExtension), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.UpdateOptions) (*v1beta1.ArangoMLExtension, error) {
func (c *FakeArangoMLExtensions) UpdateStatus(ctx context.Context, arangoMLExtension *v1beta1.ArangoMLExtension, opts v1.UpdateOptions) (result *v1beta1.ArangoMLExtension, err error) {
emptyResult := &v1beta1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlextensionsResource, "status", c.ns, arangoMLExtension), &v1beta1.ArangoMLExtension{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomlextensionsResource, "status", c.ns, arangoMLExtension, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLExtension), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMLExtensions) Delete(ctx context.Context, name string, opts v
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLExtensions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlextensionsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomlextensionsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ArangoMLExtensionList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMLExtensions) DeleteCollection(ctx context.Context, opts v1.D
// Patch applies the patch and returns the patched arangoMLExtension.
func (c *FakeArangoMLExtensions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoMLExtension, err error) {
emptyResult := &v1beta1.ArangoMLExtension{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlextensionsResource, c.ns, name, pt, data, subresources...), &v1beta1.ArangoMLExtension{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomlextensionsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLExtension), err
}

View file

@ -45,22 +45,24 @@ var arangomlstoragesKind = v1beta1.SchemeGroupVersion.WithKind("ArangoMLStorage"
// Get takes name of the arangoMLStorage, and returns the corresponding arangoMLStorage object, and an error if there is any.
func (c *FakeArangoMLStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoMLStorage, err error) {
emptyResult := &v1beta1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangomlstoragesResource, c.ns, name), &v1beta1.ArangoMLStorage{})
Invokes(testing.NewGetActionWithOptions(arangomlstoragesResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLStorage), err
}
// List takes label and field selectors, and returns the list of ArangoMLStorages that match those selectors.
func (c *FakeArangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoMLStorageList, err error) {
emptyResult := &v1beta1.ArangoMLStorageList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangomlstoragesResource, arangomlstoragesKind, c.ns, opts), &v1beta1.ArangoMLStorageList{})
Invokes(testing.NewListActionWithOptions(arangomlstoragesResource, arangomlstoragesKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoMLStorages) List(ctx context.Context, opts v1.ListOptions) (r
// Watch returns a watch.Interface that watches the requested arangoMLStorages.
func (c *FakeArangoMLStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangomlstoragesResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangomlstoragesResource, c.ns, opts))
}
// Create takes the representation of a arangoMLStorage and creates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *FakeArangoMLStorages) Create(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.CreateOptions) (result *v1beta1.ArangoMLStorage, err error) {
emptyResult := &v1beta1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangomlstoragesResource, c.ns, arangoMLStorage), &v1beta1.ArangoMLStorage{})
Invokes(testing.NewCreateActionWithOptions(arangomlstoragesResource, c.ns, arangoMLStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLStorage), err
}
// Update takes the representation of a arangoMLStorage and updates it. Returns the server's representation of the arangoMLStorage, and an error, if there is any.
func (c *FakeArangoMLStorages) Update(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1beta1.ArangoMLStorage, err error) {
emptyResult := &v1beta1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangomlstoragesResource, c.ns, arangoMLStorage), &v1beta1.ArangoMLStorage{})
Invokes(testing.NewUpdateActionWithOptions(arangomlstoragesResource, c.ns, arangoMLStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLStorage), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.UpdateOptions) (*v1beta1.ArangoMLStorage, error) {
func (c *FakeArangoMLStorages) UpdateStatus(ctx context.Context, arangoMLStorage *v1beta1.ArangoMLStorage, opts v1.UpdateOptions) (result *v1beta1.ArangoMLStorage, err error) {
emptyResult := &v1beta1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangomlstoragesResource, "status", c.ns, arangoMLStorage), &v1beta1.ArangoMLStorage{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangomlstoragesResource, "status", c.ns, arangoMLStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLStorage), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoMLStorages) Delete(ctx context.Context, name string, opts v1.
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoMLStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangomlstoragesResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangomlstoragesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ArangoMLStorageList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoMLStorages) DeleteCollection(ctx context.Context, opts v1.Del
// Patch applies the patch and returns the patched arangoMLStorage.
func (c *FakeArangoMLStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoMLStorage, err error) {
emptyResult := &v1beta1.ArangoMLStorage{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangomlstoragesResource, c.ns, name, pt, data, subresources...), &v1beta1.ArangoMLStorage{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangomlstoragesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoMLStorage), err
}

View file

@ -24,14 +24,13 @@ package v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/networking/v1alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoRoutesGetter has a method to return a ArangoRouteInterface.
@ -44,6 +43,7 @@ type ArangoRoutesGetter interface {
type ArangoRouteInterface interface {
Create(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.CreateOptions) (*v1alpha1.ArangoRoute, error)
Update(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.UpdateOptions) (*v1alpha1.ArangoRoute, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.UpdateOptions) (*v1alpha1.ArangoRoute, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoRouteInterface interface {
// arangoRoutes implements ArangoRouteInterface
type arangoRoutes struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1alpha1.ArangoRoute, *v1alpha1.ArangoRouteList]
}
// newArangoRoutes returns a ArangoRoutes
func newArangoRoutes(c *NetworkingV1alpha1Client, namespace string) *arangoRoutes {
return &arangoRoutes{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1alpha1.ArangoRoute, *v1alpha1.ArangoRouteList](
"arangoroutes",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha1.ArangoRoute { return &v1alpha1.ArangoRoute{} },
func() *v1alpha1.ArangoRouteList { return &v1alpha1.ArangoRouteList{} }),
}
}
// Get takes name of the arangoRoute, and returns the corresponding arangoRoute object, and an error if there is any.
func (c *arangoRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoRoute, err error) {
result = &v1alpha1.ArangoRoute{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoroutes").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoRoutes that match those selectors.
func (c *arangoRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoRouteList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoRouteList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoroutes").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoRoutes.
func (c *arangoRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoroutes").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoRoute and creates it. Returns the server's representation of the arangoRoute, and an error, if there is any.
func (c *arangoRoutes) Create(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.CreateOptions) (result *v1alpha1.ArangoRoute, err error) {
result = &v1alpha1.ArangoRoute{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoroutes").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoRoute).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoRoute and updates it. Returns the server's representation of the arangoRoute, and an error, if there is any.
func (c *arangoRoutes) Update(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.UpdateOptions) (result *v1alpha1.ArangoRoute, err error) {
result = &v1alpha1.ArangoRoute{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoroutes").
Name(arangoRoute.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoRoute).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoRoutes) UpdateStatus(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.UpdateOptions) (result *v1alpha1.ArangoRoute, err error) {
result = &v1alpha1.ArangoRoute{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoroutes").
Name(arangoRoute.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoRoute).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoRoute and deletes it. Returns an error if one occurs.
func (c *arangoRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoroutes").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoroutes").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoRoute.
func (c *arangoRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoRoute, err error) {
result = &v1alpha1.ArangoRoute{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoroutes").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangoroutesKind = v1alpha1.SchemeGroupVersion.WithKind("ArangoRoute")
// Get takes name of the arangoRoute, and returns the corresponding arangoRoute object, and an error if there is any.
func (c *FakeArangoRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoRoute, err error) {
emptyResult := &v1alpha1.ArangoRoute{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoroutesResource, c.ns, name), &v1alpha1.ArangoRoute{})
Invokes(testing.NewGetActionWithOptions(arangoroutesResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoRoute), err
}
// List takes label and field selectors, and returns the list of ArangoRoutes that match those selectors.
func (c *FakeArangoRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoRouteList, err error) {
emptyResult := &v1alpha1.ArangoRouteList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoroutesResource, arangoroutesKind, c.ns, opts), &v1alpha1.ArangoRouteList{})
Invokes(testing.NewListActionWithOptions(arangoroutesResource, arangoroutesKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoRoutes) List(ctx context.Context, opts v1.ListOptions) (resul
// Watch returns a watch.Interface that watches the requested arangoRoutes.
func (c *FakeArangoRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoroutesResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoroutesResource, c.ns, opts))
}
// Create takes the representation of a arangoRoute and creates it. Returns the server's representation of the arangoRoute, and an error, if there is any.
func (c *FakeArangoRoutes) Create(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.CreateOptions) (result *v1alpha1.ArangoRoute, err error) {
emptyResult := &v1alpha1.ArangoRoute{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoroutesResource, c.ns, arangoRoute), &v1alpha1.ArangoRoute{})
Invokes(testing.NewCreateActionWithOptions(arangoroutesResource, c.ns, arangoRoute, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoRoute), err
}
// Update takes the representation of a arangoRoute and updates it. Returns the server's representation of the arangoRoute, and an error, if there is any.
func (c *FakeArangoRoutes) Update(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.UpdateOptions) (result *v1alpha1.ArangoRoute, err error) {
emptyResult := &v1alpha1.ArangoRoute{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoroutesResource, c.ns, arangoRoute), &v1alpha1.ArangoRoute{})
Invokes(testing.NewUpdateActionWithOptions(arangoroutesResource, c.ns, arangoRoute, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoRoutes) UpdateStatus(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.UpdateOptions) (*v1alpha1.ArangoRoute, error) {
func (c *FakeArangoRoutes) UpdateStatus(ctx context.Context, arangoRoute *v1alpha1.ArangoRoute, opts v1.UpdateOptions) (result *v1alpha1.ArangoRoute, err error) {
emptyResult := &v1alpha1.ArangoRoute{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoroutesResource, "status", c.ns, arangoRoute), &v1alpha1.ArangoRoute{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoroutesResource, "status", c.ns, arangoRoute, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoRoute), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoRoutes) Delete(ctx context.Context, name string, opts v1.Dele
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoroutesResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoroutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoRouteList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteO
// Patch applies the patch and returns the patched arangoRoute.
func (c *FakeArangoRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoRoute, err error) {
emptyResult := &v1alpha1.ArangoRoute{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoroutesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoRoute{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoroutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoRoute), err
}

View file

@ -24,14 +24,13 @@ package v1
import (
"context"
"time"
v1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoDeploymentReplicationsGetter has a method to return a ArangoDeploymentReplicationInterface.
@ -44,6 +43,7 @@ type ArangoDeploymentReplicationsGetter interface {
type ArangoDeploymentReplicationInterface interface {
Create(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.CreateOptions) (*v1.ArangoDeploymentReplication, error)
Update(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.UpdateOptions) (*v1.ArangoDeploymentReplication, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.UpdateOptions) (*v1.ArangoDeploymentReplication, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoDeploymentReplicationInterface interface {
// arangoDeploymentReplications implements ArangoDeploymentReplicationInterface
type arangoDeploymentReplications struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1.ArangoDeploymentReplication, *v1.ArangoDeploymentReplicationList]
}
// newArangoDeploymentReplications returns a ArangoDeploymentReplications
func newArangoDeploymentReplications(c *ReplicationV1Client, namespace string) *arangoDeploymentReplications {
return &arangoDeploymentReplications{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1.ArangoDeploymentReplication, *v1.ArangoDeploymentReplicationList](
"arangodeploymentreplications",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1.ArangoDeploymentReplication { return &v1.ArangoDeploymentReplication{} },
func() *v1.ArangoDeploymentReplicationList { return &v1.ArangoDeploymentReplicationList{} }),
}
}
// Get takes name of the arangoDeploymentReplication, and returns the corresponding arangoDeploymentReplication object, and an error if there is any.
func (c *arangoDeploymentReplications) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoDeploymentReplication, err error) {
result = &v1.ArangoDeploymentReplication{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoDeploymentReplications that match those selectors.
func (c *arangoDeploymentReplications) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoDeploymentReplicationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1.ArangoDeploymentReplicationList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoDeploymentReplications.
func (c *arangoDeploymentReplications) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoDeploymentReplication and creates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *arangoDeploymentReplications) Create(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.CreateOptions) (result *v1.ArangoDeploymentReplication, err error) {
result = &v1.ArangoDeploymentReplication{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeploymentReplication).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoDeploymentReplication and updates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *arangoDeploymentReplications) Update(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.UpdateOptions) (result *v1.ArangoDeploymentReplication, err error) {
result = &v1.ArangoDeploymentReplication{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(arangoDeploymentReplication.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeploymentReplication).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoDeploymentReplications) UpdateStatus(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.UpdateOptions) (result *v1.ArangoDeploymentReplication, err error) {
result = &v1.ArangoDeploymentReplication{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(arangoDeploymentReplication.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeploymentReplication).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoDeploymentReplication and deletes it. Returns an error if one occurs.
func (c *arangoDeploymentReplications) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoDeploymentReplications) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoDeploymentReplication.
func (c *arangoDeploymentReplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoDeploymentReplication, err error) {
result = &v1.ArangoDeploymentReplication{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangodeploymentreplicationsKind = v1.SchemeGroupVersion.WithKind("ArangoDep
// Get takes name of the arangoDeploymentReplication, and returns the corresponding arangoDeploymentReplication object, and an error if there is any.
func (c *FakeArangoDeploymentReplications) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ArangoDeploymentReplication, err error) {
emptyResult := &v1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangodeploymentreplicationsResource, c.ns, name), &v1.ArangoDeploymentReplication{})
Invokes(testing.NewGetActionWithOptions(arangodeploymentreplicationsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeploymentReplication), err
}
// List takes label and field selectors, and returns the list of ArangoDeploymentReplications that match those selectors.
func (c *FakeArangoDeploymentReplications) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ArangoDeploymentReplicationList, err error) {
emptyResult := &v1.ArangoDeploymentReplicationList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangodeploymentreplicationsResource, arangodeploymentreplicationsKind, c.ns, opts), &v1.ArangoDeploymentReplicationList{})
Invokes(testing.NewListActionWithOptions(arangodeploymentreplicationsResource, arangodeploymentreplicationsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoDeploymentReplications) List(ctx context.Context, opts metav1
// Watch returns a watch.Interface that watches the requested arangoDeploymentReplications.
func (c *FakeArangoDeploymentReplications) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangodeploymentreplicationsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangodeploymentreplicationsResource, c.ns, opts))
}
// Create takes the representation of a arangoDeploymentReplication and creates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *FakeArangoDeploymentReplications) Create(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.CreateOptions) (result *v1.ArangoDeploymentReplication, err error) {
emptyResult := &v1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication), &v1.ArangoDeploymentReplication{})
Invokes(testing.NewCreateActionWithOptions(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeploymentReplication), err
}
// Update takes the representation of a arangoDeploymentReplication and updates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *FakeArangoDeploymentReplications) Update(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.UpdateOptions) (result *v1.ArangoDeploymentReplication, err error) {
emptyResult := &v1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication), &v1.ArangoDeploymentReplication{})
Invokes(testing.NewUpdateActionWithOptions(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeploymentReplication), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoDeploymentReplications) UpdateStatus(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.UpdateOptions) (*v1.ArangoDeploymentReplication, error) {
func (c *FakeArangoDeploymentReplications) UpdateStatus(ctx context.Context, arangoDeploymentReplication *v1.ArangoDeploymentReplication, opts metav1.UpdateOptions) (result *v1.ArangoDeploymentReplication, err error) {
emptyResult := &v1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangodeploymentreplicationsResource, "status", c.ns, arangoDeploymentReplication), &v1.ArangoDeploymentReplication{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangodeploymentreplicationsResource, "status", c.ns, arangoDeploymentReplication, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeploymentReplication), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoDeploymentReplications) Delete(ctx context.Context, name stri
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoDeploymentReplications) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangodeploymentreplicationsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangodeploymentreplicationsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.ArangoDeploymentReplicationList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoDeploymentReplications) DeleteCollection(ctx context.Context,
// Patch applies the patch and returns the patched arangoDeploymentReplication.
func (c *FakeArangoDeploymentReplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ArangoDeploymentReplication, err error) {
emptyResult := &v1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangodeploymentreplicationsResource, c.ns, name, pt, data, subresources...), &v1.ArangoDeploymentReplication{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangodeploymentreplicationsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1.ArangoDeploymentReplication), err
}

View file

@ -24,14 +24,13 @@ package v2alpha1
import (
"context"
"time"
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v2alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoDeploymentReplicationsGetter has a method to return a ArangoDeploymentReplicationInterface.
@ -44,6 +43,7 @@ type ArangoDeploymentReplicationsGetter interface {
type ArangoDeploymentReplicationInterface interface {
Create(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.CreateOptions) (*v2alpha1.ArangoDeploymentReplication, error)
Update(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.UpdateOptions) (*v2alpha1.ArangoDeploymentReplication, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.UpdateOptions) (*v2alpha1.ArangoDeploymentReplication, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoDeploymentReplicationInterface interface {
// arangoDeploymentReplications implements ArangoDeploymentReplicationInterface
type arangoDeploymentReplications struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v2alpha1.ArangoDeploymentReplication, *v2alpha1.ArangoDeploymentReplicationList]
}
// newArangoDeploymentReplications returns a ArangoDeploymentReplications
func newArangoDeploymentReplications(c *ReplicationV2alpha1Client, namespace string) *arangoDeploymentReplications {
return &arangoDeploymentReplications{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v2alpha1.ArangoDeploymentReplication, *v2alpha1.ArangoDeploymentReplicationList](
"arangodeploymentreplications",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v2alpha1.ArangoDeploymentReplication { return &v2alpha1.ArangoDeploymentReplication{} },
func() *v2alpha1.ArangoDeploymentReplicationList { return &v2alpha1.ArangoDeploymentReplicationList{} }),
}
}
// Get takes name of the arangoDeploymentReplication, and returns the corresponding arangoDeploymentReplication object, and an error if there is any.
func (c *arangoDeploymentReplications) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
result = &v2alpha1.ArangoDeploymentReplication{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoDeploymentReplications that match those selectors.
func (c *arangoDeploymentReplications) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoDeploymentReplicationList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v2alpha1.ArangoDeploymentReplicationList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoDeploymentReplications.
func (c *arangoDeploymentReplications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoDeploymentReplication and creates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *arangoDeploymentReplications) Create(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.CreateOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
result = &v2alpha1.ArangoDeploymentReplication{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeploymentReplication).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoDeploymentReplication and updates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *arangoDeploymentReplications) Update(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
result = &v2alpha1.ArangoDeploymentReplication{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(arangoDeploymentReplication.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeploymentReplication).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoDeploymentReplications) UpdateStatus(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
result = &v2alpha1.ArangoDeploymentReplication{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(arangoDeploymentReplication.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoDeploymentReplication).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoDeploymentReplication and deletes it. Returns an error if one occurs.
func (c *arangoDeploymentReplications) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoDeploymentReplications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangodeploymentreplications").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoDeploymentReplication.
func (c *arangoDeploymentReplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoDeploymentReplication, err error) {
result = &v2alpha1.ArangoDeploymentReplication{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangodeploymentreplications").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangodeploymentreplicationsKind = v2alpha1.SchemeGroupVersion.WithKind("Ara
// Get takes name of the arangoDeploymentReplication, and returns the corresponding arangoDeploymentReplication object, and an error if there is any.
func (c *FakeArangoDeploymentReplications) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
emptyResult := &v2alpha1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangodeploymentreplicationsResource, c.ns, name), &v2alpha1.ArangoDeploymentReplication{})
Invokes(testing.NewGetActionWithOptions(arangodeploymentreplicationsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeploymentReplication), err
}
// List takes label and field selectors, and returns the list of ArangoDeploymentReplications that match those selectors.
func (c *FakeArangoDeploymentReplications) List(ctx context.Context, opts v1.ListOptions) (result *v2alpha1.ArangoDeploymentReplicationList, err error) {
emptyResult := &v2alpha1.ArangoDeploymentReplicationList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangodeploymentreplicationsResource, arangodeploymentreplicationsKind, c.ns, opts), &v2alpha1.ArangoDeploymentReplicationList{})
Invokes(testing.NewListActionWithOptions(arangodeploymentreplicationsResource, arangodeploymentreplicationsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoDeploymentReplications) List(ctx context.Context, opts v1.Lis
// Watch returns a watch.Interface that watches the requested arangoDeploymentReplications.
func (c *FakeArangoDeploymentReplications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangodeploymentreplicationsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangodeploymentreplicationsResource, c.ns, opts))
}
// Create takes the representation of a arangoDeploymentReplication and creates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *FakeArangoDeploymentReplications) Create(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.CreateOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
emptyResult := &v2alpha1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication), &v2alpha1.ArangoDeploymentReplication{})
Invokes(testing.NewCreateActionWithOptions(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeploymentReplication), err
}
// Update takes the representation of a arangoDeploymentReplication and updates it. Returns the server's representation of the arangoDeploymentReplication, and an error, if there is any.
func (c *FakeArangoDeploymentReplications) Update(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
emptyResult := &v2alpha1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication), &v2alpha1.ArangoDeploymentReplication{})
Invokes(testing.NewUpdateActionWithOptions(arangodeploymentreplicationsResource, c.ns, arangoDeploymentReplication, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeploymentReplication), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoDeploymentReplications) UpdateStatus(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.UpdateOptions) (*v2alpha1.ArangoDeploymentReplication, error) {
func (c *FakeArangoDeploymentReplications) UpdateStatus(ctx context.Context, arangoDeploymentReplication *v2alpha1.ArangoDeploymentReplication, opts v1.UpdateOptions) (result *v2alpha1.ArangoDeploymentReplication, err error) {
emptyResult := &v2alpha1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangodeploymentreplicationsResource, "status", c.ns, arangoDeploymentReplication), &v2alpha1.ArangoDeploymentReplication{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangodeploymentreplicationsResource, "status", c.ns, arangoDeploymentReplication, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeploymentReplication), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoDeploymentReplications) Delete(ctx context.Context, name stri
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoDeploymentReplications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangodeploymentreplicationsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangodeploymentreplicationsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v2alpha1.ArangoDeploymentReplicationList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoDeploymentReplications) DeleteCollection(ctx context.Context,
// Patch applies the patch and returns the patched arangoDeploymentReplication.
func (c *FakeArangoDeploymentReplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2alpha1.ArangoDeploymentReplication, err error) {
emptyResult := &v2alpha1.ArangoDeploymentReplication{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangodeploymentreplicationsResource, c.ns, name, pt, data, subresources...), &v2alpha1.ArangoDeploymentReplication{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangodeploymentreplicationsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v2alpha1.ArangoDeploymentReplication), err
}

View file

@ -24,14 +24,13 @@ package v1alpha1
import (
"context"
"time"
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1alpha1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoProfilesGetter has a method to return a ArangoProfileInterface.
@ -44,6 +43,7 @@ type ArangoProfilesGetter interface {
type ArangoProfileInterface interface {
Create(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.CreateOptions) (*v1alpha1.ArangoProfile, error)
Update(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.UpdateOptions) (*v1alpha1.ArangoProfile, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.UpdateOptions) (*v1alpha1.ArangoProfile, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoProfileInterface interface {
// arangoProfiles implements ArangoProfileInterface
type arangoProfiles struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1alpha1.ArangoProfile, *v1alpha1.ArangoProfileList]
}
// newArangoProfiles returns a ArangoProfiles
func newArangoProfiles(c *SchedulerV1alpha1Client, namespace string) *arangoProfiles {
return &arangoProfiles{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1alpha1.ArangoProfile, *v1alpha1.ArangoProfileList](
"arangoprofiles",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1alpha1.ArangoProfile { return &v1alpha1.ArangoProfile{} },
func() *v1alpha1.ArangoProfileList { return &v1alpha1.ArangoProfileList{} }),
}
}
// Get takes name of the arangoProfile, and returns the corresponding arangoProfile object, and an error if there is any.
func (c *arangoProfiles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoProfile, err error) {
result = &v1alpha1.ArangoProfile{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoprofiles").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoProfiles that match those selectors.
func (c *arangoProfiles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoProfileList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ArangoProfileList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoProfiles.
func (c *arangoProfiles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoProfile and creates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *arangoProfiles) Create(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.CreateOptions) (result *v1alpha1.ArangoProfile, err error) {
result = &v1alpha1.ArangoProfile{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoProfile).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoProfile and updates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *arangoProfiles) Update(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.UpdateOptions) (result *v1alpha1.ArangoProfile, err error) {
result = &v1alpha1.ArangoProfile{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoprofiles").
Name(arangoProfile.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoProfile).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoProfiles) UpdateStatus(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.UpdateOptions) (result *v1alpha1.ArangoProfile, err error) {
result = &v1alpha1.ArangoProfile{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoprofiles").
Name(arangoProfile.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoProfile).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoProfile and deletes it. Returns an error if one occurs.
func (c *arangoProfiles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoprofiles").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoProfiles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoProfile.
func (c *arangoProfiles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoProfile, err error) {
result = &v1alpha1.ArangoProfile{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoprofiles").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangoprofilesKind = v1alpha1.SchemeGroupVersion.WithKind("ArangoProfile")
// Get takes name of the arangoProfile, and returns the corresponding arangoProfile object, and an error if there is any.
func (c *FakeArangoProfiles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ArangoProfile, err error) {
emptyResult := &v1alpha1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoprofilesResource, c.ns, name), &v1alpha1.ArangoProfile{})
Invokes(testing.NewGetActionWithOptions(arangoprofilesResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoProfile), err
}
// List takes label and field selectors, and returns the list of ArangoProfiles that match those selectors.
func (c *FakeArangoProfiles) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ArangoProfileList, err error) {
emptyResult := &v1alpha1.ArangoProfileList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoprofilesResource, arangoprofilesKind, c.ns, opts), &v1alpha1.ArangoProfileList{})
Invokes(testing.NewListActionWithOptions(arangoprofilesResource, arangoprofilesKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoProfiles) List(ctx context.Context, opts v1.ListOptions) (res
// Watch returns a watch.Interface that watches the requested arangoProfiles.
func (c *FakeArangoProfiles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoprofilesResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoprofilesResource, c.ns, opts))
}
// Create takes the representation of a arangoProfile and creates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *FakeArangoProfiles) Create(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.CreateOptions) (result *v1alpha1.ArangoProfile, err error) {
emptyResult := &v1alpha1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoprofilesResource, c.ns, arangoProfile), &v1alpha1.ArangoProfile{})
Invokes(testing.NewCreateActionWithOptions(arangoprofilesResource, c.ns, arangoProfile, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoProfile), err
}
// Update takes the representation of a arangoProfile and updates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *FakeArangoProfiles) Update(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.UpdateOptions) (result *v1alpha1.ArangoProfile, err error) {
emptyResult := &v1alpha1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoprofilesResource, c.ns, arangoProfile), &v1alpha1.ArangoProfile{})
Invokes(testing.NewUpdateActionWithOptions(arangoprofilesResource, c.ns, arangoProfile, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoProfile), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoProfiles) UpdateStatus(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.UpdateOptions) (*v1alpha1.ArangoProfile, error) {
func (c *FakeArangoProfiles) UpdateStatus(ctx context.Context, arangoProfile *v1alpha1.ArangoProfile, opts v1.UpdateOptions) (result *v1alpha1.ArangoProfile, err error) {
emptyResult := &v1alpha1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoprofilesResource, "status", c.ns, arangoProfile), &v1alpha1.ArangoProfile{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoprofilesResource, "status", c.ns, arangoProfile, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoProfile), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoProfiles) Delete(ctx context.Context, name string, opts v1.De
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoProfiles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoprofilesResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoprofilesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ArangoProfileList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoProfiles) DeleteCollection(ctx context.Context, opts v1.Delet
// Patch applies the patch and returns the patched arangoProfile.
func (c *FakeArangoProfiles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ArangoProfile, err error) {
emptyResult := &v1alpha1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoprofilesResource, c.ns, name, pt, data, subresources...), &v1alpha1.ArangoProfile{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoprofilesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha1.ArangoProfile), err
}

View file

@ -24,14 +24,13 @@ package v1beta1
import (
"context"
"time"
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoProfilesGetter has a method to return a ArangoProfileInterface.
@ -44,6 +43,7 @@ type ArangoProfilesGetter interface {
type ArangoProfileInterface interface {
Create(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.CreateOptions) (*v1beta1.ArangoProfile, error)
Update(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.UpdateOptions) (*v1beta1.ArangoProfile, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.UpdateOptions) (*v1beta1.ArangoProfile, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoProfileInterface interface {
// arangoProfiles implements ArangoProfileInterface
type arangoProfiles struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1beta1.ArangoProfile, *v1beta1.ArangoProfileList]
}
// newArangoProfiles returns a ArangoProfiles
func newArangoProfiles(c *SchedulerV1beta1Client, namespace string) *arangoProfiles {
return &arangoProfiles{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1beta1.ArangoProfile, *v1beta1.ArangoProfileList](
"arangoprofiles",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1beta1.ArangoProfile { return &v1beta1.ArangoProfile{} },
func() *v1beta1.ArangoProfileList { return &v1beta1.ArangoProfileList{} }),
}
}
// Get takes name of the arangoProfile, and returns the corresponding arangoProfile object, and an error if there is any.
func (c *arangoProfiles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoProfile, err error) {
result = &v1beta1.ArangoProfile{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoprofiles").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoProfiles that match those selectors.
func (c *arangoProfiles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoProfileList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ArangoProfileList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoProfiles.
func (c *arangoProfiles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoProfile and creates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *arangoProfiles) Create(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.CreateOptions) (result *v1beta1.ArangoProfile, err error) {
result = &v1beta1.ArangoProfile{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoProfile).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoProfile and updates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *arangoProfiles) Update(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.UpdateOptions) (result *v1beta1.ArangoProfile, err error) {
result = &v1beta1.ArangoProfile{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoprofiles").
Name(arangoProfile.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoProfile).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoProfiles) UpdateStatus(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.UpdateOptions) (result *v1beta1.ArangoProfile, err error) {
result = &v1beta1.ArangoProfile{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoprofiles").
Name(arangoProfile.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoProfile).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoProfile and deletes it. Returns an error if one occurs.
func (c *arangoProfiles) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoprofiles").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoProfiles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoprofiles").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoProfile.
func (c *arangoProfiles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoProfile, err error) {
result = &v1beta1.ArangoProfile{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoprofiles").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1beta1
import (
"context"
"time"
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoSchedulerBatchJobsGetter has a method to return a ArangoSchedulerBatchJobInterface.
@ -44,6 +43,7 @@ type ArangoSchedulerBatchJobsGetter interface {
type ArangoSchedulerBatchJobInterface interface {
Create(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.CreateOptions) (*v1beta1.ArangoSchedulerBatchJob, error)
Update(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerBatchJob, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerBatchJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoSchedulerBatchJobInterface interface {
// arangoSchedulerBatchJobs implements ArangoSchedulerBatchJobInterface
type arangoSchedulerBatchJobs struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1beta1.ArangoSchedulerBatchJob, *v1beta1.ArangoSchedulerBatchJobList]
}
// newArangoSchedulerBatchJobs returns a ArangoSchedulerBatchJobs
func newArangoSchedulerBatchJobs(c *SchedulerV1beta1Client, namespace string) *arangoSchedulerBatchJobs {
return &arangoSchedulerBatchJobs{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1beta1.ArangoSchedulerBatchJob, *v1beta1.ArangoSchedulerBatchJobList](
"arangoschedulerbatchjobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1beta1.ArangoSchedulerBatchJob { return &v1beta1.ArangoSchedulerBatchJob{} },
func() *v1beta1.ArangoSchedulerBatchJobList { return &v1beta1.ArangoSchedulerBatchJobList{} }),
}
}
// Get takes name of the arangoSchedulerBatchJob, and returns the corresponding arangoSchedulerBatchJob object, and an error if there is any.
func (c *arangoSchedulerBatchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
result = &v1beta1.ArangoSchedulerBatchJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoSchedulerBatchJobs that match those selectors.
func (c *arangoSchedulerBatchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerBatchJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ArangoSchedulerBatchJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoSchedulerBatchJobs.
func (c *arangoSchedulerBatchJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoSchedulerBatchJob and creates it. Returns the server's representation of the arangoSchedulerBatchJob, and an error, if there is any.
func (c *arangoSchedulerBatchJobs) Create(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
result = &v1beta1.ArangoSchedulerBatchJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerBatchJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoSchedulerBatchJob and updates it. Returns the server's representation of the arangoSchedulerBatchJob, and an error, if there is any.
func (c *arangoSchedulerBatchJobs) Update(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
result = &v1beta1.ArangoSchedulerBatchJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
Name(arangoSchedulerBatchJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerBatchJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoSchedulerBatchJobs) UpdateStatus(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
result = &v1beta1.ArangoSchedulerBatchJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
Name(arangoSchedulerBatchJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerBatchJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoSchedulerBatchJob and deletes it. Returns an error if one occurs.
func (c *arangoSchedulerBatchJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoSchedulerBatchJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoSchedulerBatchJob.
func (c *arangoSchedulerBatchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
result = &v1beta1.ArangoSchedulerBatchJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoschedulerbatchjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1beta1
import (
"context"
"time"
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoSchedulerCronJobsGetter has a method to return a ArangoSchedulerCronJobInterface.
@ -44,6 +43,7 @@ type ArangoSchedulerCronJobsGetter interface {
type ArangoSchedulerCronJobInterface interface {
Create(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.CreateOptions) (*v1beta1.ArangoSchedulerCronJob, error)
Update(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerCronJob, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerCronJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoSchedulerCronJobInterface interface {
// arangoSchedulerCronJobs implements ArangoSchedulerCronJobInterface
type arangoSchedulerCronJobs struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1beta1.ArangoSchedulerCronJob, *v1beta1.ArangoSchedulerCronJobList]
}
// newArangoSchedulerCronJobs returns a ArangoSchedulerCronJobs
func newArangoSchedulerCronJobs(c *SchedulerV1beta1Client, namespace string) *arangoSchedulerCronJobs {
return &arangoSchedulerCronJobs{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1beta1.ArangoSchedulerCronJob, *v1beta1.ArangoSchedulerCronJobList](
"arangoschedulercronjobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1beta1.ArangoSchedulerCronJob { return &v1beta1.ArangoSchedulerCronJob{} },
func() *v1beta1.ArangoSchedulerCronJobList { return &v1beta1.ArangoSchedulerCronJobList{} }),
}
}
// Get takes name of the arangoSchedulerCronJob, and returns the corresponding arangoSchedulerCronJob object, and an error if there is any.
func (c *arangoSchedulerCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
result = &v1beta1.ArangoSchedulerCronJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoSchedulerCronJobs that match those selectors.
func (c *arangoSchedulerCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerCronJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ArangoSchedulerCronJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoSchedulerCronJobs.
func (c *arangoSchedulerCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoSchedulerCronJob and creates it. Returns the server's representation of the arangoSchedulerCronJob, and an error, if there is any.
func (c *arangoSchedulerCronJobs) Create(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
result = &v1beta1.ArangoSchedulerCronJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerCronJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoSchedulerCronJob and updates it. Returns the server's representation of the arangoSchedulerCronJob, and an error, if there is any.
func (c *arangoSchedulerCronJobs) Update(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
result = &v1beta1.ArangoSchedulerCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
Name(arangoSchedulerCronJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerCronJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoSchedulerCronJobs) UpdateStatus(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
result = &v1beta1.ArangoSchedulerCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
Name(arangoSchedulerCronJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerCronJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoSchedulerCronJob and deletes it. Returns an error if one occurs.
func (c *arangoSchedulerCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoSchedulerCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulercronjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoSchedulerCronJob.
func (c *arangoSchedulerCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerCronJob, err error) {
result = &v1beta1.ArangoSchedulerCronJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoschedulercronjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1beta1
import (
"context"
"time"
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoSchedulerDeploymentsGetter has a method to return a ArangoSchedulerDeploymentInterface.
@ -44,6 +43,7 @@ type ArangoSchedulerDeploymentsGetter interface {
type ArangoSchedulerDeploymentInterface interface {
Create(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.CreateOptions) (*v1beta1.ArangoSchedulerDeployment, error)
Update(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerDeployment, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerDeployment, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoSchedulerDeploymentInterface interface {
// arangoSchedulerDeployments implements ArangoSchedulerDeploymentInterface
type arangoSchedulerDeployments struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1beta1.ArangoSchedulerDeployment, *v1beta1.ArangoSchedulerDeploymentList]
}
// newArangoSchedulerDeployments returns a ArangoSchedulerDeployments
func newArangoSchedulerDeployments(c *SchedulerV1beta1Client, namespace string) *arangoSchedulerDeployments {
return &arangoSchedulerDeployments{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1beta1.ArangoSchedulerDeployment, *v1beta1.ArangoSchedulerDeploymentList](
"arangoschedulerdeployments",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1beta1.ArangoSchedulerDeployment { return &v1beta1.ArangoSchedulerDeployment{} },
func() *v1beta1.ArangoSchedulerDeploymentList { return &v1beta1.ArangoSchedulerDeploymentList{} }),
}
}
// Get takes name of the arangoSchedulerDeployment, and returns the corresponding arangoSchedulerDeployment object, and an error if there is any.
func (c *arangoSchedulerDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
result = &v1beta1.ArangoSchedulerDeployment{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoSchedulerDeployments that match those selectors.
func (c *arangoSchedulerDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerDeploymentList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ArangoSchedulerDeploymentList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoSchedulerDeployments.
func (c *arangoSchedulerDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoSchedulerDeployment and creates it. Returns the server's representation of the arangoSchedulerDeployment, and an error, if there is any.
func (c *arangoSchedulerDeployments) Create(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
result = &v1beta1.ArangoSchedulerDeployment{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerDeployment).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoSchedulerDeployment and updates it. Returns the server's representation of the arangoSchedulerDeployment, and an error, if there is any.
func (c *arangoSchedulerDeployments) Update(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
result = &v1beta1.ArangoSchedulerDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
Name(arangoSchedulerDeployment.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerDeployment).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoSchedulerDeployments) UpdateStatus(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
result = &v1beta1.ArangoSchedulerDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
Name(arangoSchedulerDeployment.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerDeployment).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoSchedulerDeployment and deletes it. Returns an error if one occurs.
func (c *arangoSchedulerDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoSchedulerDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulerdeployments").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoSchedulerDeployment.
func (c *arangoSchedulerDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerDeployment, err error) {
result = &v1beta1.ArangoSchedulerDeployment{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoschedulerdeployments").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -24,14 +24,13 @@ package v1beta1
import (
"context"
"time"
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoSchedulerPodsGetter has a method to return a ArangoSchedulerPodInterface.
@ -44,6 +43,7 @@ type ArangoSchedulerPodsGetter interface {
type ArangoSchedulerPodInterface interface {
Create(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.CreateOptions) (*v1beta1.ArangoSchedulerPod, error)
Update(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerPod, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerPod, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,144 +56,18 @@ type ArangoSchedulerPodInterface interface {
// arangoSchedulerPods implements ArangoSchedulerPodInterface
type arangoSchedulerPods struct {
client rest.Interface
ns string
*gentype.ClientWithList[*v1beta1.ArangoSchedulerPod, *v1beta1.ArangoSchedulerPodList]
}
// newArangoSchedulerPods returns a ArangoSchedulerPods
func newArangoSchedulerPods(c *SchedulerV1beta1Client, namespace string) *arangoSchedulerPods {
return &arangoSchedulerPods{
client: c.RESTClient(),
ns: namespace,
gentype.NewClientWithList[*v1beta1.ArangoSchedulerPod, *v1beta1.ArangoSchedulerPodList](
"arangoschedulerpods",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *v1beta1.ArangoSchedulerPod { return &v1beta1.ArangoSchedulerPod{} },
func() *v1beta1.ArangoSchedulerPodList { return &v1beta1.ArangoSchedulerPodList{} }),
}
}
// Get takes name of the arangoSchedulerPod, and returns the corresponding arangoSchedulerPod object, and an error if there is any.
func (c *arangoSchedulerPods) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
result = &v1beta1.ArangoSchedulerPod{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerpods").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoSchedulerPods that match those selectors.
func (c *arangoSchedulerPods) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerPodList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.ArangoSchedulerPodList{}
err = c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerpods").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoSchedulerPods.
func (c *arangoSchedulerPods) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("arangoschedulerpods").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoSchedulerPod and creates it. Returns the server's representation of the arangoSchedulerPod, and an error, if there is any.
func (c *arangoSchedulerPods) Create(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
result = &v1beta1.ArangoSchedulerPod{}
err = c.client.Post().
Namespace(c.ns).
Resource("arangoschedulerpods").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerPod).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoSchedulerPod and updates it. Returns the server's representation of the arangoSchedulerPod, and an error, if there is any.
func (c *arangoSchedulerPods) Update(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
result = &v1beta1.ArangoSchedulerPod{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulerpods").
Name(arangoSchedulerPod.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerPod).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoSchedulerPods) UpdateStatus(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
result = &v1beta1.ArangoSchedulerPod{}
err = c.client.Put().
Namespace(c.ns).
Resource("arangoschedulerpods").
Name(arangoSchedulerPod.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoSchedulerPod).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoSchedulerPod and deletes it. Returns an error if one occurs.
func (c *arangoSchedulerPods) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulerpods").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoSchedulerPods) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("arangoschedulerpods").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoSchedulerPod.
func (c *arangoSchedulerPods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerPod, err error) {
result = &v1beta1.ArangoSchedulerPod{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("arangoschedulerpods").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -45,22 +45,24 @@ var arangoprofilesKind = v1beta1.SchemeGroupVersion.WithKind("ArangoProfile")
// Get takes name of the arangoProfile, and returns the corresponding arangoProfile object, and an error if there is any.
func (c *FakeArangoProfiles) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoProfile, err error) {
emptyResult := &v1beta1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoprofilesResource, c.ns, name), &v1beta1.ArangoProfile{})
Invokes(testing.NewGetActionWithOptions(arangoprofilesResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoProfile), err
}
// List takes label and field selectors, and returns the list of ArangoProfiles that match those selectors.
func (c *FakeArangoProfiles) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoProfileList, err error) {
emptyResult := &v1beta1.ArangoProfileList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoprofilesResource, arangoprofilesKind, c.ns, opts), &v1beta1.ArangoProfileList{})
Invokes(testing.NewListActionWithOptions(arangoprofilesResource, arangoprofilesKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoProfiles) List(ctx context.Context, opts v1.ListOptions) (res
// Watch returns a watch.Interface that watches the requested arangoProfiles.
func (c *FakeArangoProfiles) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoprofilesResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoprofilesResource, c.ns, opts))
}
// Create takes the representation of a arangoProfile and creates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *FakeArangoProfiles) Create(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.CreateOptions) (result *v1beta1.ArangoProfile, err error) {
emptyResult := &v1beta1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoprofilesResource, c.ns, arangoProfile), &v1beta1.ArangoProfile{})
Invokes(testing.NewCreateActionWithOptions(arangoprofilesResource, c.ns, arangoProfile, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoProfile), err
}
// Update takes the representation of a arangoProfile and updates it. Returns the server's representation of the arangoProfile, and an error, if there is any.
func (c *FakeArangoProfiles) Update(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.UpdateOptions) (result *v1beta1.ArangoProfile, err error) {
emptyResult := &v1beta1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoprofilesResource, c.ns, arangoProfile), &v1beta1.ArangoProfile{})
Invokes(testing.NewUpdateActionWithOptions(arangoprofilesResource, c.ns, arangoProfile, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoProfile), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoProfiles) UpdateStatus(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.UpdateOptions) (*v1beta1.ArangoProfile, error) {
func (c *FakeArangoProfiles) UpdateStatus(ctx context.Context, arangoProfile *v1beta1.ArangoProfile, opts v1.UpdateOptions) (result *v1beta1.ArangoProfile, err error) {
emptyResult := &v1beta1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoprofilesResource, "status", c.ns, arangoProfile), &v1beta1.ArangoProfile{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoprofilesResource, "status", c.ns, arangoProfile, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoProfile), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoProfiles) Delete(ctx context.Context, name string, opts v1.De
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoProfiles) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoprofilesResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoprofilesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ArangoProfileList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoProfiles) DeleteCollection(ctx context.Context, opts v1.Delet
// Patch applies the patch and returns the patched arangoProfile.
func (c *FakeArangoProfiles) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoProfile, err error) {
emptyResult := &v1beta1.ArangoProfile{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoprofilesResource, c.ns, name, pt, data, subresources...), &v1beta1.ArangoProfile{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoprofilesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoProfile), err
}

View file

@ -45,22 +45,24 @@ var arangoschedulerbatchjobsKind = v1beta1.SchemeGroupVersion.WithKind("ArangoSc
// Get takes name of the arangoSchedulerBatchJob, and returns the corresponding arangoSchedulerBatchJob object, and an error if there is any.
func (c *FakeArangoSchedulerBatchJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoschedulerbatchjobsResource, c.ns, name), &v1beta1.ArangoSchedulerBatchJob{})
Invokes(testing.NewGetActionWithOptions(arangoschedulerbatchjobsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerBatchJob), err
}
// List takes label and field selectors, and returns the list of ArangoSchedulerBatchJobs that match those selectors.
func (c *FakeArangoSchedulerBatchJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerBatchJobList, err error) {
emptyResult := &v1beta1.ArangoSchedulerBatchJobList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoschedulerbatchjobsResource, arangoschedulerbatchjobsKind, c.ns, opts), &v1beta1.ArangoSchedulerBatchJobList{})
Invokes(testing.NewListActionWithOptions(arangoschedulerbatchjobsResource, arangoschedulerbatchjobsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoSchedulerBatchJobs) List(ctx context.Context, opts v1.ListOpt
// Watch returns a watch.Interface that watches the requested arangoSchedulerBatchJobs.
func (c *FakeArangoSchedulerBatchJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoschedulerbatchjobsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoschedulerbatchjobsResource, c.ns, opts))
}
// Create takes the representation of a arangoSchedulerBatchJob and creates it. Returns the server's representation of the arangoSchedulerBatchJob, and an error, if there is any.
func (c *FakeArangoSchedulerBatchJobs) Create(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoschedulerbatchjobsResource, c.ns, arangoSchedulerBatchJob), &v1beta1.ArangoSchedulerBatchJob{})
Invokes(testing.NewCreateActionWithOptions(arangoschedulerbatchjobsResource, c.ns, arangoSchedulerBatchJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerBatchJob), err
}
// Update takes the representation of a arangoSchedulerBatchJob and updates it. Returns the server's representation of the arangoSchedulerBatchJob, and an error, if there is any.
func (c *FakeArangoSchedulerBatchJobs) Update(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoschedulerbatchjobsResource, c.ns, arangoSchedulerBatchJob), &v1beta1.ArangoSchedulerBatchJob{})
Invokes(testing.NewUpdateActionWithOptions(arangoschedulerbatchjobsResource, c.ns, arangoSchedulerBatchJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerBatchJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoSchedulerBatchJobs) UpdateStatus(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerBatchJob, error) {
func (c *FakeArangoSchedulerBatchJobs) UpdateStatus(ctx context.Context, arangoSchedulerBatchJob *v1beta1.ArangoSchedulerBatchJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoschedulerbatchjobsResource, "status", c.ns, arangoSchedulerBatchJob), &v1beta1.ArangoSchedulerBatchJob{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoschedulerbatchjobsResource, "status", c.ns, arangoSchedulerBatchJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerBatchJob), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoSchedulerBatchJobs) Delete(ctx context.Context, name string,
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoSchedulerBatchJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoschedulerbatchjobsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoschedulerbatchjobsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ArangoSchedulerBatchJobList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoSchedulerBatchJobs) DeleteCollection(ctx context.Context, opt
// Patch applies the patch and returns the patched arangoSchedulerBatchJob.
func (c *FakeArangoSchedulerBatchJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerBatchJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerBatchJob{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoschedulerbatchjobsResource, c.ns, name, pt, data, subresources...), &v1beta1.ArangoSchedulerBatchJob{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoschedulerbatchjobsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerBatchJob), err
}

View file

@ -45,22 +45,24 @@ var arangoschedulercronjobsKind = v1beta1.SchemeGroupVersion.WithKind("ArangoSch
// Get takes name of the arangoSchedulerCronJob, and returns the corresponding arangoSchedulerCronJob object, and an error if there is any.
func (c *FakeArangoSchedulerCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerCronJob{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoschedulercronjobsResource, c.ns, name), &v1beta1.ArangoSchedulerCronJob{})
Invokes(testing.NewGetActionWithOptions(arangoschedulercronjobsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerCronJob), err
}
// List takes label and field selectors, and returns the list of ArangoSchedulerCronJobs that match those selectors.
func (c *FakeArangoSchedulerCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerCronJobList, err error) {
emptyResult := &v1beta1.ArangoSchedulerCronJobList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoschedulercronjobsResource, arangoschedulercronjobsKind, c.ns, opts), &v1beta1.ArangoSchedulerCronJobList{})
Invokes(testing.NewListActionWithOptions(arangoschedulercronjobsResource, arangoschedulercronjobsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoSchedulerCronJobs) List(ctx context.Context, opts v1.ListOpti
// Watch returns a watch.Interface that watches the requested arangoSchedulerCronJobs.
func (c *FakeArangoSchedulerCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoschedulercronjobsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoschedulercronjobsResource, c.ns, opts))
}
// Create takes the representation of a arangoSchedulerCronJob and creates it. Returns the server's representation of the arangoSchedulerCronJob, and an error, if there is any.
func (c *FakeArangoSchedulerCronJobs) Create(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerCronJob{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoschedulercronjobsResource, c.ns, arangoSchedulerCronJob), &v1beta1.ArangoSchedulerCronJob{})
Invokes(testing.NewCreateActionWithOptions(arangoschedulercronjobsResource, c.ns, arangoSchedulerCronJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerCronJob), err
}
// Update takes the representation of a arangoSchedulerCronJob and updates it. Returns the server's representation of the arangoSchedulerCronJob, and an error, if there is any.
func (c *FakeArangoSchedulerCronJobs) Update(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerCronJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoschedulercronjobsResource, c.ns, arangoSchedulerCronJob), &v1beta1.ArangoSchedulerCronJob{})
Invokes(testing.NewUpdateActionWithOptions(arangoschedulercronjobsResource, c.ns, arangoSchedulerCronJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerCronJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoSchedulerCronJobs) UpdateStatus(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerCronJob, error) {
func (c *FakeArangoSchedulerCronJobs) UpdateStatus(ctx context.Context, arangoSchedulerCronJob *v1beta1.ArangoSchedulerCronJob, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerCronJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerCronJob{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoschedulercronjobsResource, "status", c.ns, arangoSchedulerCronJob), &v1beta1.ArangoSchedulerCronJob{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoschedulercronjobsResource, "status", c.ns, arangoSchedulerCronJob, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerCronJob), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoSchedulerCronJobs) Delete(ctx context.Context, name string, o
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoSchedulerCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoschedulercronjobsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoschedulercronjobsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ArangoSchedulerCronJobList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoSchedulerCronJobs) DeleteCollection(ctx context.Context, opts
// Patch applies the patch and returns the patched arangoSchedulerCronJob.
func (c *FakeArangoSchedulerCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerCronJob, err error) {
emptyResult := &v1beta1.ArangoSchedulerCronJob{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoschedulercronjobsResource, c.ns, name, pt, data, subresources...), &v1beta1.ArangoSchedulerCronJob{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoschedulercronjobsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerCronJob), err
}

View file

@ -45,22 +45,24 @@ var arangoschedulerdeploymentsKind = v1beta1.SchemeGroupVersion.WithKind("Arango
// Get takes name of the arangoSchedulerDeployment, and returns the corresponding arangoSchedulerDeployment object, and an error if there is any.
func (c *FakeArangoSchedulerDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
emptyResult := &v1beta1.ArangoSchedulerDeployment{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoschedulerdeploymentsResource, c.ns, name), &v1beta1.ArangoSchedulerDeployment{})
Invokes(testing.NewGetActionWithOptions(arangoschedulerdeploymentsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerDeployment), err
}
// List takes label and field selectors, and returns the list of ArangoSchedulerDeployments that match those selectors.
func (c *FakeArangoSchedulerDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerDeploymentList, err error) {
emptyResult := &v1beta1.ArangoSchedulerDeploymentList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoschedulerdeploymentsResource, arangoschedulerdeploymentsKind, c.ns, opts), &v1beta1.ArangoSchedulerDeploymentList{})
Invokes(testing.NewListActionWithOptions(arangoschedulerdeploymentsResource, arangoschedulerdeploymentsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoSchedulerDeployments) List(ctx context.Context, opts v1.ListO
// Watch returns a watch.Interface that watches the requested arangoSchedulerDeployments.
func (c *FakeArangoSchedulerDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoschedulerdeploymentsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoschedulerdeploymentsResource, c.ns, opts))
}
// Create takes the representation of a arangoSchedulerDeployment and creates it. Returns the server's representation of the arangoSchedulerDeployment, and an error, if there is any.
func (c *FakeArangoSchedulerDeployments) Create(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
emptyResult := &v1beta1.ArangoSchedulerDeployment{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoschedulerdeploymentsResource, c.ns, arangoSchedulerDeployment), &v1beta1.ArangoSchedulerDeployment{})
Invokes(testing.NewCreateActionWithOptions(arangoschedulerdeploymentsResource, c.ns, arangoSchedulerDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerDeployment), err
}
// Update takes the representation of a arangoSchedulerDeployment and updates it. Returns the server's representation of the arangoSchedulerDeployment, and an error, if there is any.
func (c *FakeArangoSchedulerDeployments) Update(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
emptyResult := &v1beta1.ArangoSchedulerDeployment{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoschedulerdeploymentsResource, c.ns, arangoSchedulerDeployment), &v1beta1.ArangoSchedulerDeployment{})
Invokes(testing.NewUpdateActionWithOptions(arangoschedulerdeploymentsResource, c.ns, arangoSchedulerDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerDeployment), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoSchedulerDeployments) UpdateStatus(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerDeployment, error) {
func (c *FakeArangoSchedulerDeployments) UpdateStatus(ctx context.Context, arangoSchedulerDeployment *v1beta1.ArangoSchedulerDeployment, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerDeployment, err error) {
emptyResult := &v1beta1.ArangoSchedulerDeployment{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoschedulerdeploymentsResource, "status", c.ns, arangoSchedulerDeployment), &v1beta1.ArangoSchedulerDeployment{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoschedulerdeploymentsResource, "status", c.ns, arangoSchedulerDeployment, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerDeployment), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoSchedulerDeployments) Delete(ctx context.Context, name string
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoSchedulerDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoschedulerdeploymentsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoschedulerdeploymentsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ArangoSchedulerDeploymentList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoSchedulerDeployments) DeleteCollection(ctx context.Context, o
// Patch applies the patch and returns the patched arangoSchedulerDeployment.
func (c *FakeArangoSchedulerDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerDeployment, err error) {
emptyResult := &v1beta1.ArangoSchedulerDeployment{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoschedulerdeploymentsResource, c.ns, name, pt, data, subresources...), &v1beta1.ArangoSchedulerDeployment{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoschedulerdeploymentsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerDeployment), err
}

View file

@ -45,22 +45,24 @@ var arangoschedulerpodsKind = v1beta1.SchemeGroupVersion.WithKind("ArangoSchedul
// Get takes name of the arangoSchedulerPod, and returns the corresponding arangoSchedulerPod object, and an error if there is any.
func (c *FakeArangoSchedulerPods) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
emptyResult := &v1beta1.ArangoSchedulerPod{}
obj, err := c.Fake.
Invokes(testing.NewGetAction(arangoschedulerpodsResource, c.ns, name), &v1beta1.ArangoSchedulerPod{})
Invokes(testing.NewGetActionWithOptions(arangoschedulerpodsResource, c.ns, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerPod), err
}
// List takes label and field selectors, and returns the list of ArangoSchedulerPods that match those selectors.
func (c *FakeArangoSchedulerPods) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ArangoSchedulerPodList, err error) {
emptyResult := &v1beta1.ArangoSchedulerPodList{}
obj, err := c.Fake.
Invokes(testing.NewListAction(arangoschedulerpodsResource, arangoschedulerpodsKind, c.ns, opts), &v1beta1.ArangoSchedulerPodList{})
Invokes(testing.NewListActionWithOptions(arangoschedulerpodsResource, arangoschedulerpodsKind, c.ns, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -79,40 +81,43 @@ func (c *FakeArangoSchedulerPods) List(ctx context.Context, opts v1.ListOptions)
// Watch returns a watch.Interface that watches the requested arangoSchedulerPods.
func (c *FakeArangoSchedulerPods) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(arangoschedulerpodsResource, c.ns, opts))
InvokesWatch(testing.NewWatchActionWithOptions(arangoschedulerpodsResource, c.ns, opts))
}
// Create takes the representation of a arangoSchedulerPod and creates it. Returns the server's representation of the arangoSchedulerPod, and an error, if there is any.
func (c *FakeArangoSchedulerPods) Create(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.CreateOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
emptyResult := &v1beta1.ArangoSchedulerPod{}
obj, err := c.Fake.
Invokes(testing.NewCreateAction(arangoschedulerpodsResource, c.ns, arangoSchedulerPod), &v1beta1.ArangoSchedulerPod{})
Invokes(testing.NewCreateActionWithOptions(arangoschedulerpodsResource, c.ns, arangoSchedulerPod, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerPod), err
}
// Update takes the representation of a arangoSchedulerPod and updates it. Returns the server's representation of the arangoSchedulerPod, and an error, if there is any.
func (c *FakeArangoSchedulerPods) Update(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
emptyResult := &v1beta1.ArangoSchedulerPod{}
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(arangoschedulerpodsResource, c.ns, arangoSchedulerPod), &v1beta1.ArangoSchedulerPod{})
Invokes(testing.NewUpdateActionWithOptions(arangoschedulerpodsResource, c.ns, arangoSchedulerPod, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerPod), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoSchedulerPods) UpdateStatus(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.UpdateOptions) (*v1beta1.ArangoSchedulerPod, error) {
func (c *FakeArangoSchedulerPods) UpdateStatus(ctx context.Context, arangoSchedulerPod *v1beta1.ArangoSchedulerPod, opts v1.UpdateOptions) (result *v1beta1.ArangoSchedulerPod, err error) {
emptyResult := &v1beta1.ArangoSchedulerPod{}
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(arangoschedulerpodsResource, "status", c.ns, arangoSchedulerPod), &v1beta1.ArangoSchedulerPod{})
Invokes(testing.NewUpdateSubresourceActionWithOptions(arangoschedulerpodsResource, "status", c.ns, arangoSchedulerPod, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerPod), err
}
@ -127,7 +132,7 @@ func (c *FakeArangoSchedulerPods) Delete(ctx context.Context, name string, opts
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoSchedulerPods) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(arangoschedulerpodsResource, c.ns, listOpts)
action := testing.NewDeleteCollectionActionWithOptions(arangoschedulerpodsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ArangoSchedulerPodList{})
return err
@ -135,11 +140,12 @@ func (c *FakeArangoSchedulerPods) DeleteCollection(ctx context.Context, opts v1.
// Patch applies the patch and returns the patched arangoSchedulerPod.
func (c *FakeArangoSchedulerPods) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ArangoSchedulerPod, err error) {
emptyResult := &v1beta1.ArangoSchedulerPod{}
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(arangoschedulerpodsResource, c.ns, name, pt, data, subresources...), &v1beta1.ArangoSchedulerPod{})
Invokes(testing.NewPatchSubresourceActionWithOptions(arangoschedulerpodsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1beta1.ArangoSchedulerPod), err
}

View file

@ -24,14 +24,13 @@ package v1alpha
import (
"context"
"time"
v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha"
scheme "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest"
gentype "k8s.io/client-go/gentype"
)
// ArangoLocalStoragesGetter has a method to return a ArangoLocalStorageInterface.
@ -44,6 +43,7 @@ type ArangoLocalStoragesGetter interface {
type ArangoLocalStorageInterface interface {
Create(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.CreateOptions) (*v1alpha.ArangoLocalStorage, error)
Update(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.UpdateOptions) (*v1alpha.ArangoLocalStorage, error)
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.UpdateOptions) (*v1alpha.ArangoLocalStorage, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@ -56,133 +56,18 @@ type ArangoLocalStorageInterface interface {
// arangoLocalStorages implements ArangoLocalStorageInterface
type arangoLocalStorages struct {
client rest.Interface
*gentype.ClientWithList[*v1alpha.ArangoLocalStorage, *v1alpha.ArangoLocalStorageList]
}
// newArangoLocalStorages returns a ArangoLocalStorages
func newArangoLocalStorages(c *StorageV1alphaClient) *arangoLocalStorages {
return &arangoLocalStorages{
client: c.RESTClient(),
gentype.NewClientWithList[*v1alpha.ArangoLocalStorage, *v1alpha.ArangoLocalStorageList](
"arangolocalstorages",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *v1alpha.ArangoLocalStorage { return &v1alpha.ArangoLocalStorage{} },
func() *v1alpha.ArangoLocalStorageList { return &v1alpha.ArangoLocalStorageList{} }),
}
}
// Get takes name of the arangoLocalStorage, and returns the corresponding arangoLocalStorage object, and an error if there is any.
func (c *arangoLocalStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha.ArangoLocalStorage, err error) {
result = &v1alpha.ArangoLocalStorage{}
err = c.client.Get().
Resource("arangolocalstorages").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ArangoLocalStorages that match those selectors.
func (c *arangoLocalStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha.ArangoLocalStorageList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha.ArangoLocalStorageList{}
err = c.client.Get().
Resource("arangolocalstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested arangoLocalStorages.
func (c *arangoLocalStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("arangolocalstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a arangoLocalStorage and creates it. Returns the server's representation of the arangoLocalStorage, and an error, if there is any.
func (c *arangoLocalStorages) Create(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.CreateOptions) (result *v1alpha.ArangoLocalStorage, err error) {
result = &v1alpha.ArangoLocalStorage{}
err = c.client.Post().
Resource("arangolocalstorages").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoLocalStorage).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a arangoLocalStorage and updates it. Returns the server's representation of the arangoLocalStorage, and an error, if there is any.
func (c *arangoLocalStorages) Update(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.UpdateOptions) (result *v1alpha.ArangoLocalStorage, err error) {
result = &v1alpha.ArangoLocalStorage{}
err = c.client.Put().
Resource("arangolocalstorages").
Name(arangoLocalStorage.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoLocalStorage).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *arangoLocalStorages) UpdateStatus(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.UpdateOptions) (result *v1alpha.ArangoLocalStorage, err error) {
result = &v1alpha.ArangoLocalStorage{}
err = c.client.Put().
Resource("arangolocalstorages").
Name(arangoLocalStorage.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(arangoLocalStorage).
Do(ctx).
Into(result)
return
}
// Delete takes name of the arangoLocalStorage and deletes it. Returns an error if one occurs.
func (c *arangoLocalStorages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("arangolocalstorages").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *arangoLocalStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("arangolocalstorages").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched arangoLocalStorage.
func (c *arangoLocalStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha.ArangoLocalStorage, err error) {
result = &v1alpha.ArangoLocalStorage{}
err = c.client.Patch(pt).
Resource("arangolocalstorages").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View file

@ -44,20 +44,22 @@ var arangolocalstoragesKind = v1alpha.SchemeGroupVersion.WithKind("ArangoLocalSt
// Get takes name of the arangoLocalStorage, and returns the corresponding arangoLocalStorage object, and an error if there is any.
func (c *FakeArangoLocalStorages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha.ArangoLocalStorage, err error) {
emptyResult := &v1alpha.ArangoLocalStorage{}
obj, err := c.Fake.
Invokes(testing.NewRootGetAction(arangolocalstoragesResource, name), &v1alpha.ArangoLocalStorage{})
Invokes(testing.NewRootGetActionWithOptions(arangolocalstoragesResource, name, options), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha.ArangoLocalStorage), err
}
// List takes label and field selectors, and returns the list of ArangoLocalStorages that match those selectors.
func (c *FakeArangoLocalStorages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha.ArangoLocalStorageList, err error) {
emptyResult := &v1alpha.ArangoLocalStorageList{}
obj, err := c.Fake.
Invokes(testing.NewRootListAction(arangolocalstoragesResource, arangolocalstoragesKind, opts), &v1alpha.ArangoLocalStorageList{})
Invokes(testing.NewRootListActionWithOptions(arangolocalstoragesResource, arangolocalstoragesKind, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@ -76,36 +78,39 @@ func (c *FakeArangoLocalStorages) List(ctx context.Context, opts v1.ListOptions)
// Watch returns a watch.Interface that watches the requested arangoLocalStorages.
func (c *FakeArangoLocalStorages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(arangolocalstoragesResource, opts))
InvokesWatch(testing.NewRootWatchActionWithOptions(arangolocalstoragesResource, opts))
}
// Create takes the representation of a arangoLocalStorage and creates it. Returns the server's representation of the arangoLocalStorage, and an error, if there is any.
func (c *FakeArangoLocalStorages) Create(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.CreateOptions) (result *v1alpha.ArangoLocalStorage, err error) {
emptyResult := &v1alpha.ArangoLocalStorage{}
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(arangolocalstoragesResource, arangoLocalStorage), &v1alpha.ArangoLocalStorage{})
Invokes(testing.NewRootCreateActionWithOptions(arangolocalstoragesResource, arangoLocalStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha.ArangoLocalStorage), err
}
// Update takes the representation of a arangoLocalStorage and updates it. Returns the server's representation of the arangoLocalStorage, and an error, if there is any.
func (c *FakeArangoLocalStorages) Update(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.UpdateOptions) (result *v1alpha.ArangoLocalStorage, err error) {
emptyResult := &v1alpha.ArangoLocalStorage{}
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(arangolocalstoragesResource, arangoLocalStorage), &v1alpha.ArangoLocalStorage{})
Invokes(testing.NewRootUpdateActionWithOptions(arangolocalstoragesResource, arangoLocalStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha.ArangoLocalStorage), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeArangoLocalStorages) UpdateStatus(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.UpdateOptions) (*v1alpha.ArangoLocalStorage, error) {
func (c *FakeArangoLocalStorages) UpdateStatus(ctx context.Context, arangoLocalStorage *v1alpha.ArangoLocalStorage, opts v1.UpdateOptions) (result *v1alpha.ArangoLocalStorage, err error) {
emptyResult := &v1alpha.ArangoLocalStorage{}
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(arangolocalstoragesResource, "status", arangoLocalStorage), &v1alpha.ArangoLocalStorage{})
Invokes(testing.NewRootUpdateSubresourceActionWithOptions(arangolocalstoragesResource, "status", arangoLocalStorage, opts), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha.ArangoLocalStorage), err
}
@ -119,7 +124,7 @@ func (c *FakeArangoLocalStorages) Delete(ctx context.Context, name string, opts
// DeleteCollection deletes a collection of objects.
func (c *FakeArangoLocalStorages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(arangolocalstoragesResource, listOpts)
action := testing.NewRootDeleteCollectionActionWithOptions(arangolocalstoragesResource, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha.ArangoLocalStorageList{})
return err
@ -127,10 +132,11 @@ func (c *FakeArangoLocalStorages) DeleteCollection(ctx context.Context, opts v1.
// Patch applies the patch and returns the patched arangoLocalStorage.
func (c *FakeArangoLocalStorages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha.ArangoLocalStorage, err error) {
emptyResult := &v1alpha.ArangoLocalStorage{}
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(arangolocalstoragesResource, name, pt, data, subresources...), &v1alpha.ArangoLocalStorage{})
Invokes(testing.NewRootPatchSubresourceActionWithOptions(arangolocalstoragesResource, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
return nil, err
return emptyResult, err
}
return obj.(*v1alpha.ArangoLocalStorage), err
}

View file

@ -240,6 +240,7 @@ type SharedInformerFactory interface {
// Start initializes all requested informers. They are handled in goroutines
// which run until the stop channel gets closed.
// Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync.
Start(stopCh <-chan struct{})
// Shutdown marks a factory as shutting down. At that point no new

View file

@ -24,8 +24,8 @@ package v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/analytics/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type GraphAnalyticsEngineLister interface {
// graphAnalyticsEngineLister implements the GraphAnalyticsEngineLister interface.
type graphAnalyticsEngineLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha1.GraphAnalyticsEngine]
}
// NewGraphAnalyticsEngineLister returns a new GraphAnalyticsEngineLister.
func NewGraphAnalyticsEngineLister(indexer cache.Indexer) GraphAnalyticsEngineLister {
return &graphAnalyticsEngineLister{indexer: indexer}
}
// List lists all GraphAnalyticsEngines in the indexer.
func (s *graphAnalyticsEngineLister) List(selector labels.Selector) (ret []*v1alpha1.GraphAnalyticsEngine, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.GraphAnalyticsEngine))
})
return ret, err
return &graphAnalyticsEngineLister{listers.New[*v1alpha1.GraphAnalyticsEngine](indexer, v1alpha1.Resource("graphanalyticsengine"))}
}
// GraphAnalyticsEngines returns an object that can list and get GraphAnalyticsEngines.
func (s *graphAnalyticsEngineLister) GraphAnalyticsEngines(namespace string) GraphAnalyticsEngineNamespaceLister {
return graphAnalyticsEngineNamespaceLister{indexer: s.indexer, namespace: namespace}
return graphAnalyticsEngineNamespaceLister{listers.NewNamespaced[*v1alpha1.GraphAnalyticsEngine](s.ResourceIndexer, namespace)}
}
// GraphAnalyticsEngineNamespaceLister helps list and get GraphAnalyticsEngines.
@ -78,26 +70,5 @@ type GraphAnalyticsEngineNamespaceLister interface {
// graphAnalyticsEngineNamespaceLister implements the GraphAnalyticsEngineNamespaceLister
// interface.
type graphAnalyticsEngineNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all GraphAnalyticsEngines in the indexer for a given namespace.
func (s graphAnalyticsEngineNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.GraphAnalyticsEngine, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.GraphAnalyticsEngine))
})
return ret, err
}
// Get retrieves the GraphAnalyticsEngine from the indexer for a given namespace and name.
func (s graphAnalyticsEngineNamespaceLister) Get(name string) (*v1alpha1.GraphAnalyticsEngine, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("graphanalyticsengine"), name)
}
return obj.(*v1alpha1.GraphAnalyticsEngine), nil
listers.ResourceIndexer[*v1alpha1.GraphAnalyticsEngine]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/apps/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoJobLister interface {
// arangoJobLister implements the ArangoJobLister interface.
type arangoJobLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoJob]
}
// NewArangoJobLister returns a new ArangoJobLister.
func NewArangoJobLister(indexer cache.Indexer) ArangoJobLister {
return &arangoJobLister{indexer: indexer}
}
// List lists all ArangoJobs in the indexer.
func (s *arangoJobLister) List(selector labels.Selector) (ret []*v1.ArangoJob, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoJob))
})
return ret, err
return &arangoJobLister{listers.New[*v1.ArangoJob](indexer, v1.Resource("arangojob"))}
}
// ArangoJobs returns an object that can list and get ArangoJobs.
func (s *arangoJobLister) ArangoJobs(namespace string) ArangoJobNamespaceLister {
return arangoJobNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoJobNamespaceLister{listers.NewNamespaced[*v1.ArangoJob](s.ResourceIndexer, namespace)}
}
// ArangoJobNamespaceLister helps list and get ArangoJobs.
@ -78,26 +70,5 @@ type ArangoJobNamespaceLister interface {
// arangoJobNamespaceLister implements the ArangoJobNamespaceLister
// interface.
type arangoJobNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoJobs in the indexer for a given namespace.
func (s arangoJobNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoJob, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoJob))
})
return ret, err
}
// Get retrieves the ArangoJob from the indexer for a given namespace and name.
func (s arangoJobNamespaceLister) Get(name string) (*v1.ArangoJob, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangojob"), name)
}
return obj.(*v1.ArangoJob), nil
listers.ResourceIndexer[*v1.ArangoJob]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoBackupLister interface {
// arangoBackupLister implements the ArangoBackupLister interface.
type arangoBackupLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoBackup]
}
// NewArangoBackupLister returns a new ArangoBackupLister.
func NewArangoBackupLister(indexer cache.Indexer) ArangoBackupLister {
return &arangoBackupLister{indexer: indexer}
}
// List lists all ArangoBackups in the indexer.
func (s *arangoBackupLister) List(selector labels.Selector) (ret []*v1.ArangoBackup, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoBackup))
})
return ret, err
return &arangoBackupLister{listers.New[*v1.ArangoBackup](indexer, v1.Resource("arangobackup"))}
}
// ArangoBackups returns an object that can list and get ArangoBackups.
func (s *arangoBackupLister) ArangoBackups(namespace string) ArangoBackupNamespaceLister {
return arangoBackupNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoBackupNamespaceLister{listers.NewNamespaced[*v1.ArangoBackup](s.ResourceIndexer, namespace)}
}
// ArangoBackupNamespaceLister helps list and get ArangoBackups.
@ -78,26 +70,5 @@ type ArangoBackupNamespaceLister interface {
// arangoBackupNamespaceLister implements the ArangoBackupNamespaceLister
// interface.
type arangoBackupNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoBackups in the indexer for a given namespace.
func (s arangoBackupNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoBackup, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoBackup))
})
return ret, err
}
// Get retrieves the ArangoBackup from the indexer for a given namespace and name.
func (s arangoBackupNamespaceLister) Get(name string) (*v1.ArangoBackup, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangobackup"), name)
}
return obj.(*v1.ArangoBackup), nil
listers.ResourceIndexer[*v1.ArangoBackup]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/backup/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoBackupPolicyLister interface {
// arangoBackupPolicyLister implements the ArangoBackupPolicyLister interface.
type arangoBackupPolicyLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoBackupPolicy]
}
// NewArangoBackupPolicyLister returns a new ArangoBackupPolicyLister.
func NewArangoBackupPolicyLister(indexer cache.Indexer) ArangoBackupPolicyLister {
return &arangoBackupPolicyLister{indexer: indexer}
}
// List lists all ArangoBackupPolicies in the indexer.
func (s *arangoBackupPolicyLister) List(selector labels.Selector) (ret []*v1.ArangoBackupPolicy, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoBackupPolicy))
})
return ret, err
return &arangoBackupPolicyLister{listers.New[*v1.ArangoBackupPolicy](indexer, v1.Resource("arangobackuppolicy"))}
}
// ArangoBackupPolicies returns an object that can list and get ArangoBackupPolicies.
func (s *arangoBackupPolicyLister) ArangoBackupPolicies(namespace string) ArangoBackupPolicyNamespaceLister {
return arangoBackupPolicyNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoBackupPolicyNamespaceLister{listers.NewNamespaced[*v1.ArangoBackupPolicy](s.ResourceIndexer, namespace)}
}
// ArangoBackupPolicyNamespaceLister helps list and get ArangoBackupPolicies.
@ -78,26 +70,5 @@ type ArangoBackupPolicyNamespaceLister interface {
// arangoBackupPolicyNamespaceLister implements the ArangoBackupPolicyNamespaceLister
// interface.
type arangoBackupPolicyNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoBackupPolicies in the indexer for a given namespace.
func (s arangoBackupPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoBackupPolicy, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoBackupPolicy))
})
return ret, err
}
// Get retrieves the ArangoBackupPolicy from the indexer for a given namespace and name.
func (s arangoBackupPolicyNamespaceLister) Get(name string) (*v1.ArangoBackupPolicy, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangobackuppolicy"), name)
}
return obj.(*v1.ArangoBackupPolicy), nil
listers.ResourceIndexer[*v1.ArangoBackupPolicy]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoClusterSynchronizationLister interface {
// arangoClusterSynchronizationLister implements the ArangoClusterSynchronizationLister interface.
type arangoClusterSynchronizationLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoClusterSynchronization]
}
// NewArangoClusterSynchronizationLister returns a new ArangoClusterSynchronizationLister.
func NewArangoClusterSynchronizationLister(indexer cache.Indexer) ArangoClusterSynchronizationLister {
return &arangoClusterSynchronizationLister{indexer: indexer}
}
// List lists all ArangoClusterSynchronizations in the indexer.
func (s *arangoClusterSynchronizationLister) List(selector labels.Selector) (ret []*v1.ArangoClusterSynchronization, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoClusterSynchronization))
})
return ret, err
return &arangoClusterSynchronizationLister{listers.New[*v1.ArangoClusterSynchronization](indexer, v1.Resource("arangoclustersynchronization"))}
}
// ArangoClusterSynchronizations returns an object that can list and get ArangoClusterSynchronizations.
func (s *arangoClusterSynchronizationLister) ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationNamespaceLister {
return arangoClusterSynchronizationNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoClusterSynchronizationNamespaceLister{listers.NewNamespaced[*v1.ArangoClusterSynchronization](s.ResourceIndexer, namespace)}
}
// ArangoClusterSynchronizationNamespaceLister helps list and get ArangoClusterSynchronizations.
@ -78,26 +70,5 @@ type ArangoClusterSynchronizationNamespaceLister interface {
// arangoClusterSynchronizationNamespaceLister implements the ArangoClusterSynchronizationNamespaceLister
// interface.
type arangoClusterSynchronizationNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoClusterSynchronizations in the indexer for a given namespace.
func (s arangoClusterSynchronizationNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoClusterSynchronization, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoClusterSynchronization))
})
return ret, err
}
// Get retrieves the ArangoClusterSynchronization from the indexer for a given namespace and name.
func (s arangoClusterSynchronizationNamespaceLister) Get(name string) (*v1.ArangoClusterSynchronization, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangoclustersynchronization"), name)
}
return obj.(*v1.ArangoClusterSynchronization), nil
listers.ResourceIndexer[*v1.ArangoClusterSynchronization]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoDeploymentLister interface {
// arangoDeploymentLister implements the ArangoDeploymentLister interface.
type arangoDeploymentLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoDeployment]
}
// NewArangoDeploymentLister returns a new ArangoDeploymentLister.
func NewArangoDeploymentLister(indexer cache.Indexer) ArangoDeploymentLister {
return &arangoDeploymentLister{indexer: indexer}
}
// List lists all ArangoDeployments in the indexer.
func (s *arangoDeploymentLister) List(selector labels.Selector) (ret []*v1.ArangoDeployment, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoDeployment))
})
return ret, err
return &arangoDeploymentLister{listers.New[*v1.ArangoDeployment](indexer, v1.Resource("arangodeployment"))}
}
// ArangoDeployments returns an object that can list and get ArangoDeployments.
func (s *arangoDeploymentLister) ArangoDeployments(namespace string) ArangoDeploymentNamespaceLister {
return arangoDeploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoDeploymentNamespaceLister{listers.NewNamespaced[*v1.ArangoDeployment](s.ResourceIndexer, namespace)}
}
// ArangoDeploymentNamespaceLister helps list and get ArangoDeployments.
@ -78,26 +70,5 @@ type ArangoDeploymentNamespaceLister interface {
// arangoDeploymentNamespaceLister implements the ArangoDeploymentNamespaceLister
// interface.
type arangoDeploymentNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoDeployments in the indexer for a given namespace.
func (s arangoDeploymentNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoDeployment, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoDeployment))
})
return ret, err
}
// Get retrieves the ArangoDeployment from the indexer for a given namespace and name.
func (s arangoDeploymentNamespaceLister) Get(name string) (*v1.ArangoDeployment, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangodeployment"), name)
}
return obj.(*v1.ArangoDeployment), nil
listers.ResourceIndexer[*v1.ArangoDeployment]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMemberLister interface {
// arangoMemberLister implements the ArangoMemberLister interface.
type arangoMemberLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoMember]
}
// NewArangoMemberLister returns a new ArangoMemberLister.
func NewArangoMemberLister(indexer cache.Indexer) ArangoMemberLister {
return &arangoMemberLister{indexer: indexer}
}
// List lists all ArangoMembers in the indexer.
func (s *arangoMemberLister) List(selector labels.Selector) (ret []*v1.ArangoMember, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoMember))
})
return ret, err
return &arangoMemberLister{listers.New[*v1.ArangoMember](indexer, v1.Resource("arangomember"))}
}
// ArangoMembers returns an object that can list and get ArangoMembers.
func (s *arangoMemberLister) ArangoMembers(namespace string) ArangoMemberNamespaceLister {
return arangoMemberNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMemberNamespaceLister{listers.NewNamespaced[*v1.ArangoMember](s.ResourceIndexer, namespace)}
}
// ArangoMemberNamespaceLister helps list and get ArangoMembers.
@ -78,26 +70,5 @@ type ArangoMemberNamespaceLister interface {
// arangoMemberNamespaceLister implements the ArangoMemberNamespaceLister
// interface.
type arangoMemberNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMembers in the indexer for a given namespace.
func (s arangoMemberNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoMember, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoMember))
})
return ret, err
}
// Get retrieves the ArangoMember from the indexer for a given namespace and name.
func (s arangoMemberNamespaceLister) Get(name string) (*v1.ArangoMember, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangomember"), name)
}
return obj.(*v1.ArangoMember), nil
listers.ResourceIndexer[*v1.ArangoMember]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoTaskLister interface {
// arangoTaskLister implements the ArangoTaskLister interface.
type arangoTaskLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoTask]
}
// NewArangoTaskLister returns a new ArangoTaskLister.
func NewArangoTaskLister(indexer cache.Indexer) ArangoTaskLister {
return &arangoTaskLister{indexer: indexer}
}
// List lists all ArangoTasks in the indexer.
func (s *arangoTaskLister) List(selector labels.Selector) (ret []*v1.ArangoTask, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoTask))
})
return ret, err
return &arangoTaskLister{listers.New[*v1.ArangoTask](indexer, v1.Resource("arangotask"))}
}
// ArangoTasks returns an object that can list and get ArangoTasks.
func (s *arangoTaskLister) ArangoTasks(namespace string) ArangoTaskNamespaceLister {
return arangoTaskNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoTaskNamespaceLister{listers.NewNamespaced[*v1.ArangoTask](s.ResourceIndexer, namespace)}
}
// ArangoTaskNamespaceLister helps list and get ArangoTasks.
@ -78,26 +70,5 @@ type ArangoTaskNamespaceLister interface {
// arangoTaskNamespaceLister implements the ArangoTaskNamespaceLister
// interface.
type arangoTaskNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoTasks in the indexer for a given namespace.
func (s arangoTaskNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoTask, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoTask))
})
return ret, err
}
// Get retrieves the ArangoTask from the indexer for a given namespace and name.
func (s arangoTaskNamespaceLister) Get(name string) (*v1.ArangoTask, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangotask"), name)
}
return obj.(*v1.ArangoTask), nil
listers.ResourceIndexer[*v1.ArangoTask]
}

View file

@ -24,8 +24,8 @@ package v2alpha1
import (
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoClusterSynchronizationLister interface {
// arangoClusterSynchronizationLister implements the ArangoClusterSynchronizationLister interface.
type arangoClusterSynchronizationLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v2alpha1.ArangoClusterSynchronization]
}
// NewArangoClusterSynchronizationLister returns a new ArangoClusterSynchronizationLister.
func NewArangoClusterSynchronizationLister(indexer cache.Indexer) ArangoClusterSynchronizationLister {
return &arangoClusterSynchronizationLister{indexer: indexer}
}
// List lists all ArangoClusterSynchronizations in the indexer.
func (s *arangoClusterSynchronizationLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoClusterSynchronization, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoClusterSynchronization))
})
return ret, err
return &arangoClusterSynchronizationLister{listers.New[*v2alpha1.ArangoClusterSynchronization](indexer, v2alpha1.Resource("arangoclustersynchronization"))}
}
// ArangoClusterSynchronizations returns an object that can list and get ArangoClusterSynchronizations.
func (s *arangoClusterSynchronizationLister) ArangoClusterSynchronizations(namespace string) ArangoClusterSynchronizationNamespaceLister {
return arangoClusterSynchronizationNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoClusterSynchronizationNamespaceLister{listers.NewNamespaced[*v2alpha1.ArangoClusterSynchronization](s.ResourceIndexer, namespace)}
}
// ArangoClusterSynchronizationNamespaceLister helps list and get ArangoClusterSynchronizations.
@ -78,26 +70,5 @@ type ArangoClusterSynchronizationNamespaceLister interface {
// arangoClusterSynchronizationNamespaceLister implements the ArangoClusterSynchronizationNamespaceLister
// interface.
type arangoClusterSynchronizationNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoClusterSynchronizations in the indexer for a given namespace.
func (s arangoClusterSynchronizationNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoClusterSynchronization, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoClusterSynchronization))
})
return ret, err
}
// Get retrieves the ArangoClusterSynchronization from the indexer for a given namespace and name.
func (s arangoClusterSynchronizationNamespaceLister) Get(name string) (*v2alpha1.ArangoClusterSynchronization, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v2alpha1.Resource("arangoclustersynchronization"), name)
}
return obj.(*v2alpha1.ArangoClusterSynchronization), nil
listers.ResourceIndexer[*v2alpha1.ArangoClusterSynchronization]
}

View file

@ -24,8 +24,8 @@ package v2alpha1
import (
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoDeploymentLister interface {
// arangoDeploymentLister implements the ArangoDeploymentLister interface.
type arangoDeploymentLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v2alpha1.ArangoDeployment]
}
// NewArangoDeploymentLister returns a new ArangoDeploymentLister.
func NewArangoDeploymentLister(indexer cache.Indexer) ArangoDeploymentLister {
return &arangoDeploymentLister{indexer: indexer}
}
// List lists all ArangoDeployments in the indexer.
func (s *arangoDeploymentLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoDeployment, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoDeployment))
})
return ret, err
return &arangoDeploymentLister{listers.New[*v2alpha1.ArangoDeployment](indexer, v2alpha1.Resource("arangodeployment"))}
}
// ArangoDeployments returns an object that can list and get ArangoDeployments.
func (s *arangoDeploymentLister) ArangoDeployments(namespace string) ArangoDeploymentNamespaceLister {
return arangoDeploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoDeploymentNamespaceLister{listers.NewNamespaced[*v2alpha1.ArangoDeployment](s.ResourceIndexer, namespace)}
}
// ArangoDeploymentNamespaceLister helps list and get ArangoDeployments.
@ -78,26 +70,5 @@ type ArangoDeploymentNamespaceLister interface {
// arangoDeploymentNamespaceLister implements the ArangoDeploymentNamespaceLister
// interface.
type arangoDeploymentNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoDeployments in the indexer for a given namespace.
func (s arangoDeploymentNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoDeployment, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoDeployment))
})
return ret, err
}
// Get retrieves the ArangoDeployment from the indexer for a given namespace and name.
func (s arangoDeploymentNamespaceLister) Get(name string) (*v2alpha1.ArangoDeployment, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v2alpha1.Resource("arangodeployment"), name)
}
return obj.(*v2alpha1.ArangoDeployment), nil
listers.ResourceIndexer[*v2alpha1.ArangoDeployment]
}

View file

@ -24,8 +24,8 @@ package v2alpha1
import (
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMemberLister interface {
// arangoMemberLister implements the ArangoMemberLister interface.
type arangoMemberLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v2alpha1.ArangoMember]
}
// NewArangoMemberLister returns a new ArangoMemberLister.
func NewArangoMemberLister(indexer cache.Indexer) ArangoMemberLister {
return &arangoMemberLister{indexer: indexer}
}
// List lists all ArangoMembers in the indexer.
func (s *arangoMemberLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoMember, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoMember))
})
return ret, err
return &arangoMemberLister{listers.New[*v2alpha1.ArangoMember](indexer, v2alpha1.Resource("arangomember"))}
}
// ArangoMembers returns an object that can list and get ArangoMembers.
func (s *arangoMemberLister) ArangoMembers(namespace string) ArangoMemberNamespaceLister {
return arangoMemberNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMemberNamespaceLister{listers.NewNamespaced[*v2alpha1.ArangoMember](s.ResourceIndexer, namespace)}
}
// ArangoMemberNamespaceLister helps list and get ArangoMembers.
@ -78,26 +70,5 @@ type ArangoMemberNamespaceLister interface {
// arangoMemberNamespaceLister implements the ArangoMemberNamespaceLister
// interface.
type arangoMemberNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMembers in the indexer for a given namespace.
func (s arangoMemberNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoMember, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoMember))
})
return ret, err
}
// Get retrieves the ArangoMember from the indexer for a given namespace and name.
func (s arangoMemberNamespaceLister) Get(name string) (*v2alpha1.ArangoMember, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v2alpha1.Resource("arangomember"), name)
}
return obj.(*v2alpha1.ArangoMember), nil
listers.ResourceIndexer[*v2alpha1.ArangoMember]
}

View file

@ -24,8 +24,8 @@ package v2alpha1
import (
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v2alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoTaskLister interface {
// arangoTaskLister implements the ArangoTaskLister interface.
type arangoTaskLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v2alpha1.ArangoTask]
}
// NewArangoTaskLister returns a new ArangoTaskLister.
func NewArangoTaskLister(indexer cache.Indexer) ArangoTaskLister {
return &arangoTaskLister{indexer: indexer}
}
// List lists all ArangoTasks in the indexer.
func (s *arangoTaskLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoTask, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoTask))
})
return ret, err
return &arangoTaskLister{listers.New[*v2alpha1.ArangoTask](indexer, v2alpha1.Resource("arangotask"))}
}
// ArangoTasks returns an object that can list and get ArangoTasks.
func (s *arangoTaskLister) ArangoTasks(namespace string) ArangoTaskNamespaceLister {
return arangoTaskNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoTaskNamespaceLister{listers.NewNamespaced[*v2alpha1.ArangoTask](s.ResourceIndexer, namespace)}
}
// ArangoTaskNamespaceLister helps list and get ArangoTasks.
@ -78,26 +70,5 @@ type ArangoTaskNamespaceLister interface {
// arangoTaskNamespaceLister implements the ArangoTaskNamespaceLister
// interface.
type arangoTaskNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoTasks in the indexer for a given namespace.
func (s arangoTaskNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoTask, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoTask))
})
return ret, err
}
// Get retrieves the ArangoTask from the indexer for a given namespace and name.
func (s arangoTaskNamespaceLister) Get(name string) (*v2alpha1.ArangoTask, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v2alpha1.Resource("arangotask"), name)
}
return obj.(*v2alpha1.ArangoTask), nil
listers.ResourceIndexer[*v2alpha1.ArangoTask]
}

View file

@ -24,8 +24,8 @@ package v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMLBatchJobLister interface {
// arangoMLBatchJobLister implements the ArangoMLBatchJobLister interface.
type arangoMLBatchJobLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha1.ArangoMLBatchJob]
}
// NewArangoMLBatchJobLister returns a new ArangoMLBatchJobLister.
func NewArangoMLBatchJobLister(indexer cache.Indexer) ArangoMLBatchJobLister {
return &arangoMLBatchJobLister{indexer: indexer}
}
// List lists all ArangoMLBatchJobs in the indexer.
func (s *arangoMLBatchJobLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLBatchJob, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLBatchJob))
})
return ret, err
return &arangoMLBatchJobLister{listers.New[*v1alpha1.ArangoMLBatchJob](indexer, v1alpha1.Resource("arangomlbatchjob"))}
}
// ArangoMLBatchJobs returns an object that can list and get ArangoMLBatchJobs.
func (s *arangoMLBatchJobLister) ArangoMLBatchJobs(namespace string) ArangoMLBatchJobNamespaceLister {
return arangoMLBatchJobNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMLBatchJobNamespaceLister{listers.NewNamespaced[*v1alpha1.ArangoMLBatchJob](s.ResourceIndexer, namespace)}
}
// ArangoMLBatchJobNamespaceLister helps list and get ArangoMLBatchJobs.
@ -78,26 +70,5 @@ type ArangoMLBatchJobNamespaceLister interface {
// arangoMLBatchJobNamespaceLister implements the ArangoMLBatchJobNamespaceLister
// interface.
type arangoMLBatchJobNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLBatchJobs in the indexer for a given namespace.
func (s arangoMLBatchJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLBatchJob, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLBatchJob))
})
return ret, err
}
// Get retrieves the ArangoMLBatchJob from the indexer for a given namespace and name.
func (s arangoMLBatchJobNamespaceLister) Get(name string) (*v1alpha1.ArangoMLBatchJob, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlbatchjob"), name)
}
return obj.(*v1alpha1.ArangoMLBatchJob), nil
listers.ResourceIndexer[*v1alpha1.ArangoMLBatchJob]
}

View file

@ -24,8 +24,8 @@ package v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMLCronJobLister interface {
// arangoMLCronJobLister implements the ArangoMLCronJobLister interface.
type arangoMLCronJobLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha1.ArangoMLCronJob]
}
// NewArangoMLCronJobLister returns a new ArangoMLCronJobLister.
func NewArangoMLCronJobLister(indexer cache.Indexer) ArangoMLCronJobLister {
return &arangoMLCronJobLister{indexer: indexer}
}
// List lists all ArangoMLCronJobs in the indexer.
func (s *arangoMLCronJobLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLCronJob, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLCronJob))
})
return ret, err
return &arangoMLCronJobLister{listers.New[*v1alpha1.ArangoMLCronJob](indexer, v1alpha1.Resource("arangomlcronjob"))}
}
// ArangoMLCronJobs returns an object that can list and get ArangoMLCronJobs.
func (s *arangoMLCronJobLister) ArangoMLCronJobs(namespace string) ArangoMLCronJobNamespaceLister {
return arangoMLCronJobNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMLCronJobNamespaceLister{listers.NewNamespaced[*v1alpha1.ArangoMLCronJob](s.ResourceIndexer, namespace)}
}
// ArangoMLCronJobNamespaceLister helps list and get ArangoMLCronJobs.
@ -78,26 +70,5 @@ type ArangoMLCronJobNamespaceLister interface {
// arangoMLCronJobNamespaceLister implements the ArangoMLCronJobNamespaceLister
// interface.
type arangoMLCronJobNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLCronJobs in the indexer for a given namespace.
func (s arangoMLCronJobNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLCronJob, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLCronJob))
})
return ret, err
}
// Get retrieves the ArangoMLCronJob from the indexer for a given namespace and name.
func (s arangoMLCronJobNamespaceLister) Get(name string) (*v1alpha1.ArangoMLCronJob, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlcronjob"), name)
}
return obj.(*v1alpha1.ArangoMLCronJob), nil
listers.ResourceIndexer[*v1alpha1.ArangoMLCronJob]
}

View file

@ -24,8 +24,8 @@ package v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMLExtensionLister interface {
// arangoMLExtensionLister implements the ArangoMLExtensionLister interface.
type arangoMLExtensionLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha1.ArangoMLExtension]
}
// NewArangoMLExtensionLister returns a new ArangoMLExtensionLister.
func NewArangoMLExtensionLister(indexer cache.Indexer) ArangoMLExtensionLister {
return &arangoMLExtensionLister{indexer: indexer}
}
// List lists all ArangoMLExtensions in the indexer.
func (s *arangoMLExtensionLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLExtension, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLExtension))
})
return ret, err
return &arangoMLExtensionLister{listers.New[*v1alpha1.ArangoMLExtension](indexer, v1alpha1.Resource("arangomlextension"))}
}
// ArangoMLExtensions returns an object that can list and get ArangoMLExtensions.
func (s *arangoMLExtensionLister) ArangoMLExtensions(namespace string) ArangoMLExtensionNamespaceLister {
return arangoMLExtensionNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMLExtensionNamespaceLister{listers.NewNamespaced[*v1alpha1.ArangoMLExtension](s.ResourceIndexer, namespace)}
}
// ArangoMLExtensionNamespaceLister helps list and get ArangoMLExtensions.
@ -78,26 +70,5 @@ type ArangoMLExtensionNamespaceLister interface {
// arangoMLExtensionNamespaceLister implements the ArangoMLExtensionNamespaceLister
// interface.
type arangoMLExtensionNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLExtensions in the indexer for a given namespace.
func (s arangoMLExtensionNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLExtension, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLExtension))
})
return ret, err
}
// Get retrieves the ArangoMLExtension from the indexer for a given namespace and name.
func (s arangoMLExtensionNamespaceLister) Get(name string) (*v1alpha1.ArangoMLExtension, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlextension"), name)
}
return obj.(*v1alpha1.ArangoMLExtension), nil
listers.ResourceIndexer[*v1alpha1.ArangoMLExtension]
}

View file

@ -24,8 +24,8 @@ package v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMLStorageLister interface {
// arangoMLStorageLister implements the ArangoMLStorageLister interface.
type arangoMLStorageLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha1.ArangoMLStorage]
}
// NewArangoMLStorageLister returns a new ArangoMLStorageLister.
func NewArangoMLStorageLister(indexer cache.Indexer) ArangoMLStorageLister {
return &arangoMLStorageLister{indexer: indexer}
}
// List lists all ArangoMLStorages in the indexer.
func (s *arangoMLStorageLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLStorage, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLStorage))
})
return ret, err
return &arangoMLStorageLister{listers.New[*v1alpha1.ArangoMLStorage](indexer, v1alpha1.Resource("arangomlstorage"))}
}
// ArangoMLStorages returns an object that can list and get ArangoMLStorages.
func (s *arangoMLStorageLister) ArangoMLStorages(namespace string) ArangoMLStorageNamespaceLister {
return arangoMLStorageNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMLStorageNamespaceLister{listers.NewNamespaced[*v1alpha1.ArangoMLStorage](s.ResourceIndexer, namespace)}
}
// ArangoMLStorageNamespaceLister helps list and get ArangoMLStorages.
@ -78,26 +70,5 @@ type ArangoMLStorageNamespaceLister interface {
// arangoMLStorageNamespaceLister implements the ArangoMLStorageNamespaceLister
// interface.
type arangoMLStorageNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLStorages in the indexer for a given namespace.
func (s arangoMLStorageNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoMLStorage, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoMLStorage))
})
return ret, err
}
// Get retrieves the ArangoMLStorage from the indexer for a given namespace and name.
func (s arangoMLStorageNamespaceLister) Get(name string) (*v1alpha1.ArangoMLStorage, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangomlstorage"), name)
}
return obj.(*v1alpha1.ArangoMLStorage), nil
listers.ResourceIndexer[*v1alpha1.ArangoMLStorage]
}

View file

@ -24,8 +24,8 @@ package v1beta1
import (
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMLExtensionLister interface {
// arangoMLExtensionLister implements the ArangoMLExtensionLister interface.
type arangoMLExtensionLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1beta1.ArangoMLExtension]
}
// NewArangoMLExtensionLister returns a new ArangoMLExtensionLister.
func NewArangoMLExtensionLister(indexer cache.Indexer) ArangoMLExtensionLister {
return &arangoMLExtensionLister{indexer: indexer}
}
// List lists all ArangoMLExtensions in the indexer.
func (s *arangoMLExtensionLister) List(selector labels.Selector) (ret []*v1beta1.ArangoMLExtension, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoMLExtension))
})
return ret, err
return &arangoMLExtensionLister{listers.New[*v1beta1.ArangoMLExtension](indexer, v1beta1.Resource("arangomlextension"))}
}
// ArangoMLExtensions returns an object that can list and get ArangoMLExtensions.
func (s *arangoMLExtensionLister) ArangoMLExtensions(namespace string) ArangoMLExtensionNamespaceLister {
return arangoMLExtensionNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMLExtensionNamespaceLister{listers.NewNamespaced[*v1beta1.ArangoMLExtension](s.ResourceIndexer, namespace)}
}
// ArangoMLExtensionNamespaceLister helps list and get ArangoMLExtensions.
@ -78,26 +70,5 @@ type ArangoMLExtensionNamespaceLister interface {
// arangoMLExtensionNamespaceLister implements the ArangoMLExtensionNamespaceLister
// interface.
type arangoMLExtensionNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLExtensions in the indexer for a given namespace.
func (s arangoMLExtensionNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ArangoMLExtension, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoMLExtension))
})
return ret, err
}
// Get retrieves the ArangoMLExtension from the indexer for a given namespace and name.
func (s arangoMLExtensionNamespaceLister) Get(name string) (*v1beta1.ArangoMLExtension, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("arangomlextension"), name)
}
return obj.(*v1beta1.ArangoMLExtension), nil
listers.ResourceIndexer[*v1beta1.ArangoMLExtension]
}

View file

@ -24,8 +24,8 @@ package v1beta1
import (
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/ml/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoMLStorageLister interface {
// arangoMLStorageLister implements the ArangoMLStorageLister interface.
type arangoMLStorageLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1beta1.ArangoMLStorage]
}
// NewArangoMLStorageLister returns a new ArangoMLStorageLister.
func NewArangoMLStorageLister(indexer cache.Indexer) ArangoMLStorageLister {
return &arangoMLStorageLister{indexer: indexer}
}
// List lists all ArangoMLStorages in the indexer.
func (s *arangoMLStorageLister) List(selector labels.Selector) (ret []*v1beta1.ArangoMLStorage, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoMLStorage))
})
return ret, err
return &arangoMLStorageLister{listers.New[*v1beta1.ArangoMLStorage](indexer, v1beta1.Resource("arangomlstorage"))}
}
// ArangoMLStorages returns an object that can list and get ArangoMLStorages.
func (s *arangoMLStorageLister) ArangoMLStorages(namespace string) ArangoMLStorageNamespaceLister {
return arangoMLStorageNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoMLStorageNamespaceLister{listers.NewNamespaced[*v1beta1.ArangoMLStorage](s.ResourceIndexer, namespace)}
}
// ArangoMLStorageNamespaceLister helps list and get ArangoMLStorages.
@ -78,26 +70,5 @@ type ArangoMLStorageNamespaceLister interface {
// arangoMLStorageNamespaceLister implements the ArangoMLStorageNamespaceLister
// interface.
type arangoMLStorageNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoMLStorages in the indexer for a given namespace.
func (s arangoMLStorageNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ArangoMLStorage, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoMLStorage))
})
return ret, err
}
// Get retrieves the ArangoMLStorage from the indexer for a given namespace and name.
func (s arangoMLStorageNamespaceLister) Get(name string) (*v1beta1.ArangoMLStorage, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("arangomlstorage"), name)
}
return obj.(*v1beta1.ArangoMLStorage), nil
listers.ResourceIndexer[*v1beta1.ArangoMLStorage]
}

View file

@ -24,8 +24,8 @@ package v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/networking/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoRouteLister interface {
// arangoRouteLister implements the ArangoRouteLister interface.
type arangoRouteLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha1.ArangoRoute]
}
// NewArangoRouteLister returns a new ArangoRouteLister.
func NewArangoRouteLister(indexer cache.Indexer) ArangoRouteLister {
return &arangoRouteLister{indexer: indexer}
}
// List lists all ArangoRoutes in the indexer.
func (s *arangoRouteLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoRoute, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoRoute))
})
return ret, err
return &arangoRouteLister{listers.New[*v1alpha1.ArangoRoute](indexer, v1alpha1.Resource("arangoroute"))}
}
// ArangoRoutes returns an object that can list and get ArangoRoutes.
func (s *arangoRouteLister) ArangoRoutes(namespace string) ArangoRouteNamespaceLister {
return arangoRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoRouteNamespaceLister{listers.NewNamespaced[*v1alpha1.ArangoRoute](s.ResourceIndexer, namespace)}
}
// ArangoRouteNamespaceLister helps list and get ArangoRoutes.
@ -78,26 +70,5 @@ type ArangoRouteNamespaceLister interface {
// arangoRouteNamespaceLister implements the ArangoRouteNamespaceLister
// interface.
type arangoRouteNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoRoutes in the indexer for a given namespace.
func (s arangoRouteNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoRoute, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoRoute))
})
return ret, err
}
// Get retrieves the ArangoRoute from the indexer for a given namespace and name.
func (s arangoRouteNamespaceLister) Get(name string) (*v1alpha1.ArangoRoute, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangoroute"), name)
}
return obj.(*v1alpha1.ArangoRoute), nil
listers.ResourceIndexer[*v1alpha1.ArangoRoute]
}

View file

@ -24,8 +24,8 @@ package v1
import (
v1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoDeploymentReplicationLister interface {
// arangoDeploymentReplicationLister implements the ArangoDeploymentReplicationLister interface.
type arangoDeploymentReplicationLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1.ArangoDeploymentReplication]
}
// NewArangoDeploymentReplicationLister returns a new ArangoDeploymentReplicationLister.
func NewArangoDeploymentReplicationLister(indexer cache.Indexer) ArangoDeploymentReplicationLister {
return &arangoDeploymentReplicationLister{indexer: indexer}
}
// List lists all ArangoDeploymentReplications in the indexer.
func (s *arangoDeploymentReplicationLister) List(selector labels.Selector) (ret []*v1.ArangoDeploymentReplication, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoDeploymentReplication))
})
return ret, err
return &arangoDeploymentReplicationLister{listers.New[*v1.ArangoDeploymentReplication](indexer, v1.Resource("arangodeploymentreplication"))}
}
// ArangoDeploymentReplications returns an object that can list and get ArangoDeploymentReplications.
func (s *arangoDeploymentReplicationLister) ArangoDeploymentReplications(namespace string) ArangoDeploymentReplicationNamespaceLister {
return arangoDeploymentReplicationNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoDeploymentReplicationNamespaceLister{listers.NewNamespaced[*v1.ArangoDeploymentReplication](s.ResourceIndexer, namespace)}
}
// ArangoDeploymentReplicationNamespaceLister helps list and get ArangoDeploymentReplications.
@ -78,26 +70,5 @@ type ArangoDeploymentReplicationNamespaceLister interface {
// arangoDeploymentReplicationNamespaceLister implements the ArangoDeploymentReplicationNamespaceLister
// interface.
type arangoDeploymentReplicationNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoDeploymentReplications in the indexer for a given namespace.
func (s arangoDeploymentReplicationNamespaceLister) List(selector labels.Selector) (ret []*v1.ArangoDeploymentReplication, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1.ArangoDeploymentReplication))
})
return ret, err
}
// Get retrieves the ArangoDeploymentReplication from the indexer for a given namespace and name.
func (s arangoDeploymentReplicationNamespaceLister) Get(name string) (*v1.ArangoDeploymentReplication, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1.Resource("arangodeploymentreplication"), name)
}
return obj.(*v1.ArangoDeploymentReplication), nil
listers.ResourceIndexer[*v1.ArangoDeploymentReplication]
}

View file

@ -24,8 +24,8 @@ package v2alpha1
import (
v2alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/replication/v2alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoDeploymentReplicationLister interface {
// arangoDeploymentReplicationLister implements the ArangoDeploymentReplicationLister interface.
type arangoDeploymentReplicationLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v2alpha1.ArangoDeploymentReplication]
}
// NewArangoDeploymentReplicationLister returns a new ArangoDeploymentReplicationLister.
func NewArangoDeploymentReplicationLister(indexer cache.Indexer) ArangoDeploymentReplicationLister {
return &arangoDeploymentReplicationLister{indexer: indexer}
}
// List lists all ArangoDeploymentReplications in the indexer.
func (s *arangoDeploymentReplicationLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoDeploymentReplication, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoDeploymentReplication))
})
return ret, err
return &arangoDeploymentReplicationLister{listers.New[*v2alpha1.ArangoDeploymentReplication](indexer, v2alpha1.Resource("arangodeploymentreplication"))}
}
// ArangoDeploymentReplications returns an object that can list and get ArangoDeploymentReplications.
func (s *arangoDeploymentReplicationLister) ArangoDeploymentReplications(namespace string) ArangoDeploymentReplicationNamespaceLister {
return arangoDeploymentReplicationNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoDeploymentReplicationNamespaceLister{listers.NewNamespaced[*v2alpha1.ArangoDeploymentReplication](s.ResourceIndexer, namespace)}
}
// ArangoDeploymentReplicationNamespaceLister helps list and get ArangoDeploymentReplications.
@ -78,26 +70,5 @@ type ArangoDeploymentReplicationNamespaceLister interface {
// arangoDeploymentReplicationNamespaceLister implements the ArangoDeploymentReplicationNamespaceLister
// interface.
type arangoDeploymentReplicationNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoDeploymentReplications in the indexer for a given namespace.
func (s arangoDeploymentReplicationNamespaceLister) List(selector labels.Selector) (ret []*v2alpha1.ArangoDeploymentReplication, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v2alpha1.ArangoDeploymentReplication))
})
return ret, err
}
// Get retrieves the ArangoDeploymentReplication from the indexer for a given namespace and name.
func (s arangoDeploymentReplicationNamespaceLister) Get(name string) (*v2alpha1.ArangoDeploymentReplication, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v2alpha1.Resource("arangodeploymentreplication"), name)
}
return obj.(*v2alpha1.ArangoDeploymentReplication), nil
listers.ResourceIndexer[*v2alpha1.ArangoDeploymentReplication]
}

View file

@ -24,8 +24,8 @@ package v1alpha1
import (
v1alpha1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoProfileLister interface {
// arangoProfileLister implements the ArangoProfileLister interface.
type arangoProfileLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha1.ArangoProfile]
}
// NewArangoProfileLister returns a new ArangoProfileLister.
func NewArangoProfileLister(indexer cache.Indexer) ArangoProfileLister {
return &arangoProfileLister{indexer: indexer}
}
// List lists all ArangoProfiles in the indexer.
func (s *arangoProfileLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoProfile, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoProfile))
})
return ret, err
return &arangoProfileLister{listers.New[*v1alpha1.ArangoProfile](indexer, v1alpha1.Resource("arangoprofile"))}
}
// ArangoProfiles returns an object that can list and get ArangoProfiles.
func (s *arangoProfileLister) ArangoProfiles(namespace string) ArangoProfileNamespaceLister {
return arangoProfileNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoProfileNamespaceLister{listers.NewNamespaced[*v1alpha1.ArangoProfile](s.ResourceIndexer, namespace)}
}
// ArangoProfileNamespaceLister helps list and get ArangoProfiles.
@ -78,26 +70,5 @@ type ArangoProfileNamespaceLister interface {
// arangoProfileNamespaceLister implements the ArangoProfileNamespaceLister
// interface.
type arangoProfileNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoProfiles in the indexer for a given namespace.
func (s arangoProfileNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.ArangoProfile, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha1.ArangoProfile))
})
return ret, err
}
// Get retrieves the ArangoProfile from the indexer for a given namespace and name.
func (s arangoProfileNamespaceLister) Get(name string) (*v1alpha1.ArangoProfile, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha1.Resource("arangoprofile"), name)
}
return obj.(*v1alpha1.ArangoProfile), nil
listers.ResourceIndexer[*v1alpha1.ArangoProfile]
}

View file

@ -24,8 +24,8 @@ package v1beta1
import (
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoProfileLister interface {
// arangoProfileLister implements the ArangoProfileLister interface.
type arangoProfileLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1beta1.ArangoProfile]
}
// NewArangoProfileLister returns a new ArangoProfileLister.
func NewArangoProfileLister(indexer cache.Indexer) ArangoProfileLister {
return &arangoProfileLister{indexer: indexer}
}
// List lists all ArangoProfiles in the indexer.
func (s *arangoProfileLister) List(selector labels.Selector) (ret []*v1beta1.ArangoProfile, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoProfile))
})
return ret, err
return &arangoProfileLister{listers.New[*v1beta1.ArangoProfile](indexer, v1beta1.Resource("arangoprofile"))}
}
// ArangoProfiles returns an object that can list and get ArangoProfiles.
func (s *arangoProfileLister) ArangoProfiles(namespace string) ArangoProfileNamespaceLister {
return arangoProfileNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoProfileNamespaceLister{listers.NewNamespaced[*v1beta1.ArangoProfile](s.ResourceIndexer, namespace)}
}
// ArangoProfileNamespaceLister helps list and get ArangoProfiles.
@ -78,26 +70,5 @@ type ArangoProfileNamespaceLister interface {
// arangoProfileNamespaceLister implements the ArangoProfileNamespaceLister
// interface.
type arangoProfileNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoProfiles in the indexer for a given namespace.
func (s arangoProfileNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ArangoProfile, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoProfile))
})
return ret, err
}
// Get retrieves the ArangoProfile from the indexer for a given namespace and name.
func (s arangoProfileNamespaceLister) Get(name string) (*v1beta1.ArangoProfile, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("arangoprofile"), name)
}
return obj.(*v1beta1.ArangoProfile), nil
listers.ResourceIndexer[*v1beta1.ArangoProfile]
}

View file

@ -24,8 +24,8 @@ package v1beta1
import (
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoSchedulerBatchJobLister interface {
// arangoSchedulerBatchJobLister implements the ArangoSchedulerBatchJobLister interface.
type arangoSchedulerBatchJobLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1beta1.ArangoSchedulerBatchJob]
}
// NewArangoSchedulerBatchJobLister returns a new ArangoSchedulerBatchJobLister.
func NewArangoSchedulerBatchJobLister(indexer cache.Indexer) ArangoSchedulerBatchJobLister {
return &arangoSchedulerBatchJobLister{indexer: indexer}
}
// List lists all ArangoSchedulerBatchJobs in the indexer.
func (s *arangoSchedulerBatchJobLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerBatchJob, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerBatchJob))
})
return ret, err
return &arangoSchedulerBatchJobLister{listers.New[*v1beta1.ArangoSchedulerBatchJob](indexer, v1beta1.Resource("arangoschedulerbatchjob"))}
}
// ArangoSchedulerBatchJobs returns an object that can list and get ArangoSchedulerBatchJobs.
func (s *arangoSchedulerBatchJobLister) ArangoSchedulerBatchJobs(namespace string) ArangoSchedulerBatchJobNamespaceLister {
return arangoSchedulerBatchJobNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoSchedulerBatchJobNamespaceLister{listers.NewNamespaced[*v1beta1.ArangoSchedulerBatchJob](s.ResourceIndexer, namespace)}
}
// ArangoSchedulerBatchJobNamespaceLister helps list and get ArangoSchedulerBatchJobs.
@ -78,26 +70,5 @@ type ArangoSchedulerBatchJobNamespaceLister interface {
// arangoSchedulerBatchJobNamespaceLister implements the ArangoSchedulerBatchJobNamespaceLister
// interface.
type arangoSchedulerBatchJobNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoSchedulerBatchJobs in the indexer for a given namespace.
func (s arangoSchedulerBatchJobNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerBatchJob, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerBatchJob))
})
return ret, err
}
// Get retrieves the ArangoSchedulerBatchJob from the indexer for a given namespace and name.
func (s arangoSchedulerBatchJobNamespaceLister) Get(name string) (*v1beta1.ArangoSchedulerBatchJob, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("arangoschedulerbatchjob"), name)
}
return obj.(*v1beta1.ArangoSchedulerBatchJob), nil
listers.ResourceIndexer[*v1beta1.ArangoSchedulerBatchJob]
}

View file

@ -24,8 +24,8 @@ package v1beta1
import (
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoSchedulerCronJobLister interface {
// arangoSchedulerCronJobLister implements the ArangoSchedulerCronJobLister interface.
type arangoSchedulerCronJobLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1beta1.ArangoSchedulerCronJob]
}
// NewArangoSchedulerCronJobLister returns a new ArangoSchedulerCronJobLister.
func NewArangoSchedulerCronJobLister(indexer cache.Indexer) ArangoSchedulerCronJobLister {
return &arangoSchedulerCronJobLister{indexer: indexer}
}
// List lists all ArangoSchedulerCronJobs in the indexer.
func (s *arangoSchedulerCronJobLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerCronJob, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerCronJob))
})
return ret, err
return &arangoSchedulerCronJobLister{listers.New[*v1beta1.ArangoSchedulerCronJob](indexer, v1beta1.Resource("arangoschedulercronjob"))}
}
// ArangoSchedulerCronJobs returns an object that can list and get ArangoSchedulerCronJobs.
func (s *arangoSchedulerCronJobLister) ArangoSchedulerCronJobs(namespace string) ArangoSchedulerCronJobNamespaceLister {
return arangoSchedulerCronJobNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoSchedulerCronJobNamespaceLister{listers.NewNamespaced[*v1beta1.ArangoSchedulerCronJob](s.ResourceIndexer, namespace)}
}
// ArangoSchedulerCronJobNamespaceLister helps list and get ArangoSchedulerCronJobs.
@ -78,26 +70,5 @@ type ArangoSchedulerCronJobNamespaceLister interface {
// arangoSchedulerCronJobNamespaceLister implements the ArangoSchedulerCronJobNamespaceLister
// interface.
type arangoSchedulerCronJobNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoSchedulerCronJobs in the indexer for a given namespace.
func (s arangoSchedulerCronJobNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerCronJob, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerCronJob))
})
return ret, err
}
// Get retrieves the ArangoSchedulerCronJob from the indexer for a given namespace and name.
func (s arangoSchedulerCronJobNamespaceLister) Get(name string) (*v1beta1.ArangoSchedulerCronJob, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("arangoschedulercronjob"), name)
}
return obj.(*v1beta1.ArangoSchedulerCronJob), nil
listers.ResourceIndexer[*v1beta1.ArangoSchedulerCronJob]
}

View file

@ -24,8 +24,8 @@ package v1beta1
import (
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoSchedulerDeploymentLister interface {
// arangoSchedulerDeploymentLister implements the ArangoSchedulerDeploymentLister interface.
type arangoSchedulerDeploymentLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1beta1.ArangoSchedulerDeployment]
}
// NewArangoSchedulerDeploymentLister returns a new ArangoSchedulerDeploymentLister.
func NewArangoSchedulerDeploymentLister(indexer cache.Indexer) ArangoSchedulerDeploymentLister {
return &arangoSchedulerDeploymentLister{indexer: indexer}
}
// List lists all ArangoSchedulerDeployments in the indexer.
func (s *arangoSchedulerDeploymentLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerDeployment, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerDeployment))
})
return ret, err
return &arangoSchedulerDeploymentLister{listers.New[*v1beta1.ArangoSchedulerDeployment](indexer, v1beta1.Resource("arangoschedulerdeployment"))}
}
// ArangoSchedulerDeployments returns an object that can list and get ArangoSchedulerDeployments.
func (s *arangoSchedulerDeploymentLister) ArangoSchedulerDeployments(namespace string) ArangoSchedulerDeploymentNamespaceLister {
return arangoSchedulerDeploymentNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoSchedulerDeploymentNamespaceLister{listers.NewNamespaced[*v1beta1.ArangoSchedulerDeployment](s.ResourceIndexer, namespace)}
}
// ArangoSchedulerDeploymentNamespaceLister helps list and get ArangoSchedulerDeployments.
@ -78,26 +70,5 @@ type ArangoSchedulerDeploymentNamespaceLister interface {
// arangoSchedulerDeploymentNamespaceLister implements the ArangoSchedulerDeploymentNamespaceLister
// interface.
type arangoSchedulerDeploymentNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoSchedulerDeployments in the indexer for a given namespace.
func (s arangoSchedulerDeploymentNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerDeployment, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerDeployment))
})
return ret, err
}
// Get retrieves the ArangoSchedulerDeployment from the indexer for a given namespace and name.
func (s arangoSchedulerDeploymentNamespaceLister) Get(name string) (*v1beta1.ArangoSchedulerDeployment, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("arangoschedulerdeployment"), name)
}
return obj.(*v1beta1.ArangoSchedulerDeployment), nil
listers.ResourceIndexer[*v1beta1.ArangoSchedulerDeployment]
}

View file

@ -24,8 +24,8 @@ package v1beta1
import (
v1beta1 "github.com/arangodb/kube-arangodb/pkg/apis/scheduler/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -42,25 +42,17 @@ type ArangoSchedulerPodLister interface {
// arangoSchedulerPodLister implements the ArangoSchedulerPodLister interface.
type arangoSchedulerPodLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1beta1.ArangoSchedulerPod]
}
// NewArangoSchedulerPodLister returns a new ArangoSchedulerPodLister.
func NewArangoSchedulerPodLister(indexer cache.Indexer) ArangoSchedulerPodLister {
return &arangoSchedulerPodLister{indexer: indexer}
}
// List lists all ArangoSchedulerPods in the indexer.
func (s *arangoSchedulerPodLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerPod, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerPod))
})
return ret, err
return &arangoSchedulerPodLister{listers.New[*v1beta1.ArangoSchedulerPod](indexer, v1beta1.Resource("arangoschedulerpod"))}
}
// ArangoSchedulerPods returns an object that can list and get ArangoSchedulerPods.
func (s *arangoSchedulerPodLister) ArangoSchedulerPods(namespace string) ArangoSchedulerPodNamespaceLister {
return arangoSchedulerPodNamespaceLister{indexer: s.indexer, namespace: namespace}
return arangoSchedulerPodNamespaceLister{listers.NewNamespaced[*v1beta1.ArangoSchedulerPod](s.ResourceIndexer, namespace)}
}
// ArangoSchedulerPodNamespaceLister helps list and get ArangoSchedulerPods.
@ -78,26 +70,5 @@ type ArangoSchedulerPodNamespaceLister interface {
// arangoSchedulerPodNamespaceLister implements the ArangoSchedulerPodNamespaceLister
// interface.
type arangoSchedulerPodNamespaceLister struct {
indexer cache.Indexer
namespace string
}
// List lists all ArangoSchedulerPods in the indexer for a given namespace.
func (s arangoSchedulerPodNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ArangoSchedulerPod, err error) {
err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
ret = append(ret, m.(*v1beta1.ArangoSchedulerPod))
})
return ret, err
}
// Get retrieves the ArangoSchedulerPod from the indexer for a given namespace and name.
func (s arangoSchedulerPodNamespaceLister) Get(name string) (*v1beta1.ArangoSchedulerPod, error) {
obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1beta1.Resource("arangoschedulerpod"), name)
}
return obj.(*v1beta1.ArangoSchedulerPod), nil
listers.ResourceIndexer[*v1beta1.ArangoSchedulerPod]
}

View file

@ -24,8 +24,8 @@ package v1alpha
import (
v1alpha "github.com/arangodb/kube-arangodb/pkg/apis/storage/v1alpha"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
)
@ -43,30 +43,10 @@ type ArangoLocalStorageLister interface {
// arangoLocalStorageLister implements the ArangoLocalStorageLister interface.
type arangoLocalStorageLister struct {
indexer cache.Indexer
listers.ResourceIndexer[*v1alpha.ArangoLocalStorage]
}
// NewArangoLocalStorageLister returns a new ArangoLocalStorageLister.
func NewArangoLocalStorageLister(indexer cache.Indexer) ArangoLocalStorageLister {
return &arangoLocalStorageLister{indexer: indexer}
}
// List lists all ArangoLocalStorages in the indexer.
func (s *arangoLocalStorageLister) List(selector labels.Selector) (ret []*v1alpha.ArangoLocalStorage, err error) {
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
ret = append(ret, m.(*v1alpha.ArangoLocalStorage))
})
return ret, err
}
// Get retrieves the ArangoLocalStorage from the index for a given name.
func (s *arangoLocalStorageLister) Get(name string) (*v1alpha.ArangoLocalStorage, error) {
obj, exists, err := s.indexer.GetByKey(name)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(v1alpha.Resource("arangolocalstorage"), name)
}
return obj.(*v1alpha.ArangoLocalStorage), nil
return &arangoLocalStorageLister{listers.New[*v1alpha.ArangoLocalStorage](indexer, v1alpha.Resource("arangolocalstorage"))}
}

View file

@ -63,7 +63,9 @@ func NewOperator(name, namespace, image string) Operator {
name: name,
namespace: namespace,
image: image,
workqueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), name),
workqueue: workqueue.NewTypedRateLimitingQueueWithConfig(workqueue.DefaultTypedControllerRateLimiter[operation.Item](), workqueue.TypedRateLimitingQueueConfig[operation.Item]{
Name: name,
}),
}
// Declaration of prometheus interface
@ -85,7 +87,7 @@ type operator struct {
starters []Starter
handlers []Handler
workqueue workqueue.RateLimitingInterface
workqueue workqueue.TypedRateLimitingInterface[operation.Item]
// Implement prometheus collector
*prometheusMetrics
@ -155,7 +157,7 @@ func (o *operator) RegisterStarter(starter Starter) error {
}
func (o *operator) EnqueueItem(item operation.Item) {
o.workqueue.Add(item.String())
o.workqueue.Add(item)
}
func (o *operator) RegisterInformer(informer cache.SharedIndexInformer, group, version, kind string, filters ...InformerFilter) error {

View file

@ -78,27 +78,14 @@ func (o *operator) processNextItem() bool {
return true
}
func (o *operator) processObject(obj interface{}) error {
defer o.workqueue.Done(obj)
var item operation.Item
var key string
var ok bool
func (o *operator) processObject(item operation.Item) error {
defer o.workqueue.Done(item)
var err error
if key, ok = obj.(string); !ok {
o.workqueue.Forget(obj)
return nil
}
if item, err = operation.NewItemFromString(key); err != nil {
o.workqueue.Forget(obj)
return nil
}
if item.Operation != operation.Update {
o.workqueue.Forget(item)
item.Operation = operation.Update
o.workqueue.Forget(obj)
o.workqueue.Add(item.String())
o.workqueue.Add(item)
return nil
}
@ -113,10 +100,10 @@ func (o *operator) processObject(obj interface{}) error {
item.Name)
if err = o.processItem(item); err != nil {
o.workqueue.AddRateLimited(key)
o.workqueue.AddRateLimited(item)
if !IsReconcile(err) {
message := fmt.Sprintf("error syncing '%s': %s, re-queuing", key, err.Error())
message := fmt.Sprintf("error syncing '%s': %s, re-queuing", item.String(), err.Error())
loggerWorker.Debug(message)
return errors.Errorf(message)
}
@ -132,7 +119,7 @@ func (o *operator) processObject(obj interface{}) error {
item.Namespace,
item.Name)
o.workqueue.Forget(obj)
o.workqueue.Forget(item)
return nil
}

View file

@ -39,7 +39,7 @@ import (
const AuthorizationGRPCHeader = "adb-authorization"
func NewGRPCClient[T any](ctx context.Context, in func(cc grpc.ClientConnInterface) T, addr string, opts ...grpc.DialOption) (T, io.Closer, error) {
con, err := NewGRPCConn(ctx, addr, opts...)
con, err := NewGRPCConn(addr, opts...)
if err != nil {
return Default[T](), nil, err
}
@ -65,7 +65,7 @@ func NewOptionalTLSGRPCConn(ctx context.Context, addr string, tls *tls.Config, o
copy(newOpts[len(opts):], tlsOpts)
// Create conn
conn, err := newGRPCConn(ctx, addr, tlsOpts...)
conn, err := newGRPCConn(addr, tlsOpts...)
if err != nil {
return nil, err
}
@ -91,17 +91,17 @@ func NewOptionalTLSGRPCConn(ctx context.Context, addr string, tls *tls.Config, o
}
}
return newGRPCConn(ctx, addr, opts...)
return newGRPCConn(addr, opts...)
}
func newGRPCConn(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
func newGRPCConn(addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
var z []grpc.DialOption
z = append(z, grpc.WithTransportCredentials(insecure.NewCredentials()))
z = append(z, opts...)
conn, err := grpc.DialContext(ctx, addr, z...)
conn, err := grpc.NewClient(addr, z...)
if err != nil {
return nil, err
}
@ -109,8 +109,8 @@ func newGRPCConn(ctx context.Context, addr string, opts ...grpc.DialOption) (*gr
return conn, nil
}
func NewGRPCConn(ctx context.Context, addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
return newGRPCConn(ctx, addr, opts...)
func NewGRPCConn(addr string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
return newGRPCConn(addr, opts...)
}
func ClientTLS(config *tls.Config) []grpc.DialOption {

View file

@ -50,7 +50,10 @@ func NewResourceWatcher(getter cache.Getter, resource, namespace string,
namespace,
fields.Everything())
_, informer := cache.NewIndexerInformer(source, objType, 0, cache.ResourceEventHandlerFuncs{
_, informer := cache.NewInformerWithOptions(cache.InformerOptions{
ListerWatcher: source,
ObjectType: objType,
Handler: cache.ResourceEventHandlerFuncs{
AddFunc: func(obj interface{}) {
defer func() {
if err := recover(); err != nil {
@ -81,7 +84,10 @@ func NewResourceWatcher(getter cache.Getter, resource, namespace string,
h.DeleteFunc(obj)
}
},
}, cache.Indexers{})
},
ResyncPeriod: 0,
Indexers: cache.Indexers{},
})
return &ResourceWatcher{
informer: informer,

View file

@ -46,12 +46,12 @@ func Test_Service(t *testing.T) {
othStart := other.StartWithHealth(ctx, h)
healthConn, err := grpc.DialContext(ctx, st.Address(), grpc.WithTransportCredentials(insecure.NewCredentials()))
healthConn, err := grpc.NewClient(st.Address(), grpc.WithTransportCredentials(insecure.NewCredentials()))
require.NoError(t, err)
defer healthConn.Close()
otherConn, err := grpc.DialContext(ctx, othStart.Address(), grpc.WithTransportCredentials(insecure.NewCredentials()))
otherConn, err := grpc.NewClient(othStart.Address(), grpc.WithTransportCredentials(insecure.NewCredentials()))
require.NoError(t, err)
defer otherConn.Close()

24
scripts/codegen.sh Normal file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
SCRIPT_ROOT=$1
THIS_PKG=github.com/arangodb/kube-arangodb
sed -i --posix "s@\^v\[0-9\]\+((alpha|beta)\[0-9\]\+)\?@^v[0-9]+((alpha|beta)[0-9]*)?@g" "${SCRIPT_ROOT}/deps/k8s.io/code-generator/kube_codegen.sh"
source "${SCRIPT_ROOT}/deps/k8s.io/code-generator/kube_codegen.sh"
kube::codegen::gen_helpers \
--boilerplate "${SCRIPT_ROOT}/tools/codegen/boilerplate.go.txt" \
"${SCRIPT_ROOT}/pkg/apis"
kube::codegen::gen_client \
--boilerplate "${SCRIPT_ROOT}/tools/codegen/boilerplate.go.txt" \
--with-watch \
--output-dir "${SCRIPT_ROOT}/pkg/generated" \
--output-pkg "${THIS_PKG}/pkg/generated" \
"${SCRIPT_ROOT}/pkg/apis"