• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / kubebuilder / 21644195158

03 Feb 2026 07:17PM UTC coverage: 66.682% (-7.2%) from 73.852%
21644195158

Pull #5352

github

camilamacedo86
(chore) Add delete interface and implementation for all options

Add delete functionality to remove APIs and webhooks from projects.
Users can now clean up scaffolded resources.
Pull Request #5352: ✨ Added Delete API and implemented a unified interface across all commands and plugin options

394 of 1568 new or added lines in 21 files covered. (25.13%)

1 existing line in 1 file now uncovered.

7069 of 10601 relevant lines covered (66.68%)

37.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/pkg/plugins/common/kustomize/v2/plugin.go
1
/*
2
Copyright 2022 The Kubernetes Authors.
3

4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7

8
    http://www.apache.org/licenses/LICENSE-2.0
9

10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16

17
package v2
18

19
import (
20
        "sigs.k8s.io/kubebuilder/v4/pkg/config"
21
        cfgv3 "sigs.k8s.io/kubebuilder/v4/pkg/config/v3"
22
        "sigs.k8s.io/kubebuilder/v4/pkg/model/stage"
23
        "sigs.k8s.io/kubebuilder/v4/pkg/plugin"
24
        "sigs.k8s.io/kubebuilder/v4/pkg/plugins"
25
)
26

27
// KustomizeVersion is the kubernetes-sigs/kustomize version to be used in the project
28
const KustomizeVersion = "v5.8.0"
29

30
const pluginName = "kustomize.common." + plugins.DefaultNameQualifier
31

32
var (
33
        pluginVersion            = plugin.Version{Number: 2, Stage: stage.Stable}
34
        supportedProjectVersions = []config.Version{cfgv3.Version}
35
)
36

37
var (
38
        _ plugin.Init          = Plugin{}
39
        _ plugin.CreateAPI     = Plugin{}
40
        _ plugin.CreateWebhook = Plugin{}
41
        _ plugin.DeleteAPI     = Plugin{}
42
        _ plugin.DeleteWebhook = Plugin{}
43
)
44

45
// Plugin implements the plugin.Full interface
46
type Plugin struct {
47
        initSubcommand
48
        createAPISubcommand
49
        createWebhookSubcommand
50
        deleteAPISubcommand
51
        deleteWebhookSubcommand
52
}
53

54
// Name returns the name of the plugin
55
func (Plugin) Name() string { return pluginName }
×
56

57
// Version returns the version of the plugin
58
func (Plugin) Version() plugin.Version { return pluginVersion }
1✔
59

60
// SupportedProjectVersions returns an array with all project versions supported by the plugin
61
func (Plugin) SupportedProjectVersions() []config.Version { return supportedProjectVersions }
1✔
62

63
// GetInitSubcommand will return the subcommand which is responsible for scaffolding init project
64
func (p Plugin) GetInitSubcommand() plugin.InitSubcommand { return &p.initSubcommand }
×
65

66
// GetCreateAPISubcommand will return the subcommand which is responsible for scaffolding apis
67
func (p Plugin) GetCreateAPISubcommand() plugin.CreateAPISubcommand { return &p.createAPISubcommand }
×
68

69
// GetCreateWebhookSubcommand will return the subcommand which is responsible for scaffolding webhooks
70
func (p Plugin) GetCreateWebhookSubcommand() plugin.CreateWebhookSubcommand {
×
71
        return &p.createWebhookSubcommand
×
72
}
×
73

74
// GetDeleteAPISubcommand will return the subcommand which is responsible for cleaning up API kustomize files
NEW
75
func (p Plugin) GetDeleteAPISubcommand() plugin.DeleteAPISubcommand { return &p.deleteAPISubcommand }
×
76

77
// GetDeleteWebhookSubcommand will return the subcommand which is responsible for cleaning up webhook kustomize files
NEW
78
func (p Plugin) GetDeleteWebhookSubcommand() plugin.DeleteWebhookSubcommand {
×
NEW
79
        return &p.deleteWebhookSubcommand
×
NEW
80
}
×
81

82
// DeprecationWarning define the deprecation message or return empty when plugin is not deprecated
83
func (p Plugin) DeprecationWarning() string {
1✔
84
        return ""
1✔
85
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc