1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix: add more infos in reports printers (#5027)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-10-18 09:56:14 +02:00 committed by GitHub
parent 382c8c4ca0
commit 4b3a7b7da8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 88 additions and 20 deletions

View file

@ -39,8 +39,9 @@ type AdmissionReportSpec struct {
// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=admr
// +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=".spec.owner.kind",priority=1
// +kubebuilder:printcolumn:name="Subject",type=string,JSONPath=".spec.owner.name",priority=1
// +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
// +kubebuilder:printcolumn:name="Pass",type=integer,JSONPath=".spec.summary.pass"
// +kubebuilder:printcolumn:name="Fail",type=integer,JSONPath=".spec.summary.fail"
// +kubebuilder:printcolumn:name="Warn",type=integer,JSONPath=".spec.summary.warn"
@ -74,8 +75,9 @@ func (r *AdmissionReport) SetSummary(summary policyreportv1alpha2.PolicyReportSu
// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +kubebuilder:resource:scope=Cluster,shortName=cadmr
// +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=".spec.owner.kind",priority=1
// +kubebuilder:printcolumn:name="Subject",type=string,JSONPath=".spec.owner.name",priority=1
// +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
// +kubebuilder:printcolumn:name="Pass",type=integer,JSONPath=".spec.summary.pass"
// +kubebuilder:printcolumn:name="Fail",type=integer,JSONPath=".spec.summary.fail"
// +kubebuilder:printcolumn:name="Warn",type=integer,JSONPath=".spec.summary.warn"

View file

@ -36,6 +36,7 @@ type BackgroundScanReportSpec struct {
// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=bgscanr
// +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
// +kubebuilder:printcolumn:name="Pass",type=integer,JSONPath=".spec.summary.pass"
@ -71,6 +72,7 @@ func (r *BackgroundScanReport) SetSummary(summary policyreportv1alpha2.PolicyRep
// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +kubebuilder:resource:scope=Cluster,shortName=cbgscanr
// +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
// +kubebuilder:printcolumn:name="Pass",type=integer,JSONPath=".spec.summary.pass"

View file

@ -26,11 +26,15 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string
@ -280,6 +284,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
@ -504,11 +512,15 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string
@ -758,6 +770,10 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1

View file

@ -18,11 +18,15 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string

View file

@ -18,6 +18,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1

View file

@ -18,11 +18,15 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string

View file

@ -18,6 +18,10 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1

View file

@ -35,11 +35,15 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string
@ -372,6 +376,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
@ -673,11 +681,15 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string
@ -1011,6 +1023,10 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1

View file

@ -33,11 +33,15 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string
@ -369,6 +373,10 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
@ -669,11 +677,15 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.owner.kind
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1
type: string
- jsonPath: .spec.owner.name
- jsonPath: .metadata.ownerReferences[0].name
name: Subject
priority: 1
type: string
@ -1006,6 +1018,10 @@ spec:
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.ownerReferences[0].apiVersion
name: ApiVersion
priority: 1
type: string
- jsonPath: .metadata.ownerReferences[0].kind
name: Kind
priority: 1