Skip to content

Commit

Permalink
docs: use v2 for cleanup policies and exceptions (#1372)
Browse files Browse the repository at this point in the history
Signed-off-by: Mariam Fahmy <[email protected]>
  • Loading branch information
MariamFahmy98 authored Oct 27, 2024
1 parent e2f1533 commit 647765b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion content/en/docs/kyverno-cli/usage/apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ spec:
Policy Exception manifest (`exception.yaml`):

```yaml
apiVersion: kyverno.io/v2beta1
apiVersion: kyverno.io/v2
kind: PolicyException
metadata:
name: container-exception
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/kyverno-cli/usage/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ spec:
Policy Exception manifest (`delta-exception.yaml`):

```yaml
apiVersion: kyverno.io/v2beta1
apiVersion: kyverno.io/v2
kind: PolicyException
metadata:
name: delta-exception
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/writing-policies/cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions content/en/docs/writing-policies/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 647765b

Please sign in to comment.