diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f3bd673152c..ecd6324a21b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: '1.23' - name: Build and install Kubebuilder CLI run: make install diff --git a/docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/devcontainer.json b/docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/devcontainer.json index e2cdc09c96c..259f0f67268 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/devcontainer.json +++ b/docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Kubebuilder DevContainer", - "image": "golang:1.22", + "image": "golang:1.23", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers/features/git:1": {} diff --git a/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile b/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile index 4ba18b68cc4..5c73c7f37cd 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile +++ b/docs/book/src/cronjob-tutorial/testdata/project/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/docs/book/src/cronjob-tutorial/testdata/project/README.md b/docs/book/src/cronjob-tutorial/testdata/project/README.md index 2ae27e2f60a..023de4fb07a 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/README.md +++ b/docs/book/src/cronjob-tutorial/testdata/project/README.md @@ -7,7 +7,7 @@ ## Getting Started ### Prerequisites -- go version v1.22.0+ +- go version v1.23.0+ - docker version 17.03+. - kubectl version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/go.mod b/docs/book/src/cronjob-tutorial/testdata/project/go.mod index c0f4bf539db..d2863ec5d54 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/go.mod +++ b/docs/book/src/cronjob-tutorial/testdata/project/go.mod @@ -1,6 +1,8 @@ module tutorial.kubebuilder.io/project -go 1.22.0 +go 1.23.0 + +godebug default=go1.23 require ( github.com/onsi/ginkgo/v2 v2.19.0 diff --git a/docs/book/src/getting-started/testdata/project/.devcontainer/devcontainer.json b/docs/book/src/getting-started/testdata/project/.devcontainer/devcontainer.json index e2cdc09c96c..259f0f67268 100644 --- a/docs/book/src/getting-started/testdata/project/.devcontainer/devcontainer.json +++ b/docs/book/src/getting-started/testdata/project/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Kubebuilder DevContainer", - "image": "golang:1.22", + "image": "golang:1.23", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers/features/git:1": {} diff --git a/docs/book/src/getting-started/testdata/project/Dockerfile b/docs/book/src/getting-started/testdata/project/Dockerfile index 4ba18b68cc4..5c73c7f37cd 100644 --- a/docs/book/src/getting-started/testdata/project/Dockerfile +++ b/docs/book/src/getting-started/testdata/project/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/docs/book/src/getting-started/testdata/project/README.md b/docs/book/src/getting-started/testdata/project/README.md index 2ae27e2f60a..023de4fb07a 100644 --- a/docs/book/src/getting-started/testdata/project/README.md +++ b/docs/book/src/getting-started/testdata/project/README.md @@ -7,7 +7,7 @@ ## Getting Started ### Prerequisites -- go version v1.22.0+ +- go version v1.23.0+ - docker version 17.03+. - kubectl version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/docs/book/src/getting-started/testdata/project/go.mod b/docs/book/src/getting-started/testdata/project/go.mod index f0affb033a3..ee7841e6a7c 100644 --- a/docs/book/src/getting-started/testdata/project/go.mod +++ b/docs/book/src/getting-started/testdata/project/go.mod @@ -1,6 +1,8 @@ module example.com/memcached -go 1.22.0 +go 1.23.0 + +godebug default=go1.23 require ( github.com/onsi/ginkgo/v2 v2.19.0 diff --git a/docs/book/src/multiversion-tutorial/testdata/project/.devcontainer/devcontainer.json b/docs/book/src/multiversion-tutorial/testdata/project/.devcontainer/devcontainer.json index e2cdc09c96c..259f0f67268 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/.devcontainer/devcontainer.json +++ b/docs/book/src/multiversion-tutorial/testdata/project/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Kubebuilder DevContainer", - "image": "golang:1.22", + "image": "golang:1.23", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers/features/git:1": {} diff --git a/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile b/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile index 4ba18b68cc4..5c73c7f37cd 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile +++ b/docs/book/src/multiversion-tutorial/testdata/project/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/docs/book/src/multiversion-tutorial/testdata/project/README.md b/docs/book/src/multiversion-tutorial/testdata/project/README.md index 2ae27e2f60a..023de4fb07a 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/README.md +++ b/docs/book/src/multiversion-tutorial/testdata/project/README.md @@ -7,7 +7,7 @@ ## Getting Started ### Prerequisites -- go version v1.22.0+ +- go version v1.23.0+ - docker version 17.03+. - kubectl version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/docs/book/src/multiversion-tutorial/testdata/project/go.mod b/docs/book/src/multiversion-tutorial/testdata/project/go.mod index c0f4bf539db..d2863ec5d54 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/go.mod +++ b/docs/book/src/multiversion-tutorial/testdata/project/go.mod @@ -1,6 +1,8 @@ module tutorial.kubebuilder.io/project -go 1.22.0 +go 1.23.0 + +godebug default=go1.23 require ( github.com/onsi/ginkgo/v2 v2.19.0 diff --git a/go.mod b/go.mod index 6d2c90b0af2..3792e22359d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module sigs.k8s.io/kubebuilder/v4 -go 1.22.3 +go 1.23.0 + +godebug default=go1.23 require ( github.com/gobuffalo/flect v1.0.3 diff --git a/pkg/plugins/golang/go_version_test.go b/pkg/plugins/golang/go_version_test.go index b148955246a..63016a6fa9c 100644 --- a/pkg/plugins/golang/go_version_test.go +++ b/pkg/plugins/golang/go_version_test.go @@ -200,6 +200,7 @@ var _ = Describe("checkGoVersion", func() { Entry("for go.1.20", "go1.20"), Entry("for go.1.21", "go1.21"), Entry("for go.1.22", "go1.22"), + Entry("for go.1.23", "go1.23"), ) DescribeTable("should return an error for non-supported go versions", diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/devcontainer.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/devcontainer.go index 43b1caa8bb2..bba2ed5f9de 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/devcontainer.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/devcontainer.go @@ -22,7 +22,7 @@ import ( const devContainerTemplate = `{ "name": "Kubebuilder DevContainer", - "image": "golang:1.22", + "image": "golang:1.23", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers/features/git:1": {} diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/dockerfile.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/dockerfile.go index f3d55d01821..69d74e6c2d3 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/dockerfile.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/dockerfile.go @@ -39,7 +39,7 @@ func (f *Dockerfile) SetTemplateDefaults() error { } const dockerfileTemplate = `# Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go index e09bf97f887..ba8c75d3a71 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/gomod.go @@ -45,7 +45,9 @@ func (f *GoMod) SetTemplateDefaults() error { const goModTemplate = `module {{ .Repo }} -go 1.22.0 +go 1.23.0 + +godebug default=go1.23 require ( sigs.k8s.io/controller-runtime {{ .ControllerRuntimeVersion }} diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/readme.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/readme.go index 0ac835f1aa4..09598f8236a 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/readme.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/readme.go @@ -74,7 +74,7 @@ const readmeFileTemplate = `# {{ .ProjectName }} ## Getting Started ### Prerequisites -- go version v1.22.0+ +- go version v1.23.0+ - docker version 17.03+. - kubectl version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/testdata/project-v4-multigroup/.devcontainer/devcontainer.json b/testdata/project-v4-multigroup/.devcontainer/devcontainer.json index e2cdc09c96c..259f0f67268 100644 --- a/testdata/project-v4-multigroup/.devcontainer/devcontainer.json +++ b/testdata/project-v4-multigroup/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Kubebuilder DevContainer", - "image": "golang:1.22", + "image": "golang:1.23", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers/features/git:1": {} diff --git a/testdata/project-v4-multigroup/Dockerfile b/testdata/project-v4-multigroup/Dockerfile index 4ba18b68cc4..5c73c7f37cd 100644 --- a/testdata/project-v4-multigroup/Dockerfile +++ b/testdata/project-v4-multigroup/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/testdata/project-v4-multigroup/README.md b/testdata/project-v4-multigroup/README.md index 781364a7172..b1a1f0078d4 100644 --- a/testdata/project-v4-multigroup/README.md +++ b/testdata/project-v4-multigroup/README.md @@ -7,7 +7,7 @@ ## Getting Started ### Prerequisites -- go version v1.22.0+ +- go version v1.23.0+ - docker version 17.03+. - kubectl version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/testdata/project-v4-multigroup/go.mod b/testdata/project-v4-multigroup/go.mod index 63743297d77..bfbaf4f736a 100644 --- a/testdata/project-v4-multigroup/go.mod +++ b/testdata/project-v4-multigroup/go.mod @@ -1,6 +1,8 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4-multigroup -go 1.22.0 +go 1.23.0 + +godebug default=go1.23 require ( github.com/cert-manager/cert-manager v1.16.2 diff --git a/testdata/project-v4-with-plugins/.devcontainer/devcontainer.json b/testdata/project-v4-with-plugins/.devcontainer/devcontainer.json index e2cdc09c96c..259f0f67268 100644 --- a/testdata/project-v4-with-plugins/.devcontainer/devcontainer.json +++ b/testdata/project-v4-with-plugins/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Kubebuilder DevContainer", - "image": "golang:1.22", + "image": "golang:1.23", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers/features/git:1": {} diff --git a/testdata/project-v4-with-plugins/Dockerfile b/testdata/project-v4-with-plugins/Dockerfile index 4ba18b68cc4..5c73c7f37cd 100644 --- a/testdata/project-v4-with-plugins/Dockerfile +++ b/testdata/project-v4-with-plugins/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/testdata/project-v4-with-plugins/README.md b/testdata/project-v4-with-plugins/README.md index 9c58ab5d5ee..777908b008b 100644 --- a/testdata/project-v4-with-plugins/README.md +++ b/testdata/project-v4-with-plugins/README.md @@ -7,7 +7,7 @@ ## Getting Started ### Prerequisites -- go version v1.22.0+ +- go version v1.23.0+ - docker version 17.03+. - kubectl version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/testdata/project-v4-with-plugins/go.mod b/testdata/project-v4-with-plugins/go.mod index d89ee19b7ff..5c9d96c8f7e 100644 --- a/testdata/project-v4-with-plugins/go.mod +++ b/testdata/project-v4-with-plugins/go.mod @@ -1,6 +1,8 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4-with-plugins -go 1.22.0 +go 1.23.0 + +godebug default=go1.23 require ( github.com/onsi/ginkgo/v2 v2.19.0 diff --git a/testdata/project-v4/.devcontainer/devcontainer.json b/testdata/project-v4/.devcontainer/devcontainer.json index e2cdc09c96c..259f0f67268 100644 --- a/testdata/project-v4/.devcontainer/devcontainer.json +++ b/testdata/project-v4/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Kubebuilder DevContainer", - "image": "golang:1.22", + "image": "golang:1.23", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": {}, "ghcr.io/devcontainers/features/git:1": {} diff --git a/testdata/project-v4/Dockerfile b/testdata/project-v4/Dockerfile index 4ba18b68cc4..5c73c7f37cd 100644 --- a/testdata/project-v4/Dockerfile +++ b/testdata/project-v4/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.22 AS builder +FROM golang:1.23 AS builder ARG TARGETOS ARG TARGETARCH diff --git a/testdata/project-v4/README.md b/testdata/project-v4/README.md index 28b9088287b..1663baa23cd 100644 --- a/testdata/project-v4/README.md +++ b/testdata/project-v4/README.md @@ -7,7 +7,7 @@ ## Getting Started ### Prerequisites -- go version v1.22.0+ +- go version v1.23.0+ - docker version 17.03+. - kubectl version v1.11.3+. - Access to a Kubernetes v1.11.3+ cluster. diff --git a/testdata/project-v4/go.mod b/testdata/project-v4/go.mod index 86a7d16eb8b..fba6e85255a 100644 --- a/testdata/project-v4/go.mod +++ b/testdata/project-v4/go.mod @@ -1,6 +1,8 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4 -go 1.22.0 +go 1.23.0 + +godebug default=go1.23 require ( github.com/cert-manager/cert-manager v1.16.2