diff --git a/charts/kyverno/crds/crds.yaml b/charts/kyverno/crds/crds.yaml index ace2b43f5c..ca75e4a1a9 100644 --- a/charts/kyverno/crds/crds.yaml +++ b/charts/kyverno/crds/crds.yaml @@ -379,12 +379,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -401,11 +399,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -426,7 +422,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -434,7 +429,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -444,7 +438,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -458,7 +451,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -466,7 +458,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -477,7 +468,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array @@ -1810,12 +1800,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -1832,11 +1820,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -1857,7 +1843,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -1865,7 +1850,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -1875,7 +1859,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -1889,7 +1872,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -1897,7 +1879,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -1908,7 +1889,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array diff --git a/definitions/crds/kyverno.io_clusterpolicies.yaml b/definitions/crds/kyverno.io_clusterpolicies.yaml index 3c7420a5db..49c17cf6d3 100644 --- a/definitions/crds/kyverno.io_clusterpolicies.yaml +++ b/definitions/crds/kyverno.io_clusterpolicies.yaml @@ -381,12 +381,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -403,11 +401,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -428,7 +424,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -436,7 +431,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -446,7 +440,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -460,7 +453,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -468,7 +460,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -479,7 +470,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array diff --git a/definitions/crds/kyverno.io_policies.yaml b/definitions/crds/kyverno.io_policies.yaml index 31bcccbac4..84c97c9938 100644 --- a/definitions/crds/kyverno.io_policies.yaml +++ b/definitions/crds/kyverno.io_policies.yaml @@ -382,12 +382,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -404,11 +402,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -429,7 +425,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -437,7 +432,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -447,7 +441,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -461,7 +454,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -469,7 +461,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -480,7 +471,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array diff --git a/definitions/install.yaml b/definitions/install.yaml index fa66d1b504..cea011953b 100644 --- a/definitions/install.yaml +++ b/definitions/install.yaml @@ -384,12 +384,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -406,11 +404,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -431,7 +427,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -439,7 +434,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -449,7 +443,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -463,7 +456,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -471,7 +463,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -482,7 +473,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array @@ -1815,12 +1805,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -1837,11 +1825,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -1862,7 +1848,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -1870,7 +1855,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -1880,7 +1864,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -1894,7 +1877,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -1902,7 +1884,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -1913,7 +1894,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array diff --git a/definitions/install_debug.yaml b/definitions/install_debug.yaml index c2fa07e421..f94e16f588 100755 --- a/definitions/install_debug.yaml +++ b/definitions/install_debug.yaml @@ -384,12 +384,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -406,11 +404,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -431,7 +427,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -439,7 +434,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -449,7 +443,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -463,7 +456,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -471,7 +463,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -482,7 +473,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array @@ -1815,12 +1805,10 @@ spec: description: Overlay specifies an overlay pattern to modify resources. DEPRECATED. Use PatchStrategicMerge instead. Scheduled for removal in release 1.5+. - x-kubernetes-preserve-unknown-fields: true patchStrategicMerge: description: PatchStrategicMerge is a strategic merge patch used to modify resources. See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - x-kubernetes-preserve-unknown-fields: true patches: description: Patches specifies a RFC 6902 JSON Patch to modify resources. DEPRECATED. Use PatchesJSON6902 instead. @@ -1837,11 +1825,9 @@ spec: type: string value: description: Value specifies the value to be applied. - x-kubernetes-preserve-unknown-fields: true type: object nullable: true type: array - x-kubernetes-preserve-unknown-fields: true patchesJson6902: description: PatchesJSON6902 is a list of RFC 6902 JSON Patch declarations used to modify resources. See https://tools.ietf.org/html/rfc6902 @@ -1862,7 +1848,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -1870,7 +1855,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array validate: @@ -1880,7 +1864,6 @@ spec: description: AnyPattern specifies list of validation patterns. At least one of the patterns must be satisfied for the validation rule to succeed. - x-kubernetes-preserve-unknown-fields: true deny: description: Deny defines conditions to fail the validation rule. @@ -1894,7 +1877,6 @@ spec: key: description: Key is the context entry (using JMESPath) for conditional rule evaluation. - x-kubernetes-preserve-unknown-fields: true operator: description: Operator is the operation to perform. type: string @@ -1902,7 +1884,6 @@ spec: description: Value is the conditional value, or set of values. The values can be fixed set or can be variables declared using using JMESPath. - x-kubernetes-preserve-unknown-fields: true type: object type: array type: object @@ -1913,7 +1894,6 @@ spec: pattern: description: Pattern specifies an overlay-style pattern used to check resources. - x-kubernetes-preserve-unknown-fields: true type: object type: object type: array diff --git a/pkg/api/kyverno/v1/policy_types.go b/pkg/api/kyverno/v1/policy_types.go index 0b1faff926..4cd1124cc1 100755 --- a/pkg/api/kyverno/v1/policy_types.go +++ b/pkg/api/kyverno/v1/policy_types.go @@ -102,7 +102,6 @@ type ConfigMapReference struct { // Condition defines variable-based conditional criteria for rule execution. type Condition struct { // Key is the context entry (using JMESPath) for conditional rule evaluation. - // +kubebuilder:validation:XPreserveUnknownFields Key apiextensions.JSON `json:"key,omitempty" yaml:"key,omitempty"` // Operator is the operation to perform. @@ -110,7 +109,6 @@ type Condition struct { // Value is the conditional value, or set of values. The values can be fixed set // or can be variables declared using using JMESPath. - // +kubebuilder:validation:XPreserveUnknownFields // +optional Value apiextensions.JSON `json:"value,omitempty" yaml:"value,omitempty"` } @@ -203,14 +201,12 @@ type Mutation struct { // Overlay specifies an overlay pattern to modify resources. // DEPRECATED. Use PatchStrategicMerge instead. Scheduled for // removal in release 1.5+. - // +kubebuilder:validation:XPreserveUnknownFields // +optional Overlay apiextensions.JSON `json:"overlay,omitempty"` // Patches specifies a RFC 6902 JSON Patch to modify resources. // DEPRECATED. Use PatchesJSON6902 instead. Scheduled for // removal in release 1.5+. - // +kubebuilder:validation:XPreserveUnknownFields // +nullable // +optional Patches []Patch `json:"patches,omitempty" yaml:"patches,omitempty"` @@ -218,7 +214,6 @@ type Mutation struct { // PatchStrategicMerge is a strategic merge patch used to modify resources. // See https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/ // and https://kubectl.docs.kubernetes.io/references/kustomize/patchesstrategicmerge/. - // +kubebuilder:validation:XPreserveUnknownFields // +optional PatchStrategicMerge apiextensions.JSON `json:"patchStrategicMerge,omitempty" yaml:"patchStrategicMerge,omitempty"` @@ -242,7 +237,6 @@ type Patch struct { Operation string `json:"op,omitempty" yaml:"op,omitempty"` // Value specifies the value to be applied. - // +kubebuilder:validation:XPreserveUnknownFields // +optional Value apiextensions.JSON `json:"value,omitempty" yaml:"value,omitempty"` } @@ -255,13 +249,11 @@ type Validation struct { Message string `json:"message,omitempty" yaml:"message,omitempty"` // Pattern specifies an overlay-style pattern used to check resources. - // +kubebuilder:validation:XPreserveUnknownFields // +optional Pattern apiextensions.JSON `json:"pattern,omitempty" yaml:"pattern,omitempty"` // AnyPattern specifies list of validation patterns. At least one of the patterns // must be satisfied for the validation rule to succeed. - // +kubebuilder:validation:XPreserveUnknownFields // +optional AnyPattern apiextensions.JSON `json:"anyPattern,omitempty" yaml:"anyPattern,omitempty"`