-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kusion init
provides a new way to collect template params value with specified CLI flag
#72
Comments
kusion init
support a new way to collect template params with specified CLI flagkusion init
support a new way to collect value of template params with specified CLI flag
kusion init
support a new way to collect value of template params with specified CLI flagkusion init
provides a new way to collect value of template params with specified CLI flag
kusion init
provides a new way to collect value of template params with specified CLI flagkusion init
provides a new way to collect template params value with specified CLI flag
Can you provide more example of custom parameter for CLI and 3rd-party system integration? |
Integration Step1: call func
Step2: use default values as input params for func |
|
Enhancement
Summary
kusion init
is a helpful tool to create a new project of KCL. Consider that we have two different roles, one is template developer, who is responsible for design and develop template, as well as a set of default values; another is to use template. For quick start of template rendering, developer provides a YAML file, named kusion.yaml, which contains type and default value of all params that is used by go template engine.However, if I want to override template default value, there is only one solution: type new default when each Prompt asks, which is strongly Inefficient.
Proposal
Add a new flag(CustomParams) to override template defaults. Kusion must to provide a struct with filed name and type. User can prepare a new set of defaults in advance, based on file kusion.yaml.
Design Details
Field Types
Although we encourage all to use primitive type for template params:
But we must admit there is always an exception, aka complicated data type, For example:
and mixed complicated with primitives. So we need to explain every field type in kusion.yaml.
Flag Definition in Struct
kusion.yaml provide a struct as below:
kusion.yaml
Implicit struct of CustomParams flag:
struct definition
The text was updated successfully, but these errors were encountered: