Skip to content

Commit

Permalink
Update go version in kubebuilder
Browse files Browse the repository at this point in the history
Signed-off-by: Sujil02 <sujil.shah@gmail.com>
  • Loading branch information
sujil02 committed May 18, 2021
1 parent 53b7bf2 commit 55e6bd2
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 108 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.15'
go-version: '1.16'
- 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.15'
go-version: '1.16'
# 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.15'
go-version: '1.16'
- 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.15 as builder
FROM golang:1.16 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -15,7 +15,7 @@ COPY apis/ apis/
COPY controllers/ controllers/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module tutorial.kubebuilder.io/project

go 1.15
go 1.16

require (
github.com/go-logr/logr v0.2.1
Expand Down
4 changes: 2 additions & 2 deletions 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.15 as builder
FROM golang:1.16 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -15,7 +15,7 @@ COPY api/ api/
COPY controllers/ controllers/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
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.15
go 1.16

require (
github.com/go-logr/logr v0.3.0
Expand Down
4 changes: 2 additions & 2 deletions docs/book/src/migration/manually_migration_guide_v2_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ Ensure that your `go.mod` is using Go version `1.15` and the following dependenc
```go
module example
go 1.15
go 1.16
require (
github.com/go-logr/logr v0.3.0
Expand All @@ -377,7 +377,7 @@ FROM golang:1.13 as builder
With:
```
# Build the manager binary
FROM golang:1.15 as builder
FROM golang:1.16 as builder
```

#### Update your Makefile
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/migration/v2vsv3.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and [kb-releases][kb-releases] release notes.

## Common changes

v3 projects use Go modules and request Go 1.15+. Dep is no longer supported for dependency management.
v3 projects use Go modules and request Go 1.16+. Dep is no longer supported for dependency management.

## Kubebuilder

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.15 as builder
FROM golang:1.16 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -15,7 +15,7 @@ COPY api/ api/
COPY controllers/ controllers/

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module tutorial.kubebuilder.io/project

go 1.15
go 1.16

require (
github.com/go-logr/logr v0.3.0
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.15
go 1.16
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module sigs.k8s.io/kubebuilder/v3

go 1.15
go 1.16


require (
github.com/cloudflare/cfssl v1.5.0 // for `kubebuilder alpha config-gen`
github.com/go-logr/logr v0.3.0 // indirect
github.com/gobuffalo/flect v0.2.2
// TODO: remove this in favor of embed once using 1.16
github.com/markbates/pkger v0.17.1 // for `kubebuilder alpha config-gen`
Expand All @@ -15,9 +17,10 @@ require (
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e
// for `kubebuilder alpha config-gen`
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
k8s.io/api v0.20.2 // indirect
k8s.io/apiextensions-apiserver v0.20.1 // indirect
k8s.io/apimachinery v0.20.2 // for `kubebuilder alpha config-gen`
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect
sigs.k8s.io/controller-runtime v0.8.3
sigs.k8s.io/controller-tools v0.3.0 // for `kubebuilder alpha config-gen`
sigs.k8s.io/kustomize/kyaml v0.10.10 // for `kubebuilder alpha config-gen`
sigs.k8s.io/yaml v1.2.0
Expand Down
Loading

0 comments on commit 55e6bd2

Please sign in to comment.