From ef55e716a6a589a423cb01d5cbab8a9a927ae4e6 Mon Sep 17 00:00:00 2001 From: shuting Date: Mon, 8 May 2023 22:51:52 +0800 Subject: [PATCH] add condition msg to v2beta1 (#7126) Signed-off-by: ShutingZhao --- api/kyverno/v2beta1/common_types.go | 3 ++ charts/kyverno/templates/crds/crds.yaml | 40 +++++++++++++++++++ config/crds/kyverno.io_cleanuppolicies.yaml | 6 +++ .../kyverno.io_clustercleanuppolicies.yaml | 6 +++ config/crds/kyverno.io_clusterpolicies.yaml | 14 +++++++ config/crds/kyverno.io_policies.yaml | 14 +++++++ config/install-latest-testing.yaml | 40 +++++++++++++++++++ docs/user/crd/index.html | 11 +++++ 8 files changed, 134 insertions(+) diff --git a/api/kyverno/v2beta1/common_types.go b/api/kyverno/v2beta1/common_types.go index d74394883c..a852199902 100644 --- a/api/kyverno/v2beta1/common_types.go +++ b/api/kyverno/v2beta1/common_types.go @@ -97,6 +97,9 @@ type Condition struct { // or can be variables declared using JMESPath. // +optional RawValue *apiextv1.JSON `json:"value,omitempty" yaml:"value,omitempty"` + + // Message is an optional display message + Message string `json:"message,omitempty" yaml:"message,omitempty"` } func (c *Condition) GetKey() apiextensions.JSON { diff --git a/charts/kyverno/templates/crds/crds.yaml b/charts/kyverno/templates/crds/crds.yaml index fd9eb76199..44c5529e02 100644 --- a/charts/kyverno/templates/crds/crds.yaml +++ b/charts/kyverno/templates/crds/crds.yaml @@ -708,6 +708,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -748,6 +751,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -2577,6 +2583,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -2617,6 +2626,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -12848,6 +12860,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -12889,6 +12904,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -12949,6 +12967,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -12992,6 +13014,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -27117,6 +27143,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -27158,6 +27187,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -27218,6 +27250,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -27261,6 +27297,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: diff --git a/config/crds/kyverno.io_cleanuppolicies.yaml b/config/crds/kyverno.io_cleanuppolicies.yaml index 56d8f011a6..1a8d83cbd8 100644 --- a/config/crds/kyverno.io_cleanuppolicies.yaml +++ b/config/crds/kyverno.io_cleanuppolicies.yaml @@ -61,6 +61,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -101,6 +104,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, diff --git a/config/crds/kyverno.io_clustercleanuppolicies.yaml b/config/crds/kyverno.io_clustercleanuppolicies.yaml index ea7fddb30a..e1aafa3c00 100644 --- a/config/crds/kyverno.io_clustercleanuppolicies.yaml +++ b/config/crds/kyverno.io_clustercleanuppolicies.yaml @@ -61,6 +61,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -101,6 +104,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, diff --git a/config/crds/kyverno.io_clusterpolicies.yaml b/config/crds/kyverno.io_clusterpolicies.yaml index b174c21a32..30ad4f590c 100644 --- a/config/crds/kyverno.io_clusterpolicies.yaml +++ b/config/crds/kyverno.io_clusterpolicies.yaml @@ -9106,6 +9106,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -9147,6 +9150,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -9207,6 +9213,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -9250,6 +9260,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: diff --git a/config/crds/kyverno.io_policies.yaml b/config/crds/kyverno.io_policies.yaml index 78f122c931..fe22af5b0a 100644 --- a/config/crds/kyverno.io_policies.yaml +++ b/config/crds/kyverno.io_policies.yaml @@ -9109,6 +9109,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -9150,6 +9153,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -9210,6 +9216,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -9253,6 +9263,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: diff --git a/config/install-latest-testing.yaml b/config/install-latest-testing.yaml index cdab31a9c9..4203fe67c6 100644 --- a/config/install-latest-testing.yaml +++ b/config/install-latest-testing.yaml @@ -912,6 +912,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -952,6 +955,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -2781,6 +2787,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -2821,6 +2830,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, In, AnyIn, AllIn, @@ -13052,6 +13064,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -13093,6 +13108,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -13153,6 +13171,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -13196,6 +13218,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -27321,6 +27347,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -27362,6 +27391,9 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: Equals, NotEquals, @@ -27422,6 +27454,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: @@ -27465,6 +27501,10 @@ spec: description: Key is the context entry (using JMESPath) for conditional rule evaluation. x-kubernetes-preserve-unknown-fields: true + message: + description: Message is an optional display + message + type: string operator: description: 'Operator is the conditional operation to perform. Valid operators are: diff --git a/docs/user/crd/index.html b/docs/user/crd/index.html index a01206c581..93cf25631e 100644 --- a/docs/user/crd/index.html +++ b/docs/user/crd/index.html @@ -6179,6 +6179,17 @@ Kubernetes apiextensions/v1.JSON or can be variables declared using JMESPath.

+ + +message
+ +string + + + +

Message is an optional display message

+ +