diff --git a/api/kyverno/v1/clusterpolicy_types.go b/api/kyverno/v1/clusterpolicy_types.go index 540cfe048f..1f7ce0a4a7 100644 --- a/api/kyverno/v1/clusterpolicy_types.go +++ b/api/kyverno/v1/clusterpolicy_types.go @@ -13,7 +13,7 @@ import ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:resource:path=clusterpolicies,scope="Cluster",shortName=cpol +// +kubebuilder:resource:path=clusterpolicies,scope="Cluster",shortName=cpol,categories=kyverno;all // +kubebuilder:printcolumn:name="Background",type=boolean,JSONPath=".spec.background" // +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction" // +kubebuilder:printcolumn:name="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1 diff --git a/api/kyverno/v1/policy_types.go b/api/kyverno/v1/policy_types.go index 57a55ee868..7d8771431d 100755 --- a/api/kyverno/v1/policy_types.go +++ b/api/kyverno/v1/policy_types.go @@ -16,7 +16,7 @@ import ( // +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction" // +kubebuilder:printcolumn:name="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1 // +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready` -// +kubebuilder:resource:shortName=pol +// +kubebuilder:resource:shortName=pol,categories=kyverno;all // +kubebuilder:storageversion // Policy declares validation, mutation, and generation behaviors for matching resources. diff --git a/api/kyverno/v1alpha2/admission_report_types.go b/api/kyverno/v1alpha2/admission_report_types.go index 0575f2c288..e6bd3e0db6 100644 --- a/api/kyverno/v1alpha2/admission_report_types.go +++ b/api/kyverno/v1alpha2/admission_report_types.go @@ -38,7 +38,7 @@ type AdmissionReportSpec struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion -// +kubebuilder:resource:shortName=admr +// +kubebuilder:resource:shortName=admr,categories=kyverno;all // +kubebuilder:printcolumn:name="ApiVersion",type=string,JSONPath=".metadata.ownerReferences[0].apiVersion",priority=1 // +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=".metadata.ownerReferences[0].kind",priority=1 // +kubebuilder:printcolumn:name="Subject",type=string,JSONPath=".metadata.ownerReferences[0].name",priority=1 @@ -74,7 +74,7 @@ func (r *AdmissionReport) SetSummary(summary policyreportv1alpha2.PolicyReportSu // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion -// +kubebuilder:resource:scope=Cluster,shortName=cadmr +// +kubebuilder:resource:scope=Cluster,shortName=cadmr,categories=kyverno;all // +kubebuilder:printcolumn:name="ApiVersion",type=string,JSONPath=".metadata.ownerReferences[0].apiVersion",priority=1 // +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=".metadata.ownerReferences[0].kind",priority=1 // +kubebuilder:printcolumn:name="Subject",type=string,JSONPath=".metadata.ownerReferences[0].name",priority=1 diff --git a/api/kyverno/v1alpha2/background_scan_report_types.go b/api/kyverno/v1alpha2/background_scan_report_types.go index 30dc5ea664..d6fc524f22 100644 --- a/api/kyverno/v1alpha2/background_scan_report_types.go +++ b/api/kyverno/v1alpha2/background_scan_report_types.go @@ -35,7 +35,7 @@ type BackgroundScanReportSpec struct { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion -// +kubebuilder:resource:shortName=bgscanr +// +kubebuilder:resource:shortName=bgscanr,categories=kyverno;all // +kubebuilder:printcolumn:name="ApiVersion",type=string,JSONPath=".metadata.ownerReferences[0].apiVersion",priority=1 // +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=".metadata.ownerReferences[0].kind",priority=1 // +kubebuilder:printcolumn:name="Subject",type=string,JSONPath=".metadata.ownerReferences[0].name",priority=1 @@ -71,7 +71,7 @@ func (r *BackgroundScanReport) SetSummary(summary policyreportv1alpha2.PolicyRep // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:storageversion -// +kubebuilder:resource:scope=Cluster,shortName=cbgscanr +// +kubebuilder:resource:scope=Cluster,shortName=cbgscanr,categories=kyverno;all // +kubebuilder:printcolumn:name="ApiVersion",type=string,JSONPath=".metadata.ownerReferences[0].apiVersion",priority=1 // +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=".metadata.ownerReferences[0].kind",priority=1 // +kubebuilder:printcolumn:name="Subject",type=string,JSONPath=".metadata.ownerReferences[0].name",priority=1 diff --git a/api/kyverno/v1beta1/updaterequest_types.go b/api/kyverno/v1beta1/updaterequest_types.go index 335d88384f..25bcc3b211 100644 --- a/api/kyverno/v1beta1/updaterequest_types.go +++ b/api/kyverno/v1beta1/updaterequest_types.go @@ -51,7 +51,7 @@ type UpdateRequestStatus struct { // +kubebuilder:printcolumn:name="ResourceNamespace",type="string",JSONPath=".spec.resource.namespace" // +kubebuilder:printcolumn:name="status",type="string",JSONPath=".status.state" // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:resource:shortName=ur +// +kubebuilder:resource:shortName=ur,categories=kyverno;all // UpdateRequest is a request to process mutate and generate rules in background. type UpdateRequest struct { diff --git a/api/kyverno/v2beta1/clusterpolicy_types.go b/api/kyverno/v2beta1/clusterpolicy_types.go index a75dcc22cd..53361b8b73 100644 --- a/api/kyverno/v2beta1/clusterpolicy_types.go +++ b/api/kyverno/v2beta1/clusterpolicy_types.go @@ -14,7 +14,7 @@ import ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:resource:path=clusterpolicies,scope="Cluster",shortName=cpol +// +kubebuilder:resource:path=clusterpolicies,scope="Cluster",shortName=cpol,categories=kyverno;all // +kubebuilder:printcolumn:name="Background",type=boolean,JSONPath=".spec.background" // +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction" // +kubebuilder:printcolumn:name="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1 diff --git a/api/kyverno/v2beta1/policy_types.go b/api/kyverno/v2beta1/policy_types.go index 1901fdb029..ba8ad93dbd 100755 --- a/api/kyverno/v2beta1/policy_types.go +++ b/api/kyverno/v2beta1/policy_types.go @@ -17,7 +17,7 @@ import ( // +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction" // +kubebuilder:printcolumn:name="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1 // +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready` -// +kubebuilder:resource:shortName=pol +// +kubebuilder:resource:shortName=pol,categories=kyverno;all // Policy declares validation, mutation, and generation behaviors for matching resources. // See: https://kyverno.io/docs/writing-policies/ for more information. diff --git a/charts/kyverno/templates/crds.yaml b/charts/kyverno/templates/crds.yaml index ad2afedd1b..cf4f47dd50 100644 --- a/charts/kyverno/templates/crds.yaml +++ b/charts/kyverno/templates/crds.yaml @@ -17,6 +17,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: AdmissionReport listKind: AdmissionReportList plural: admissionreports @@ -275,6 +278,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: BackgroundScanReport listKind: BackgroundScanReportList plural: backgroundscanreports @@ -503,6 +509,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: ClusterAdmissionReport listKind: ClusterAdmissionReportList plural: clusteradmissionreports @@ -761,6 +770,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: ClusterBackgroundScanReport listKind: ClusterBackgroundScanReportList plural: clusterbackgroundscanreports @@ -989,6 +1001,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: ClusterPolicy listKind: ClusterPolicyList plural: clusterpolicies @@ -8570,6 +8585,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: Policy listKind: PolicyList plural: policies @@ -15976,6 +15994,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: UpdateRequest listKind: UpdateRequestList plural: updaterequests diff --git a/config/crds/kyverno.io_admissionreports.yaml b/config/crds/kyverno.io_admissionreports.yaml index 4960930f7a..6f52841b62 100644 --- a/config/crds/kyverno.io_admissionreports.yaml +++ b/config/crds/kyverno.io_admissionreports.yaml @@ -9,6 +9,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: AdmissionReport listKind: AdmissionReportList plural: admissionreports diff --git a/config/crds/kyverno.io_backgroundscanreports.yaml b/config/crds/kyverno.io_backgroundscanreports.yaml index 26a7e95fde..589a3b2c39 100644 --- a/config/crds/kyverno.io_backgroundscanreports.yaml +++ b/config/crds/kyverno.io_backgroundscanreports.yaml @@ -9,6 +9,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: BackgroundScanReport listKind: BackgroundScanReportList plural: backgroundscanreports diff --git a/config/crds/kyverno.io_clusteradmissionreports.yaml b/config/crds/kyverno.io_clusteradmissionreports.yaml index 5d58d6a0ae..2d9eddf5ca 100644 --- a/config/crds/kyverno.io_clusteradmissionreports.yaml +++ b/config/crds/kyverno.io_clusteradmissionreports.yaml @@ -9,6 +9,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: ClusterAdmissionReport listKind: ClusterAdmissionReportList plural: clusteradmissionreports diff --git a/config/crds/kyverno.io_clusterbackgroundscanreports.yaml b/config/crds/kyverno.io_clusterbackgroundscanreports.yaml index b31f1c19db..4cc68a4019 100644 --- a/config/crds/kyverno.io_clusterbackgroundscanreports.yaml +++ b/config/crds/kyverno.io_clusterbackgroundscanreports.yaml @@ -9,6 +9,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: ClusterBackgroundScanReport listKind: ClusterBackgroundScanReportList plural: clusterbackgroundscanreports diff --git a/config/crds/kyverno.io_clusterpolicies.yaml b/config/crds/kyverno.io_clusterpolicies.yaml index 0ff9e4d72b..884692494f 100644 --- a/config/crds/kyverno.io_clusterpolicies.yaml +++ b/config/crds/kyverno.io_clusterpolicies.yaml @@ -9,6 +9,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: ClusterPolicy listKind: ClusterPolicyList plural: clusterpolicies diff --git a/config/crds/kyverno.io_policies.yaml b/config/crds/kyverno.io_policies.yaml index de2de6e29f..b6b5277202 100644 --- a/config/crds/kyverno.io_policies.yaml +++ b/config/crds/kyverno.io_policies.yaml @@ -9,6 +9,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: Policy listKind: PolicyList plural: policies diff --git a/config/crds/kyverno.io_updaterequests.yaml b/config/crds/kyverno.io_updaterequests.yaml index f3954fdfb0..125db812e6 100644 --- a/config/crds/kyverno.io_updaterequests.yaml +++ b/config/crds/kyverno.io_updaterequests.yaml @@ -9,6 +9,9 @@ metadata: spec: group: kyverno.io names: + categories: + - kyverno + - all kind: UpdateRequest listKind: UpdateRequestList plural: updaterequests