From 3f1f56809b5c21beea0afdc2bce6f73b8967f513 Mon Sep 17 00:00:00 2001 From: Camila Macedo Date: Sun, 22 Sep 2024 11:00:56 +0100 Subject: [PATCH] (doc) - refactory and clenup the Plugin section Over time, this section has grown incrementally, leading to content duplication and outdated or irrelevant information. To address this, we are now: - Re-organizing the structure for better clarity. - Fixing broken or outdated links. - Removing duplicated and obsolete content. - Re-writing and refining parts of the sections to ensure accuracy and relevance. - Ensuring the Kubebuilder layout doc's standards --- VERSIONING.md | 2 +- docs/book/src/SUMMARY.md | 20 +- docs/book/src/plugins/available-plugins.md | 8 +- .../available/deploy-image-plugin-v1-alpha.md | 111 +++++ .../src/plugins/available/go-v4-plugin.md | 53 +++ .../{ => available}/grafana-v1-alpha.md | 45 +- .../src/plugins/available/kustomize-v2.md | 105 +++++ docs/book/src/plugins/creating-plugins.md | 222 ---------- .../plugins/deploy-image-plugin-v1-alpha.md | 75 ---- docs/book/src/plugins/extending-cli.md | 212 --------- docs/book/src/plugins/extending.md | 57 +++ .../extending_cli_features_and_plugins.md | 411 ++++++++++++++++++ .../src/plugins/extending/external-plugins.md | 151 +++++++ .../src/plugins/extending/testing-plugins.md | 108 +++++ docs/book/src/plugins/external-plugins.md | 162 ------- docs/book/src/plugins/go-v4-plugin.md | 60 --- docs/book/src/plugins/plugins-versioning.md | 33 +- docs/book/src/plugins/plugins.md | 61 +-- docs/book/src/plugins/testing-plugins.md | 83 ---- .../src/plugins/to-add-optional-features.md | 11 +- docs/book/src/plugins/to-be-extended.md | 33 +- docs/book/src/plugins/to-scaffold-project.md | 9 +- 22 files changed, 1115 insertions(+), 917 deletions(-) create mode 100644 docs/book/src/plugins/available/deploy-image-plugin-v1-alpha.md create mode 100644 docs/book/src/plugins/available/go-v4-plugin.md rename docs/book/src/plugins/{ => available}/grafana-v1-alpha.md (83%) create mode 100644 docs/book/src/plugins/available/kustomize-v2.md delete mode 100644 docs/book/src/plugins/creating-plugins.md delete mode 100644 docs/book/src/plugins/deploy-image-plugin-v1-alpha.md delete mode 100644 docs/book/src/plugins/extending-cli.md create mode 100644 docs/book/src/plugins/extending.md create mode 100644 docs/book/src/plugins/extending/extending_cli_features_and_plugins.md create mode 100644 docs/book/src/plugins/extending/external-plugins.md create mode 100644 docs/book/src/plugins/extending/testing-plugins.md delete mode 100644 docs/book/src/plugins/external-plugins.md delete mode 100644 docs/book/src/plugins/go-v4-plugin.md delete mode 100644 docs/book/src/plugins/testing-plugins.md diff --git a/VERSIONING.md b/VERSIONING.md index d26a8552434..8d5e7e2a971 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -59,4 +59,4 @@ take care of building and publishing the artifacts. [envtest-ref]: https://book.kubebuilder.io/reference/artifacts.html [tools-branch]: https://github.com/kubernetes-sigs/kubebuilder/tree/tools-releases [kb-releases]:https://github.com/kubernetes-sigs/kubebuilder/releases -[cli-plugins-versioning]:docs/book/src/plugins/extending-cli.md#plugin-versioning +[cli-plugins-versioning]:docs/book/src/plugins/extending#plugin-versioning diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md index 6bc70fa7c67..3b64b77ac3b 100644 --- a/docs/book/src/SUMMARY.md +++ b/docs/book/src/SUMMARY.md @@ -117,18 +117,16 @@ - [Plugins][plugins] - [Available Plugins](./plugins/available-plugins.md) - - [To scaffold a project](./plugins/to-scaffold-project.md) - - [go/v4 (Default init scaffold)](./plugins/go-v4-plugin.md) - - [To add optional features](./plugins/to-add-optional-features.md) - - [grafana/v1-alpha](./plugins/grafana-v1-alpha.md) - - [deploy-image/v1-alpha](./plugins/deploy-image-plugin-v1-alpha.md) - - [To be extended for others tools](./plugins/to-be-extended.md) - - [kustomize/v2 (Default init scaffold with go/v4)](./plugins/kustomize-v2.md) - - [Extending the CLI](./plugins/extending-cli.md) - - [Creating your own plugins](./plugins/creating-plugins.md) - - [Testing your own plugins](./plugins/testing-plugins.md) + - [go/v4](./plugins/available/go-v4-plugin.md) + - [grafana/v1-alpha](./plugins/available/grafana-v1-alpha.md) + - [deploy-image/v1-alpha](./plugins/available/deploy-image-plugin-v1-alpha.md) + - [kustomize/v2](./plugins/available/kustomize-v2.md) + - [Extending](./plugins/extending.md) + - [CLI and Plugins](./plugins/extending/extending_cli_features_and_plugins.md) + - [External Plugins](./plugins/extending/external-plugins.md) + - [E2E Tests](./plugins/extending/testing-plugins.md) - [Plugins Versioning](./plugins/plugins-versioning.md) - - [Creating external plugins](./plugins/external-plugins.md) + --- diff --git a/docs/book/src/plugins/available-plugins.md b/docs/book/src/plugins/available-plugins.md index 3f723d05274..b4d819b8a6f 100644 --- a/docs/book/src/plugins/available-plugins.md +++ b/docs/book/src/plugins/available-plugins.md @@ -6,10 +6,4 @@ This section describes the plugins supported and shipped in with the Kubebuilder {{#include to-add-optional-features.md }} {{#include to-be-extended.md }} - \ No newline at end of file +[plugin-versions]: plugins-versioning.md \ No newline at end of file diff --git a/docs/book/src/plugins/available/deploy-image-plugin-v1-alpha.md b/docs/book/src/plugins/available/deploy-image-plugin-v1-alpha.md new file mode 100644 index 00000000000..94136a654ea --- /dev/null +++ b/docs/book/src/plugins/available/deploy-image-plugin-v1-alpha.md @@ -0,0 +1,111 @@ +# Deploy Image Plugin (deploy-image/v1-alpha) + +The `deploy-image` plugin allows users to create [controllers][controller-runtime] and custom resources that deploy and manage container images on the cluster, following Kubernetes best practices. It simplifies the complexities of deploying images while allowing users to customize their projects as needed. + +By using this plugin, you will get: + +- A controller implementation to deploy and manage an Operand (image) on the cluster. +- Tests to verify the reconciliation logic, using [ENVTEST][envtest]. +- Custom resource samples updated with the necessary specifications. +- Environment variable support for managing the Operand (image) within the manager. + + + + +## When to use it? + +- This plugin is ideal for users who are just getting started with Kubernetes operators. +- It helps users deploy and manage an image (Operand) using the [Operator pattern][operator-pattern]. +- If you're looking for a quick and efficient way to set up a custom controller and manage a container image, this plugin is a great choice. + +## How to use it? + +1. **Initialize your project**: + After creating a new project with `kubebuilder init`, you can use this + plugin to create APIs. Ensure that you've completed the + [quick start][quick-start] guide before proceeding. + +2. **Create APIs**: + With this plugin, you can [create APIs][create-apis] to specify the image (Operand) you want to deploy on the cluster. You can also optionally specify the command, port, and security context using various flags: + + Example command: + ```sh + kubebuilder create api --group example.com --version v1alpha1 --kind Memcached --image=memcached:1.6.15-alpine --image-container-command="memcached,--memory-limit=64,modern,-v" --image-container-port="11211" --run-as-user="1001" --plugins="deploy-image/v1-alpha" + ``` + + + +## Subcommands + +The `deploy-image` plugin includes the following subcommand: + +- `create api`: Use this command to scaffold the API and controller code to manage the container image. + +## Affected files + +When using the `create api` command with this plugin, the following +files are affected, in addition to the existing Kubebuilder scaffolding: + +- `controllers/*_controller_test.go`: Scaffolds tests for the controller. +- `controllers/*_suite_test.go`: Scaffolds or updates the test suite. +- `api//*_types.go`: Scaffolds the API specs. +- `config/samples/*_.yaml`: Scaffolds default values for the custom resource. +- `main.go`: Updates the file to add the controller setup. +- `config/manager/manager.yaml`: Updates to include environment variables for storing the image. + +## Further Resources: + +- Check out this [video][video] to see how it works. + +[video]: https://youtu.be/UwPuRjjnMjY +[operator-pattern]: https://kubernetes.io/docs/concepts/extend-kubernetes/operator/ +[controller-runtime]: https://github.com/kubernetes-sigs/controller-runtime +[testdata]: ./.././../../../../testdata/project-v4-with-plugins +[envtest]: ./../../reference/envtest.md +[quick-start]: ./../../quick-start.md +[create-apis]: ../../cronjob-tutorial/new-api.md \ No newline at end of file diff --git a/docs/book/src/plugins/available/go-v4-plugin.md b/docs/book/src/plugins/available/go-v4-plugin.md new file mode 100644 index 00000000000..6e13a9539cc --- /dev/null +++ b/docs/book/src/plugins/available/go-v4-plugin.md @@ -0,0 +1,53 @@ +# go/v4 (go.kubebuilder.io/v4) + +**(Default Scaffold)** + +Kubebuilder will scaffold using the `go/v4` plugin only if specified when initializing the project. +This plugin is a composition of the `kustomize.common.kubebuilder.io/v2` and `base.go.kubebuilder.io/v4` plugins +using the [Bundle Plugin][bundle]. It scaffolds a project template +that helps in constructing sets of [controllers][controller-runtime]. + +By following the [quickstart][quickstart] and creating any project, +you will be using this plugin by default. + + + +## How to use it ? + +To create a new project with the `go/v4` plugin the following command can be used: + +```sh +kubebuilder init --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project --plugins=go/v4 +``` + +## 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/v4`][v4-plugin]. +- Check the code implementation of the [Kustomize/v2 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]: ./../../../../../testdata +[plugins-main]: ./../../../../../cmd/main.go +[kustomize-plugin]: ./../../plugins/avaialable/kustomize-v2.md +[kustomize]: https://github.com/kubernetes-sigs/kustomize +[standard-go-project]: https://github.com/golang-standards/project-layout +[v4-plugin]: ./../../../../../pkg/plugins/golang/v4 +[migration-guide-doc]: ./../../migration/migration_guide_gov3_to_gov4.md +[project-doc]: ./../../reference/project-config.md +[bundle]: ./../../../../../pkg/plugin/bundle.go diff --git a/docs/book/src/plugins/grafana-v1-alpha.md b/docs/book/src/plugins/available/grafana-v1-alpha.md similarity index 83% rename from docs/book/src/plugins/grafana-v1-alpha.md rename to docs/book/src/plugins/available/grafana-v1-alpha.md index 9f8c277be0b..d086fe17f09 100644 --- a/docs/book/src/plugins/grafana-v1-alpha.md +++ b/docs/book/src/plugins/available/grafana-v1-alpha.md @@ -1,17 +1,23 @@ # Grafana Plugin (`grafana/v1-alpha`) -The Grafana plugin is an optional plugin that can be used to scaffold Grafana Dashboards to allow you to check out the default metrics which are exported by projects using [controller-runtime][controller-runtime]. +The Grafana plugin is an optional plugin that can be used to +scaffold Grafana Dashboards to allow you to check out the +default metrics which are exported by projects +using [controller-runtime][controller-runtime]. ## When to use it ? -- If you are looking to observe the metrics exported by [controller metrics][controller-metrics] and collected by Prometheus via [Grafana][grafana]. +- If you are looking to observe the metrics +exported by [controller metrics][controller-metrics] and +collected by Prometheus via [Grafana][grafana]. ## How to use it ? @@ -21,10 +27,10 @@ You can check its default scaffold by looking at the `project-v3-with-metrics` p - Access to [Prometheus][prometheus]. - Prometheus should have an endpoint exposed. (For `prometheus-operator`, this is similar as: http://prometheus-k8s.monitoring.svc:9090 ) - The endpoint is ready to/already become the datasource of your Grafana. See [Add a data source](https://grafana.com/docs/grafana/latest/datasources/add-a-data-source/) -- Access to [Grafana](https://grafana.com/docs/grafana/latest/setup-grafana/installation/). Make sure you have: - - [Dashboard edit permission](https://grafana.com/docs/grafana/next/administration/roles-and-permissions/#dashboard-permissions) +- Access to [Grafana][grafana-install]. Make sure you have: + - [Dashboard edit permission][grafana-permissions] - Prometheus Data source - ![pre](https://user-images.githubusercontent.com/18136486/176119794-f6d69b0b-93f0-4f9e-a53c-daf9f77dadae.gif) + ![pre][prometheus-data-source] -[design-doc]: ./extending-cli.md -[cli-plugins-versioning]:./extending-cli.md#plugin-versioning + [semver]: https://semver.org/ [migrations]: ../migrations.md [kb-releases]:https://github.com/kubernetes-sigs/kubebuilder/releases +[design-doc]: ./extending +[cli-plugins-versioning]:./extending#plugin-versioning \ No newline at end of file diff --git a/docs/book/src/plugins/plugins.md b/docs/book/src/plugins/plugins.md index 0f71d9f2ba4..66dae4859b6 100644 --- a/docs/book/src/plugins/plugins.md +++ b/docs/book/src/plugins/plugins.md @@ -1,40 +1,47 @@ # Plugins -Since the `3.0.0` Kubebuilder version, preliminary support for plugins was added. You can [Extend the CLI and Scaffolds][extending-cli] as well. See that when users run the CLI commands to perform the scaffolds, the plugins are used: +Kubebuilder's architecture is fundamentally plugin-based. +This design enables the Kubebuilder CLI to evolve while maintaining +backward compatibility with older versions, allowing users to opt-in or +opt-out of specific features, and enabling seamless integration +with external tools. -- To initialize a project with a chain of global plugins: +By leveraging plugins, projects can extend Kubebuilder and use it as a +library to support new functionalities or implement custom scaffolding +tailored to their users' needs. This flexibility allows maintainers +to build on top of Kubebuilder’s foundation, adapting it to specific +use cases while benefiting from its powerful scaffolding engine. -```sh -kubebuilder init --plugins=pluginA,pluginB -``` +Plugins offer several key advantages: + +- **Backward compatibility**: Ensures older layouts and project structures remain functional with newer versions. +- **Customization**: Allows users to opt-in or opt-out for specific features (i.e. [Grafana][grafana-plugin] and [Deploy Image][deploy-image] plugins) +- **Extensibility**: Facilitates integration with third-party tools and projects that wish to provide their own [External Plugins][external-plugins], which can be used alongside Kubebuilder to modify and enhance project scaffolding or introduce new features. -- To perform an optional scaffold using custom plugins: +**For example, to initialize a project with multiple global plugins:** ```sh -kubebuilder create api --plugins=pluginA,pluginB +kubebuilder init --plugins=pluginA,pluginB,pluginC ``` -This section details how to extend Kubebuilder and create your plugins following the same layout structures. - - - - +This section details the available plugins, how to extend Kubebuilder, +and how to create your own plugins while following the same layout structures. -- [Extending the CLI and Scaffolds](extending-cli.md) -- [Creating your own plugins](creating-plugins.md) -- [Testing your plugins](testing-plugins.md) +- [Available Plugins](./available-plugins.md) +- [Extending](./extending.md) +- [Plugins Versioning](./plugins-versioning.md) -[plugins-phase1-design-doc]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/designs/extensible-cli-and-scaffolding-plugins-phase-1.md -[plugins-phase1-design-doc-1.5]: https://github.com/kubernetes-sigs/kubebuilder/blob/master/designs/extensible-cli-and-scaffolding-plugins-phase-1-5.md -[extending-cli]: extending-cli.md -[section-future-vision-plugins]: https://book.kubebuilder.io/plugins/creating-plugins.html#future-vision-for-kubebuilder-plugins +[extending-cli]: extending.md +[grafana-plugin]: ./available/grafana-v1-alpha.md +[deploy-image]: ./available/deploy-image-plugin-v1-alpha.md +[external-plugins]: ./extending/external-plugins.md \ No newline at end of file diff --git a/docs/book/src/plugins/testing-plugins.md b/docs/book/src/plugins/testing-plugins.md deleted file mode 100644 index d22028a8a96..00000000000 --- a/docs/book/src/plugins/testing-plugins.md +++ /dev/null @@ -1,83 +0,0 @@ -# Test Your Plugins - -You can test your plugin in two dimension: - -1. Validate your plugin behavior through E2E tests -2. Generate sample projects based on your plugin that can be placed in `./testdata/` - -## Write E2E Tests - -You can check [Kubebuilder/v3/test/e2e/utils](https://pkg.go.dev/sigs.k8s.io/kubebuilder/v4/test/e2e/utils) package that offers `TestContext` of rich methods: - -- [NewTestContext](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L51) helps define: - - Temporary folder for testing projects - - Temporary controller-manager image - - [Kubectl execution method](https://pkg.go.dev/sigs.k8s.io/kubebuilder/v4/test/e2e/utils#Kubectl) - - The cli executable (`kubebuilder`, `operator-sdk`, OR your extended-cli) - -Once defined, you can use `TestContext` to: - -1. Setup testing environment, e.g: - - Clean up the environment, create temp dir. See [Prepare](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L97) - - Install prerequisites CRDs: See [InstallCertManager](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L138), [InstallPrometheusManager](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.6.0/test/e2e/utils/test_context.go#L171) -2. Validate the plugin behavior, e.g: - - Trigger the plugin's bound subcommands. See [Init](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L213), [CreateAPI](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.6.0/test/e2e/utils/test_context.go#L222) - - Use [PluginUtil](https://pkg.go.dev/sigs.k8s.io/kubebuilder/v4/pkg/plugin/util) to verify the scaffolded outputs. See [InsertCode](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/pkg/plugin/util/util.go#L67), [ReplaceInFile](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.6.0/pkg/plugin/util/util.go#L196), [UncommendCode](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.6.0/pkg/plugin/util/util.go#L86) -3. Further make sure the scaffolded output works, e.g: - - Execute commands in your `Makefile`. See [Make](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L240) - - Temporary load image of the testing controller. See [LoadImageToKindCluster](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L283) - - Call Kubectl to validate running resources. See [utils.Kubectl](https://pkg.go.dev/sigs.k8s.io/kubebuilder/v4/test/e2e/utils#Kubectl) -4. Delete temporary resources after testing exited, e.g: - - Uninstall prerequisites CRDs: See [UninstallPrometheusOperManager](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L183) - - Delete temp dir. See [Destroy](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/test/e2e/utils/test_context.go#L255) - -**References:** [operator-sdk e2e tests](https://github.com/operator-framework/operator-sdk/tree/master/test/e2e/go), [kubebuiler e2e tests](https://github.com/kubernetes-sigs/kubebuilder/tree/master/test/e2e/v3) - -## Generate Test Samples - -It can be straightforward to view content of sample projects generated by your plugin. - -For example, Kubebuilder generate [sample projects](https://github.com/kubernetes-sigs/kubebuilder/tree/v3.7.0/testdata) based on different plugins to validate the layouts. - -Simply, you can also use `TextContext` to generate folders of scaffolded projects from your plugin. -The commands are very similar as mentioned in [creating-plugins](creating-plugins.md#write-e2e-tests). - -Following is a general workflow to create a sample by the plugin `go/v4`: (`kbc` is an instance of `TextContext`) - -- To initialized a project: - ```go - By("initializing a project") - err = kbc.Init( - "--plugins", "go/v4", - "--project-version", "3", - "--domain", kbc.Domain, - "--fetch-deps=false", - ) - ExpectWithOffset(1, err).NotTo(HaveOccurred()) - ``` -- To define API: - ```go - By("creating API definition") - err = kbc.CreateAPI( - "--group", kbc.Group, - "--version", kbc.Version, - "--kind", kbc.Kind, - "--namespaced", - "--resource", - "--controller", - "--make=false", - ) - ExpectWithOffset(1, err).NotTo(HaveOccurred()) - ``` -- To scaffold webhook configurations: - ```go - By("scaffolding mutating and validating webhooks") - err = kbc.CreateWebhook( - "--group", kbc.Group, - "--version", kbc.Version, - "--kind", kbc.Kind, - "--defaulting", - "--programmatic-validation", - ) - ExpectWithOffset(1, err).NotTo(HaveOccurred()) - ``` diff --git a/docs/book/src/plugins/to-add-optional-features.md b/docs/book/src/plugins/to-add-optional-features.md index 048a23d8730..6b95e7c02c2 100644 --- a/docs/book/src/plugins/to-add-optional-features.md +++ b/docs/book/src/plugins/to-add-optional-features.md @@ -2,7 +2,10 @@ The following plugins are useful to generate code and take advantage of optional features -| Plugin | Key | Description | -|-------------------------------------------------------------------------| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [grafana.kubebuilder.io/v1-alpha](grafana-v1-alpha.md) | `grafana/v1-alpha` | Optional helper plugin which can be used to scaffold Grafana Manifests Dashboards for the default metrics which are exported by controller-runtime. | -| [deploy-image.go.kubebuilder.io/v1-alpha](deploy-image-plugin-v1-alpha) | `deploy-image/v1-alpha` | Optional helper plugin which can be used to scaffold APIs and controller with code implementation to Deploy and Manage an Operand(image). | +| Plugin | Key | Description | +|---------------------------------------------------| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [grafana.kubebuilder.io/v1-alpha][grafana] | `grafana/v1-alpha` | Optional helper plugin which can be used to scaffold Grafana Manifests Dashboards for the default metrics which are exported by controller-runtime. | +| [deploy-image.go.kubebuilder.io/v1-alpha][deploy] | `deploy-image/v1-alpha` | Optional helper plugin which can be used to scaffold APIs and controller with code implementation to Deploy and Manage an Operand(image). | + +[grafana]: ./available/grafana-v1-alpha.md +[deploy]: ./available/deploy-image-plugin-v1-alpha.md \ No newline at end of file diff --git a/docs/book/src/plugins/to-be-extended.md b/docs/book/src/plugins/to-be-extended.md index 62fa74b4c96..962eda6f44d 100644 --- a/docs/book/src/plugins/to-be-extended.md +++ b/docs/book/src/plugins/to-be-extended.md @@ -1,25 +1,24 @@ -## To help projects using Kubebuilder as Lib to composite new solutions and plugins +## To be extended - +| Plugin | Key | Description | +|--------------------------------------------------------|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| +| [kustomize.common.kubebuilder.io/v2][kustomize-plugin] | `kustomize/v2` | Responsible for scaffolding all [kustomize][kustomize] files under the `config/` directory | +| `base.go.kubebuilder.io/v4` | `base/v4` | Responsible for scaffolding all files which specifically requires Golang. This plugin is used in the composition to create the plugin (`go/v4`) | -Then, see that you can use the kustomize plugin, which is responsible for to scaffold the kustomize files under `config/`, as -the base language plugins which are responsible for to scaffold the Golang files to create your own plugins to work with -another languages (i.e. [Operator-SDK][sdk] does to allow users work with Ansible/Helm) or to add -helpers on top, such as [Operator-SDK][sdk] does to add their features to integrate the projects with [OLM][olm]. - -| Plugin | Key | Description | -| ---------------------------------------------------------------------------------- |-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| -| [kustomize.common.kubebuilder.io/v2](kustomize-v2.md) | `kustomize/v2` | Responsible for scaffolding all [kustomize][kustomize] files under the `config/` directory | -| `base.go.kubebuilder.io/v4` | `base/v4` | Responsible for scaffolding all files which specifically requires Golang. This plugin is used in the composition to create the plugin (`go/v4`) | - -[create-plugins]: creating-plugins.md [kustomize]: https://kustomize.io/ [sdk]: https://github.com/operator-framework/operator-sdk [olm]: https://olm.operatorframework.io/ - +[kustomize-plugin]: ./available/kustomize-v2.md +[external-plugins]: ./extending/external-plugins.md diff --git a/docs/book/src/plugins/to-scaffold-project.md b/docs/book/src/plugins/to-scaffold-project.md index c91217191d6..7e1744e94fc 100644 --- a/docs/book/src/plugins/to-scaffold-project.md +++ b/docs/book/src/plugins/to-scaffold-project.md @@ -2,6 +2,9 @@ The following plugins are useful to scaffold the whole project with the tool. -| Plugin | Key | Description | -|------------------------------------------------------------------------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [go.kubebuilder.io/v4 - (Default scaffold with Kubebuilder init)](go-v4-plugin.md) | `go/v4` | Scaffold composite by `base.go.kubebuilder.io/v4` and [kustomize.common.kubebuilder.io/v2](kustomize-v2.md). Responsible for scaffolding Golang projects and its configurations. | +| Plugin | Key | Description | +|--------------------------------------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [go.kubebuilder.io/v4 - (Default scaffold with Kubebuilder init)][go-v4] | `go/v4` | Scaffold composite by `base.go.kubebuilder.io/v4` and [kustomize.common.kubebuilder.io/v2][kustomize-v2]. Responsible for scaffolding Golang projects and its configurations. | + +[go-v4]: ./available/go-v4-plugin.md +[kustomize-v2]: ./available/kustomize-v2.md \ No newline at end of file