Skip to main content
版本:v1.1

vela def init

Init a new definition

Synopsis

Init a new definition with given arguments or interactively

  • We support parsing a single YAML file (like kubernetes objects) into the cue-style template. However, we do not support variables in YAML file currently, which prevents users from directly feeding files like helm chart directly. We may introduce such features in the future.
vela def init DEF_NAME [flags]

Examples

# Command below initiate an empty TraitDefinition named my-ingress
> vela def init my-ingress -t trait --desc "My ingress trait definition." > ./my-ingress.cue
# Command below initiate a definition named my-def interactively and save it to ./my-def.cue
> vela def init my-def -i --output ./my-def.cue
# Command below initiate a ComponentDefinition named my-webservice with the template parsed from ./template.yaml.
> vela def init my-webservice -i --template-yaml ./template.yaml

Options

  -d, --desc string            Specify the description of the new definition.
-h, --help help for init
-i, --interactive Specify whether use interactive process to help generate definitions.
-o, --output string Specify the output path of the generated definition. If empty, the definition will be printed in the console.
-y, --template-yaml string Specify the template yaml file that definition will use to build the schema. If empty, a default template for the given definition type will be used.
-t, --type string Specify the type of the new definition. Valid types: workload, scope, workflow-step, component, trait, policy

Options inherited from parent commands

  -e, --env string   specify environment name for application

SEE ALSO

Auto generated by spf13/cobra on 19-Aug-2021