Skip to content

Commit f4ffb98

Browse files
⚠️ adds deprecation of declarative plugin
1 parent a361294 commit f4ffb98

File tree

65 files changed

+39
-2742
lines changed

Some content is hidden

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

65 files changed

+39
-2742
lines changed

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
# Declarative Plugin
1+
# [Deprecated] Declarative Plugin
2+
3+
<aside class="note warning">
4+
<h1>Notice of Deprecation</h1>
5+
6+
The Declarative plugin is an implementation derived from the [kubebuilder-declarative-pattern][kubebuilder-declarative-pattern] project.
7+
As the project maintainers possess the most comprehensive knowledge about its changes and Kubebuilder allows
8+
the creation of custom plugins using its library, it has been decided that this plugin will be better
9+
maintained within the [kubebuilder-declarative-pattern][kubebuilder-declarative-pattern] project itself,
10+
which falls under its domain of responsibility. This decision aims to improve the maintainability of both the
11+
plugin and Kubebuilder, ultimately providing an enhanced user experience. To follow up on this work, please refer
12+
to [Issue #293](https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/issues/293) in the
13+
kubebuilder-declarative-pattern repository.
14+
15+
</aside>
216

317
The declarative plugin allows you to create [controllers][controller-runtime] using the [kubebuilder-declarative-pattern][kubebuilder-declarative-pattern].
418
By using the declarative plugin, you can make the required changes on top of what is scaffolded by default when you create a Go project with Kubebuilder and the Golang plugins (i.e. go/v2, go/v3).

docs/book/src/plugins/to-add-optional-features.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
The following plugins are useful to generate code and take advantage of optional features
44

5-
| Plugin | Key | Description |
6-
| ---------------------------------------------------------------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7-
| [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. |
8-
| [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. |
9-
| [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). |
5+
| Plugin | Key | Description |
6+
|-------------------------------------------------------------------------| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7+
| [declarative.go.kubebuilder.io/v1 - (Deprecated) ](declarative-v1.md) | `declarative/v1` | Optional plugin used to scaffold APIs/controllers using the [kubebuilder-declarative-pattern][kubebuilder-declarative-pattern] project. |
8+
| [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. |
9+
| [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). |

pkg/plugins/golang/declarative/v1/plugin.go

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
// Deprecated: The declarative plugin has been deprecated.
18+
// The Declarative plugin is an implementation derived from the kubebuilder-declarative-pattern project.
19+
// As the project maintainers possess the most comprehensive knowledge about its changes and Kubebuilder
20+
// allows the creation of custom plugins using its library, it has been decided that this plugin will be
21+
// better maintained within the kubebuilder-declarative-pattern project
22+
// itself, which falls under its domain of responsibility. This decision aims to improve the maintainability
23+
// of both the plugin and Kubebuilder, ultimately providing an enhanced user experience.
24+
// To follow up on this work, please refer to the Issue #293:
25+
// https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/issues/293.
1726
package v1
1827

1928
import (
@@ -61,5 +70,13 @@ type pluginConfig struct {
6170
}
6271

6372
func (p Plugin) DeprecationWarning() string {
64-
return ""
73+
return "The declarative plugin has been deprecated. \n" +
74+
"The Declarative plugin is an implementation derived from the kubebuilder-declarative-pattern project. " +
75+
"As the project maintainers possess the most comprehensive knowledge about its changes and Kubebuilder " +
76+
"allows the creation of custom plugins using its library, it has been decided that this plugin will be " +
77+
"better maintained within the kubebuilder-declarative-pattern project " +
78+
"itself, which falls under its domain of responsibility. This decision aims to improve the maintainability " +
79+
"of both the plugin and Kubebuilder, ultimately providing an enhanced user experience." +
80+
"To follow up on this work, please refer to the Issue #293: " +
81+
"https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/issues/293."
6582
}

test/testdata/generate.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ function scaffold_test_project {
112112

113113
header_text 'Editing project with Grafana plugin ...'
114114
$kb edit --plugins=grafana.kubebuilder.io/v1-alpha
115-
elif [[ $project =~ declarative ]]; then
116-
header_text 'Creating APIs ...'
117-
$kb create api --group crew --version v1 --kind Captain --controller=true --resource=true --make=false
118-
$kb create api --group crew --version v1 --kind FirstMate --controller=true --resource=true --make=false
119-
$kb create api --group crew --version v1 --kind Admiral --controller=true --resource=true --namespaced=false --make=false
115+
120116
elif [[ $project =~ deploy-image ]]; then
121117
header_text 'Creating Memcached API with deploy-image plugin ...'
122118
$kb create api --group example.com --version v1alpha1 --kind Memcached --image=memcached:1.4.36-alpine --image-container-command="memcached,-m=64,-o,modern,-v" --image-container-port="11211" --run-as-user="1001" --plugins="deploy-image/v1-alpha" --make=false
@@ -145,6 +141,5 @@ scaffold_test_project project-v3 --plugins="go/v3"
145141
# [Currently, default CLI plugin] - [Next version, alpha] Project version v4-alpha
146142
scaffold_test_project project-v4 --plugins="go/v4"
147143
scaffold_test_project project-v4-multigroup --plugins="go/v4"
148-
scaffold_test_project project-v4-declarative-v1 --plugins="go/v4,declarative"
149144
scaffold_test_project project-v4-with-deploy-image --plugins="go/v4"
150145
scaffold_test_project project-v4-with-grafana --plugins="go/v4"

test/testdata/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ build_kb
3333
# Project version v4-alpha
3434
test_project project-v4
3535
test_project project-v4-multigroup
36-
test_project project-v4-declarative-v1
3736
test_project project-v4-with-deploy-image
3837
test_project project-v4-with-grafana

testdata/project-v4-declarative-v1/.dockerignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

testdata/project-v4-declarative-v1/.gitignore

Lines changed: 0 additions & 26 deletions
This file was deleted.

testdata/project-v4-declarative-v1/Dockerfile

Lines changed: 0 additions & 40 deletions
This file was deleted.

testdata/project-v4-declarative-v1/Makefile

Lines changed: 0 additions & 163 deletions
This file was deleted.

testdata/project-v4-declarative-v1/PROJECT

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)