diff --git a/api/kyverno/v1/clusterpolicy_types.go b/api/kyverno/v1/clusterpolicy_types.go index 97f7ef5772..e55a9d3ef8 100644 --- a/api/kyverno/v1/clusterpolicy_types.go +++ b/api/kyverno/v1/clusterpolicy_types.go @@ -17,7 +17,7 @@ import ( // +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 -// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready` +// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type == "Ready")].status` // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Validate",type=integer,JSONPath=`.status.rulecount.validate`,priority=1 // +kubebuilder:printcolumn:name="Mutate",type=integer,JSONPath=`.status.rulecount.mutate`,priority=1 diff --git a/api/kyverno/v1/policy_types.go b/api/kyverno/v1/policy_types.go index 37cd3f4af8..3ce808a33c 100644 --- a/api/kyverno/v1/policy_types.go +++ b/api/kyverno/v1/policy_types.go @@ -15,7 +15,7 @@ import ( // +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 -// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready` +// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type == "Ready")].status` // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Validate",type=integer,JSONPath=`.status.rulecount.validate`,priority=1 // +kubebuilder:printcolumn:name="Mutate",type=integer,JSONPath=`.status.rulecount.mutate`,priority=1 diff --git a/api/kyverno/v2beta1/clusterpolicy_types.go b/api/kyverno/v2beta1/clusterpolicy_types.go index ef511f5f84..f20b32137a 100644 --- a/api/kyverno/v2beta1/clusterpolicy_types.go +++ b/api/kyverno/v2beta1/clusterpolicy_types.go @@ -18,7 +18,7 @@ import ( // +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 -// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready` +// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type == "Ready")].status` // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Validate",type=integer,JSONPath=`.status.rulecount.validate`,priority=1 // +kubebuilder:printcolumn:name="Mutate",type=integer,JSONPath=`.status.rulecount.mutate`,priority=1 diff --git a/api/kyverno/v2beta1/policy_types.go b/api/kyverno/v2beta1/policy_types.go index d42774053a..6e6c50cc8a 100644 --- a/api/kyverno/v2beta1/policy_types.go +++ b/api/kyverno/v2beta1/policy_types.go @@ -16,7 +16,7 @@ import ( // +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 -// +kubebuilder:printcolumn:name="Ready",type=boolean,JSONPath=`.status.ready` +// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type == "Ready")].status` // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Validate",type=integer,JSONPath=`.status.rulecount.validate`,priority=1 // +kubebuilder:printcolumn:name="Mutate",type=integer,JSONPath=`.status.rulecount.mutate`,priority=1 diff --git a/charts/kyverno/templates/crds/crds.yaml b/charts/kyverno/templates/crds/crds.yaml index 77f6616706..e6f20da0ff 100644 --- a/charts/kyverno/templates/crds/crds.yaml +++ b/charts/kyverno/templates/crds/crds.yaml @@ -3432,9 +3432,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -10109,9 +10109,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -16542,9 +16542,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -23221,9 +23221,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date diff --git a/config/crds/kyverno.io_clusterpolicies.yaml b/config/crds/kyverno.io_clusterpolicies.yaml index 2715cecbc8..0a3c16f170 100644 --- a/config/crds/kyverno.io_clusterpolicies.yaml +++ b/config/crds/kyverno.io_clusterpolicies.yaml @@ -30,9 +30,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -6707,9 +6707,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date diff --git a/config/crds/kyverno.io_policies.yaml b/config/crds/kyverno.io_policies.yaml index dab4a0402d..fc0fcd07d4 100644 --- a/config/crds/kyverno.io_policies.yaml +++ b/config/crds/kyverno.io_policies.yaml @@ -30,9 +30,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -6709,9 +6709,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date diff --git a/config/install.yaml b/config/install.yaml index 5e0565b87c..973a9dfc52 100644 --- a/config/install.yaml +++ b/config/install.yaml @@ -3503,9 +3503,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -10180,9 +10180,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -16613,9 +16613,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -23292,9 +23292,9 @@ spec: name: Failure Policy priority: 1 type: string - - jsonPath: .status.ready + - jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready - type: boolean + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date