set_cluster_security_policy_mode
Switch a cluster's pod-security policies between audit (violations are reported), enforce (violating pods are rejected at admission) and off (the Kyverno policy engine is uninstalled from the cluster; native pod security keeps observing in audit). Enforce can block deployments that violate the baseline - read get_cluster_policy_violations first and only enforce when the list is clean or every violation is understood. Off is for clusters whose control planes cannot afford the engine's admission webhook and reports controller; audit or enforce afterwards do not reinstall it. Committed to the GitOps repository and applied by the reconciler. Reversible between audit and enforce.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | audit, enforce or off. | |
| cluster_id | No | Cluster id (UUID). Optional when the conversation is bound to a cluster. |