Skip to main content
Version: v1.11-alpha

vela policy dry-run

Preview what policies would do to an Application without applying changes.

Synopsis

Simulates the full policy application using the same code path as the controller. No changes are made to the cluster.

vela policy dry-run [app-name] [flags]

Examples

  # Simulate policies for a live Application (fetched from cluster)
vela policy dry-run my-app

# Test policies using a local Application file
vela policy dry-run -f app.yaml

# Focus on a specific policy
vela policy dry-run -f app.yaml -p my-policy

# Summary view (labels and annotations only)
vela policy dry-run my-app --output summary

# JSON output for CI/CD
vela policy dry-run -f app.yaml --output json

# Include per-policy output details
vela policy dry-run -f app.yaml --details

# Include outcome (final spec/labels/annotations/context)
vela policy dry-run -f app.yaml --outcome

Options

      --details            Include per-policy output details (context, labels, annotations, spec transforms)
-e, --env string specify environment name for application
-f, --file string Path to a local Application YAML file
-h, --help help for dry-run
-n, --namespace string specify the Kubernetes namespace to use
--outcome Include outcome (final spec, labels, annotations and context) in output
-o, --output string Output format: table, summary, json, yaml (default "table")
-p, --policy string Filter output to policies matching a name or glob pattern (e.g. "add-env-*")

Options inherited from parent commands

  -V, --verbosity Level   number for the log level verbosity
-y, --yes Assume yes for all user prompts

SEE ALSO

  • vela policy - Manage and debug Application-scoped policies.

Go Back to CLI Commands Homepage.

Auto generated by spf13/cobra script in KubeVela.