Skip to content

Commit

Permalink
Update go version to 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantking committed Dec 13, 2021
1 parent 0036a35 commit 3caf64a
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: '1.17'
- name: Remove pre-installed kustomize
# This step is needed as the following one tries to remove
# kustomize for each test but has no permission to do so
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: '1.17'
# This step is needed as the following one tries to remove
# kustomize for each test but has no permission to do so
- name: Remove pre-installed kustomize
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.16'
go-version: '1.17'
- name: Generate the coverage output
run: make test-coverage
- name: Send the coverage output
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module tutorial.kubebuilder.io/project

go 1.16
go 1.17

require (
k8s.io/apimachinery v0.21.2
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/cronjob-tutorial/testdata/project/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/cronjob-tutorial/testdata/project/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module tutorial.kubebuilder.io/project

go 1.16
go 1.17

require (
github.com/onsi/ginkgo v1.16.4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion docs/book/utils/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module sigs.k8s.io/kubebuilder/docs/book/utils

go 1.16
go 1.17
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/kubebuilder/v3

go 1.16
go 1.17

require (
github.com/cloudflare/cfssl v1.5.0 // for `kubebuilder alpha config-gen`
Expand Down
13 changes: 13 additions & 0 deletions pkg/plugins/golang/go_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,19 @@ var _ = Describe("checkGoVersion", func() {
Entry("for go 1.16.2", "go1.16.2"),
Entry("for go 1.16.3", "go1.16.3"),
Entry("for go 1.16.4", "go1.16.4"),
Entry("for go 1.16.5", "go1.16.5"),
Entry("for go 1.16.6", "go1.16.6"),
Entry("for go 1.16.7", "go1.16.7"),
Entry("for go 1.16.8", "go1.16.8"),
Entry("for go 1.16.9", "go1.16.9"),
Entry("for go 1.16.10", "go1.16.10"),
Entry("for go 1.16.11", "go1.16.11"),
Entry("for go 1.16.12", "go1.16.12"),
Entry("for go 1.17.1", "go1.17.1"),
Entry("for go 1.17.2", "go1.17.2"),
Entry("for go 1.17.3", "go1.17.3"),
Entry("for go 1.17.4", "go1.17.4"),
Entry("for go 1.17.5", "go1.17.5"),
)

DescribeTable("should return an error for non-supported go versions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (f *Dockerfile) SetTemplateDefaults() error {
}

const dockerfileTemplate = `# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (f *GoMod) SetTemplateDefaults() error {
const goModTemplate = `
module {{ .Repo }}
go 1.16
go 1.17
require (
sigs.k8s.io/controller-runtime {{ .ControllerRuntimeVersion }}
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3-addon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3-config/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3-multigroup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3-multigroup/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/kubebuilder/testdata/project-v3-multigroup

go 1.16
go 1.17

require (
github.com/onsi/ginkgo v1.16.4
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3-v1beta1/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.16 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down

0 comments on commit 3caf64a

Please sign in to comment.