Skip to content

THREESCALE-12323 Upgrade operator envtest and controller-runtime used in CI#1141

Open
urbanikb wants to merge 3 commits into3scale:masterfrom
urbanikb:THREESCALE-12323
Open

THREESCALE-12323 Upgrade operator envtest and controller-runtime used in CI#1141
urbanikb wants to merge 3 commits into3scale:masterfrom
urbanikb:THREESCALE-12323

Conversation

@urbanikb
Copy link

What

Fix:

Validation

Run E2E test against existing cluster:

  1. authenticate to test cluster
  2. make test-e2e

This PR contains patch to controller-runtime and dependencies:

  • k8s version v0.29.0 -> v0.31.0
  • controller-tools version v0.14.0 -> v0.16.5

@urbanikb urbanikb requested a review from a team as a code owner February 17, 2026 20:14
@urbanikb urbanikb force-pushed the THREESCALE-12323 branch 2 times, most recently from ab31258 to 3abe227 Compare February 17, 2026 20:29
Comment on lines +159 to +162
## Location to install dependencies to
LOCALBIN ?= $(PROJECT_PATH)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to line 47

Comment on lines +183 to +197
# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
# $1 - target path with name of binary
# $2 - package url which can be installed
# $3 - specific version of package
define go-install-tool
@[ -f "$(1)-$(3)" ] || { \
set -e; \
package=$(2)@$(3) ;\
echo "Downloading $${package}" ;\
rm -f $(1) || true ;\
GOBIN=$(LOCALBIN) go install $${package} ;\
mv $(1) $(1)-$(3) ;\
} ;\
ln -sf $(1)-$(3) $(1)
endef
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of go-bin-install and move this to the same line

go 1.22
go 1.22.0

toolchain go1.22.10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the ending .0, we previously had issues with the build system; it wasn't recognizing the correct version of Go. I'm not sure if this issue has been fixed or not, but it's best to remove it to avoid any headache.

Perhaps also update the toolchain version, when I run go mod tidy, toolchain was bumped to go1.22.12

diff --git a/go.mod b/go.mod
index 1d02afbf..ea010cd2 100644
--- a/go.mod
+++ b/go.mod
@@ -1,8 +1,8 @@
 module github.com/3scale/3scale-operator
 
-go 1.22
+go 1.22.0
 
-toolchain go1.22.10
+toolchain go1.22.12
....

- capabilities.3scale.net
resources:
- applicationauths
verbs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this worries me. Maybe we should check the controller-gen changelog to see if they made any breaking changes.

@tkan145
Copy link
Contributor

tkan145 commented Feb 18, 2026

/retest

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments