Skip to content

Commit 92e0349

Browse files
authored
Merge pull request #2189 from kubernetes-sigs/master
🌱 prepare for 3.1.0 release
2 parents 533874b + 68841fd commit 92e0349

File tree

78 files changed

+220
-246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+220
-246
lines changed

.github/workflows/testdata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Go
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: '1.15'
21+
go-version: '1.16'
2222
- name: Remove pre-installed kustomize
2323
# This step is needed as the following one tries to remove
2424
# kustomize for each test but has no permission to do so

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Go
2525
uses: actions/setup-go@v2
2626
with:
27-
go-version: '1.15'
27+
go-version: '1.16'
2828
# This step is needed as the following one tries to remove
2929
# kustomize for each test but has no permission to do so
3030
- name: Remove pre-installed kustomize
@@ -54,7 +54,7 @@ jobs:
5454
- name: Setup Go
5555
uses: actions/setup-go@v2
5656
with:
57-
go-version: '1.15'
57+
go-version: '1.16'
5858
- name: Generate the coverage output
5959
run: make test-coverage
6060
- name: Send the coverage output
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
function notFound(info) {
2+
return {
3+
statusCode: 404,
4+
headers: {'content-type': 'text/html'},
5+
body: ("<h1>Not Found</h1>"+
6+
"<p>You shouldn't see this page, please file a bug</p>"+
7+
`<details><summary>debug details</summary><pre><code>${JSON.stringify(info)}</code></pre></details>`
8+
),
9+
};
10+
}
11+
12+
function redirectToDownload(version, file) {
13+
const loc = `https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${version}/${file}`;
14+
return {
15+
statusCode: 302,
16+
headers: {'location': loc, 'content-type': 'text/plain'},
17+
body: `Redirecting to ${loc}`,
18+
};
19+
}
20+
21+
22+
exports.handler = async function(evt, ctx) {
23+
// grab the prefix too to check for coherence
24+
const [prefix, version, os, arch] = evt.path.split("/").slice(-4);
25+
if (prefix !== 'releases' || !version || !os || !arch) {
26+
return notFound({version: version, os: os, arch: arch, prefix: prefix, rawPath: evt.path});
27+
}
28+
29+
switch(version[0]) {
30+
case '1':
31+
// fallthrough
32+
case '2':
33+
return redirectToDownload(version, `kubebuilder_${version}_${os}_${arch}.tar.gz`);
34+
default:
35+
return redirectToDownload(version, `kubebuilder_${os}_${arch}`);
36+
}
37+
}

docs/book/src/component-config-tutorial/testdata/project/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.15 as builder
2+
FROM golang:1.16 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests
@@ -15,7 +15,7 @@ COPY apis/ apis/
1515
COPY controllers/ controllers/
1616

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

2020
# Use distroless as minimal base image to package the manager binary
2121
# Refer to https://github.com/GoogleContainerTools/distroless for more details

docs/book/src/component-config-tutorial/testdata/project/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module tutorial.kubebuilder.io/project
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/go-logr/logr v0.2.1

docs/book/src/cronjob-tutorial/testdata/project/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.15 as builder
2+
FROM golang:1.16 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests
@@ -15,7 +15,7 @@ COPY api/ api/
1515
COPY controllers/ controllers/
1616

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

2020
# Use distroless as minimal base image to package the manager binary
2121
# Refer to https://github.com/GoogleContainerTools/distroless for more details

docs/book/src/cronjob-tutorial/testdata/project/config/crd/patches/webhook_in_cronjobs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ spec:
1212
namespace: system
1313
name: webhook-service
1414
path: /convert
15+
conversionReviewVersions:
16+
- "v1"

docs/book/src/cronjob-tutorial/testdata/project/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module tutorial.kubebuilder.io/project
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/go-logr/logr v0.3.0

docs/book/src/migration/manually_migration_guide_v2_v3.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,15 @@ Ensure that your `go.mod` is using Go version `1.15` and the following dependenc
353353
```go
354354
module example
355355
356-
go 1.15
356+
go 1.16
357357
358358
require (
359359
github.com/go-logr/logr v0.3.0
360360
github.com/onsi/ginkgo v1.14.1
361361
github.com/onsi/gomega v1.10.2
362-
k8s.io/apimachinery v0.19.2
363-
k8s.io/client-go v0.19.2
364-
sigs.k8s.io/controller-runtime v0.7.0
362+
k8s.io/apimachinery v0.20.2
363+
k8s.io/client-go v0.20.2
364+
sigs.k8s.io/controller-runtime v0.8.3
365365
)
366366
```
367367

@@ -377,7 +377,7 @@ FROM golang:1.13 as builder
377377
With:
378378
```
379379
# Build the manager binary
380-
FROM golang:1.15 as builder
380+
FROM golang:1.16 as builder
381381
```
382382

383383
#### Update your Makefile

docs/book/src/migration/migration_guide_v2tov3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ go mod init tutorial.kubebuilder.io/migration-project
3939
<aside class="note warning">
4040
<h1> Migrating to Kubebuilder v3 while staying on the go/v2 plugin </h1>
4141

42-
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.
42+
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.
4343
</aside>
4444

4545
<aside class="note">
@@ -128,7 +128,7 @@ func (r *CronJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
128128
<aside class="note warning">
129129
<h1>Controller-runtime version updated has breaking changes</h1>
130130
131-
Check [sigs.k8s.io/controller-runtime release docs from 0.7.0+ version][controller-runtime] for breaking changes.
131+
Check [sigs.k8s.io/controller-runtime release docs from 0.8.0+ version][controller-runtime] for breaking changes.
132132
133133
</aside>
134134

0 commit comments

Comments
 (0)