Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9347eae
:book: suplememting info about release process
camilamacedo86 Feb 18, 2021
5cc7d55
Add tests to the DNS validation package
Adirio Feb 18, 2021
7a7a66f
Remove old TODOs that are no longer valid
Adirio Feb 22, 2021
615f8c2
Merge pull request #2033 from Adirio/cleanup-todos
k8s-ci-robot Feb 22, 2021
33036c5
Merge pull request #2034 from Adirio/tests/dns-validation
k8s-ci-robot Feb 22, 2021
c45c5da
fix unit tests to work with later versions of ginkgo/gomega
joelanford Feb 25, 2021
ed6539a
Merge pull request #2039 from joelanford/fix/test-unit
k8s-ci-robot Feb 25, 2021
d121077
:seedling: fix CI to use the correct g version
camilamacedo86 Feb 25, 2021
d07dfcc
Merge pull request #2040 from camilamacedo86/fix-ci-go-version
k8s-ci-robot Feb 25, 2021
4bf571c
Explicitly define WithCompletion as an Option
Adirio Feb 26, 2021
cfbf62d
Merge pull request #2045 from Adirio/completion-option
k8s-ci-robot Feb 26, 2021
1586c2d
Generalize CRD and webhook version related methods in Config
Adirio Feb 26, 2021
0610cc8
Merge pull request #2047 from Adirio/config-interface
k8s-ci-robot Feb 26, 2021
64ad95f
:seedling: Update golangci-lint to latest version
Feb 25, 2021
a90cbd5
Merge pull request #2041 from goutamtadi1/update-golangci-lint
k8s-ci-robot Feb 27, 2021
75ac496
Add https to the webpage
mkumatag Mar 1, 2021
80177d3
Merge pull request #2050 from mkumatag/fix_link
k8s-ci-robot Mar 1, 2021
2ef938f
Add go mod tidy to be executed after the scaffolding api
dastergon Feb 24, 2021
2b46403
Merge pull request #2037 from dastergon/fix-api-generation
k8s-ci-robot Mar 1, 2021
1a74c97
docs: update CRD path for multi-group api
ahalimx86 Mar 2, 2021
bc7ce7d
netlify.toml: update redirects for v3.0.0
estroz Mar 4, 2021
d905233
(go/v3) bump controller-runtime to v0.7.2
estroz Mar 5, 2021
f81fb0d
feat: improve service monitor configuration
johanneswuerbach Mar 5, 2021
bdfa597
Use client.New instead of manager client in tests
leovct Mar 6, 2021
984816b
Merge pull request #2062 from estroz/docs/update-redirects
k8s-ci-robot Mar 8, 2021
6de8014
Merge pull request #2054 from ahalim-intel/update_migrations
k8s-ci-robot Mar 8, 2021
2018a4f
Merge pull request #2064 from estroz/deps/bump-c-r-0.7.2
k8s-ci-robot Mar 8, 2021
01293b2
Fix the config registry public API
Adirio Mar 9, 2021
9a121a1
test/e2e: export KIND_CLUSTER so local tests get correct cluster name
estroz Mar 9, 2021
b6e2ead
Merge pull request #2071 from estroz/chore/correct-test-cluster-name
k8s-ci-robot Mar 9, 2021
c748ebd
This commit adds a ServiceAccount (config/rbac/service_account.yaml)
estroz Mar 8, 2021
dd3942c
Merge pull request #2070 from estroz/feature/service-account
k8s-ci-robot Mar 9, 2021
4e6c400
Remove CLI interface and expose cli instead
Adirio Mar 10, 2021
2687774
Move the internal machinery utils to appropiate exported packages
Adirio Mar 9, 2021
8e0f0ab
Merge pull request #2074 from Adirio/export-machinery-utils
k8s-ci-robot Mar 10, 2021
f0ab179
Merge pull request #2072 from Adirio/fix-config-registry-api
k8s-ci-robot Mar 10, 2021
de84b80
Merge pull request #2079 from Adirio/cli-external-api
k8s-ci-robot Mar 10, 2021
0675cd5
Merge pull request #2030 from camilamacedo86/imp-release-docs
k8s-ci-robot Mar 10, 2021
fe73ff7
Add `kubebuilder alpha config-gen` subcommand
pwittrock Mar 7, 2021
9742a11
Merge pull request #1831 from pwittrock/main
k8s-ci-robot Mar 13, 2021
a2cc78c
Inject filesystem from cli instead of creating several per command
Adirio Mar 12, 2021
73cda2b
Merge pull request #2080 from Adirio/inject-filesystem
k8s-ci-robot Mar 13, 2021
61dcae6
Export scaffolding machinery
Adirio Mar 14, 2021
f7ad796
Store abstraction for persisting Config
Adirio Mar 14, 2021
23c49c2
Add fish completion
Adirio Mar 15, 2021
cd8812d
Merge pull request #2083 from Adirio/export-config-machinery
k8s-ci-robot Mar 15, 2021
bca394b
Provide third-party devs the option to provide their own alpha subcom…
Adirio Mar 15, 2021
e9caa6e
Merge pull request #2088 from Adirio/fish-code-completion
k8s-ci-robot Mar 15, 2021
fdb87df
Merge pull request #2089 from Adirio/extra-alpha-commands
k8s-ci-robot Mar 15, 2021
83230ae
Improve plugin phase 1.5 EP
Adirio Mar 9, 2021
6ca3450
Merge pull request #2082 from Adirio/export-scaffold-machinery
k8s-ci-robot Mar 15, 2021
fb4beed
Add coverage badge from Coveralls
Adirio Mar 15, 2021
388b36e
Remove kubebuilder hardcoded reference in alpha subcommand description
Adirio Mar 15, 2021
05be3c2
Fix alpha extra commands parent command
Adirio Mar 15, 2021
94b63e2
Merge pull request #2090 from Adirio/add-coverage-badge
k8s-ci-robot Mar 15, 2021
4b4d28a
Merge pull request #2091 from Adirio/alpha-description
k8s-ci-robot Mar 15, 2021
bebd89c
Merge pull request #2092 from Adirio/fix-alpha-subcommands
k8s-ci-robot Mar 15, 2021
9eb0747
Cleanup help messages
Adirio Mar 16, 2021
104672d
Merge pull request #2093 from Adirio/cleanup-help
k8s-ci-robot Mar 16, 2021
82c1b65
Fix coverage report on master
Adirio Mar 16, 2021
e806ba0
Merge pull request #2094 from Adirio/fix-ci
k8s-ci-robot Mar 16, 2021
e5b6435
Merge pull request #2066 from leovct/use-client-new-in-tests
k8s-ci-robot Mar 16, 2021
911f342
Merge pull request #2075 from Adirio/ep-plugin-phase-1.5
k8s-ci-robot Mar 16, 2021
668b999
Enable the storage of multiple plugins as layout
Adirio Mar 17, 2021
406d79d
Merge pull request #2096 from Adirio/config-chain
estroz Mar 17, 2021
faff148
Merge pull request #2065 from johanneswuerbach/improve-service-monitor
k8s-ci-robot Mar 17, 2021
f7b0ae3
pkg/cli/alpha/config-gen: command docs no longer depend on local envi…
estroz Mar 17, 2021
f2e1edb
Plugin phase 1.5 implementation
Adirio Mar 15, 2021
646f742
Merge pull request #2097 from estroz/docs/config-gen-static-cmd-docs
estroz Mar 18, 2021
2983c97
Merge pull request #2060 from Adirio/plugin-phase-1.5
k8s-ci-robot Mar 18, 2021
62e4812
Fix linting issues
Adirio Mar 22, 2021
b789900
Merge pull request #2102 from Adirio/fix-lint
k8s-ci-robot Mar 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 20 additions & 38 deletions docs/book/src/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,23 @@ Projects created by Kubebuilder contain a Makefile that will install tools at ve
- [controller-gen](https://github.com/kubernetes-sigs/controller-tools)

The versions which are defined in the `Makefile` and `go.mod` files are the versions tested and therefore is recommend to use the specified versions.

</aside>

## Installation

Install [kubebuilder](https://sigs.k8s.io/kubebuilder):

```bash
os=$(go env GOOS)
arch=$(go env GOARCH)

# download kubebuilder and extract it to tmp
curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/
```

If you are using a Kubebuilder plugin version less than version `v3+`, you must configure the Kubernetes binaries required for the [envtest][envtest], run:

```bash
# move to a long-term location and put it on your path
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder
export PATH=$PATH:/usr/local/kubebuilder/bin
# download kubebuilder and install locally.
curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/$(go env GOOS)/$(go env GOARCH)
chmod +x kubebuilder && mv kubebuilder /usr/local/bin/
```

<aside class="note">
<h1>Using master branch</h1>

Also, you can install a master snapshot from `https://go.kubebuilder.io/dl/latest/${os}/${arch}`.
You can work with a master snapshot by installing from `https://go.kubebuilder.io/dl/master/$(go env GOOS)/$(go env GOARCH)`.

</aside>

Expand All @@ -65,25 +54,18 @@ Kubebuilder provides autocompletion support for Bash and Zsh via the command `ku
Create a directory, and then run the init command inside of it to initialize a new project. Follows an example.

```bash
mkdir $GOPATH/src/example
cd $GOPATH/src/example
kubebuilder init --domain my.domain
mkdir -p ~/projects/guestbook
cd ~/projects/guestbook
kubebuilder init --domain my.domain --repo my.domain/guestbook
```

<aside class="note">
<h1>Not in $GOPATH</h1>
<h1>Developing in $GOPATH</h1>

If you're not in `GOPATH`, you'll need to run `go mod init <modulename>` in order to tell kubebuilder and Go the base import path of your module.
If your project is initialized within [`GOPATH`][GOPATH-golang-docs], the implicitly called `go mod init` will interpolate the module path for you.
Otherwise `--repo=<module path>` must be set.

For a further understanding of `GOPATH` see [The GOPATH environment variable][GOPATH-golang-docs] in the [How to Write Go Code][how-to-write-go-code-golang-docs] golang page doc.

</aside>

<aside class="note">
<h1>Go package issues</h1>

Ensure that you activate the module support by running `$ export GO111MODULE=on`
to solve issues as `cannot find package ... (from $GOROOT)`.
Read the [Go modules blogpost][go-modules-blogpost] if unfamiliar with the module system.

</aside>

Expand All @@ -99,7 +81,7 @@ kubebuilder create api --group webapp --version v1 --kind Guestbook
<aside class="note">
<h1>Press Options</h1>

If you press `y` for Create Resource [y/n] and for Create Controller [y/n] then this will create the files `api/v1/guestbook_types.go` where the API is defined
If you press `y` for Create Resource [y/n] and for Create Controller [y/n] then this will create the files `api/v1/guestbook_types.go` where the API is defined
and the `controllers/guestbook_controller.go` where the reconciliation business logic is implemented for this Kind(CRD).

</aside>
Expand Down Expand Up @@ -162,7 +144,7 @@ type Guestbook struct {
</details>


## Test It Out
## Test It Out

You'll need a Kubernetes cluster to run against. You can use
[KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or
Expand All @@ -174,7 +156,7 @@ run against a remote cluster.
Your controller will automatically use the current context in your
kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).

</aside>
</aside>

Install the CRDs into the cluster:
```bash
Expand Down Expand Up @@ -216,7 +198,7 @@ make deploy IMG=<some-registry>/<project-name>:tag
If you encounter RBAC errors, you may need to grant yourself cluster-admin
privileges or be logged in as admin. See [Prerequisites for using Kubernetes RBAC on GKE cluster v1.11.x and older][pre-rbc-gke] which may be your case.

</aside>
</aside>

## Uninstall CRDs

Expand All @@ -234,13 +216,13 @@ UnDeploy the controller to the cluster:
make undeploy
```

## Next Step
## Next Step

Now, see the [architecture concept diagram][architecture-concept-diagram] for a better overview and follow up the [CronJob tutorial][cronjob-tutorial] to better understand how it works by developing a demo example project.
Now, see the [architecture concept diagram][architecture-concept-diagram] for a better overview and follow up the [CronJob tutorial][cronjob-tutorial] to better understand how it works by developing a demo example project.

[pre-rbc-gke]: https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#iam-rolebinding-bootstrap
[cronjob-tutorial]: https://book.kubebuilder.io/cronjob-tutorial/cronjob-tutorial.html
[GOPATH-golang-docs]: https://golang.org/doc/code.html#GOPATH
[how-to-write-go-code-golang-docs]: https://golang.org/doc/code.html
[go-module-blogpost]:https://blog.golang.org/using-go-modules
[envtest]: https://book.kubebuilder.io/reference/testing/envtest.html
[architecture-concept-diagram]: architecture.md
[architecture-concept-diagram]: architecture.md
12 changes: 6 additions & 6 deletions docs/book/src/reference/artifacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ to the main binary releases.

## Test Binaries

You can find all of the test binaries at `https://go.kubebuilder.io/test-tools`.
You can find individual test binaries at `https://go.kubebuilder.io/test-tools/${version}/${os}/${arch}`.
You can find test binary tarballs for all Kubernetes versions and host platforms at `https://go.kubebuilder.io/test-tools`.
You can find a test binary tarball for a particular Kubernetes version and host platform at `https://go.kubebuilder.io/test-tools/${version}/${os}/${arch}`.

## Container Images

You can find all container images for your os at `https://go.kubebuilder.io/images/${os}`
or at `gcr.io/kubebuilder/thirdparty-${os}`.
You can find individual container images at `https://go.kubebuilder.io/images/${os}/${version}`
or at `gcr.io/kubebuilder/thirdparty-${os}:${version}`.
You can find all container image versions for a particular platform at `https://go.kubebuilder.io/images/${os}/${arch}`
or at `gcr.io/kubebuilder/thirdparty-${os}-${arch}`.
You can find the container image for a particular version and platform at `https://go.kubebuilder.io/images/${os}/${arch}/${version}`
or at `gcr.io/kubebuilder/thirdparty-${os}-${arch}:${version}`.
70 changes: 50 additions & 20 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
status = 301
force = true

# Go Links
# kubebuilder binary (v3+) and tarball (< v3) redirects.
[[redirects]]
from = "https://go.kubebuilder.io/dl/*"
to = "https://go.kubebuilder.io/releases/:splat"
Expand All @@ -37,9 +37,17 @@
status = 302
force = true

# Development branch redirect.
[[redirects]]
from = "https://go.kubebuilder.io/releases/:version"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/v:version"
from = "https://go.kubebuilder.io/releases/master/:os/:arch"
to = "https://storage.googleapis.com/kubebuilder-release/kubebuilder_master_:os_:arch.tar.gz"
status = 302
force = true

# Latest redirects.
[[redirects]]
from = "https://go.kubebuilder.io/releases/latest"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/latest"
status = 302
force = true

Expand All @@ -50,47 +58,70 @@
force = true

[[redirects]]
from = "https://go.kubebuilder.io/releases/:version/:os"
to = "https://go.kubebuilder.io/releases/:version/:os/amd64"
from = "https://go.kubebuilder.io/releases/latest/:os/:arch"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/latest/download/kubebuilder_:os_:arch"
status = 302
force = true

# v1 redirects.
[[redirects]]
from = "https://go.kubebuilder.io/releases/latest/:os/:arch"
to = "https://storage.googleapis.com/kubebuilder-release/kubebuilder_master_:os_:arch.tar.gz"
from = "https://go.kubebuilder.io/releases/1.:minorpatch/:os/:arch"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v1.:minorpatch/kubebuilder_1.:minorpatch_:os_:arch.tar.gz"
status = 302
force = true

# v2 redirects.
[[redirects]]
from = "https://go.kubebuilder.io/releases/2.:minorpatch/:os/:arch"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.:minorpatch/kubebuilder_2.:minorpatch_:os_:arch.tar.gz"
status = 302
force = true

# v3+ redirects.
[[redirects]]
from = "https://go.kubebuilder.io/releases/:version"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/v:version"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/releases/:version/:os"
to = "https://go.kubebuilder.io/releases/:version/:os/amd64"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/releases/:version/:os/:arch"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v:version/kubebuilder_:version_:os_:arch.tar.gz"
to = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v:version/kubebuilder_:os_:arch"
status = 302
force = true

# Tools redirects.
[[redirects]]
from = "https://go.kubebuilder.io/test-tools"
to = "https://storage.googleapis.com/kubebuilder-tools"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/test-tools/:version"
to = "https://storage.googleapis.com/kubebuilder-tools/?prefix=kubebuilder-tools-:version"
from = "https://go.kubebuilder.io/test-tools/:k8sversion"
to = "https://storage.googleapis.com/kubebuilder-tools/?prefix=kubebuilder-tools-:k8sversion"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/test-tools/:version/:os"
to = "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-:version-:os-amd64.tar.gz"
from = "https://go.kubebuilder.io/test-tools/:k8sversion/:os"
to = "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-:k8sversion-:os-amd64.tar.gz"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/test-tools/:version/:os/:arch"
to = "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-:version-:os-:arch.tar.gz"
from = "https://go.kubebuilder.io/test-tools/:k8sversion/:os/:arch"
to = "https://storage.googleapis.com/kubebuilder-tools/kubebuilder-tools-:k8sversion-:os-:arch.tar.gz"
status = 302
force = true

# Image redirects.
[[redirects]]
from = "https://go.kubebuilder.io/images"
to = "gcr.io/kubebuilder"
Expand All @@ -99,20 +130,19 @@

[[redirects]]
from = "https://go.kubebuilder.io/images/:os"
to = "gcr.io/kubebuilder/thirdparty-:os"
to = "https://go.kubebuilder.io/images/:os/amd64"
status = 302
force = true

[[redirects]]
from = "https://go.kubebuilder.io/images/:os/:version"
to = "gcr.io/kubebuilder/thirdparty-:os::version"
from = "https://go.kubebuilder.io/images/:os/:arch"
to = "gcr.io/kubebuilder/thirdparty-:os-:arch"
status = 302
force = true

# TODO(directxman12): change this to standard kustomize when the next version is released (2.1.0)
[[redirects]]
from = "https://go.kubebuilder.io/kustomize/:os/:arch"
to = "https://storage.googleapis.com/kubebuilder-kustomize/kustomize_:os_:arch"
from = "https://go.kubebuilder.io/images/:os/:arch/:k8sversion"
to = "gcr.io/kubebuilder/thirdparty-:os-:arch::k8sversion"
status = 302
force = true

Expand Down