Skip to content
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: support vela kube apply for CUE and JSON files #4420

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

wonderflow
Copy link
Collaborator

@wonderflow wonderflow commented Jul 21, 2022

Signed-off-by: Jianbo Sun jianbo.sjb@alibaba-inc.com

Description of your changes

  1. Support the following format and add tests.
# Apply object in CUE, the whole CUE file MUST follow the kubernetes API and contain only one object.
vela kube apply -f my.cue --cluster cluster-1
# Apply object in JSON, the whole JSON file MUST follow the kubernetes API and contain only one object.
vela kube apply -f my.json --cluster cluster-1
  1. Align the dry-run flag from --dryrun to --dry-run. This is a break change but only CLI usage affect.

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #4420 (4be3355) into master (d386b64) will increase coverage by 10.23%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master    #4420       +/-   ##
===========================================
+ Coverage   51.27%   61.50%   +10.23%     
===========================================
  Files         325      347       +22     
  Lines       33400    34260      +860     
===========================================
+ Hits        17126    21073     +3947     
+ Misses      13981    10443     -3538     
- Partials     2293     2744      +451     
Flag Coverage Δ
apiserver-e2etests 27.08% <0.00%> (?)
apiserver-unittests 40.08% <ø> (ø)
core-unittests 56.47% <0.00%> (+0.03%) ⬆️
e2e-multicluster-test 19.88% <100.00%> (?)
e2e-rollout-tests 22.27% <0.00%> (-0.06%) ⬇️
e2etests 28.72% <0.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/utils/file.go 55.76% <100.00%> (+30.27%) ⬆️
apis/core.oam.dev/v1beta1/policy_definition.go 0.00% <0.00%> (-50.00%) ⬇️
...aits/traitdefinition/traitdefinition_controller.go 65.26% <0.00%> (-5.27%) ⬇️
pkg/controller/utils/capability.go 79.82% <0.00%> (-0.45%) ⬇️
...kg/apiserver/interfaces/api/assembler/v1/do2dto.go 83.68% <0.00%> (ø)
pkg/apiserver/domain/model/envbinding.go 100.00% <0.00%> (ø)
pkg/apiserver/domain/model/env.go 100.00% <0.00%> (ø)
pkg/apiserver/domain/model/workflow.go 100.00% <0.00%> (ø)
pkg/cloudprovider/cluster.go 0.00% <0.00%> (ø)
pkg/apiserver/domain/model/user.go 82.14% <0.00%> (ø)
... and 146 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d386b64...4be3355. Read the comment docs.

@wonderflow wonderflow merged commit 957302c into kubevela:master Jul 21, 2022
@wonderflow wonderflow deleted the velakube branch July 21, 2022 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants