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

kubernetes-sigs / kubebuilder / 21794733234

08 Feb 2026 07:59AM UTC coverage: 73.272% (-0.7%) from 73.954%
21794733234

push

github

web-flow
Merge pull request #5448 from camilamacedo86/help-fix

🐛 fix(CLI/API) prevent --help from being validated as plugin name

116 of 220 new or added lines in 15 files covered. (52.73%)

3 existing lines in 1 file now uncovered.

6826 of 9316 relevant lines covered (73.27%)

43.28 hits per line

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

18.18
/pkg/plugins/optional/grafana/v1alpha/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 v1alpha
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
const pluginName = "grafana." + plugins.DefaultNameQualifier
28

29
var (
30
        pluginVersion            = plugin.Version{Number: 1, Stage: stage.Alpha}
31
        supportedProjectVersions = []config.Version{cfgv3.Version}
32
)
33

34
// Plugin implements the plugin.Full interface
35
type Plugin struct {
36
        initSubcommand
37
        editSubcommand
38
}
39

40
var _ plugin.Init = Plugin{}
41

42
// Name returns the name of the plugin
43
func (Plugin) Name() string { return pluginName }
11✔
44

45
// Version returns the version of the grafana plugin
46
func (Plugin) Version() plugin.Version { return pluginVersion }
15✔
47

48
// SupportedProjectVersions returns an array with all project versions supported by the plugin
49
func (Plugin) SupportedProjectVersions() []config.Version { return supportedProjectVersions }
×
50

51
// GetInitSubcommand will return the subcommand which is responsible for initializing and scaffolding grafana manifests
52
func (p Plugin) GetInitSubcommand() plugin.InitSubcommand { return &p.initSubcommand }
×
53

54
// GetEditSubcommand will return the subcommand which is responsible for adding grafana manifests
55
func (p Plugin) GetEditSubcommand() plugin.EditSubcommand { return &p.editSubcommand }
×
56

57
type pluginConfig struct{}
58

59
// Description returns a short description of the plugin
NEW
60
func (Plugin) Description() string {
×
NEW
61
        return "Generates Grafana Dashboards for metrics"
×
NEW
62
}
×
63

64
// DeprecationWarning define the deprecation message or return empty when plugin is not deprecated
65
func (p Plugin) DeprecationWarning() string {
×
66
        return ""
×
67
}
×
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