mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +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="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1
|
||||
// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready`
|
||||
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
// +kubebuilder:storageversion
|
||||
|
||||
// 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="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1
|
||||
// +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:storageversion
|
||||
|
||||
|
|
|
@ -19,6 +19,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:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
|
||||
|
||||
// ClusterPolicy declares validation, mutation, and generation behaviors for matching resources.
|
||||
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="Failure Policy",type=string,JSONPath=".spec.failurePolicy",priority=1
|
||||
// +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
|
||||
|
||||
// Policy declares validation, mutation, and generation behaviors for matching resources.
|
||||
|
|
|
@ -1026,6 +1026,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -4653,6 +4656,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -8610,6 +8616,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -12237,6 +12246,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
|
|
@ -34,6 +34,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -5882,6 +5885,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
|
|
@ -34,6 +34,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -5884,6 +5887,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
|
|
@ -26,6 +26,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: AdmissionReport
|
||||
listKind: AdmissionReportList
|
||||
plural: admissionreports
|
||||
|
@ -367,6 +370,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: BackgroundScanReport
|
||||
listKind: BackgroundScanReportList
|
||||
plural: backgroundscanreports
|
||||
|
@ -672,6 +678,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: ClusterAdmissionReport
|
||||
listKind: ClusterAdmissionReportList
|
||||
plural: clusteradmissionreports
|
||||
|
@ -1014,6 +1023,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: ClusterBackgroundScanReport
|
||||
listKind: ClusterBackgroundScanReportList
|
||||
plural: clusterbackgroundscanreports
|
||||
|
@ -1319,6 +1331,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: ClusterPolicy
|
||||
listKind: ClusterPolicyList
|
||||
plural: clusterpolicies
|
||||
|
@ -1341,6 +1356,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -7189,6 +7207,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -13330,6 +13351,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: Policy
|
||||
listKind: PolicyList
|
||||
plural: policies
|
||||
|
@ -13352,6 +13376,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -19202,6 +19229,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -25153,6 +25183,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: UpdateRequest
|
||||
listKind: UpdateRequestList
|
||||
plural: updaterequests
|
||||
|
|
|
@ -24,6 +24,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: AdmissionReport
|
||||
listKind: AdmissionReportList
|
||||
plural: admissionreports
|
||||
|
@ -364,6 +367,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: BackgroundScanReport
|
||||
listKind: BackgroundScanReportList
|
||||
plural: backgroundscanreports
|
||||
|
@ -668,6 +674,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: ClusterAdmissionReport
|
||||
listKind: ClusterAdmissionReportList
|
||||
plural: clusteradmissionreports
|
||||
|
@ -1009,6 +1018,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: ClusterBackgroundScanReport
|
||||
listKind: ClusterBackgroundScanReportList
|
||||
plural: clusterbackgroundscanreports
|
||||
|
@ -1313,6 +1325,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: ClusterPolicy
|
||||
listKind: ClusterPolicyList
|
||||
plural: clusterpolicies
|
||||
|
@ -1335,6 +1350,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -7183,6 +7201,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -13321,6 +13342,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: Policy
|
||||
listKind: PolicyList
|
||||
plural: policies
|
||||
|
@ -13343,6 +13367,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -19193,6 +19220,9 @@ spec:
|
|||
- jsonPath: .status.ready
|
||||
name: Ready
|
||||
type: boolean
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v2beta1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
|
@ -25142,6 +25172,9 @@ metadata:
|
|||
spec:
|
||||
group: kyverno.io
|
||||
names:
|
||||
categories:
|
||||
- kyverno
|
||||
- all
|
||||
kind: UpdateRequest
|
||||
listKind: UpdateRequestList
|
||||
plural: updaterequests
|
||||
|
|
Loading…
Reference in a new issue