aboutsummaryrefslogtreecommitdiffstats
path: root/src/monitor/pkg/apis/k8splugin/v1alpha1
diff options
context:
space:
mode:
Diffstat (limited to 'src/monitor/pkg/apis/k8splugin/v1alpha1')
-rw-r--r--src/monitor/pkg/apis/k8splugin/v1alpha1/register.go13
-rw-r--r--src/monitor/pkg/apis/k8splugin/v1alpha1/types.go1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/monitor/pkg/apis/k8splugin/v1alpha1/register.go b/src/monitor/pkg/apis/k8splugin/v1alpha1/register.go
index ee2af820..7d3334a9 100644
--- a/src/monitor/pkg/apis/k8splugin/v1alpha1/register.go
+++ b/src/monitor/pkg/apis/k8splugin/v1alpha1/register.go
@@ -16,4 +16,17 @@ var (
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
+
+ // AddToScheme is a global function variable that registers this API
+ AddToScheme = SchemeBuilder.AddToScheme
)
+
+// Kind takes an unqualified kind and returns back a Group qualified GroupKind
+func Kind(kind string) schema.GroupKind {
+ return SchemeGroupVersion.WithKind(kind).GroupKind()
+}
+
+// Resource takes an unqualified resource and returns a Group qualified GroupResource
+func Resource(resource string) schema.GroupResource {
+ return SchemeGroupVersion.WithResource(resource).GroupResource()
+}
diff --git a/src/monitor/pkg/apis/k8splugin/v1alpha1/types.go b/src/monitor/pkg/apis/k8splugin/v1alpha1/types.go
index 22dfdd25..30fe1dd2 100644
--- a/src/monitor/pkg/apis/k8splugin/v1alpha1/types.go
+++ b/src/monitor/pkg/apis/k8splugin/v1alpha1/types.go
@@ -10,6 +10,7 @@ import (
// ResourceBundleState is the Schema for the ResourceBundleStatees API
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
+// +genclient
type ResourceBundleState struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`