-
Notifications
You must be signed in to change notification settings - Fork 873
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
Feat: make addon init use the latest CUE addon template #4434
Feat: make addon init use the latest CUE addon template #4434
Conversation
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Codecov Report
@@ Coverage Diff @@
## master #4434 +/- ##
==========================================
- Coverage 59.47% 52.74% -6.73%
==========================================
Files 343 347 +4
Lines 34247 34415 +168
==========================================
- Hits 20368 18152 -2216
- Misses 11199 13838 +2639
+ Partials 2680 2425 -255
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
return false, fmt.Errorf("no application in %s: %w", AppTemplateCueFileName, err) | ||
} | ||
return true, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please refer to https://github.com/kubevela/kubevela/pull/4443/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured out that if I were to Unmarshal to Application, it required all these files, otherwise it won't work. Since it only determines if it is a addon dir, just look for output
keyword inside template.cue
is enough.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to refactor after the new app render func
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Successfully created backport PR #4456 for |
Signed-off-by: Charlie Chiang charlie_c_0129@outlook.com
Description of your changes
We now support using CUE in addon template #4401 (
template.cue
instead oftemplate.yaml
)This PR makes
vela addon init
use this latest feature (generatingtemplate.cue
).Generating
template.yaml
is no longer supported.This won't cause compatibility issues, since the users that are able to generate
template.cue
are also using a CLI version that can properly handletemplate.cue
. Those who cannot handletemplate.cue
are using a CLI version that can generate the legacy yaml addon format.Directory structure:
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary. (no permission to add label)How has this code been tested
Special notes for your reviewer