vela def upgrade
Upgrade CUE definition for version compatibility
Synopsis
Upgrade CUE definition files to be compatible with a specific KubeVela version. This command automatically applies all necessary upgrades to ensure your definitions work with the target KubeVela version. 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
-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
- vela def - Manage definitions.