-
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 #2785 from camilamacedo86/gov4
✨ (go/v4-alpha) new alpha plugin using kustomize v4 (add support for Apple Silicon)
- Loading branch information
Showing
498 changed files
with
15,581 additions
and
728 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
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,52 @@ | ||
# go/v4-alpha (go.kubebuilder.io/v4-alpha) | ||
|
||
Kubebuilder will scaffold using the go/v4-alpha plugin only if specified when initializing the project. | ||
This plugin is a composition of the plugins ` kustomize.common.kubebuilder.io/v2-alpha` and `base.go.kubebuilder.io/v3`. | ||
It scaffolds a project template that helps in constructing sets of [controllers][controller-runtime]. | ||
|
||
It scaffolds boilerplate code to create and design controllers. | ||
Note that by following the [quickstart][quickstart] you will be using this plugin. | ||
<aside class="note"> | ||
|
||
<h1>Examples</h1> | ||
|
||
You can check samples using this plugin by looking at the `project-v4-<options>` projects | ||
under the [testdata][testdata] directory on the root directory of the Kubebuilder project. | ||
|
||
</aside> | ||
|
||
## When to use it ? | ||
|
||
- If you are looking to scaffold Golang projects to develop projects using [controllers][controller-runtime] | ||
- If you are looking to experiment with the future default scaffold that will be provided by Kubebuilder CLI | ||
- If your local environment is Apple Silicon (`darwin/arm64`) | ||
- If you are looking to use [kubernetes-sigs/kustomize][kustomize] v4 | ||
|
||
## How to use it ? | ||
|
||
To create a new project with the `go/v4-alpha` plugin the following command can be used: | ||
|
||
```sh | ||
kubebuilder init --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project --plugins=go/v4-alpha | ||
``` | ||
|
||
## Subcommands supported by the plugin | ||
|
||
- Init - `kubebuilder init [OPTIONS]` | ||
- Edit - `kubebuilder edit [OPTIONS]` | ||
- Create API - `kubebuilder create api [OPTIONS]` | ||
- Create Webhook - `kubebuilder create webhook [OPTIONS]` | ||
|
||
## Further resources | ||
|
||
- To see the composition of plugins, you can check the source code for the Kubebuilder [main.go][plugins-main]. | ||
- Check the code implementation of the [base Golang plugin `base.go.kubebuilder.io/v3`][v3-plugin]. | ||
- Check the code implementation of the [Kustomize/v2-alpha plugin][kustomize-plugin]. | ||
- Check [controller-runtime][controller-runtime] to know more about controllers. | ||
|
||
[controller-runtime]: https://github.com/kubernetes-sigs/controller-runtime | ||
[quickstart]: ../quick-start.md | ||
[testdata]: https://github.com/kubernetes-sigs/kubebuilder/tree/master/testdata | ||
[plugins-main]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/cmd/main.go | ||
[kustomize-plugin]: ../plugins/kustomize-v2-alpha.md | ||
[kustomize]: https://github.com/kubernetes-sigs/kustomize |
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
Oops, something went wrong.