From af2542909466a6e7b6b6b7ee4485524538dcff7e Mon Sep 17 00:00:00 2001 From: Mariam Fahmy Date: Mon, 30 Sep 2024 15:50:54 +0300 Subject: [PATCH] docs: use v2 for cleanup policies and exceptions Signed-off-by: Mariam Fahmy --- content/en/docs/kyverno-cli/usage/apply.md | 2 +- content/en/docs/kyverno-cli/usage/test.md | 2 +- content/en/docs/writing-policies/cleanup.md | 2 +- content/en/docs/writing-policies/exceptions.md | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/en/docs/kyverno-cli/usage/apply.md b/content/en/docs/kyverno-cli/usage/apply.md index 07e30f0a4..c1dd30793 100644 --- a/content/en/docs/kyverno-cli/usage/apply.md +++ b/content/en/docs/kyverno-cli/usage/apply.md @@ -725,7 +725,7 @@ spec: Policy Exception manifest (`exception.yaml`): ```yaml -apiVersion: kyverno.io/v2beta1 +apiVersion: kyverno.io/v2 kind: PolicyException metadata: name: container-exception diff --git a/content/en/docs/kyverno-cli/usage/test.md b/content/en/docs/kyverno-cli/usage/test.md index 1ebd7d6e6..4e225cdb3 100644 --- a/content/en/docs/kyverno-cli/usage/test.md +++ b/content/en/docs/kyverno-cli/usage/test.md @@ -567,7 +567,7 @@ spec: Policy Exception manifest (`delta-exception.yaml`): ```yaml -apiVersion: kyverno.io/v2beta1 +apiVersion: kyverno.io/v2 kind: PolicyException metadata: name: delta-exception diff --git a/content/en/docs/writing-policies/cleanup.md b/content/en/docs/writing-policies/cleanup.md index 8fba6ad83..ac858b68d 100644 --- a/content/en/docs/writing-policies/cleanup.md +++ b/content/en/docs/writing-policies/cleanup.md @@ -18,7 +18,7 @@ Since cleanup policies always operate against existing resources in a cluster, p An example ClusterCleanupPolicy is shown below. This cleanup policy removes Deployments which have the label `canremove: "true"` if they have less than two replicas on a schedule of every 5 minutes. ```yaml -apiVersion: kyverno.io/v2beta1 +apiVersion: kyverno.io/v2 kind: ClusterCleanupPolicy metadata: name: cleandeploy diff --git a/content/en/docs/writing-policies/exceptions.md b/content/en/docs/writing-policies/exceptions.md index 8ec57660d..174571500 100644 --- a/content/en/docs/writing-policies/exceptions.md +++ b/content/en/docs/writing-policies/exceptions.md @@ -59,7 +59,7 @@ Auto-generated rules for Pod controllers must be specified along with the Pod co {{% /alert %}} ```yaml -apiVersion: kyverno.io/v2beta1 +apiVersion: kyverno.io/v2 kind: PolicyException metadata: name: delta-exception @@ -198,7 +198,7 @@ spec: In this use case, all Pods in the `delta` Namespace need to run as a root. A PolicyException can be used to exempt all Pods whose Namespace is `delta` from the policy by excluding the `runAsNonRoot` control. ```yaml -apiVersion: kyverno.io/v2beta1 +apiVersion: kyverno.io/v2 kind: PolicyException metadata: name: pod-security-exception @@ -247,7 +247,7 @@ PolicyExceptions `podSecurity{}` block has the same functionality as the [valida For example, the following PolicyException exempts the containers running either the `nginx` or `redis` image from following the Capabilities control. ```yaml -apiVersion: kyverno.io/v2beta1 +apiVersion: kyverno.io/v2 kind: PolicyException metadata: name: pod-security-exception @@ -278,7 +278,7 @@ In this case, the `podSecurity.restrictedField` can be used to enforce the entir The following PolicyException grants an exemption to the `initContainers` that use Istio or Linkerd images, allowing them to bypass the `Capabilities` control. This is achieved by permitting the values of `NET_ADMIN` and `NET_RAW` in the `securityContext.capabilities.add` field. ```yaml -apiVersion: kyverno.io/v2beta1 +apiVersion: kyverno.io/v2 kind: PolicyException metadata: name: pod-security-exception