Skip to content

Commit

Permalink
Update docs/book/src/plugins/go-v2-plugin.md
Browse files Browse the repository at this point in the history
Co-authored-by: Bryce Palmer <everettraven@gmail.com>
  • Loading branch information
2 people authored and Camila Macedo committed Jun 21, 2022
1 parent bb116ed commit 44ee14b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
- [Extending the CLI](./plugins/extending-cli.md)
- [Creating your own plugins](./plugins/creating-plugins.md)
- [Available Plugins](./plugins/available-plugins.md)
- [go/v2 plugin (Deprecated)](./plugins/go-v2-plugin.md)
- [go/v3 plugin](./plugins/go-v3-plugin.md)
- [go/v2 plugin](./plugins/go-v2-plugin.md)
- [Declarative V1](./plugins/declarative-v1.md)
- [Kustomize V1](./plugins/kustomize-v1.md)
- [Plugins Versioning](./plugins/plugins-versioning.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/book/src/plugins/available-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ This section describes the plugins supported and shipped in with the Kubebuilder

| Plugin | Key | Description |
|---|---|---|
| [go.kubebuilder.io/v3](go-v3-plugin.md) | `go/v3` | Default scaffold to create the projects when none plugin(s) are informed. Responsible for scaffold the Golang project and its configurations. |
| [go.kubebuilder.io/v2](go-v2-plugin.md) | `go/v2` | Golang plugin responsible for scaffold the legacy layout provided with Kubebuilder CLI >= `2.0.0` and < `3.0.0`. |
| [go.kubebuilder.io/v2 - (Deprecated)](go-v2-plugin.md) | `go/v2` | Golang plugin responsible for scaffold the legacy layout provided with Kubebuilder CLI >= `2.0.0` and < `3.0.0`. |
| [go.kubebuilder.io/v3 - (Default scaffold with Kubebuilder init)](go-v3-plugin.md) | `go/v3` | Default scaffold to create the projects when none plugin(s) are informed. Responsible for scaffold the Golang project and its configurations. |
| [declarative.go.kubebuilder.io/v1](declarative-v1.md) | `declarative/v1` | Optional plugin used to scaffold APIs/controllers using the [kubebuilder-declarative-pattern][kubebuilder-declarative-pattern] project. |
| [kustomize.common.kubebuilder.io/v1](kustomize-v1.md) | `kustomize/v1` | Responsible for scaffold all manifests to configure the projects with [kustomize(v3)][kustomize]. (create and update the the `config/` directory). This plugin is used in the composition to create the plugin (`go/v3`). |
| [kustomize.common.kubebuilder.io/v1](kustomize-v2-alpha.md) | `kustomize/v2-alpha` | It has the same purpose of `kustomize/v1`. However, it works with [kustomize][kustomize] version `v4` and address the required changes for the future kustomize configurations. It will probably be used with the future `go/v4-alpha` plugin. |
| [kustomize.common.kubebuilder.io/v2-alpha](kustomize-v2-alpha.md) | `kustomize/v2-alpha` | It has the same purpose of `kustomize/v1`. However, it works with [kustomize][kustomize] version `v4` and address the required changes for the future kustomize configurations. It will probably be used with the future `go/v4-alpha` plugin. |
| `base.go.kubebuilder.io/v3` | `base/v3` | Responsible for scaffold all files which specific requires Golang. This plugin is used in the composition to create the plugin (`go/v3`) |

<aside class="note">
Expand Down
9 changes: 4 additions & 5 deletions docs/book/src/plugins/go-v2-plugin.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# go/v2 (go.kubebuilder.io/v2 - "Kubebuilder 2.x" layout)
# [Deprecated] go/v2 (go.kubebuilder.io/v2 - "Kubebuilder 2.x" layout)

<aside class="note warning">
<h1>Deprecated</h1>

The `go/v2` plugin cannot scaffold solutions which uses CRD and/or Webhooks with the v1 version and properly
work with the plugins ecosystem introduced with Kubebuilder `3.0.0`[More info](plugins.md). Note that `v1beta1` was deprecated on Kubernetes `1.16` and no longer is offered since its release `1.22`.
Therefore, this plugin was kept to ensure the backwords compability with old Kubebuilder versions
scaffolds produced with `"Kubebuilder 2.x"` layout.
The `go/v2` plugin cannot scaffold projects in which CRDs and/or Webhooks have a `v1` API version.
The `go/v2` plugin scaffolds with the `v1beta1` API version which was deprecated in Kubernetes `1.16` and removed in `1.22`.
This plugin was kept to ensure backwards compatibility with projects that were scaffolded with the old `"Kubebuilder 2.x"` layout and does not work with the new plugin ecosystem that was introduced with Kubebuilder `3.0.0` [More info](plugins.md)

Since `28 Apr 2021`, the default layout produced by Kubebuilder changed and is done via the `go/v3`.
We encourage you migrate your project to the latest version if your project was built with a Kubebuilder
Expand Down
8 changes: 4 additions & 4 deletions pkg/plugins/golang/v2/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ func (p Plugin) GetEditSubcommand() plugin.EditSubcommand { return &p.editSubcom

func (p Plugin) DeprecationWarning() string {
return "This version is deprecated and is no longer scaffolded by default since `28 Apr 2021`." +
"The `go/v2` plugin cannot scaffold solutions which uses CRD and/or Webhooks using the v1 API version." +
"Be aware that v1beta1 API for CRDs and Webhooks were deprecated on Kubernetes 1.16 and are" +
"no longer offered since its 1.22 release. Therefore, since this plugin cannot produce projects which" +
"are workable for Kubernetes versions >= 1.22 it is recommended upgrade your project " +
"The `go/v2` plugin cannot scaffold projects in which CRDs and/or Webhooks have a `v1` API version." +
"Be aware that v1beta1 API for CRDs and Webhooks was deprecated on Kubernetes 1.16 and are" +
"removed as of the Kubernetes 1.22 release. Therefore, since this plugin cannot produce projects that" +
"work on Kubernetes versions >= 1.22, it is recommended to upgrade your project " +
"to the latest versions available."
}

0 comments on commit 44ee14b

Please sign in to comment.