mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-15 04:07:46 +00:00
Add AGE in printer columns of CRDs (#5119)
* Add AGE in printer columns of CRDs Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com> * codegen Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
cbbd8488c8
commit
8eb1d3988c
9 changed files with 94 additions and 0 deletions
|
@ -18,6 +18,7 @@ import (
|
||||||
// +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction"
|
// +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="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1
|
||||||
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
||||||
|
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||||
// +kubebuilder:storageversion
|
// +kubebuilder:storageversion
|
||||||
|
|
||||||
// ClusterPolicy declares validation, mutation, and generation behaviors for matching resources.
|
// ClusterPolicy declares validation, mutation, and generation behaviors for matching resources.
|
||||||
|
|
1
api/kyverno/v1/policy_types.go
Executable file → Normal file
1
api/kyverno/v1/policy_types.go
Executable file → Normal file
|
@ -16,6 +16,7 @@ import (
|
||||||
// +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction"
|
// +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="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1
|
||||||
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
||||||
|
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||||
// +kubebuilder:resource:shortName=pol,categories=kyverno;all
|
// +kubebuilder:resource:shortName=pol,categories=kyverno;all
|
||||||
// +kubebuilder:storageversion
|
// +kubebuilder:storageversion
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ import (
|
||||||
// +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction"
|
// +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="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1
|
||||||
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
||||||
|
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||||
|
|
||||||
// ClusterPolicy declares validation, mutation, and generation behaviors for matching resources.
|
// ClusterPolicy declares validation, mutation, and generation behaviors for matching resources.
|
||||||
type ClusterPolicy struct {
|
type ClusterPolicy struct {
|
||||||
|
|
1
api/kyverno/v2beta1/policy_types.go
Executable file → Normal file
1
api/kyverno/v2beta1/policy_types.go
Executable file → Normal file
|
@ -17,6 +17,7 @@ import (
|
||||||
// +kubebuilder:printcolumn:name="Validate Action",type=string,JSONPath=".spec.validationFailureAction"
|
// +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="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1
|
||||||
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
||||||
|
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||||
// +kubebuilder:resource:shortName=pol,categories=kyverno;all
|
// +kubebuilder:resource:shortName=pol,categories=kyverno;all
|
||||||
|
|
||||||
// Policy declares validation, mutation, and generation behaviors for matching resources.
|
// Policy declares validation, mutation, and generation behaviors for matching resources.
|
||||||
|
|
|
@ -1026,6 +1026,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -4653,6 +4656,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -8610,6 +8616,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -12237,6 +12246,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
|
|
@ -34,6 +34,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -5882,6 +5885,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
|
|
@ -34,6 +34,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -5884,6 +5887,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
|
|
@ -26,6 +26,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: AdmissionReport
|
kind: AdmissionReport
|
||||||
listKind: AdmissionReportList
|
listKind: AdmissionReportList
|
||||||
plural: admissionreports
|
plural: admissionreports
|
||||||
|
@ -367,6 +370,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: BackgroundScanReport
|
kind: BackgroundScanReport
|
||||||
listKind: BackgroundScanReportList
|
listKind: BackgroundScanReportList
|
||||||
plural: backgroundscanreports
|
plural: backgroundscanreports
|
||||||
|
@ -672,6 +678,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: ClusterAdmissionReport
|
kind: ClusterAdmissionReport
|
||||||
listKind: ClusterAdmissionReportList
|
listKind: ClusterAdmissionReportList
|
||||||
plural: clusteradmissionreports
|
plural: clusteradmissionreports
|
||||||
|
@ -1014,6 +1023,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: ClusterBackgroundScanReport
|
kind: ClusterBackgroundScanReport
|
||||||
listKind: ClusterBackgroundScanReportList
|
listKind: ClusterBackgroundScanReportList
|
||||||
plural: clusterbackgroundscanreports
|
plural: clusterbackgroundscanreports
|
||||||
|
@ -1319,6 +1331,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: ClusterPolicy
|
kind: ClusterPolicy
|
||||||
listKind: ClusterPolicyList
|
listKind: ClusterPolicyList
|
||||||
plural: clusterpolicies
|
plural: clusterpolicies
|
||||||
|
@ -1341,6 +1356,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -7189,6 +7207,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -13330,6 +13351,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: Policy
|
kind: Policy
|
||||||
listKind: PolicyList
|
listKind: PolicyList
|
||||||
plural: policies
|
plural: policies
|
||||||
|
@ -13352,6 +13376,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -19202,6 +19229,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -25153,6 +25183,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: UpdateRequest
|
kind: UpdateRequest
|
||||||
listKind: UpdateRequestList
|
listKind: UpdateRequestList
|
||||||
plural: updaterequests
|
plural: updaterequests
|
||||||
|
|
|
@ -24,6 +24,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: AdmissionReport
|
kind: AdmissionReport
|
||||||
listKind: AdmissionReportList
|
listKind: AdmissionReportList
|
||||||
plural: admissionreports
|
plural: admissionreports
|
||||||
|
@ -364,6 +367,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: BackgroundScanReport
|
kind: BackgroundScanReport
|
||||||
listKind: BackgroundScanReportList
|
listKind: BackgroundScanReportList
|
||||||
plural: backgroundscanreports
|
plural: backgroundscanreports
|
||||||
|
@ -668,6 +674,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: ClusterAdmissionReport
|
kind: ClusterAdmissionReport
|
||||||
listKind: ClusterAdmissionReportList
|
listKind: ClusterAdmissionReportList
|
||||||
plural: clusteradmissionreports
|
plural: clusteradmissionreports
|
||||||
|
@ -1009,6 +1018,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: ClusterBackgroundScanReport
|
kind: ClusterBackgroundScanReport
|
||||||
listKind: ClusterBackgroundScanReportList
|
listKind: ClusterBackgroundScanReportList
|
||||||
plural: clusterbackgroundscanreports
|
plural: clusterbackgroundscanreports
|
||||||
|
@ -1313,6 +1325,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: ClusterPolicy
|
kind: ClusterPolicy
|
||||||
listKind: ClusterPolicyList
|
listKind: ClusterPolicyList
|
||||||
plural: clusterpolicies
|
plural: clusterpolicies
|
||||||
|
@ -1335,6 +1350,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -7183,6 +7201,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -13321,6 +13342,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: Policy
|
kind: Policy
|
||||||
listKind: PolicyList
|
listKind: PolicyList
|
||||||
plural: policies
|
plural: policies
|
||||||
|
@ -13343,6 +13367,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v1
|
name: v1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -19193,6 +19220,9 @@ spec:
|
||||||
- jsonPath: .status.ready
|
- jsonPath: .status.ready
|
||||||
name: Ready
|
name: Ready
|
||||||
type: boolean
|
type: boolean
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: Age
|
||||||
|
type: date
|
||||||
name: v2beta1
|
name: v2beta1
|
||||||
schema:
|
schema:
|
||||||
openAPIV3Schema:
|
openAPIV3Schema:
|
||||||
|
@ -25142,6 +25172,9 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
group: kyverno.io
|
group: kyverno.io
|
||||||
names:
|
names:
|
||||||
|
categories:
|
||||||
|
- kyverno
|
||||||
|
- all
|
||||||
kind: UpdateRequest
|
kind: UpdateRequest
|
||||||
listKind: UpdateRequestList
|
listKind: UpdateRequestList
|
||||||
plural: updaterequests
|
plural: updaterequests
|
||||||
|
|
Loading…
Add table
Reference in a new issue