-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2189 from kubernetes-sigs/master
🌱 prepare for 3.1.0 release
- Loading branch information
Showing
78 changed files
with
220 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/book/src/component-config-tutorial/testdata/project/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ spec: | |
namespace: system | ||
name: webhook-service | ||
path: /convert | ||
conversionReviewVersions: | ||
- "v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ spec: | |
namespace: system | ||
name: webhook-service | ||
path: /convert | ||
conversionReviewVersions: | ||
- "v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.