Skip to content

Commit

Permalink
Merge pull request #2189 from kubernetes-sigs/master
Browse files Browse the repository at this point in the history
🌱 prepare for 3.1.0 release
  • Loading branch information
k8s-ci-robot authored May 27, 2021
2 parents 533874b + 68841fd commit 92e0349
Show file tree
Hide file tree
Showing 78 changed files with 220 additions and 246 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
37 changes: 37 additions & 0 deletions docs/book/functions/handle-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
function notFound(info) {
return {
statusCode: 404,
headers: {'content-type': 'text/html'},
body: ("<h1>Not Found</h1>"+
"<p>You shouldn't see this page, please file a bug</p>"+
`<details><summary>debug details</summary><pre><code>${JSON.stringify(info)}</code></pre></details>`
),
};
}

function redirectToDownload(version, file) {
const loc = `https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${version}/${file}`;
return {
statusCode: 302,
headers: {'location': loc, 'content-type': 'text/plain'},
body: `Redirecting to ${loc}`,
};
}


exports.handler = async function(evt, ctx) {
// grab the prefix too to check for coherence
const [prefix, version, os, arch] = evt.path.split("/").slice(-4);
if (prefix !== 'releases' || !version || !os || !arch) {
return notFound({version: version, os: os, arch: arch, prefix: prefix, rawPath: evt.path});
}

switch(version[0]) {
case '1':
// fallthrough
case '2':
return redirectToDownload(version, `kubebuilder_${version}_${os}_${arch}.tar.gz`);
default:
return redirectToDownload(version, `kubebuilder_${os}_${arch}`);
}
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions:
- "v1"
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
10 changes: 5 additions & 5 deletions docs/book/src/migration/manually_migration_guide_v2_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,15 @@ 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
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
k8s.io/apimachinery v0.19.2
k8s.io/client-go v0.19.2
sigs.k8s.io/controller-runtime v0.7.0
k8s.io/apimachinery v0.20.2
k8s.io/client-go v0.20.2
sigs.k8s.io/controller-runtime v0.8.3
)
```

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
4 changes: 2 additions & 2 deletions docs/book/src/migration/migration_guide_v2tov3.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ go mod init tutorial.kubebuilder.io/migration-project
<aside class="note warning">
<h1> Migrating to Kubebuilder v3 while staying on the go/v2 plugin </h1>

You can use `--plugins=go/v2` if you wish to continue using "`Kubebuilder 2.x`" layout and avoid dealing with the breaking changes that will be faced because of the default upper versions which will be used now. See that the [controller-tools][controller-tools] `v0.4.1` & [controller-runtime][controller-runtime] `v0.7.0` are just used by default with the `go/v3` plugin layout.
You can use `--plugins=go/v2` if you wish to continue using "`Kubebuilder 2.x`" layout and avoid dealing with the breaking changes that will be faced because of the default upper versions which will be used now. See that the [controller-tools][controller-tools] `v0.4.1` & [controller-runtime][controller-runtime] `v0.8.3` are just used by default with the `go/v3` plugin layout.
</aside>

<aside class="note">
Expand Down Expand Up @@ -128,7 +128,7 @@ func (r *CronJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
<aside class="note warning">
<h1>Controller-runtime version updated has breaking changes</h1>
Check [sigs.k8s.io/controller-runtime release docs from 0.7.0+ version][controller-runtime] for breaking changes.
Check [sigs.k8s.io/controller-runtime release docs from 0.8.0+ version][controller-runtime] for breaking changes.
</aside>
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 @@ -42,7 +42,7 @@ Projects scaffolded with Kubebuilder v3 will use the `go.kubebuilder.io/v3` plug
* Manager manifests now use `SecurityContext` to address security concerns. More info: [#1637][issue-1637]
- Misc:
* Support for [controller-tools][controller-tools] `v0.4.1` (for `go/v2` it is `v0.3.0` and previously it was `v0.2.5`)
* Support for [controller-runtime][controller-runtime] `v0.7.0` (for `go/v2` it is `v0.6.4` and previously it was `v0.5.0`)
* Support for [controller-runtime][controller-runtime] `v0.8.3` (for `go/v2` it is `v0.6.4` and previously it was `v0.5.0`)
* Support for [kustomize][kustomize] `v3.8.7` (for `go/v2` it is `v3.5.4` and previously it was `v3.1.0`)
* Required Envtest binaries are automatically downloaded
* The minimum Go version is now `1.15` (previously it was `1.13).
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
Expand Up @@ -12,3 +12,5 @@ spec:
namespace: system
name: webhook-service
path: /convert
conversionReviewVersions:
- "v1"
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
4 changes: 2 additions & 2 deletions docs/book/utils/markerdocs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ func main() {
if err := plugin.Run(MarkerDocs{
Args: map[string][]string{
// marker args
"": []string{"-wwww", "crd", "webhook", "rbac:roleName=cheddar" /* role name doesn't mean anything here */, "object", "schemapatch:manifests=."},
"": {"-wwww", "crd", "webhook", "rbac:roleName=cheddar" /* role name doesn't mean anything here */, "object", "schemapatch:manifests=."},
// cli options args
"CLI: ": []string{"-hhhh"},
"CLI: ": {"-hhhh"},
},
}, os.Stdin, os.Stdout, os.Args[1:]...); err != nil {
log.Fatal(err.Error())
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
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 +16,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 92e0349

Please sign in to comment.