Skip to content

Commit

Permalink
Merge pull request #2296 from vincepri/restmapper-one
Browse files Browse the repository at this point in the history
⚠️ Use and provide a single dynamic rest mapper
  • Loading branch information
k8s-ci-robot authored May 4, 2023
2 parents 2e57de7 + 935faeb commit 57674c8
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 1,733 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ require (
go.uber.org/goleak v1.2.1
go.uber.org/zap v1.24.0
golang.org/x/sys v0.7.0
golang.org/x/time v0.3.0
gomodules.xyz/jsonpatch/v2 v2.2.0
k8s.io/api v0.27.1
k8s.io/apiextensions-apiserver v0.27.1
Expand Down Expand Up @@ -62,6 +61,7 @@ require (
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
Expand Down
52 changes: 50 additions & 2 deletions hack/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,56 @@
module sigs.k8s.io/controller-runtime/hack/tools

go 1.16
go 1.20

require (
github.com/joelanford/go-apidiff v0.5.0
sigs.k8s.io/controller-tools v0.11.3
sigs.k8s.io/controller-tools v0.12.0
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-git/v5 v5.4.2 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/exp v0.0.0-20220921164117-439092de6870 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.8.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.27.1 // indirect
k8s.io/apiextensions-apiserver v0.27.1 // indirect
k8s.io/apimachinery v0.27.1 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
1,001 changes: 45 additions & 956 deletions hack/tools/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/cache/informer_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var _ = Describe("informerCache", func() {

httpClient, err := rest.HTTPClientFor(cfg)
Expect(err).ToNot(HaveOccurred())
mapper, err := apiutil.NewDynamicRESTMapper(cfg, httpClient, apiutil.WithLazyDiscovery)
mapper, err := apiutil.NewDynamicRESTMapper(cfg, httpClient)
Expect(err).ToNot(HaveOccurred())

c, err := cache.New(cfg, cache.Options{Mapper: mapper})
Expand Down
307 changes: 0 additions & 307 deletions pkg/client/apiutil/dynamicrestmapper.go

This file was deleted.

Loading

0 comments on commit 57674c8

Please sign in to comment.