Skip to content

Commit 9daa7a4

Browse files
committed
Update controller-runtime and its dependencies to v1.19.7
- controller-runtime@1.19.7 requires k8s@1.31.X - k8s@1.31.X requires controller-tools@0.16.X - in this version of controller-runtime the envtest-setup has been replaced with a tool installed with go -> Makefile needs to be updated - some duplication now exists in Makefile - the "newer" style of installing tools is form more recent skeleton project, I have only updated binaries that need to change to limit scope of this change
1 parent d9cd833 commit 9daa7a4

3 files changed

Lines changed: 132 additions & 125 deletions

File tree

Makefile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,13 @@ run: generate fmt vet manifests
9999
@-oc process THREESCALE_VERSION=$(THREESCALE_VERSION) -f config/requirements/operator-requirements.yaml | oc apply -f - -n $(WATCH_NAMESPACE)
100100
$(GO) run ./main.go --zap-devel
101101

102-
# find or download controller-gen
103-
# download controller-gen if necessary
104-
CONTROLLER_GEN=$(PROJECT_PATH)/bin/controller-gen
105-
$(CONTROLLER_GEN):
106-
$(call go-bin-install,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0)
102+
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
103+
CONTROLLER_TOOLS_VERSION ?= v0.16.5
107104

108105
.PHONY: controller-gen
109-
controller-gen: $(CONTROLLER_GEN)
106+
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
107+
$(CONTROLLER_GEN): $(LOCALBIN)
108+
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen,$(CONTROLLER_TOOLS_VERSION))
110109

111110
.PHONY: cluster/prepare/local
112111
cluster/prepare/local: kustomize cluster/prepare/project install cluster/create/system-redis cluster/create/backend-redis cluster/create/provision-database
@@ -164,7 +163,7 @@ $(LOCALBIN):
164163

165164
ENVTEST ?= $(LOCALBIN)/setup-envtest
166165
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
167-
ENVTEST_VERSION ?= release-0.23
166+
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
168167
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
169168
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
170169

@@ -229,7 +228,7 @@ deploy: manifests $(KUSTOMIZE)
229228
$(KUSTOMIZE) build config/default | $(KUBECTL) apply -f -
230229

231230
# Generate manifests e.g. CRD, RBAC etc.
232-
manifests: $(CONTROLLER_GEN)
231+
manifests: controller-gen
233232
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
234233

235234
# Run go fmt against code
@@ -253,7 +252,7 @@ lint: $(GOLANGCI-LINT) ## Run lint tests
253252
$(GOLANGCI-LINT) run
254253

255254
# Generate code
256-
generate: $(CONTROLLER_GEN) $(GO_BINDATA)
255+
generate: controller-gen $(GO_BINDATA)
257256
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
258257
@echo Generate Go embedded assets files by processing source
259258
export PATH=$(PROJECT_PATH)/bin:$$PATH; $(GO) generate github.com/3scale/3scale-operator/pkg/assets

go.mod

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/3scale/3scale-operator
22

3-
go 1.22
3+
go 1.22.0
44

55
toolchain go1.22.10
66

@@ -26,31 +26,31 @@ require (
2626
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.52.1
2727
github.com/prometheus/client_golang v1.19.1
2828
github.com/redis/go-redis/v9 v9.7.3
29-
github.com/spf13/cobra v1.7.0
29+
github.com/spf13/cobra v1.8.1
3030
github.com/spf13/viper v1.7.0
3131
github.com/stretchr/testify v1.9.0
3232
golang.org/x/mod v0.19.0
33-
k8s.io/api v0.29.0
34-
k8s.io/apimachinery v0.29.0
35-
k8s.io/client-go v0.29.0
36-
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
37-
sigs.k8s.io/controller-runtime v0.17.2
33+
k8s.io/api v0.31.0
34+
k8s.io/apimachinery v0.31.0
35+
k8s.io/client-go v0.31.0
36+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
37+
sigs.k8s.io/controller-runtime v0.19.7
3838
sigs.k8s.io/yaml v1.4.0
3939
)
4040

4141
require (
4242
filippo.io/edwards25519 v1.1.0 // indirect
43-
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
43+
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
4444
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
4545
github.com/beorn7/perks v1.0.1 // indirect
4646
github.com/blang/semver v3.5.1+incompatible // indirect
47-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
48-
github.com/davecgh/go-spew v1.1.1 // indirect
47+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
48+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
4949
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
5050
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
51-
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
52-
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
51+
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
5352
github.com/fsnotify/fsnotify v1.7.0 // indirect
53+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
5454
github.com/ghodss/yaml v1.0.0 // indirect
5555
github.com/go-logr/zapr v1.3.0 // indirect
5656
github.com/go-openapi/analysis v0.19.10 // indirect
@@ -61,18 +61,18 @@ require (
6161
github.com/go-openapi/runtime v0.19.31 // indirect
6262
github.com/go-openapi/spec v0.19.9 // indirect
6363
github.com/go-openapi/strfmt v0.19.5 // indirect
64-
github.com/go-openapi/swag v0.22.3 // indirect
64+
github.com/go-openapi/swag v0.22.4 // indirect
6565
github.com/go-openapi/validate v0.19.11 // indirect
6666
github.com/go-playground/locales v0.13.0 // indirect
6767
github.com/go-playground/universal-translator v0.17.0 // indirect
6868
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
6969
github.com/gogo/protobuf v1.3.2 // indirect
7070
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
71-
github.com/golang/protobuf v1.5.3 // indirect
72-
github.com/google/cel-go v0.17.7 // indirect
71+
github.com/golang/protobuf v1.5.4 // indirect
72+
github.com/google/cel-go v0.20.1 // indirect
7373
github.com/google/gnostic-models v0.6.8 // indirect
7474
github.com/google/gofuzz v1.2.0 // indirect
75-
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
75+
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
7676
github.com/gorilla/websocket v1.5.0 // indirect
7777
github.com/h2non/filetype v1.1.1 // indirect
7878
github.com/h2non/go-is-svg v0.0.0-20160927212452-35e8c4b0612c // indirect
@@ -88,50 +88,50 @@ require (
8888
github.com/magiconair/properties v1.8.1 // indirect
8989
github.com/mailru/easyjson v0.7.7 // indirect
9090
github.com/mitchellh/mapstructure v1.4.1 // indirect
91-
github.com/moby/spdystream v0.2.0 // indirect
91+
github.com/moby/spdystream v0.4.0 // indirect
9292
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
9393
github.com/modern-go/reflect2 v1.0.2 // indirect
9494
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
9595
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
9696
github.com/pelletier/go-toml v1.9.3 // indirect
97-
github.com/pmezard/go-difflib v1.0.0 // indirect
98-
github.com/prometheus/client_model v0.5.0 // indirect
99-
github.com/prometheus/common v0.48.0 // indirect
100-
github.com/prometheus/procfs v0.12.0 // indirect
97+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
98+
github.com/prometheus/client_model v0.6.1 // indirect
99+
github.com/prometheus/common v0.55.0 // indirect
100+
github.com/prometheus/procfs v0.15.1 // indirect
101101
github.com/sirupsen/logrus v1.9.3 // indirect
102102
github.com/spf13/afero v1.2.2 // indirect
103103
github.com/spf13/cast v1.3.0 // indirect
104104
github.com/spf13/jwalterweatherman v1.0.0 // indirect
105105
github.com/spf13/pflag v1.0.5 // indirect
106106
github.com/stoewer/go-strcase v1.2.0 // indirect
107107
github.com/subosito/gotenv v1.2.0 // indirect
108+
github.com/x448/float16 v0.8.4 // indirect
108109
go.mongodb.org/mongo-driver v1.14.0 // indirect
109110
go.uber.org/multierr v1.11.0 // indirect
110111
go.uber.org/zap v1.26.0 // indirect
111112
golang.org/x/crypto v0.31.0 // indirect
112113
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
113114
golang.org/x/net v0.33.0 // indirect
114-
golang.org/x/oauth2 v0.16.0 // indirect
115+
golang.org/x/oauth2 v0.21.0 // indirect
115116
golang.org/x/sync v0.10.0 // indirect
116117
golang.org/x/sys v0.28.0 // indirect
117118
golang.org/x/term v0.27.0 // indirect
118119
golang.org/x/text v0.21.0 // indirect
119120
golang.org/x/time v0.3.0 // indirect
120121
golang.org/x/tools v0.23.0 // indirect
121122
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
122-
google.golang.org/appengine v1.6.7 // indirect
123-
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
124-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
125-
google.golang.org/grpc v1.58.3 // indirect
126-
google.golang.org/protobuf v1.34.1 // indirect
123+
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
124+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
125+
google.golang.org/grpc v1.65.0 // indirect
126+
google.golang.org/protobuf v1.34.2 // indirect
127+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
127128
gopkg.in/inf.v0 v0.9.1 // indirect
128129
gopkg.in/ini.v1 v1.51.0 // indirect
129130
gopkg.in/yaml.v2 v2.4.0 // indirect
130131
gopkg.in/yaml.v3 v3.0.1 // indirect
131-
k8s.io/apiextensions-apiserver v0.29.0 // indirect
132-
k8s.io/component-base v0.29.0 // indirect
133-
k8s.io/klog/v2 v2.110.1 // indirect
134-
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
132+
k8s.io/apiextensions-apiserver v0.31.0 // indirect
133+
k8s.io/klog/v2 v2.130.1 // indirect
134+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
135135
rsc.io/letsencrypt v0.0.3 // indirect
136136
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
137137
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect

0 commit comments

Comments
 (0)