diff --git a/pkg/plugins/golang/v3/commons.go b/pkg/plugins/golang/v3/commons.go index 5119a3dd73b..cd8c1eb8675 100644 --- a/pkg/plugins/golang/v3/commons.go +++ b/pkg/plugins/golang/v3/commons.go @@ -79,7 +79,7 @@ manifests: controller-gen` } if err := util.ReplaceInFile("Makefile", - "ENVTEST_K8S_VERSION = 1.27.1", + "ENVTEST_K8S_VERSION = 1.26.1", "ENVTEST_K8S_VERSION = 1.21"); err != nil { log.Warnf("unable to update the Makefile with %s: %s", "ENVTEST_K8S_VERSION = 1.21", err) } diff --git a/pkg/plugins/golang/v3/scaffolds/internal/templates/makefile.go b/pkg/plugins/golang/v3/scaffolds/internal/templates/makefile.go index 55b3b68b8ea..2249c3350fb 100644 --- a/pkg/plugins/golang/v3/scaffolds/internal/templates/makefile.go +++ b/pkg/plugins/golang/v3/scaffolds/internal/templates/makefile.go @@ -62,7 +62,7 @@ const makefileTemplate = ` # Image URL to use all building/pushing image targets IMG ?= {{ .Image }} # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.27.1 +ENVTEST_K8S_VERSION = 1.26.1 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) diff --git a/testdata/project-v3/Makefile b/testdata/project-v3/Makefile index 250cf6a1336..73a01c158dd 100644 --- a/testdata/project-v3/Makefile +++ b/testdata/project-v3/Makefile @@ -2,7 +2,7 @@ # Image URL to use all building/pushing image targets IMG ?= controller:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.27.1 +ENVTEST_K8S_VERSION = 1.26.1 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN))