A machine-readable index of this documentation for AI agents is available at https://kubevela.io/llms.txt. Markdown versions of documentation pages are available by appending .md to their URLs.
Skip to main content
Version: Next

vela def upgrade

Upgrade CUE definition for version compatibility

Synopsis​

Upgrade CUE definition files to be compatible with a specific KubeVela version. This command applies the upgrades that are on by default; --enable-all also applies the opt-in passes, such as the default guards for boolean and generic fields. If no version is specified, upgrades to the current CLI version.

Currently supported upgrades: • List concatenation syntax compatibility • Import statement management • Template syntax modernization

vela def upgrade DEFINITION_FILE [flags]

Examples​

# Validate if definition needs upgrading (exit code 1 if upgrade needed)
vela def upgrade my-definition.cue --validate

# Silent validation for scripting (only exit code)
vela def upgrade my-definition.cue --validate --quiet

# Upgrade definition for current KubeVela version
vela def upgrade my-definition.cue

# Upgrade and save to specific file
vela def upgrade my-definition.cue -o upgraded-definition.cue

# Upgrade for specific KubeVela version
vela def upgrade my-definition.cue --target-version=v1.11

Options​

      --enable-all              Enable all upgrade passes for this command invocation.
-h, --help help for upgrade
-o, --output string Output file path. If not specified, outputs to stdout.
-q, --quiet Suppress output in validate mode, only return exit code
--target-version string Target KubeVela version (e.g., --target-version=v1.11). If not specified, uses current CLI version.
--validate Validate if definition needs upgrading without making changes (exit code 1 if upgrade required)

Options inherited from parent commands​

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

SEE ALSO​

Go Back to CLI Commands Homepage.​

Auto generated by spf13/cobra script in KubeVela.​