Commit Graph

561 Commits

Author SHA1 Message Date
qiaozp 23cbc9c91f
Feat: implement pipeline APIs (#4908)
* add context when run pipeline

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Feat: implement pipeline API

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Extract get log logic and implement getPipelineRunLog API

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Init and delete pipeline contexts

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix panic

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Allow not specifying context

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* change pipeline to path parameter

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add permission check filter

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* project -> projects in route

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix route conflict

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add project alias

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Feat: change the list pipeline API

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: filter the project

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the error of the run APi

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* fix log pipeline run API

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix lint, fix the error of log api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix error returning

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: change the lable to annotation

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* remove log config not found error

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix pipeline list api return no context info

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: create the namespace

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* get pipeline lastrun info

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* allow query single step output

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* organize code in api layer

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix project filter, add context value when get pp run, extend lastRun

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix get output and implement get input api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: change the last run

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* if query sub-step outout, return it directly

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: change the run stats

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the output

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* flatten the input/output api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* more info for i/o vars

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix nested i/o struct

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add fromStep in input api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add e2e test skeleton

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add more e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* use db to store pipeline

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* keep the last 5k lines of log

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* use stern param to keep last lines of logs

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* filter, nil labels, spec check

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* empty res, index, detail param

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix e2e test and unit test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add context e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* goimports

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add more test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* review

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove optional tag in returned value, unify the imports name

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add stop test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* more coverage

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* single case selct

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* optimize log color

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add default permission and role

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix permission ut

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* change the log api implementation

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add color, add container order

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix filter nil will cut all log

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* longer timeout and lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-31 23:59:04 +08:00
Somefive b97c3af09f
Fix: apiserver & vela status use multi-cluster client (#4916) 2022-10-28 14:02:42 +08:00
Jianbo Sun 63c9896d82
Fix: update export2config and export2secret example (#4932)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-27 19:06:17 +08:00
wyike cad525ff16
fix gitlab addon registry (#4934)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-27 19:03:57 +08:00
Tianxin Dong 01c759dcd1
Fix: fix gen doc for container image (#4935)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-27 19:03:13 +08:00
Young-Zen ea12c0f11e
Fix: get Application status using jsonpath filter expression (#4923)
Signed-off-by: yanghaojia <yanghaojia@coding.net>

Signed-off-by: yanghaojia <yanghaojia@coding.net>
Co-authored-by: yanghaojia <yanghaojia@coding.net>
2022-10-27 14:41:55 +08:00
Tianxin Dong b7a763c074
Feat: support operations for workflow run (#4920)
* Feat: support operations for workflow run

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-26 16:04:34 +08:00
Tianxin Dong 2324357907
Fix: add sub step in vela workflow logs (#4915)
* Fix: add sub step in vela workflow logs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-25 16:39:38 +08:00
barnettZQG 2255b0a6c7
Feat: Refer to the generation when checking the application status (#4901)
* Feat: Refer to the generation when checking the application status

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the starting status overrided the deleting status

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-24 19:32:45 +08:00
Tianxin Dong 5c1bf0ad70
Fix: support sub steps in vela status (#4911)
* Fix: support sub steps in vela status

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add http do in stdlib

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-24 15:58:57 +08:00
barnettZQG b41391a4fa
Chore: wrong endpoint for LoadBalancer type service(revert #4729) (#4902)
* Chore: wrong endpoint for LoadBalancer type service(revert #4729)

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the unit test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-22 12:38:08 +08:00
Jianbo Sun 70f0500825
Feat: support context.clusterVersion for definition graceful upgrade (#4890)
* Feat: support context.clusterVersion for definition graceful upgrade

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

* Fix: add test for context.clusterVersion

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

* Fix: use control plane context cluster

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

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-20 20:31:29 +08:00
Siege Lion 44b4afbcdf
Feat: add the container view to `vela top` (#4892)
* Feat: add content to help view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the feature of viewing log of pod

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the container view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case and fix some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-20 14:58:41 +08:00
Tianxin Dong 95b3b31b11
Feat: remove workflow step logs to vela workflow logs (#4883)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-20 11:18:48 +08:00
barnettZQG 072ef8f724
Fix: exit waiting after the workflow failed (#4879)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-19 11:24:01 +08:00
Siege Lion ab4348ed67
Feat: add the feature of viewing log of pod in `vela top` (#4870)
* Feat: add content to help view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add cluster data to pod view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the feature of viewing log of pod

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-18 19:47:27 +08:00
Tianxin Dong ccf7bdd2d6
Feat: support step logs in vela logs (#4845)
* Feat: support step logs in vela logs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-17 19:01:59 +08:00
barnettZQG 49ed837f97
Feat: support to manage the configs by the CLI, UI, and workflow. (#4794)
* Feat: support to manage the integrations by the CLI and the workflow

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove the xml

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the unit test for the nacos writer

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add the integration API

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: make the provider commands to be deprecated

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: make the unit test work

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: rename the integration to the config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: make the unit test cases work

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: refactor the config commands

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add the distribution status for the config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: sort the import packages

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: refine the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: refine the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: get the content format before render the content

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add some examples

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the command test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add the definitions of the workflow step

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add some tests

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add some tests

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: retry the CI

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: refine some words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-17 17:15:45 +08:00
Tianxin Dong 913c740a87
Chore: use use fix and optimize definitions (#4851)
* Chore: use use fix and optimize definitions

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: use fields instead of structs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-13 17:08:33 +08:00
Somefive fb45a94bb8
Feat: add export service (#4841)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-11 10:25:56 +08:00
Jianbo Sun 15c0e4122e
Chore: prevent restart/resume/suspend/terminate workflow when application running (#4839)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 20:22:29 +08:00
Jianbo Sun 556535be84
Chore: omit empty message in workflow step status (#4837)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 17:32:58 +08:00
Siege Lion fd11f90d96
Feat: add resource topology view in `vela top` (#4817)
* Feat: add some feature

1. add more column of application and managed resource

2. alter <ESC> to exist key and add <Q> as the back key
Signed-off-by: HanMengnan <1448189829@qq.com>

* Refactor: refactor the yaml view and help view with singleton  design pattern

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: some small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: some small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-08 10:23:12 +08:00
Tianxin Dong 91e470acfc
Fix: fix render fields in debug command (#4811)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-30 14:00:33 +08:00
Jianbo Sun 09e628025a
Feat: beautify addon list experience (#4807)
* Feat: beautify addon list experience

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

* Fix: addon list e2e test

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

* Chore: refine logs

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

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-09-30 13:23:27 +08:00
Siege Lion bd728cbdbc
Feat: Add more data field to application view and managed resource view in vela top (#4781)
* Fix: fix the bug of cluster list

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add some feature

1. add more column of application and managed resource

2. alter <ESC> to exist key and add <Q> as the back key
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-30 10:45:49 +08:00
Tianxin Dong 7fa40dbe77
Feat: support workflow get-context cli (#4795)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-28 17:18:08 +08:00
Somefive 668a637f86
Feat: upgrade go1.19 (#4790) 2022-09-28 10:19:28 +08:00
qiaozp e6507cd6cd
Fix: allow to read definition from user's namespace when force delete (#4778) 2022-09-26 22:30:20 +08:00
Siege Lion 6287a9caeb
Fix: fix the bug of cluster list (#4772)
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-26 14:49:50 +08:00
barnettZQG e99e1a650f
Fix: deprecate the cue-packages command (#4762) 2022-09-23 16:53:52 +08:00
Tianxin Dong d98016aa3d
Fix: use value instead of instance in openapi.gen (#4739)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-20 15:18:31 +08:00
Jianbo Sun 99d25a3657
Feat: support no browserver when using vela show without --web (#4756)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-09-20 15:18:16 +08:00
Siege Lion d38b20de64
Feat: add feature of refreshing resource view and fix the bug of stucking (#4743)
* Fix: add test cases

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix bugs in resource view switch

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: optimize the method of resource view render

1. Separate view loading and data rendering to optimize the view rendering speed

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix the bug of ctx value transmit in resource view switch

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: Add the feature of auto refresh
Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-20 11:28:51 +08:00
Jianbo Sun cdbf14c328
Feat: support addon dry-run to get the yaml results (#4753)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-09-19 17:24:07 +08:00
barnettZQG e2cc8b466b
Fix: query the resource duplicately (#4714)
* Fix: query the resource duplicately

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add an e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-19 10:23:10 +08:00
qiaozp 7a7ce85acb
Fix: wrong endpoint for LoadBalancer type service (#4729)
* Fix: wrong endpoint for LoadBalancer type service

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix cli test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-16 16:41:26 +08:00
Tianxin Dong cd9ac72531
Chore: update cue version to attr and notification (#4734)
* Chore: update cue version to attr and notification

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: docgen test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-09-16 16:28:35 +08:00
Somefive b898cecf2f
Feat: fix empty cluster topology and support select non-control-plane clusters (#4731)
* Feat: fix empty cluster selector topology and support select non-control-plane clusters

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: panic bug for list clusters

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-15 17:32:07 +08:00
Siege Lion 67f1901015
Refactor: rename interfaces and functions in `vela top` to promote semanticity (#4727)
* Fix: rename two interface name to make the name more specific

1. rename the ResourceListener to ViewListener
2. rename the Component to View

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update the type of ”Main“ field in component.app

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: rename some functions of pageStack to make the name more readable

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix some name

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add more test case

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix time format bug

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix test case in cluster_namespace_test.go

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-15 17:10:18 +08:00
qiaozp 682c76b8c0
Fix: vela show panic for component markdown format (#4706)
* Fix: vela show panic for component markdown format

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* move code

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-14 16:29:25 +08:00
Somefive ac52f4aba8
Chore: remove manualscaler (#4716)
* chore: remove manualscaler CRD define in apis/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manualscaler CRDs yaml in charts/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler design in design/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler code in doc/ hack/ legacy/ references/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler code in pkg/ test/ vela-templates/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: fix some code

Signed-off-by: arcosx <arcosx@outlook.com>

* Chore: remove manualscaler in test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove outdated tests

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove outdated tests

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: arcosx <arcosx@outlook.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: arcosx <arcosx@outlook.com>
2022-09-14 16:28:09 +08:00
Siege Lion dd13caf3c5
Fix: fix the vela system info command can not work (#4713)
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-13 16:18:19 +08:00
Charlie Chiang c2d6dfe920
Fix: fix uninstallation continues when answer is no (#4709)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-09-12 21:46:58 +08:00
Somefive cea9ef5c97
Chore: use functions from kubevela/pkg (#4693)
* Chore: use functions from kubevela/pkg

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: rename multiclusterpkg to pkgmulticluster

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-09 15:10:18 +08:00
Siege Lion 15004d9ad8
Feat: highlight the Yaml text of `vela top` (#4689)
* Fix: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix test case of the refactored code and some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: highlight yaml text

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix the bug in table stop.

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-09 09:33:04 +08:00
Siege Lion 8df436aa3b
Refactor: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code (#4679)
* Fix: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix test case of the refactored code and some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: rename the interface of ResourceView

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-02 17:29:12 +08:00
Tianxin Dong 239c5474dd
Chore: refactor workflow from workflow engine (#4631)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-02 12:55:03 +08:00
cezhang bab9534ed8
Feat: vela revision support read the apprevision details in yaml format (#4659)
Signed-off-by: cezhang <c1zhang.dev@gmail.com>

make reviewable

fix errors

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix error

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix error

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix errors

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix errors

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2022-08-30 13:58:47 +08:00
Siege Lion a393fb03d1
Feat: load the Yaml text of resource in `vela top` (#4665)
* Fix: fix inconsistent menu hints

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the feature that a new view of yaml was added and by it the user can load the yaml text of resource

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-30 10:20:10 +08:00
47 4e08ece053
Feat: System diagnose (#4662)
* Feat: System Info & Diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.misspelling 2.license

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

* Feat: 1.the system info command displays the environment variables

* Fix: Making syntax simple

* Feat(system info):1.ARGS多行展示2.指定名称时无须指定namespace3.优化界面展示,支持原始打印或者以wide/yaml形式打印4.指定名称时,打印更可读信息

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:add comment

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:syntactic redundancy

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Add signoff

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:System diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Diagnose cluster-gateway pod's status

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
2022-08-29 14:00:15 +08:00
Siege Lion 3531249e1b
Feat: add a new resource level view: pod view (#4661)
Pod view is the next level view of managed resource view

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-29 10:30:22 +08:00
47 a4ad1ad40f
Feat: System Info & Diagnose (#4657)
* Feat: System Info & Diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.misspelling 2.license

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

* Feat: 1.the system info command displays the environment variables

* Fix: Making syntax simple

* Feat(system info):1.ARGS多行展示2.指定名称时无须指定namespace3.优化界面展示,支持原始打印或者以wide/yaml形式打印4.指定名称时,打印更可读信息

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:add comment

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:syntactic redundancy

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Add signoff

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
2022-08-26 16:51:17 +08:00
Somefive 514ef4cc42
Feat: add get topology placement in multi-cluster provider (#4636)
* Feat: add get topology placement in multi-cluster provider

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: velaql in workflow use auth

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove ui-hidden & support filter outer

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-24 19:24:08 +08:00
Yuedong Wu 68c1da847d
fix: add supported but missing provider (#4645)
Signed-off-by: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com>

Signed-off-by: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com>
2022-08-23 21:15:32 +08:00
Tianxin Dong 1e87f455e8
Fix: optimize workflow debug cmd (#4638)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-23 15:32:50 +08:00
Siege Lion 5a241078b7
Feat: add new system info to system info board and optimize code (#4640)
newly added system info including:
1. Cluster num
2. App running num
3. cpu and mem usage condition of vela-core
4. cpu and mem usage condition of vela-core cluster gateway

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-22 18:00:49 +08:00
qiaozp 36ee590071
Feat: add base resource section for component ref (#4635)
* Feat: add base resource section for component ref

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* read from local

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* beautify

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* format imports

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-20 10:26:39 +08:00
qiaozp 924d55381e
Feat: component replication (#4449) 2022-08-17 14:04:57 +08:00
qiaozp bcb3550025
Fix: up command example (#4626)
* Fix: up command example

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* typo

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-17 11:33:12 +08:00
Siege Lion 2e18eaa3b2
Feat: add filtering features to the `Application` view and `K8S object` view of `vela top` (#4612)
* Feat: when `vela top` launch, can specify the namespace of the presentation application

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add filtering function to the k8s object view of the `vela top` command, which can be filtered by cluster and cluster namespace

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-15 10:36:12 +08:00
barnettZQG 72591788a6
Fix: the create time of the synced policies is zero (#4604)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-12 14:37:39 +08:00
Siege Lion 4d3ef75601
Feat: Add a new CLI command: `vela top` which can display system information and resource status in UI form (#4556)
* Feat: UI sketch init

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: Resource data load finish

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: optimize code struct

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case and fix some bugs
1. add test case to package model
2. fix a bug of ListClusters
3. optimize code structure

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix go.mod package version

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix some bugs and optimize code structure

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix irregular code and add comments

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: supplement test cases and fix bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: move the `vela status --ui` command out and add it as a new command `vela top`

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix package import sequence and go.mod

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add copyright header

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update description and example of command `vela top`

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: convert color variables to const variables

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-09 10:56:22 +08:00
Tianxin Dong c3ca308489
Chore: update cue version to 0.4.3 (#4425)
* Chore: update cue version to 0.4.3

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve some comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* rebase and add more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-08 17:57:48 +08:00
Somefive a2acd06ab1
Docs: add description for shared-resource (#4572)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-08 12:04:09 +08:00
qiaozp fcafbef8c5
Fix: vela CLI provider compatibility (#4561)
* Fix: vela CLI provider compatibility

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* List interface won't return NotFoundError

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* format imports

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-05 14:05:23 +08:00
Jianbo Sun fce66879e7
Chore: fix cli description to remove html tag format (#4550)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-08-03 19:18:57 +08:00
barnettZQG 8dfc8e35a6
Fix: can not find the resource when the resource namespace is diffrent with application (#4517)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 22:41:41 +08:00
barnettZQG 976d683185
Feat: refactor CLI commands related to resources (#4500)
* Feat: refactor CLI commands related to resources

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove the old test case.

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: rename 'vela pods' to 'vela status --pod'

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: sort the objects

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: list the pod by the labels

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: order the tree resource

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: set multicluster config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 19:44:27 +08:00
codinghuang f1790e5e6b
Feat: support set labels for env (#4422)
* Feat: support set labels for env

Signed-off-by: codinghuang <codinghuang@qq.com>

* Refactor: Remove util.ParseLabelString

use k8s.io/apimachinery/pkg/labels

Signed-off-by: codinghuang <codinghuang@qq.com>
2022-07-29 19:14:05 +08:00
wyike c372578e59
Fix: check definition of addon whether is conflict (#4493)
* fix checksemver

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

override defs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add test and fix some special cases

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix checkdiff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix flags

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-29 16:42:16 +08:00
47 8a82ac6277
Feat: System Info & Diagnose (#4379)
* Feat: System Info & Diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.misspelling 2.license

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

* Feat: 1.the system info command displays the environment variables

* Fix: Making syntax simple
2022-07-29 13:47:35 +08:00
qiaozp 7cdaa09660
Chore: organize appliesToWorkloads field of trait defs, add doc example (#4483)
* Chore: organize appliesToWorkloads field of trait defs, add doc example

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix gen

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add deprecate label

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix script to read all definition in directory

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add comment

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* go.mod

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* update some usage, better trait doc gen

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* minor fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* minor fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* postpone markdown escape pipe char

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-07-29 11:20:55 +08:00
Arena.Su b95980a92b
Feat: delete multi apps from vela delete cli command (#4484)
Signed-off-by: suxiang <704427617@qq.com>
2022-07-27 18:58:21 +08:00
Jianbo Sun 24c6514874
Fix: docker file fail to build for vela cli (#4464)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 22:44:26 +08:00
Arena.Su 70eb639ba7
Feat: delete svc flag from vela delete cli cmd (#4448)
Signed-off-by: suxiang <704427617@qq.com>
2022-07-25 22:17:07 +08:00
Charlie Chiang bb8f4e426a
Feat: make addon init use the latest CUE addon template (#4434)
* Feat: make addon init use the latest CUE addon template

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: simplify init cmd

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: ignore metadata

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: remove status

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* do not marshal to application

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: only look for output field

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: use global constant

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests according to changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-25 21:32:01 +08:00
Jianbo Sun 4814bce594
Feat: adapt vela port-forward with the velaql (#4439)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 21:27:31 +08:00
Jianbo Sun cae4aa4a76
Chore: update description of policy/workflowstep definition (#4428)
* Chore: update description of policy definition

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

* Fix: support workflow step generation for doc

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

* Chore: refactor package refereces/plugins to references/docgen

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

* Chore: add examples of def docs for workflow step

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

* Feat: refine workflow description

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

* Chore: refine the workflow step definition

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

* Chore: update workflow step definition

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 10:34:26 +08:00
ivyilike 3e57246740
Feat: support vela def apply for directory (#4142)
Co-authored-by: ivyilike <pww123@cmbchina.com>

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

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-24 16:34:13 +08:00
wyike 25b0cb8ee1
Feat: Addon support app template written by cuelang. (#4401)
* pass tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

refactor some codes

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

WIP delete useless workflow

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add checklegacy addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

refactor some logics

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix panic test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete useless addon test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix empty clusterargs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* rewrite some logic to support parameter ui

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* rename template cue

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix panic test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix render tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix checkdiff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* update file header

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-22 17:58:19 +08:00
StevenLeiZhang 67f3f2747a
Fix: vela addon upgrade missing the history args (#4388)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-07-22 14:39:09 +08:00
Charlie Chiang 5890b58aea
Feat: get raw Application yaml, json or jsonpath (#4415)
* Feat: get raw Application

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: add gvk

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: git rid of managedFields

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typos

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add test and make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-22 14:36:50 +08:00
Jianbo Sun 68a9565a1f
Chore: trim debug info (#4423)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-22 10:36:38 +08:00
Jianbo Sun 957302cb9d
Feat: support vela kube apply for CUE and JSON files (#4420)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-21 16:02:57 +08:00
TIEDPAG e37b0276c8
Feat: support addon helm repo skip tls verify (#4122) (#4146)
* Feat: support addon helm repo skip tls verify (#4122)

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: mv http server to BeforeSuite

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci error

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix merge

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Feat: support addon helm repo skip tls verify (#4122)

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: mv http server to BeforeSuite

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci error

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci

Signed-off-by: damianqin <damianqin@tiedpag.club>

Co-authored-by: damianqin <damianqin@tiedpag.club>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-19 18:00:28 +08:00
Jianbo Sun b24e7523d8
Feat: generate docs for reference automatically (#4377)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: refactor hardcode example to embd.FS

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

Fix: refactor doc gen for general types

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

Fix: update generate format

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

Fix: generate terraform reference docs

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

Feat: add definition reference generate script

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

Fix: refine output format

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

Fix: remove dup annotation

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

Fix: update doc

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

Fix: add i18n support

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

Feat: add translation

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

Feat: add policy definition gen

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

Fix: add compatibility for lable Annotation change

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

Fix: add more tests

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

Feat: allow mark example doc url on annotation

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

Fix: align vela show with vela def doc-gen, add vela def show equals with vela show

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-18 19:22:55 +08:00
barnettZQG a519a6c89d
Feat: optimize the dry run feature (#4364)
* Feat: optimize the dry run feature

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the bcode

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change some names

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-18 14:01:11 +08:00
Charlie Chiang ace23f1c6f
Feat: enhance addon init (#4370)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-18 10:40:42 +08:00
barnettZQG 1fc65f56bf
Feat: support HTTPRoute to generate endpoint (#4378)
* Feat: support HTTPRoute to generate endpoint

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: print the inner in CLI

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 18:15:20 +08:00
wyike c29e980e8a
Fix: fail directly when app terminated (#4363)
* fail directly when app terminated

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* support suspend

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix typo

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-14 18:14:09 +08:00
Jianbo Sun 8571aa76ef
Fix: abuse timeout context in terraform provider (#4374)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 15:47:15 +08:00
Jianbo Sun 072b80f6c6
Feat: support vela def apply for yaml definition (#4372)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 15:31:30 +08:00
Jianbo Sun cde76989a0
Feat: support resource topology for endpoints (#4362)
* Feat: support resource topology for endpoints

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

* Fix: add and refactor the test for endpoint

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 14:51:06 +08:00
Jianbo Sun 4bd4e9014f
Feat: support read from URL for --file command globally (#4346)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-11 16:59:54 +08:00
Charlie Chiang 3a6d947f07
Feat: create VelaQL views using `vela ql apply` (#4324)
* Feat: create VelaQL views using `vela ql create`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: merge reusable function

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format import

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for `status` or `export` fields

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: rename variables

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-07 13:59:16 +08:00
Jianbo Sun e0ab16851e
Chore: refine the output of velaux addon fixes #3902 (#4332)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-06 17:42:20 +08:00
Charlie Chiang da5282a15d
Feat: show or list revisions in `vela def get` and `vela show` (#4307)
* Feat: support --version when getting definitions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for vela show

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-06 15:41:00 +08:00
Charlie Chiang be317c412a
Feat: print complex values in addon parameters (#4309)
* Feat: support nested parameters in addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show all params

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: handle any addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: add a error check on json marshell

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-06 15:39:46 +08:00
Sumit Tembe a422ae8ab4
Feat: don't ask user confirmation when delete with --force or --yes (#4259)
* feature: don't ask user confirmation when delete with --force or --yes

Signed-off-by: Sumit Tembe <sumit.tembe@outlook.com>

* added a new flag 'yes'

* don't skip user confirmation for --force

* skip user confirmation for --yes
2022-07-06 15:34:41 +08:00
wyike 7df0f20f70
support only provide vela or kubernetes version requirement (#4284)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

helm package logic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete useless code

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-01 17:06:22 +08:00
Charlie Chiang b2dfee134b
Feat: print addon parameters recursively (#4290)
* Feat: support nested parameters in addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show all params

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-30 23:38:38 +08:00
Siege Lion cdafc03e7d
Feat: search useful addon version automatically (#4232)
* Feat: search useful addon version automatically

Verify whether the current addon version meets the system version requirements according to the obtained specified version. There are two system version requirements: Vela core version, K8s version.

If meet the requirements and continue to perform the next task.

If the requirements are not met, obtain the highest version that meets the requirements

Refs #4181

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: Optimize function implementation and code order, and modify test cases

add more comments of function

optimize package import sequence

optimize user interaction logic and error information extraction logic

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: change template string of regular expression to const type string

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-06-29 17:46:56 +08:00
Jianbo Sun 71df27a8c3
Fix: support stdin and url for vela ql (#4274)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-29 14:50:24 +08:00
Charlie Chiang 370940070b
Feat: filter definitions by which addon installed them (#4156)
* Feat: filter by source addon in `vela def list`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: change header year to 2022

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use generic filters for extensibility

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: change variable addonFilter to addonName

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests according to code changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: unify SearchDefinition params using filters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: simplify tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove redundant code

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests with multiple filters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show SOURCE-ADDON column in `def list`, if any

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add addon filter to apiserver definition-lists

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix lint issues

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: update swagger doc accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for filter Applying

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add a helper function to apply filters to lists

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add OwnerAddon to DefinitionBase

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for OwnerAddon field

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add addon util tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-29 10:55:50 +08:00
Charlie Chiang d3454ec9d5
Feat: implement addon push command (#4261)
* Feat: implement addon push command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: split functions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add command usages

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for addon push command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: fix lint

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix old incomplete tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: also add test in pkg/addon

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: sort import

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: add break in for loop and remove default repo checks

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add a cli option to keep original Chart.yaml

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typo in comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-28 20:16:45 +08:00
Jianbo Sun 0e98959d61
Fix: trim quot char for velaql output (#4267)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-27 16:48:31 +08:00
Jianbo Sun 8b441b6579
Fix: provider can't be added since 1.4 as context abused && Feat: add cache for remote terraform module in vela show (#4256)
* Fix: provider can't be added since 1.4 as context abused

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

* Feat: add cache for remote terraform module in vela show

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

* Fix: add message for terraform resource in error state

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-27 11:31:06 +08:00
Sumit Tembe 5b9fb49a91
Feat: omit service output if there's nothing (#4260)
Signed-off-by: Sumit Tembe <sumit.tembe@outlook.com>
2022-06-27 10:18:43 +08:00
wyike c4e1f39d28
Feat: Support kruise rollout (#4243)
* Feat: support kruise rollout

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

resolve roll back

fix

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

small fix

* fix rollback

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

topology filter by owner reference

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix imports

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

* rollback related tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

rename the operator

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix bugs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

* clean args before start

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

* remove replace go mod

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix operation tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 18:03:04 +08:00
Charlie Chiang f8833e34bc
Feat: implement addon init command (#4162)
* Feat: implement addon create command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make global vars local

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typos

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: create test for file utils

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: use -p flag to manually specify paths

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: create empty scaffold if Chart-related paramaters are not provided

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: fix golangci-lint warnings

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add cli tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show URL in errors if an invalid URL is detected

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-24 14:25:36 +08:00
wyike 22fe52b19c
Feat: skip validating version check (#4231)
* skip validating version check

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix commments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add compatible logic for old controller

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* modify minimal

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-24 14:11:57 +08:00
Zheng Xi Zhou 4c90e90fff
Fix: fixed the problems of display definition in web and support displaying WorkflowStep and Policy (#4234)
* Fix: fixed the problems of display definition in web

Some ComponentDefinitions, TraitDefinitions, WorkflowDefinitions
failed to show the usage in web browser

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

* set printable type for {}

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

* support WorkflowSteps and Policies

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

Co-authored-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
2022-06-23 19:45:49 +08:00
Tianxin Dong f7be1cd2fc
Feat: support more expressions in if and op.Fail (#4151)
* Feat: support more expressions in if

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix cache overrides context

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix skip status

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in tasks

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add fail action

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix annotation in tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add failed reason in substeps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix look up nil value

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* optimize the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add status in if

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix dash case

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-22 14:51:23 +08:00
Jianbo Sun 71a02b434b
Feat: support dry run for policy (#4201)
* Feat: support dry run for policy

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

* Fix: upgrade runc package

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-20 16:15:06 +08:00
barnettZQG 2ac3a7562d
Feat: support to manage the CLI-created apps in VelaUX (#4197)
* Feat: support for automatically hosting CLI-created apps

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-20 16:06:48 +08:00
Charlie Chiang e81d8ddacb
Fix: skip endpoint table if no endpoints are found in addons (#4166)
* Feat: skip endpoint table if no endpoints are found in addons

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: rename function name

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests to also exclude endpoints

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: reduce code changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-20 10:37:40 +08:00
Zhiyu Wang e572235434
Feat: cli def alias support (#4185)
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
2022-06-18 10:34:44 +08:00
Jianbo Sun f157515251
Feat: enhance velq ql and support cue file (#4196)
* Feat: enhance velq ql and support cue file

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

* add statement

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-17 13:44:09 +08:00
wyike d2fca08acb
Feat: cli addon add registry add more git types (#4170)
* add more git types

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-16 10:54:23 +08:00
Somefive 27ec48b617
Fix: enhance CLI for managing OCM clusters (#4165)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-15 11:18:59 +08:00
Tianxin Dong 87673093e9
Feat: add timeout in workflow step (#4121)
* Feat: add timeout in workflow step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: implement timeout in steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* support backoff time for timeout

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix resume workflow cli

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* set suspend to false when terminate the workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add validate workflow step name and more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* optimize the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-13 14:30:52 +08:00
ZhongsJie ca0faa1f46
Fix: vela addon registry get panic (#4135)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-06-09 10:15:47 +08:00
JarHMJ 146bcbd9a8
Feat: render color for outputs of vela up command (#4133)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-06-09 10:15:05 +08:00
Charlie Chiang b77cdaf5f5
Fix(cli): avoid incorrect addon name when using dot as local addon path (#4126)
* Fix(cli): avoid issues when using dot as local addon path

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): add tests for `vela addon enable .`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): use sample addon to test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): fix typos in tests accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): correct file path

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): do not focus single test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): fix typos in tests accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: correct error output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-06-09 10:12:19 +08:00
Holger Protzek deaf309f9b
Add description column to vela trait and component command (#4107)
Signed-off-by: Holger Protzek <holger.protzek@springernature.com>
2022-06-08 14:28:32 +08:00
wyike a00fee91fc
Fix: hold the force uninstalling process untill the last addon been deleted (#4101)
* hold the force uninstalling process untill the last addon been deleted

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add period

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-02 16:28:08 +08:00
StevenLeiZhang e012bbd1e4
Fix: vela provider delete command's example is wrong (#4094)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-06-02 11:02:19 +08:00
barnettZQG f550e89331
Fix: show the default password (#4091)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-02 10:01:04 +08:00
barnettZQG f47dc5f598
Fix: load the provider subcommands on demand (#4086)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-01 16:21:18 +08:00
Somefive 985d49d9e6
Feat: use deferred config in CLI (#4083) 2022-06-01 08:31:01 +08:00
wyike f04f29dff0
Fix(addon): more note info and filter prerelease addon version (#4081)
* more note info and filter prerelease addon version

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* wrap the error optimize the show info

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-31 18:56:04 +08:00
StevenLeiZhang 3484e8102d
Fix: Improve vela provider add response (#4055)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-31 16:14:46 +08:00
Shukun Zhang f8c24ba912
Feat: vela ql into vela-cli (#3519)
Signed-off-by: Shukun Zhang <2236407598@qq.com>
2022-05-31 16:12:04 +08:00
barnettZQG b13eb4adb5
Fix: remove the tcp protocol prefix in the endpoint string (#4059)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-30 20:11:55 +08:00
Tianxin Dong fcfb1012d6
Feat: add if in workflow (#3941)
* Feat: add if in workflow struct

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: implement the if in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: support dependency and skip for suspend step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the rebase from sub steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: support if in sub steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Test: add more tests in discover and custom

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Lint: fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Tests: add more tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: change failed after retries into reason

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the terminate cli

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* remove the terminate workflow to pkg and add feature gates

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* nit fix

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make finish condition more clear

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-27 22:01:14 +08:00
Xiangbo Ma 83704058af
Fix: vela port-forward not working for webservice component (#4007)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-27 17:14:15 +08:00
yangs d0a725b51e
Fix: velaql fail to parse query result to json format (#4011)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-05-27 16:23:15 +08:00
Jianbo Sun 9244efe813
Feat: build docker image(oamdev/vela-cli) for vela-cli (#3976)
fixes #1392

One of the use case could be https://github.com/kubevela/kubevela/discussions/3821

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-26 10:27:31 +08:00
Somefive cb5630af48
Fix: enhance grant privileges output (#3962)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-24 14:31:32 +08:00
Somefive 897f07fbec
Feat: vela kube delete (#3952)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-24 09:38:22 +08:00
barnettZQG 09ce919b2b
Feat: Refactoring the API Server module for better layering (#3945)
* Feat: Refactoring the API Server module for better layering

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: fix the lint errors

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-23 12:17:28 +08:00
Somefive c5b28cb4b3
Feat: vela auth grant-privileges (#3943)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-23 10:47:13 +08:00
Noorain Panjwani 564cbaf5d4
Feat(cli): added the offline flag to the dry-run command (#3875)
* Feat(cli): Added an offline flag to the 'dry-run' command

Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>

* Using a fake client now for offline mode

Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>
2022-05-21 23:00:45 +08:00
Will Li fecdc23fd3
Fix(cli): try to get mapValue type name (#2474)
* Fix(cli): try to get mapValue type name

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* Fix: update output format based on comment and fix typo

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* Style: make the change reviewable

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* Fix: test

Signed-off-by: Cuichen Li <cuichli@cisco.com>
2022-05-21 00:25:20 +08:00
Zheng Xi Zhou 334446c264
Feat: support force delete Terraform typed application (#3929)
* Feat: support force delete Terraform typed application

If a Terraform typed application hangs on deletion, it could be forced to
delete by command line `vela delete xxx --force`

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix copyright

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Upgrade terraform controller api version

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add one more tests

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix two unit-tests

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-05-20 18:17:10 +08:00
Somefive 0cd1ae155c
Feat: vela kube apply --cluster (#3931)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-20 12:11:58 +08:00
Charlie Chiang eb5f416e4e
Feat: add more detailed output for `vela addon status` (#3876)
* Feat: show available versions and dependencies in `addon status`

Also prettify output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show addon dependencies in `addon status`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: adjust `addon status` output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove spaces in `addon status` output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: truncate string if available versions too long

if a local addon has been installed, the AVAILABLE-VERSIONS column of the registry one will not truncate. this commit fixes that.

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Perf: avoid unnecessary network requests to improve performance

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: do not display remote info for local addons

Limit Description length when using `addon list`

Use simpler method to get addon info

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for cli/addon limitStringLength, generateParameterString

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: fix output being empty if the searched addon does not exist anywhere

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for generateAddonInfo

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for generateAddonInfo and FindWholeAddonPackagesFromRegistry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format code

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: correct unnecessarily focused tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove unused code blocks

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: remove unnecessary output to stdout

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: remove added registry after tests has been completed

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: new RegistryDataStore every test, to avoid panics

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix failing tests due to incorrect registry name

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: move logic to get addon package out of where it is supposed to get addon status

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add test cases for secret-getting in TestGetAddonStatus

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: return error if an addon is not installed, nor does it exist in the registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: rename GetAddonWholePackage to GetDetailedAddon as per wonderflow

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: require --verbose option to show details in `vela addon status`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: require --verbose option to show details in `vela addon status`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* chore: run make reviewable

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix configmap being already existed

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: fix output show addon does not exist when verbose is off and an addon is not installed, but it does exist in the registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix golangci-lint issues

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-05-19 16:21:36 +08:00
Kethavath Siva Naik 1cc5c54d32
Fix: corrected minor typo in code (#3913)
Signed-off-by: Kethavath Siva Naik <sivanaikk0903@gmail.com>
2022-05-19 10:55:41 +08:00
Somefive 12ec62dd65
Feat: vela auth list-privileges (#3923)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-18 20:57:39 +08:00
Somefive 9d6706d48e
Feat: vela auth gen-kubeconfig (#3911)
* Feat: vela create kubeconfig

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-18 16:14:00 +08:00
ZhongsJie a19e90ea2c
Fix: modify the template definition to solve the trait cli error Signed-off-by: Shijie Zhong <zhongsjie@cmbchina.com> (#3877)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-05-13 10:52:23 +08:00
Somefive 967bc7786d
Fix: use vela prism for accessing clusters as alternative (#3849)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-12 10:47:35 +08:00
barnettZQG fc5bcc6c33
Fix: the endpoints is repeated and can not query the ingress with v1 version (#3862)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-11 14:27:38 +08:00
Afzal Ansari e6d47d3758
refactors http write resp to use 'html/template' instead (#3829)
Signed-off-by: afzal442 <afzal442@gmail.com>
2022-05-10 13:36:00 +08:00
Charlie Chiang a598272491
Fix: resolve locally installed addons not being displayed (#3827)
* Fix: resolve locally installed addons not being displayed

Addressed an issue where locally installed addons may not be displayed
if one with the same name is in the registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: revert incorrect auto-formatting

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: change original variable name to avoid confusions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for outputs from `vela addon list`
when an addon with the same as registry one is locally installed

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use more concise method to check length

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add one more test condition for dual addons
i.e. local and registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: simplify testing logic by removing unneeded looping

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add missing license header

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-05-10 13:35:12 +08:00
Zheng Xi Zhou 7bfcd6acc5
Fix: don't override user definied `region` (#3503)
* Fix: don't override user definied `region`

Fix #https://github.com/oam-dev/kubevela/issues/3384

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix check-diff

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix UT

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* revert some changes

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-05-09 15:10:31 +08:00
StevenLeiZhang 88fb854a26
Feat: Support basic-auth or reuse chartmuseum as addon registry (#3787)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-07 23:39:34 +08:00
Tianxin Dong 6c151ebcf1
Fix: add some message to make debug more clear (#3812)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-05 17:51:45 +08:00
Somefive 3cde2337c6
Feat: upgrade dependencies (#3776)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-05 14:37:50 +08:00
barnettZQG 2cc32e6c62
Chore: sync the cli binaries to OSS (#3764)
* Feat: show the parsing capability error message

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Chore: sync the cli binaries to OSS

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-28 19:18:16 +08:00
Somefive 1bd9a0eca3
Fix: kubectl check err (#3759)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-28 16:32:38 +08:00
Somefive 512664b9b3
Feat: support dependsOn in deploy workflowstep (#3750)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-28 16:29:34 +08:00
wyike 7935447d44
Fix: addon cli parse any type (#3775)
* fix addon parse any type

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* test int

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-28 15:58:23 +08:00
Tianxin Dong 6761b18229
Fix: fix up command add debug policy (#3770)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-27 21:31:07 +08:00
qiaozp af53a58b8e
Fix: velaux addon hint after enable (#3747)
* Fix: velaux addon hint after enable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* check if upgrade

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-26 15:27:43 +08:00
Zheng Xi Zhou b4894cc284
Fix: use Terraform provider name as application in CLI (#3742)
* Fix: use Terraform provider name as application in CLI

In CLI, use Terraform provider name as application name when
create a Provider. Also display there providers in VelaUX.
1). manually created a Terraform Provider object, like https://github.com/oam-dev/terraform-controller/blob/master/getting-started.md#aws
2). by enabling a Terraform provider addon in version older than v1.3.0
3). by create a Terraform provider via `vela provider add`
4). by VelaUX

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add UTs

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-26 12:53:14 +08:00
StevenLeiZhang 4162c413b3
Fix: vela-cli does not print cluster name, if application installed in default cluster (#3691)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-04-24 09:16:34 +08:00
qiaozp 900653a2da
Feat: vela def gen-api command (#3699)
* Feat: vela def go-gen command

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Add unittest

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* header

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Add test case

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* more test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add optional prefix, add omitempty in json tag

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-20 18:08:24 +08:00
Somefive 571e154af3
Fix: bind env to system namespace (#3706)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-19 20:55:59 +08:00
Zheng Xi Zhou cb4a9ea1a8
Fix: set provider name as the config name (#3687)
- For VelaUX, hidden a provider name (users don't need to manual set it). Used
the application/component name (config name) to be the provider name.
- Store description of a config to the annotation of the config application

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-18 16:47:51 +08:00
Tianxin Dong 21216055fb
Feat: add vela debug command (#3580)
* Feat: add debug configmap if debug policy is specified

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add vela debug command

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make code reviewable

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix sonartype lift

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix cue string

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: display better for debug

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* tidy the go mod

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add debug test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* change uitable vendor

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* pass resource keeper from handler

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix rebase

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Pending test temporary

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-18 11:06:14 +08:00
Somefive 5857aa8790
Fix: vela status tree show cluster alias & raw format (#3659)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-14 19:35:47 +08:00
Somefive d657ea4daf
Feat: rework vela up to support specified revision (#3634)
* Feat: rework vela up to support specified revision

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add legacy compatibility

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: fix test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-13 22:20:07 +08:00
Somefive c33eaa0609
Fix: enhance vela status tree print (#3639)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-13 17:46:55 +08:00
Somefive 7a0d2b552b
Feat: support alias in cluster (#3630)
* Feat: support alias in cluster

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test for cluster alias

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-13 13:58:35 +08:00
Somefive 0e97aa2291
Feat: vela status --tree (#3609)
* Feat: vela status --tree

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: support show not-deployed clusters

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add tests

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add multicluster e2e coverage

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: minor fix

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-12 17:58:45 +08:00
wyike 2e57be1022
Feat: support basic auth private helm repo (#3595)
* support auth

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix check diff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

fix

add comments

fix test

* add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

add more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* extract set auth info as a global func

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* return bcode

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-12 14:33:44 +08:00
Somefive b6fac3f4d5
Fix: cli default switch on feature flags (#3625)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-11 20:40:13 +08:00
Avery e65dcf12db
add sorting for properties, outputs, writeSecretRefParameters in vela def doc-gen (#3593)
Signed-off-by: Nicola115 <2225992901@qq.com>
2022-04-08 15:27:35 +08:00
Zheng Xi Zhou b1823084af
Fix: add terraform aws provider without AWS_SESSION_TOKEN (#3590)
* Fix: add terraform aws provider without AWS_SESSION_TOKEN

Fix #3589 and refine prompts for cli

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-07 13:41:29 +08:00
namo 83fe4a160e
Feat(lang): add addons gitlab support (#3543)
* add addons gitlab support

Signed-off-by: Namo <lgj112113@163.com>

* add addons gitlab support

Signed-off-by: Namo <lgj112113@163.com>

* test file edit

Signed-off-by: Namo <lgj112113@163.com>

* typo edit

Signed-off-by: Namo <lgj112113@163.com>

* notes edit

Signed-off-by: Namo <lgj112113@163.com>

* move third party imports block

Signed-off-by: Namo <lgj112113@163.com>

* code format edit

Signed-off-by: Namo <lgj112113@163.com>

* notes edit

Signed-off-by: Namo <lgj112113@163.com>

* create addon registry bug fix

Signed-off-by: Namo <lgj112113@163.com>

* add gitlab addon registry bug fix

Signed-off-by: Namo <lgj112113@163.com>

* add addon gitlab support test file

Signed-off-by: Namo <lgj112113@163.com>

* add addon gitlab support test note edit

Signed-off-by: Namo <lgj112113@163.com>

* add addon gitlab branch support and fix bug

Signed-off-by: Namo <lgj112113@163.com>

* addon gitlab registry repo name invalid

Signed-off-by: Namo <lgj112113@163.com>

Co-authored-by: Namo <lgj112113@163.com>
2022-04-07 11:05:14 +08:00
wyike ef4b9816e1
fix bug (#3569)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix bugs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

fix
2022-04-01 01:04:29 +08:00
Jianbo Sun 3157efd421
Chore: refine chart readme and notes (#3563)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-31 17:33:06 +08:00
qiaozp c6b9abe4c4
Chore: bump k8s version contraint (#3560)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-03-31 16:42:14 +08:00
wyike 0ada407fbe
optimize the ux of addon (#3557)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

fix
2022-03-31 10:24:20 +08:00
qiaozp de84421487
Feat: add name param in vela logs (#3556)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-03-30 17:56:59 +08:00
wyike 47050c90b6
Fix: cli addon multicluster bug (#3547)
* fix addon multicluster bug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete useless test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

asd

asd

* fix test race condition

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-29 23:03:57 +08:00
Zheng Xi Zhou 5d61cee3f6
Fix: support multiple-tenant cloud resources (#3305)
* Fix: support multiple-tenant cloud resources

Split terraform-xxx to two parts, the original addon will only install
definitions, and the provider object will be created by `vela provider`

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* continue

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* continue 0302

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support `vela provider list`

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* generate a configmap in an addon terraform-xxx

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix listing providers

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support add a provider

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support delete a provider

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support legacy providers

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-03-28 21:55:33 +08:00
wyike 161d2646cb
Feat: helm repo as addon registry to support addon's multi-version (#3523)
* versioned registry impl
add more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ui

fix

fix

fix

modify addon registry
2022-03-28 21:25:38 +08:00
Avery 4f8e7506f9
Fix: fix bugs in vela def doc-gen from local file (#3490)
* fix bugs in using local filepath as markdown filename; fix bugs in parseLocalFile

Signed-off-by: Nicola115 <2225992901@qq.com>

* ignore control character mismatch between lc.TerraformConfiguration and raw text

Signed-off-by: Nicola115 <2225992901@qq.com>

* goimports

Signed-off-by: Nicola115 <2225992901@qq.com>

* store remote and local in MarkDownReference struct

Signed-off-by: Nicola115 <2225992901@qq.com>

* gofmt

Signed-off-by: Nicola115 <2225992901@qq.com>

* fix too many argument bugs in generate.go:45

Signed-off-by: Nicola115 <2225992901@qq.com>

* fix invalid comment

Signed-off-by: Nicola115 <2225992901@qq.com>
2022-03-28 20:57:24 +08:00
Somefive 795231ceb5
Feat: add revision command (#3506)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 14:47:47 +08:00
Jianbo Sun 723a5d83ca
Fix: vela status --endpoint format (#3502)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-24 09:47:15 +08:00
Tianxin Dong aaa1db8760
Fix: fix workflow cli must have workflow in spec (#3469)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-23 17:16:39 +08:00
Jianbo Sun c5baa1cae9
Feat: support specify cluster in addon installation (#3497)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-23 14:33:15 +08:00
Jianbo Sun e5fd150cd5
Fix: add client validation and severside dry run for vela dry-run (#3485)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-22 16:39:36 +08:00
wyike a6460d67b6
Feat: check if an addon is been used while disabling. (#3457)
* first commit

add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fetch only definitions from registry for lagacy addon app

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

* fix error test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-21 10:38:56 +08:00
wyike 13c420dada
Fix: optimize helm repository logic put cache lower layer and return bcode when error (#3466)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-18 18:36:19 +08:00
Avery 3634ad6f18
Fix: enable provider elastic (#3453)
* enable provider ec

Signed-off-by: Nicola115 <2225992901@qq.com>

* rename provider ec as elastic

Signed-off-by: Nicola115 <2225992901@qq.com>
2022-03-16 15:07:25 +08:00
Shukun Zhang 3af893950e
add vela status --endpoint into the tips for vela up (#3433)
Co-authored-by: zhangshukun <zhangshukun.7@bytedance.com>
2022-03-14 09:39:11 +08:00