Skip to main content
Version: Next

vela def apply-module

Apply all definitions from a Go module.

Synopsis

Apply all definitions from a Go module to kubernetes cluster.

Supports both local paths and remote Go modules:

  • Local path: ./my-definitions, /path/to/definitions
  • Go module: github.com/myorg/definitions@v1.0.0

The module can contain a module.yaml file with metadata about the module, including name, version, description, and minimum KubeVela version requirements.

vela def apply-module [flags]

Examples

# Apply definitions from a local directory
> vela def apply-module ./my-definitions

# Apply definitions from a Go module
> vela def apply-module github.com/myorg/definitions@v1.0.0

# Apply only component and trait definitions
> vela def apply-module ./my-definitions --types component,trait

# Apply with a name prefix to avoid conflicts
> vela def apply-module ./my-definitions --prefix myorg-

# Apply with conflict resolution strategy
> vela def apply-module ./my-definitions --conflict overwrite

# Dry-run to preview what would be applied
> vela def apply-module ./my-definitions --dry-run

Options

  -c, --conflict string    Conflict resolution strategy: skip, overwrite, fail, rename (default "fail")
--dry-run Preview what would be applied without making changes
-h, --help help for apply-module
--ignore-placement Ignore placement constraints and apply all definitions
-n, --namespace string Namespace to apply definitions to (default "vela-system")
-p, --prefix string Prefix to add to all definition names
--skip-hooks Skip all hooks (pre-apply and post-apply)
--skip-post-apply Skip post-apply hooks only
--skip-pre-apply Skip pre-apply hooks only
--stats Show detailed timing and statistics
-t, --types string Comma-separated list of definition types to apply (component,trait,policy,workflow-step)
-v, --version string Version of the module to apply (for remote modules)

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.