Offline policy test with gator
Validate templates+constraints against fixtures with no cluster; modern: shift-left in CI
gator test -f policy/ && gator verify ./suite
- tool
- opa-gatekeeper3 commands
More opa-gatekeeper commands
-
kubectl get constrainttemplates && kubectl get constraints -AEnumerate ConstraintTemplates and every instantiated constraint kind across namespaces
-
kubectl get k8srequiredlabels <name> -o jsonpath='{.status.totalViolations} {range .status.violations[*]}{"\n"}{.kind}/{.name}: {.message}{end}'Read offending resources from a constraint's audit status without re-scanning