Skip to content

Commit 5a7e207

Browse files
⚠️ remove kustomize/v1, go/v2 and go/v3, and configurations for Project Config v2 related to legacy Kubebuilder CLI version < 3 (#3763)
⚠️ remove kustomize/v1, go/v2 and go/v3configurations as Project Config v2 from legacy Kubebuilder CLI version < 3
1 parent ce113d2 commit 5a7e207

File tree

219 files changed

+64
-12373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+64
-12373
lines changed

cmd/main.go

+4-27
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ import (
2020
"github.com/sirupsen/logrus"
2121
"github.com/spf13/afero"
2222
"sigs.k8s.io/kubebuilder/v3/pkg/cli"
23-
cfgv2 "sigs.k8s.io/kubebuilder/v3/pkg/config/v2"
2423
cfgv3 "sigs.k8s.io/kubebuilder/v3/pkg/config/v3"
2524
"sigs.k8s.io/kubebuilder/v3/pkg/machinery"
2625
"sigs.k8s.io/kubebuilder/v3/pkg/plugin"
27-
kustomizecommonv1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v1"
28-
kustomizecommonv2alpha "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2"
26+
kustomizecommonv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/common/kustomize/v2"
2927
"sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang"
3028

3129
//nolint:staticcheck
3230
declarativev1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/declarative/v1"
3331
deployimagev1alpha1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/deploy-image/v1alpha1"
34-
golangv2 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v2"
35-
golangv3 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v3"
3632
golangv4 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/golang/v4"
3733
grafanav1alpha1 "sigs.k8s.io/kubebuilder/v3/pkg/plugins/optional/grafana/v1alpha"
3834
)
@@ -43,24 +39,10 @@ func init() {
4339
}
4440

4541
func main() {
46-
47-
const deprecateMessageGoV3Bundle = "This version is deprecated." +
48-
"The `go/v3` cannot scaffold projects using kustomize versions v4x+" +
49-
" and cannot fully support Kubernetes 1.25+." +
50-
"It is recommended to upgrade your project to the latest versions available (go/v4)." +
51-
"Please, check the migration guide to learn how to upgrade your project"
52-
53-
// Bundle plugin which built the golang projects scaffold by Kubebuilder go/v3
54-
gov3Bundle, _ := plugin.NewBundleWithOptions(plugin.WithName(golang.DefaultNameQualifier),
55-
plugin.WithVersion(plugin.Version{Number: 3}),
56-
plugin.WithDeprecationMessage(deprecateMessageGoV3Bundle),
57-
plugin.WithPlugins(kustomizecommonv1.Plugin{}, golangv3.Plugin{}),
58-
)
59-
60-
// Bundle plugin which built the golang projects scaffold by Kubebuilder go/v4 with kustomize alpha-v2
42+
// Bundle plugin which built the golang projects scaffold by Kubebuilder go/v4 with kustomize v2
6143
gov4Bundle, _ := plugin.NewBundleWithOptions(plugin.WithName(golang.DefaultNameQualifier),
6244
plugin.WithVersion(plugin.Version{Number: 4}),
63-
plugin.WithPlugins(kustomizecommonv2alpha.Plugin{}, golangv4.Plugin{}),
45+
plugin.WithPlugins(kustomizecommonv2.Plugin{}, golangv4.Plugin{}),
6446
)
6547

6648
fs := machinery.Filesystem{
@@ -75,19 +57,14 @@ func main() {
7557
cli.WithCommandName("kubebuilder"),
7658
cli.WithVersion(versionString()),
7759
cli.WithPlugins(
78-
golangv2.Plugin{},
79-
golangv3.Plugin{},
8060
golangv4.Plugin{},
81-
gov3Bundle,
8261
gov4Bundle,
83-
&kustomizecommonv1.Plugin{},
84-
&kustomizecommonv2alpha.Plugin{},
62+
&kustomizecommonv2.Plugin{},
8563
&declarativev1.Plugin{},
8664
&deployimagev1alpha1.Plugin{},
8765
&grafanav1alpha1.Plugin{},
8866
),
8967
cli.WithPlugins(externalPlugins...),
90-
cli.WithDefaultPlugins(cfgv2.Version, golangv2.Plugin{}),
9168
cli.WithDefaultPlugins(cfgv3.Version, gov4Bundle),
9269
cli.WithDefaultProjectVersion(cfgv3.Version),
9370
cli.WithCompletion(),

docs/book/src/SUMMARY.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,13 @@
114114

115115
- [Available Plugins](./plugins/available-plugins.md)
116116
- [To scaffold a project](./plugins/to-scaffold-project.md)
117-
- [go/v2 (Deprecated)](./plugins/go-v2-plugin.md)
118-
- [go/v3 (Deprecated)](./plugins/go-v3-plugin.md)
119117
- [go/v4 (Default init scaffold)](./plugins/go-v4-plugin.md)
120118
- [To add optional features](./plugins/to-add-optional-features.md)
121119
- [declarative/v1 (Deprecated)](./plugins/declarative-v1.md)
122120
- [grafana/v1-alpha](./plugins/grafana-v1-alpha.md)
123121
- [deploy-image/v1-alpha](./plugins/deploy-image-plugin-v1-alpha.md)
124122
- [To be extended for others tools](./plugins/to-be-extended.md)
125-
- [kustomize/v1 (Deprecated)](./plugins/kustomize-v1.md)
126-
- [kustomize/v2](./plugins/kustomize-v2.md)
123+
- [kustomize/v2 (Default init scaffold with go/v4)](./plugins/kustomize-v2.md)
127124
- [Extending the CLI](./plugins/extending-cli.md)
128125
- [Creating your own plugins](./plugins/creating-plugins.md)
129126
- [Testing your own plugins](./plugins/testing-plugins.md)

docs/book/src/plugins/go-v2-plugin.md

-75
This file was deleted.

docs/book/src/plugins/go-v3-plugin.md

-70
This file was deleted.

docs/book/src/plugins/kustomize-v1.md

-124
This file was deleted.

docs/book/src/plugins/to-scaffold-project.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
The following plugins are useful to scaffold the whole project with the tool.
44

5-
| Plugin | Key | Description |
6-
| ---------------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7-
| [go.kubebuilder.io/v2 - (Deprecated)](go-v2-plugin.md) | `go/v2` | Golang plugin responsible for scaffolding the legacy layout provided with Kubebuilder CLI >= `2.0.0` and < `3.0.0`. |
8-
| [go.kubebuilder.io/v3 - (Default scaffold with Kubebuilder init)](go-v3-plugin.md) | `go/v3` | Default scaffold used for creating a project when no plugin(s) are provided. Responsible for scaffolding Golang projects and its configurations. |
9-
| [go.kubebuilder.io/v4-alpha - (Add Apple Silicon Support)](go-v4-plugin.md) | `go/v4` | Scaffold composite by `base.go.kubebuilder.io/v3` and [kustomize.common.kubebuilder.io/v2](kustomize-v2.md). Responsible for scaffolding Golang projects and its configurations. |
5+
| Plugin | Key | Description |
6+
|------------------------------------------------------------------------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7+
| [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. |

0 commit comments

Comments
 (0)