Policy YAML Examples
This page provides YAML examples for supported workload type policies. These policies use a flat rules array where each rule specifies the field to control, the spec selector that identifies which part of the workload spec the rule applies to, and one or more enforcements.
For a description of all rule components, see Supported workload type policies.
Rule Structure
Deployment: Container Security Baseline
Requires an image on all containers, blocks privilege escalation, and caps CPU and memory limits.
PyTorchJob: Distributed Training Guardrails
Sets resource limits across all containers, pins the master replica count to 1, restricts the worker replica range, and limits retries on the job.
Deployment: Cluster Baseline with Department Override
A cluster-scoped policy that caps CPU limits for all containers, but allows department-scoped policies to override the cap for teams that need more resources.