Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ (go/v3) deprecate go/v3 in favor of go/v4 #3238

Merged
merged 3 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
17 changes: 15 additions & 2 deletions docs/book/src/plugins/go-v3-plugin.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# go/v3 (go.kubebuilder.io/v3)
# [Deprecated] go/v3 (go.kubebuilder.io/v3)

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

The `go/v3` cannot fully support Kubernetes 1.25+ and work with Kustomize versions > v3.

The recommended way to migrate a `v3` project is to create a new `v4` project and copy over the API
and the reconciliation code. The conversion will end up with a project that looks like a native `v4` project.
For further information check the [Migration guide](../migration/migration_guide_gov3_to_gov4.md)

</aside>


Kubebuilder tool will scaffold the go/v3 plugin by default. This plugin is a composition of the plugins ` kustomize.common.kubebuilder.io/v1` and `base.go.kubebuilder.io/v3`. By using you can scaffold the default project which is a helper to construct sets of [controllers][controller-runtime].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this plugin still the default until the go/v4 plugin is stabilized?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it changes in another PR, see: #3237

Here we are only deprecating.


Expand All @@ -23,8 +35,9 @@ As `go/v3` is the default plugin there is no need to explicitly mention to Kubeb
To create a new project with the `go/v3` plugin the following command can be used:

```sh
kubebuilder init --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project
kubebuilder init --plugins=`go/v3` --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project
```

All the other subcommands supported by the go/v3 plugin can be executed similarly.

<aside class="note">
Expand Down
8 changes: 8 additions & 0 deletions pkg/plugins/golang/v4/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,11 @@ func (p Plugin) GetCreateWebhookSubcommand() plugin.CreateWebhookSubcommand {

// GetEditSubcommand will return the subcommand which is responsible for editing the scaffold of the project
func (p Plugin) GetEditSubcommand() plugin.EditSubcommand { return &p.editSubcommand }

func (p Plugin) DeprecationWarning() string {
return "This version is deprecated." +
"The `go/v3` cannot scaffold projects using kustomize versions v4x+" +
" and cannot be whole support on Kubernetes 1.25+." +
camilamacedo86 marked this conversation as resolved.
Show resolved Hide resolved
"It is recommended to upgrade your project to the latest versions available (go/v4)." +
"Please, check the migration guide to learn how to upgrade your project"
}