diff --git a/README.md b/README.md index 2a478a9cf9..bf7d45884e 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Policy enforcement is captured using Kubernetes events. Kyverno also reports pol This policy requires that all pods have CPU and memory resource requests and limits: ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind: Policy metadata: name: check-cpu-memory @@ -61,7 +61,7 @@ spec: This policy sets the imagePullPolicy to Always if the image tag is latest: ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind: Policy metadata: name: set-image-pull-policy @@ -89,7 +89,7 @@ spec: This policy sets the Zookeeper and Kafka connection strings for all namespaces with a label key 'kafka'. ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind: Policy metadata: name: "zk-kafka-address" diff --git a/documentation/writing-policies-generate.md b/documentation/writing-policies-generate.md index 0849e15f19..4d8de833dd 100644 --- a/documentation/writing-policies-generate.md +++ b/documentation/writing-policies-generate.md @@ -7,7 +7,7 @@ ## Example 1 ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind: ClusterPolicy metadata: name: basic-policy @@ -54,7 +54,7 @@ In this example, when this policy is applied, any new namespace that satisfies t ## Example 2 ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind: ClusterPolicy metadata: name: "default" diff --git a/documentation/writing-policies-mutate.md b/documentation/writing-policies-mutate.md index c9bd5f676c..7cf5015897 100644 --- a/documentation/writing-policies-mutate.md +++ b/documentation/writing-policies-mutate.md @@ -23,7 +23,7 @@ With Kyverno, the add and replace have the same behavior i.e. both operations wi This patch adds an init container to all deployments. ````yaml -apiVersion : kyverno.io/v1alpha1 +apiVersion : kyverno.io/v1 kind : ClusterPolicy metadata : name : policy-v1 @@ -47,7 +47,7 @@ spec : Here is the example of a patch that removes a label from the secret: ````yaml -apiVersion : kyverno.io/v1alpha1 +apiVersion : kyverno.io/v1 kind : ClusterPolicy metadata : name : policy-remove-label @@ -75,7 +75,7 @@ The overlay cannot be used to delete values in a resource: use **patches** for t The following mutation overlay will add (or replace) the memory request and limit to 10Gi for every Pod with a label ```memory: high```: ````yaml -apiVersion : kyverno.io/v1alpha1 +apiVersion : kyverno.io/v1 kind : ClusterPolicy metadata : name : policy-change-memory-limit @@ -108,7 +108,7 @@ spec : Applying overlays to a list type is fairly straightforward: new items will be added to the list, unless they already exist. For example, the next overlay will add IP "192.168.10.172" to all addresses in all Endpoints: ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind: ClusterPolicy metadata: name: policy-endpoints @@ -151,7 +151,7 @@ A `conditional anchor` evaluates to `true` if the anchor tag exists and if the v For example, this overlay will add or replace the value 6443 for the port field, for all ports with a name value that starts with "secure": ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind : ClusterPolicy metadata : name : policy-set-port @@ -181,7 +181,7 @@ An `add anchor` is processed as part of applying the mutation. Typically, every For example, this overlay will set the port to 6443, if a port is not already defined: ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind : ClusterPolicy metadata : name : policy-set-port diff --git a/documentation/writing-policies-validate.md b/documentation/writing-policies-validate.md index d908143c6a..405b8c0a7b 100644 --- a/documentation/writing-policies-validate.md +++ b/documentation/writing-policies-validate.md @@ -83,7 +83,7 @@ The following rule prevents the creation of Deployment, StatefuleSet and DaemonS ````yaml -apiVersion : kyverno.io/v1alpha1 +apiVersion : kyverno.io/v1 kind : ClusterPolicy metadata : name : validation-example @@ -120,7 +120,7 @@ A variation of an anchor, is to check that in a list of elements at least one el For example, this pattern will check that at least one container has memory requests and limits defined and that the request is less than the limit: ````yaml -apiVersion : kyverno.io/v1alpha1 +apiVersion : kyverno.io/v1 kind : ClusterPolicy metadata : name : validation-example2 @@ -156,7 +156,7 @@ The `anyPattern` tag can be used to check if any one of the patterns in the list *Note: either one of `pattern` or `anyPattern` is allowed in a rule, they both can't be declared in the same rule.* ````yaml -apiVersion: kyverno.io/v1alpha1 +apiVersion: kyverno.io/v1 kind: ClusterPolicy metadata: name: check-container-security-context diff --git a/documentation/writing-policies.md b/documentation/writing-policies.md index f3ca21957b..f24e082cff 100644 --- a/documentation/writing-policies.md +++ b/documentation/writing-policies.md @@ -5,7 +5,7 @@ A Kyverno policy contains a set of rules. Each rule matches resources by kind, name, or selectors. ````yaml -apiVersion : kyverno.io/v1alpha1 +apiVersion : kyverno.io/v1 kind : ClusterPolicy metadata : name : policy