From 45dd5b736dad53bd56544c98cc4a8c8f7ebcadbc Mon Sep 17 00:00:00 2001 From: Shuting Zhao Date: Tue, 1 Dec 2020 12:52:17 -0800 Subject: [PATCH] update short names, scope --- charts/kyverno/crds/crds.yaml | 2 ++ definitions/crds/kyverno.io_clusterreportchangerequests.yaml | 4 +--- pkg/api/kyverno/v1alpha1/clusterreportchangerequest_types.go | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/charts/kyverno/crds/crds.yaml b/charts/kyverno/crds/crds.yaml index ccce01697480..3366fd86ed4f 100644 --- a/charts/kyverno/crds/crds.yaml +++ b/charts/kyverno/crds/crds.yaml @@ -2374,6 +2374,8 @@ spec: kind: ReportChangeRequest listKind: ReportChangeRequestList plural: reportchangerequests + shortNames: + - rcr singular: reportchangerequest scope: Namespaced versions: diff --git a/definitions/crds/kyverno.io_clusterreportchangerequests.yaml b/definitions/crds/kyverno.io_clusterreportchangerequests.yaml index 52dd11cade25..ff5e85728a1e 100644 --- a/definitions/crds/kyverno.io_clusterreportchangerequests.yaml +++ b/definitions/crds/kyverno.io_clusterreportchangerequests.yaml @@ -13,10 +13,8 @@ spec: kind: ClusterReportChangeRequest listKind: ClusterReportChangeRequestList plural: clusterreportchangerequests - shortNames: - - crcr singular: clusterreportchangerequest - scope: Namespaced + scope: Cluster versions: - additionalPrinterColumns: - jsonPath: .scope.kind diff --git a/pkg/api/kyverno/v1alpha1/clusterreportchangerequest_types.go b/pkg/api/kyverno/v1alpha1/clusterreportchangerequest_types.go index 8a553a129844..4234cfe2a332 100644 --- a/pkg/api/kyverno/v1alpha1/clusterreportchangerequest_types.go +++ b/pkg/api/kyverno/v1alpha1/clusterreportchangerequest_types.go @@ -30,7 +30,7 @@ import ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +genclient:nonNamespaced // +kubebuilder:object:root=true -// +kubebuilder:resource:path=clusterreportchangerequests,scope="Cluster" +// +kubebuilder:resource:path=clusterreportchangerequests // +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=`.scope.kind`,priority=1 // +kubebuilder:printcolumn:name="Name",type=string,JSONPath=`.scope.name`,priority=1 // +kubebuilder:printcolumn:name="Pass",type=integer,JSONPath=`.summary.pass` @@ -40,6 +40,7 @@ import ( // +kubebuilder:printcolumn:name="Skip",type=integer,JSONPath=`.summary.skip` // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:resource:shortName=crcr +// +kubebuilder:resource:scope=Cluster type ClusterReportChangeRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"`