Commit Graph

344 Commits

Author SHA1 Message Date
Tianxin Dong 62ecc70ade
Fix: fix token invalid after the server restarted (#3658)
* Fix: fix token invalid after the server restarted

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

* fix lint

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

* Pending test temporary

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

* Pending test temporary

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-14 22:25:43 +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 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 d6b96fee5a
Fix: add e2e apiserver test for addon (#3607)
* add e2e apiserver test for addon

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

delete comment

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

fix

* fix test

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

* close the reponse body

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

* cover list enabled addon

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

fix e2e test

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

fix test

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

fix test

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-11 17:46:46 +08:00
Somefive 160ef64855
Feat: support livediff for referred object (#3525)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 17:52:33 +08:00
Somefive c4a8fcf29c
Feat: rework referred objects for version (#3446)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 16:09:12 +08:00
barnettZQG 044c4bf73c
Feat: add RBAC support (#3493)
* Feat: add the rbac data model

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

* Feat: add some api about the project

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

* Feat: add CRUD about the project and the project user

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

* Feat: add CRUD about the role and perm check filter function

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

* Feat: update swagger config

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

* Feat: add default roles and perm policies

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

* Feat: add perm check filter for all webservice

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

* Feat: change the method that find project name

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

* Feat: query applications and envs by user perm

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

* Feat: support get login user info

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

* Fix: change default permissions

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

* Feat: change PermPolicy to Permission

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

* Feat: add some unit test and fix the e2e test error

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

* Fix: change some comment word

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

* Fix: e2e api path error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-28 16:03:11 +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
Tianxin Dong 03cd0d144a
Feat: add login handle for apiserver (#3471)
* Feat: add login handle for apiserver

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

* fix go lint

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

* Fix: clean up code and add user in ctx

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

* Fix: fix swagger conflict

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

* Feat: add auth in apiserver e2e test

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

* Fix: nit fix for apiserver e2e test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-24 17:59:09 +08:00
Somefive 741544c00c
Feat: rework apprev (#3498)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-24 14:40:19 +08:00
Tianxin Dong 3ea2ac6d0f
Feat: add user management apis (#3458)
* Feat: add user management apis

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

* Feat: add e2e test and some nit fix

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

* Feat: add password validate

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

* Feat: add email modification in update user

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

* Fix: fix user detail to user base

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

* Fix: fix ut

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

* Fix: fix test

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

* Fix: fix rebase

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

* Fix: add password check in create user

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

* Fix: fix bcode confilt

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-19 15:51:32 +08:00
Somefive 2d19454a35
Feat: enhance labels & annotations trait (#3454)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-16 17:50:12 +08:00
Sunghoon Kang 1300a980f0
Feat: reconcile app with scoped permissions (#3434)
* Refactor: refactor multi cluster round trippers

Before adding more RoundTrippers, it would be better to expose common
logic in the utility package.

This commit exports `tryCancelRequest` at `utils` package, and make
`secretMultiClusterRoundTripper` implement `RoundTripperWrapper`
interface to allow chaining multiple round trippers.

Refs #3432

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Feat: reconcile app with scoped permissions

Currently, all Application resources are reconciled by the Roles bound
to the controller service account. This behavior gives us the power to
manage resources across multiple namespaces. However, this behavior can
be problematic in the soft-multitenancy environment.

This commit adds `serviceAccountName` to ApplicationSepc to reconcile
Application with the given service account for reconciling Application
with scoped permissions.

Refs #3432

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Refactor: extract context setter as method

https://github.com/oam-dev/kubevela/pull/3434#discussion_r825561603

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Feat: use annotation instead of spec

https://github.com/oam-dev/kubevela/issues/3432#issuecomment-1066460269

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Refactor: unify service account setter caller

https://github.com/oam-dev/kubevela/pull/3434#discussion_r825853612

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Refactor: rename GetServiceAccountName

https://github.com/oam-dev/kubevela/pull/3434#discussion_r826514565

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
2022-03-15 11:55:50 +08:00
Somefive e2275efe56
Feat: local virtual cluster + namespace in topology (#3436)
* Feat: virtual cluster local + namespace

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

* Chore: refactor some names

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-15 10:06:36 +08:00
Somefive 19424cfaa4
Fix: add state keep for healthy suspend (#3426)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-14 14:38:43 +08:00
Somefive 598de21f67
Feat: add support for json-patch and json-merge-patch (#3406)
* Feat: add support for json-patch and json-merge-patch

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

* Fix: add e2e test

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

* Fix: refactor json-patch field

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-11 14:57:50 +08:00
Somefive 70408e4712
Feat: support vela cluster labels add/del to manage cluster labels (#3413)
* Feat: add vela cluster label command

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

* Feat: add vela cluster label command to help manage cluster labels

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

* Fix: add e2e test

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

* Fix: use vela cluster labels

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-11 14:13:17 +08:00
Somefive b975c313c3
Fix: add parallelism params for deploy step (#3411)
* Fix: add parallelism params for deploy step

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

* Fix: add test

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

* Fix: add e2e test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-11 13:20:12 +08:00
Somefive de81c24f42
Feat: support standalone style multi-cluster (#3223)
* Feat: ref component

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

* Feat: support topology and override

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

* Feat: add support for external policy and workflow

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

* Feat: add admission control

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

* Fix: disable cross namespace ref object

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

* Chore: refactor

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

* Feat: support labelSelector in ref-objects

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

* Feat: add pre approve for deploy step

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

* Chore: refactor

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

* Fix: test

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

* Feat: support comp/trait type in override policy even not used by prototype

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

* Feat: support regex match for patch component name

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

* Fix: labelSelector not work for cluster

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

* Fix: ref workflow contains external policy

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

* Fix: revision test

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

* Feat: parallel apply components

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

* Feat: add test for oam provider

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

* Fix: service ref-comp & indirect trait ns

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

* Fix: align namespace setting for chart

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

* Fix: add strict unmarshal and reformat

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

* Fix: merge with cluster rework

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

* Feat: patch trait-def

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

* Fix: apply components + load dynamic component

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

* Fix: add test for loadPoliciesInOrder

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

* Feat: add test for open merge

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

* Fix: reformat & add test for step generator

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

* Fix: add test for parse override policy related defs

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

* Fix: add test for multicluster provider (expandTopology and overrideConfiguration)

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

* Fix: add admission test

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

* Fix: revert trait status pass in component status

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

* Fix: add test for dependency in workflowstep & standalone multicluster test

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

* Fix: add check for ref and steps in WorkflowStep & enhance ref-objects scheme check

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-07 10:21:00 +08:00
barnettZQG 342b853315
Feat: add api for delete component (#3341)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-01 22:13:24 +08:00
wyike f39a3fb792
Feat: system information collection logic in apiserver (#3082)
* Feat: userInfoCollection

Signed-off-by: wangyike <wangyike_wyk@163.com>

* Signed-off-by: wangyike <wangyike_wyk@163.com>

change enable/disable to update interface

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-14 10:16:31 +08:00
wyike 5b1c47c918
cue template health check skipStandard workload and fix test diverge (#3087)
Signed-off-by: wangyike <wangyike_wyk@163.com>

add annotation

Signed-off-by: wangyike <wangyike_wyk@163.com>

set skipStandardworkload in wl

Signed-off-by: wangyike <wangyike_wyk@163.com>

add annotation

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-13 19:08:43 +08:00
Jianbo Sun 7f7a9dcac0
Feat: vela up support read from stdin && refine CLI output && fix vela addon command (#3080)
* Feat: vela up support read from stdin

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

* Fix: addon name missed in output and fix test

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

* Chore: refine CLI output

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

Fix: add retry-on conflict on CLI

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-12 17:43:08 +08:00
wyike 53081d043b
Chore: deprecate and delete approllout related code (#3040)
* Fex: delete useles approllout related code

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix failed test

Signed-off-by: wangyike <wangyike_wyk@163.com>

Fix: failed e2e test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix-test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix e2e-test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix e2e rollout test

Signed-off-by: wangyike <wangyike_wyk@163.com>

* delete useless test code

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix failed unit-test

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-06 14:33:11 +08:00
qiaozp 5f31b9aad0
Feat: add test for registry name in addon response (#2858)
* add test for registry name when list addon

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

* revert

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

* fix

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

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-01-06 11:48:34 +08:00
Somefive 746eb0dbe4
Feat: support logs for velaql (#3011)
* Feat: support logs for velaql

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

* Feat: extend parameter

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-28 20:49:56 +08:00
Somefive 0d6173c1ca
Fix: pending deprecated test (#3009)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-28 13:12:09 +08:00
Jianbo Sun 5648c56cf5
Refactor: align velaux env and CLI env, they both use K8s namespace as (#2975)
* Refactor: use createOrUpdateNamespace as a common util function

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

* Feat: add ENV webservice handelr

* Fix: fix Env usecase logic

* Feat: Add Delete Env API

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

* Fix: filter empty addon data

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

* Feat: split makefiels and make it clear

* Feat: add k8s utils test

* Feat: Add env update interface

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

* Feat: change env implementation

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

* Fix: minor fix

* Revert "Fix: minor fix"

This reverts commit 9cafefa65a.

* Fix: use appusecase as parameter

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

* Refactor: align CLI vela env with new env design

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

* Fix: minor fix

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

* Feat: add page index and alias of env

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

* Fix: fix tests and licence header

* Fix: fix makefile and add default target

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

* Fix: update build swagger.json

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

* Fix: change update env api

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

* Feat: list env with alias

* Feat: add log to env delete

* Fix: can not get app status

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

* Feat: support update workflow and refactor code

* Fix: lint

* Fix: remove swagger check

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

* Fix: fix cli vela delete

* Fix: update test

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

* Fix: update test

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

* Fix: app deploy unit test case

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

* Fix: SortOrderDescending is not effective

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

* Fix: e2e test case

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

* Feat: support default project/target/env

* Fix: make test and add swagger

* Fix: use separated datasource for unit test

* Fix: app rollback bug

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

* Fix: fix e2e test

* Fix: kubeapi driver sort bug

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

* Fix: e2e test

* Fix: api e2e test

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

* Fix: e2e test fix

* Fix: try fix e2e test

* Fix: api e2e test

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

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-25 10:36:54 +08:00
wyike e519c6142a
Chore: delete useless test (#2984)
* delete useless test

Signed-off-by: wangyike <wangyike_wyk@163.com>

* delete healthscope related test

Signed-off-by: wangyike <wangyike_wyk@163.com>

* small fix

Signed-off-by: wangyike <wangyike_wyk@163.com>

* remove useless report

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-23 18:13:00 +08:00
Somefive 36ad77493c
Fix: resource policy test flaky (#2969)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-22 09:27:21 +08:00
qiaozp 9317bb1cab
Refactor: addon cache mechanism and code architecture (#2956)
* Refactor: fix addon cache and code

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

* basic trim

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

* Fix list OSS bucket addon's meta

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

* rename listAddonMeta func

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

* fix enable

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

* rename and trim cache func call

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

* remove same source code, use Registry to implement Source interface. Keep the compatibility of DeployTo fields.

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

* complete github reader

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

* fix read from github, fix test

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

* reviewable

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

* header

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

* rename function, restore test

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

* try CI

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

* sort out functions name. add detail test

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

* fix test

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

* fix test

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

* filter directory without metadata.yaml in oss

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

* add GitHub reader unit test

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

* clean up

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

* reviewable

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

* header

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

* add cache arg

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

* fix test

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

* change field name

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

* build swagger

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

* some json tag, revert cache logic

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

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-21 09:31:37 +08:00
Zheng Xi Zhou d11d171be8
Fix: enable Observability in runtime clusters (#2886)
* Fix: enable Observability in runtime clusters

Enabled add-on observability in runtime clusters. In each cluster, a sub-domain
will be allocated to the cluste

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


* Fix:add workflow step definition and ut

Added a new workflow step definition `apply-application-in-parallel`,
and added more unit tests
2021-12-17 23:04:54 +08:00
yangsoon 3b1f097807
Fix: change catlog helm repo path to https://charts.kubevela.net/example (#2942)
Signed-off-by: yangsoon <yangsoonlx@gmail.com>
2021-12-16 15:17:00 +08:00
Tianxin Dong 655c2615e1
Feat: add workflow reconciling backoff time and failed limit times (#2881)
* Feat: add workflow failed after retries

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

* Feat: add workflow reconcile backoff time

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

* fix lint

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

* make reviewable

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

* resolve some comments

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

* add tests

* fix rebase

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

* fix test

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

* fix status

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

* fix requeue time interval

* resolve comments

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

* change time to pointer

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

* fix pointer test

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

* fix test

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

* change time to cm

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

* resolve comments and add e2e test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-15 11:33:33 +08:00
Somefive 4dc213469a
Feat: add compatibility code for new rt (#2920)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-14 21:27:47 +08:00
yangsoon 6d536a84d7
Feat: refactor velaql provider with new ResourceTracker architecture (#2915)
* Feat: refactor velaql with new ResourceTracker architecture

Signed-off-by: yangsoon <yangsoonlx@gmail.com>

* Feat: concurrently request the pod created by helm

Signed-off-by: yangsoon <yangsoonlx@gmail.com>
2021-12-14 13:09:40 +08:00
Somefive a89bb69a62
Fix: add design docs for ResourceTracker (#2909)
* Fix: enhance rt logic and add docs

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

* Fix: test conflict

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-13 19:41:42 +08:00
Somefive b622cbdb7f
Feat: ResourceTracker new architecture (#2849)
* Feat: new rt

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

* Fix: add publish version

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-10 15:00:03 +08:00
barnettZQG ad4b44696a
Feat: add the project api (#2899)
* Feat: add the project api

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

* Fix: fix e2e test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-08 19:08:35 +08:00
wyike 99757814ab
Feat: algin addon cli and apiserver (#2867)
Feat: cli aligin with apiserver

Fix comments

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-07 15:11:52 +08:00
qiaozp 95c2b8ce04
Fix: query addon status api 500 because of secret (#2866)
* Fix: query addon status api 500 because of secret

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

* Fix: enable addon failed because the file name of the cue template is used as the component name

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

* Fix: fix several oss read problem

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

* fix lint

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

* fix

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

* use oss test endpoint

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

* fix ut

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-03 10:59:46 +08:00
yangsoon 13b07674f1
Fix: fix flaky e2e-test of apiserver (#2840)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-30 10:37:52 +08:00
Tianxin Dong d1f56743cc
Feat: add core definitions (#2664)
* Feat: add components and storage api-oriented defs

* add some examples

* change the dir

* resolve comments

* make reviewable

* fix example

* add labels and annotations in component

* add config map ref key in env

* add more traits

* add wfstep defs and rename

* fmt the cue

* re-struct all the definitions

* revert deprecated defs and add webhook def

* delete useless network trait

* fix generated tab

* fix indent

* fix webservice

* add labels

* comment webservice and worker's health check

* fix retainkeys

* fix webservice and worker's health check

* add suspend def which will be replaced by internal def

* fix cli and add labels

* fix script

* add ignore

* fix healthscope example
2021-11-29 15:02:16 +08:00
yangsoon 23bceb9f9c
Fix: velaql miss query the resources created by the old application version (#2824)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-27 13:57:48 +08:00
Zheng Xi Zhou 7bdf4c176b
Fix: install Terraform and apply the support for a provider in one jump (#2778)
* Fix: install Terraform and apply the support for a provider in one jump

- Fix issue: addon name should not include forward-slash "/" cloud-resource fix addon name should not include forward-slash "/" #2588
- Install terraform and the provider in one jump. Instead of installing terraform
and terraform-xxx in two steps
2021-11-26 23:01:11 +08:00
wyike 66e8398ab8
Fix: add back missed commit and add tests (#2781)
* Fix: missed commit

Test: add test

* Fix: add e2e test addon rely on core feature

fix test

Fix: e2e-test

* Fix: create vela-system namespace when cluster join

fix

* Fix: fix comments add args in command
2021-11-24 20:59:08 +08:00
barnettZQG 99d473df2a
Feat: translate the object type to Group (#2786)
* Feat:  translate the object type to Group

* Fix: fix unit test bug

* Fix: fix workflow do not delete after delete env bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-24 20:17:40 +08:00
Zheng Xi Zhou 14770dff0d
Fix: arguments map[string]string doesn't support observability's args (#2790)
* Fix: arguments map[string]string doesn't support observability's args

As there are bool typed arguments, the current arguments type doesn't
support.
2021-11-24 19:52:59 +08:00
Zheng Xi Zhou e5a86ef537
Fix: the first addon should not be `example` (#2793)
As addon example has been removed, the first addon on should not
be `example`
2021-11-24 13:44:55 +08:00
barnettZQG 8c276e226b
Fix: fix update component and list workflow bug (#2782)
* Fix: fix update component and list workflow bug (#2763)

* Fix: fix update component and list workflow bug

* Fix: change e2e test case

* Fix: change e2e case

Co-authored-by: barnettZQG <yiyun.pro>

* Fix: fix sync controller revision (#2772)

Co-authored-by: Tianxin Dong <dongtianxin.tx@alibaba-inc.com>
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-23 19:30:54 +08:00
Hongchao Deng 5c46aa2f7f fix header 2021-11-22 19:07:13 +08:00
Hongchao Deng cf4aaf51c8 fix imports 2021-11-22 18:47:47 +08:00
Hongchao Deng 8699346401 Merge branch 'apiserver' into merge 2021-11-22 17:27:40 +08:00
Hongchao Deng e5aba94cd1 Merge branch 'apiserver' into merge 2021-11-22 17:25:50 +08:00
Zheng Xi Zhou 5b7b7138e2
Fix: enable addon without arguments (#2766)
If an addon like `fluxcd` doesn't need arguments to be enabled, we
should not parse the arugments
2021-11-22 16:30:11 +08:00
qiaozp 1ea26865aa
Fix: lint apiserver code, fix panic (#2755)
* lint code

* fix error judge
try

* fix multicluster enable panic

* add err log

* fix can not get parameter

* debug

* try ci

* debug

* debug

* debug

* debugo

Co-authored-by: barnettZQG <576501057@qq.com>
2021-11-21 18:09:19 +08:00
yangsoon 99ffe80eb4
Feat: component-pod-view support filter resource by cluster name and cluster namespace (#2754) 2021-11-21 14:56:01 +08:00
barnettZQG adcb7bd65e
Feat: support update component and query app statistics info (#2746)
* Feat: change swagger config

* Feat: support update component and query app statistics info

* Fix: fix workflow list bug

* Fix: fix test bug

* Fix: fix e2e test bug

* Feat: change workflow api

* Fix: fix app deploy e2e test bug

* Fix: change e2e test

* Fix: fix workflow bug

* Fix: fix deploy bug

* Fix: fix selector bug

* Feat: support recycle env

* Fix: debug e2e

* Fix: fix e2e case bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-20 19:50:36 +08:00
Somefive 1a2c964dac
Fix: enhance cluster api (#2742) 2021-11-19 15:39:54 +08:00
朱晓兵 ffd25a4cbf
Feat: refactor envbinding for adapt policy placement (#2731)
* Feat: refactor envbinding for adapt policy placement

* Fix: refactor envbinding logic

* Fix: fix some bug

* Fix: fix unit test

* Fix: fix unit test

* Fix: fix unit test

* Fix: fix unit test

* Fix: fix unit test ...

* Fix: fix unit test

Co-authored-by: zhuxiaobing <zhuxiaobing@lixiang.com>
2021-11-19 10:37:40 +08:00
yangsoon 530f158795
Feat: velaql support query the resources created by helmrelease (#2726)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-18 11:53:38 +08:00
barnettZQG ba1f8e4793
Feat: change the model to support multiple environments (#2721)
* Feat: change swagger config

* Feat: change the model to support multiple environments.

* Feat: support query targets by namespace

* Fix: fix definition unit test case

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-16 14:45:49 +08:00
wyike 43aa05673e
Feat: manage trait (#2702)
* Feat: manage trait

fix test

* fix test
2021-11-15 21:04:03 +08:00
qiaozp 27490c4bce
Refactor: refactor addon for later reusing code in CLI (#2708)
* refactor addon for later reuse code in CLI

* fix import
2021-11-15 12:16:32 +08:00
barnettZQG e1c64540f4
Feat: change api spec (#2695)
* Feat: change api spec

* Feat: change DeployEvent to ApplicationRevision

* Fix: fix test bug

* Fix: fix unit test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-12 17:19:34 +08:00
yangsoon 722ed480e9
Feat: add more views (#2689)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-12 14:34:26 +08:00
barnettZQG 3e68f8a83b
Feat: change model name (#2688)
* Feat: change mode name

* Fix: fix e2e test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-12 11:58:13 +08:00
wyike b0577a979a
Fix: fix delete a component from application not delete workload (#2680)
lint

Fix: error test

Fix: fix e2e rollout

Fix comment
2021-11-12 11:45:45 +08:00
Somefive cee3630ead
Feat: upgrade cluster gateway to support remote debug (#2673) 2021-11-12 11:44:18 +08:00
Zheng Xi Zhou 53d380ff41
Fix: application status.services doesn't include Terraform typed components (#2643)
* Fix: application status.services doesn't include Terraform typed components

Function aggregateHealthStatus() which is used to retrieve components status, was
abandoned. All unit-tests of it was abandoned too. Fixed it and restore all the unit
tests.
2021-11-11 14:07:46 +08:00
yangsoon 8a3b7b6a05
Feat: add query provider and get view template from configmap (#2619) 2021-11-11 13:40:14 +08:00
Somefive fd66e6a228
Fix: revision namespace override (#2550) 2021-11-09 23:36:43 +08:00
Somefive 7103f8ff52
Feat: merge master into apiserver (#2660)
* Feat(rollout): fill rolloutBatches if empty when scale up/down (#2569)

* Feat: fill rolloutBatches if empty

* Fix: fix unit-test

* Test: add more test

Fix: lint

Fix: fix lint

* Update release.yml (#2537)

* Feat: add registry, merge registry and cap center (#2528)

* Feat: add registry command

* Refactor: comp/trait command combine with registry

* Feat: refactor `vela comp/trait`

* Fix: import

* Fix: fix if type is autodetects.core.oam.dev

* Fix: fix list from url

* Fix: test

* Feat: add test

* Fix: remove dup test

* Fix: test

* Fix: test

* Fix: fix label filter

* Fix: reviewable

* Fix test

* fix personal repo in test

* Fix test

* Fix test

* add some boundary check

* reviewable

* Fix: fix nocalhost trait (#2577)

* fix incorrect addon status (#2576)

* Fix(cli): client-side throttling in vela CLI (#2581)

* fix cli throttling

* fix import

* set to a lower value

* remove addon with no defs (#2574)

* Feat: vela logs support multicluster (#2593)

* Feat: add basic multiple cluster logs

* fix context

* Fix select style

* Fix select style

* remove useless env

* fix naming

* Feat: vela cluster support use ocm to join/list/detach cluster (#2599)

* Feat: add render component and apply component remaining (#2587)

* Feat: add render component and apply component remaining

* fix ut

* fix e2e

* allow import package in custom status cue template (#2585)

Co-authored-by: chwetion <chwetion@foxmail.com>

* Fix: abnormal aux name (#2612)

* Feat: store workflow step def properties in cm (#2592)

* Fix: fix notification def

* Feat: store workflow step def properties in cm

* fix ci

* fix data race

* Fix: change Initializer to Application for addon Observability (#2615)

In this doc, updated the Observability implementation from initializer
to Application. I also store definitions as it's not well stored in
vela-templates/addons/observability

* Fix: fix backport param (#2611)

* Fix: add owner reference in workflow context cm (#2573)

* Fix: add owner reference in workflow context cm

* fix ci

* delete useless test case

* Fix: op.delete bugs (#2622)

* Fix: op.delete some bugs

* Fix: app status update error

Fix: make reviewable

* Fix: show reconcile error log (#2626)

* Feat: add reconcile timeout configuration for vela-core (#2630)

* Fix: patch status retry while conflict happens (#2629)

* Fix: allow definition schema cm can be same name in different definition type (#2618)

* Fix: fix definition schema cm name

* fix ut

* fix ut

* fix show

* add switch default case

* Feat: remove envbinding policy into workflow (#2556)

Fix: add more test

* Feat: add vela prob to test cluster (#2635)

* Fix: upgrade stern lib to avoid panic for vela logs (#2650)

* Fix: filter loggable workload in vela logs (#2651)

* Fix: filter loggable workload in vela logs

* reviewable

* Feat: add vela exec for multi cluster (#2299)

fix

support vela exec

* Fix: health check will check for multiclusters (#2645)

* Fix: minor fix for vela cli printing (#2655)

* Fix: minor fix for vela cli printing

* add dockerfile go mod cache

* Feat: support apiserver-related multicluster features (#2625)

* Feat: remove envbinding policy into workflow

Feat: add support for env change (env gc)

Fix: fix rollout timeout setting bug

* Feat: support disable trait and env without workflow

* Fix: add hint for replaced value

Co-authored-by: wyike <wangyike_wyk@163.com>
Co-authored-by: basefas <basefas@hotmail.com>
Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
Co-authored-by: Tianxin Dong <dongtianxin.tx@alibaba-inc.com>
Co-authored-by: yangsoon <yangsoonlx@gmail.com>
Co-authored-by: Chwetion <137953601@qq.com>
Co-authored-by: chwetion <chwetion@foxmail.com>
Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com>
Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-09 13:06:55 +08:00
Somefive 64ab932c6d
Feat: support apiserver-related multicluster features (#2625)
* Feat: remove envbinding policy into workflow

Feat: add support for env change (env gc)

Fix: fix rollout timeout setting bug

* Feat: support disable trait and env without workflow

* Fix: add hint for replaced value
2021-11-08 10:11:50 -05:00
barnettZQG eb258fae66
Feat: support ui schema (#2647)
* Docs: change swagger api config

* Docs: change swagger api config

* Docs: change swagger api config

* Feat: support ui schema

* Fix: distinguish between structs and arrays

* Feat: support build swagger config

* Feat: support update ui schema

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-08 14:13:22 +08:00
Hongchao Deng c821f2a929
Feat: rewrite Addon API to support new format (#2605)
* Feat: rewrite Addon API to support new format

fix test

fix

fix

add registry query parameter

skip enable test

add Definition meta

fix

fix ext

add cue rendering

return component name

update swagger.json

refactor addon cue/yaml tmpl to addonElementFile

apply app in enable

fix cue parse

comment

swagger

enable test

update

fix bug

fix cue render

fix apply fail, decode object

fix disable addon, todo: fix status api

* avoid to render a whole addon when check status

* fix

* fix

* add label

* remove todo

* fluxcd

* fix args

* add all path to addon component name

* reorder test

* add addon application prefix

* add

* add ns when test

* fix

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-11-05 17:39:31 +08:00
Somefive bf3a1cddf9
Feat: remove envbinding policy into workflow (#2556)
Fix: add more test
2021-11-05 17:29:05 +08:00
Tianxin Dong 50cfe0c68f
Fix: allow definition schema cm can be same name in different definition type (#2618)
* Fix: fix definition schema cm name

* fix ut

* fix ut

* fix show

* add switch default case
2021-11-05 16:07:04 +08:00
barnettZQG df5bc2727e
Feat: supports setting environment differences for application plan (#2624)
* Feat: supports setting environment differences for application plan

* Feat: update swagger config

* Feat: CRUD of application env binding plan

* Style: change code style

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-05 10:42:18 +08:00
Tianxin Dong e8969e4d17
Feat: add definition API (#2602)
* Feat: add definition API

* fix struct

* fix e2e

* optimize the code

* fix return

* fix const
2021-11-04 16:38:34 +08:00
barnettZQG 8e874bc3a9
Feat: change application to applicationplan (#2616)
* Feat: change application to applicationplan

* Feat: update swagger config

* Feat: change api spec

* Fix : fix e2e test case

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-03 17:25:37 +08:00
Somefive 90e5fd9ed6
Fix: add fixes to cluster api (#2597) 2021-11-02 09:49:52 +08:00
barnettZQG 9519d2443a
Feat: add alias field and fix some code bug (#2589)
* Feat: add alias field and fix some code bug

* Fix: fix alias check rule bug

* Fix: fix addon e2e test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-31 18:23:55 +08:00
wyike 7647ef9662
Feat(rollout): fill rolloutBatches if empty when scale up/down (#2569)
* Feat: fill rolloutBatches if empty

* Fix: fix unit-test

* Test: add more test

Fix: lint

Fix: fix lint
2021-10-28 17:50:28 +08:00
Yin Da 0fedad7cd2 Merge branch 'master' into apiserver 2021-10-28 15:19:03 +08:00
yangsoon edf42074b9
Feat: add velaql webservice (#2532) 2021-10-28 12:05:12 +08:00
wyike f48da214e3
Feat: health scope controller support check trait-managing workload (#2527)
* Feat: health scope controller support trait manage-workload

* Test: add multi-cluster and health policy e2e-test

Fix: e2e-test

lint

Fix: all e2e-test

Fix: modify port back

middle commit

middle pr

Fix: e2e-rollout-test

make reviewable

defet to rollout apply gvk annotation

fix e2e

* Update test/e2e-multicluster-test/multicluster_rollout_test.go

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-10-26 19:51:53 +08:00
Hongchao Deng 3ebc94394c
Feat: addon service impl (#2515)
* Feat: addon service impl

* get addon from git/configmap

* add ListAddonRegistries

* add GetAddonModel

* add CreateAddonRegistry and bcode/addon.go

* add applyAddonData

* update

* Fix: getAddonFromGit

* Fix: getAddonFromGit, remove trailing .git

* add comment

* add enable/disable/status impl

* add deleteAddonRegistry and check dup addon

* read addon without accessing database

* change to query parameter, add addon detail

* Feat: add addon readme for apiserver

* Make enable/disable/status runnable

* chore: fix bcode

* Fix: refactor parse to util

* Fix: refactor addonutil to pkg

* add addon test for create and delete addon registry

* fix version prefix

* add post func

* add enable/disable test

* add provider aws readme

* done testing

* fix comment and refactor statusAddon

* move enable/disable logic to usecase

* add GITHUB_TOKEN env

* Fix: Add github token support and use it in test

* add license

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-10-26 17:52:34 +08:00
Somefive accf0138f8 Feat: apiserver cluster api (#2526)
* Fix: multicluster api

* Feat: add apiserver cluster api & fix codecov

* Feat: add pod capacity and resourceused stat

* Feat: add cloud cluster manage

* Test: add test for cloud cluster

* Test: pending cloud resource api

* Style: refactor

* Fix: apiserver e2e test

* Fix: fix application usecase policy bug

* Style: add returns for cluster api

* Feat: add provider detail info & add cache & add rollback protection

* Style: refactor

* Style: add error code
2021-10-23 00:29:43 +08:00
barnettZQG f0b91ef8d6 Feat: added environment binding capabilities to the application creation API. (#2523)
* Feat: add env binding support in app create api

* Feat: add query component types api

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-23 00:29:43 +08:00
barnettZQG b85dda35f3 Feat: add namesapce create and list api (#2514)
Co-authored-by: barnettZQG <yiyun.pro>
2021-10-23 00:29:43 +08:00
yangsoon c7f9cdcbbf Feat: add the oam application api in apiserver (#2492)
* Feat: oam application api in apiserver

* Feat: enable unit-test and e2e-test
2021-10-23 00:29:42 +08:00
barnettZQG d2dc9a8da7 Feat: application operation API implementation (#2478)
* Feat: application operation API implementation

* Docs: update swagger json

* Docs: update swagger config

* Feat: improve application management API implementation and testing

* Style: change code style

* Style: change some code style

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-23 00:29:42 +08:00
qiaozp 49bfeee53d
Refactor: remove initializer (#2491) 2021-10-15 11:25:26 +08:00
wyike 89eaf502fa
Test: add e2e-test for multi-cluster rollout (#2472)
* Test: add e2e-test guarantee multi-cluster rollout

* Fix: install rollout runtime chart

add cluster name in dockerfile

Fix: build image error

enable all test

Fix: add rollout chart

add shebang

fix image repo
2021-10-14 18:27:50 +08:00
Tianxin Dong 85c887d3e4
Fix: change raw extension to pointer (#2451)
* Fix: change raw extension to pointer

* Test: fix ut
2021-10-13 16:16:53 +08:00
Jianbo Sun f9ffb9e240
Chore: add example for env patch and fix e2e flaky (#2462) 2021-10-13 15:39:50 +08:00
Jian.Li 8935a87c59
Fix: Closure Bug In newValue (#2437)
* Fix: new value bug

* Fix: strategyUnify Bug

* Fix: e2e error
2021-10-12 19:05:03 +08:00
barnettZQG 0d036e7449
Feat: initialize the Apiserver framework (#2417)
* Feat: add kubeapi and mongodb datastore implementation

* Style: change kubeapi import code style

* Style: change mongodb package import code style

* Style: add some comment

* Style: change databasePrefix to tableNamePrefix

* Chore: install mongodb in unit-test job

* Chore: install mongodb in compatibility-test job

* Feat: add apiserver e2e test case

* Docs: change developer guide doc

* Feat: use common.Scheme

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-12 11:53:24 +08:00
wyike 9c76b2f3ac
Fix: race condition of cloneset and statefulSet rollout plugin (#2394)
* Fix: clonset and stateful set

* Fix: e2e-test race condition
2021-10-11 15:47:20 +08:00
Somefive 472ed3a146
Feat: add support for envbinding with namespace selector (#2432)
* Feat: add support for envbinding with namespace selector

* Fix: service account kubeconfig e2e-test

* Docs: add comments to explain functions

* Docs: add envbinding example
2021-10-11 14:52:01 +08:00
Somefive 46e22cc203
Feat: multicluster support ServiceAccountToken (#2356)
* Feat: support serviceaccount in multicluster

* Fix: add compatibility & support sa

* Fix: add multicluster sa test

* Fix: add test for upgrade func

* Style: format
2021-10-08 14:45:04 +08:00
Somefive a3f48425be
Feat: use #ApplyComponent for EnvBinding (#2382)
* Feat: use #ApplyComponent in EnvBinding

* Fix: application test compRev control by resourcetracker

* Fix: add more detail in error info
2021-10-08 13:11:14 +08:00
GingoBang 83eec87da6
Refactor: change rollout's json tag (#2314)
* Refactor: set rollout as a pointer reference

see issue #2289 for more details

Closes #2289

* Refactor: set rollout as a pointer reference
see issue #2289 for more details

Closes #2289
2021-10-02 10:19:41 +08:00
Reeta Singh 6647a11c86
Chore: deprecate containerized workload (#2330)
* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Chore: deprecate containerized workload

* Chore: deprecate containerized workload

* Chore: run make reviewable as per review comment

* Chore: fix import

* Chore: merge with master

* Chore: merge with master

* Chore: remove references for containerized workload

* Chore: fix failiing e2e test

* Chore: fix failing e2e test

* Chore: fix failing e2e test

* Chore: fix failing e2e test

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: merge with upstream

Co-authored-by: Reeta Singh <reetas@twitter.com>
2021-09-30 16:06:29 +08:00
Somefive 83b26349c7
Feat: bootstrap multicluster testing (#2368)
* Feat: bootstrap multicluster testing

* Fix: update action step name in .github/workflows/e2e-multicluster-test:yml

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>

* Fix: update setup-core wait condition

* Fix: add apply envbinding app test & upgrade gomega

* Fix: remove end_e2e duplicate script

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
2021-09-30 10:19:39 +08:00
Jian.Li ef653ebeb4
Feat: add inputs test cases and optimize code (#2388)
* Feat: add test case & optimize code

* Fix: e2e test
2021-09-29 15:08:00 +08:00
Jianbo Sun a2ad91f2f5
Fix: try fix CI unit test (#2376) 2021-09-28 18:44:50 +08:00
Jianbo Sun 0a9518f583
Fix: remove appcontext CRD and controller (#2270) 2021-09-23 15:05:47 +08:00
Somefive e8d051a532
Support MultiCluster EnvBinding with cluster-gateway (#2247)
* Feat: init multicluster

* Feat: add secret namespace auto-detect

* Style: format

* Style: split gc codes

* Feat: add cluster cli

* Fix: rebase workflow on master

* Feat: add component selector for env binding

* Fix: selector & patch conflict

* Feat: add local cluster support & fix unit test

* Fix: fix omitempty bug

* Feat(health-scope): support multi-cluster's healthcheck

* Fix: resourcetracker gc bug & rename

* Feat: add multicluster to op.Read

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-09-14 20:35:10 +08:00
wyike 3d29df3a52
Fix: fix in middler of test (#2275)
add test

delete uesless

add comments

fix small issue

fix error

add charts back
2021-09-14 18:05:21 +08:00
Tianxin Dong 8e172091f6
Test: fix resource tracker e2e (#2281) 2021-09-14 10:26:57 +08:00
Jianbo Sun cad21c5138
Fix: refactor workflow and fix some e2e tests (#2272)
* Fix: add e2e plugin test back

* Fix: e2e rollout test and try change port to 37081

* Fix: add rollout plan test back

* Refactor: change the workflow state machine and add workflow succeed state

* Refactor: refine definition controller and fix e2e of app revision

* Refactor: unlock all the normal cases

* Fix: add helm schematic logic back into workflow
2021-09-13 14:17:12 +08:00
Tianxin Dong af01349f28
Test: fix rollout e2e test (#2277) 2021-09-13 11:13:03 +08:00
Jian.Li 6cbdbe84b2
Refactor application code to make it run as Dag workflow (#2236)
* Refactor: remove use of AppConfig in AppRevision

* Refactor: remove insert secret and configmap

* Feat(workflow): upgrade

* Fix(conflict): workflow cherry

* Feat(workflow): support DAG mode

* Feat(workflow): prepare steps in step

* Feat(tools): random string

* Fix(rand): gosec weak random

* Fix(ci): test passing

* Feat(workflow): generate steps

* Fix: fix rebase from master

* Fix: fix workflow ut

* Feat(test): add test cases

* Fix: fix lint and rebase from master

* Refactor: application code

* Fix: fix ci lint

* Fix: make code reviewable

* Fix: workflow_test.go

* Feat: collect services

* Fix(ci): unit tests

* Feat: make one

* Test: application with input/output and workflow

* Fix: trace test

* Fix: update step index falied

* Feat: refactor op.#Load

* Fix: delete dead code

* Refactor: op.xxx

* Fix: patch component

* Test: add generator test

* Fix: add license

* Fix: pending e2e plugin test

* Fix: disable test/e2e-test

* Fix: patch by script

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-09-12 10:12:46 +08:00
Jianbo Sun a79c96fa46
Fix: pending the flaky rollout test (#2253) 2021-09-09 21:06:03 +08:00
Yue Wang 4ed40bebe3
Feat(app): show health status from HealthScope in application status (#2228)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-09-07 11:27:29 +08:00
Eng Zer Jun 426aa7af34
Refactor: move from io/ioutil to io and os package (#2234)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <zerjun@beatchain.co>
2021-09-06 18:33:42 +08:00
Yue Wang 6bf4a2c1f7
Feat(healthscope): add health-scope-binding policy and e2e test for health scope (#2205)
Signed-off-by: roywang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-08-31 15:59:17 +08:00
wyike 01f7357525
change IncreaseFirst to DecreaseFirst (#2142)
don't merge, only for test

request cpu to 0

revert
2021-08-23 16:24:51 +08:00
Yue Wang 324fc1ac7c
add CUE-based health check in HealthScope controller (#1956)
add e2e test

Signed-off-by: Yue Wang <seiwy2010@gmail.com>
2021-08-20 15:55:47 +08:00
wyike 4941a3e9c2
fix external revision bug (#2126)
* fix external revision bug

* add test

* try to fix flaky-test
2021-08-20 15:43:50 +08:00
wyike 0c0b9d0774
rollout OCM demo and defer rollout pass owner to handleSucceed (#2121)
* finish test

fix demo

finish test

finish docs

fix rollout template

add more test

add comment

* impove test coverage and wrap error

fix checkdiff

add more time
2021-08-19 15:33:40 +08:00
Zhizhen He 1e294b3164
chore: replace github.com/ghodss/yaml with sigs.k8s.io/yaml (#2089) 2021-08-15 10:53:05 +08:00
yangsoon abbec2c36b
definitions support specify the revision name (#2044)
* support named defRev

* add test
2021-08-10 20:03:45 +08:00
yangsoon 0eed21987a
add more test for envbinding (#2032) 2021-08-06 10:46:31 +08:00
wyike 3f326f06e4
application skip gc resource and rollout set workload ownerReference (#2024)
* finish main logic and test

* fix import order

* rollout isn't created by applciation

* fix comments

* fix compatility test

* mock error test
2021-08-05 17:15:57 +08:00
yangsoon 0752244d0b
enable policy (#2011) 2021-08-04 18:58:57 +08:00
wyike 13fc4e2b25
rollout controller find sourceRevision (#1989)
* rollout controller use last target as source and add whole process e2e-test

* modify makefile use regex include all rollout related test

* add example

* fix golint

* more wait time

* pending pod may let rollout stock in rollingBatches

* fix docs and tests comments

modify docs example

modify cue and yaml

* less pod in test avoid pod pending
2021-08-03 20:27:11 +08:00
Jianbo Sun aa87d3da24
upgrade K8s dependency lib to v0.21 (#1985)
* upgrade K8s dependency to v0.21

* update CRD for new version of controller-runtime

* fix ci component revision create must fill Raw in runtime.RawExtension

* try fix test

* start control plane timeout set to 1min and fix tests

* add timeout for env test start and stop

* longer timeout time for BeforeSuit function

* upgrade kubebuilder and k8s cluster version to match with v1.21.2 in github action

* fix test

* fix resource tracker ownerRef override

* update developer guides
2021-08-03 11:30:02 +08:00
Shaw Ho d9cd048d79
Fix addRevisionLabel to selector (#1983)
Signed-off-by: Xiaoxi He <tossmilestone@gmail.com>
2021-08-02 16:36:54 +08:00
Yue Wang b4ebdac5bb
quick fix tests (#1999)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
2021-08-02 10:29:31 +08:00
yangsoon 7161959aca
add EnvBinding Controller for Multi cluster deploy and Configuration Management (#1968)
* patch env configuration

* add e2e-test
2021-07-30 10:02:51 +08:00
Jianbo Sun e71d71c6b7
use corev1.ObjectReference insteadof crossplane-runtime TypedReference (#1974)
* refactor crossplane-runtime TypedReference to ObjectReference and make condtion locally

* fix test
2021-07-28 13:59:13 +08:00
chival 6b804acbf5
Fix Initializer bugs & Enhance addon command (#1955)
* enhance `addon enable` command

* fix: initializer requeue twice
fix: initializer won't update status while checking dependency

* not delete ns while disable addon

* add init delete webhook and test

* use poll func

* fix get init logic

* fix get init logic

* fix CI

* fix CI

* unfocus

* check diff

* CI
2021-07-25 10:16:43 +08:00
yangsoon 5e064219e7
Enhance Initializer: export the phase of Initializer and help install build-in Initializer (#1932)
* add phase for initilaizer

* help install build-in initializer

* add test
2021-07-20 20:40:01 +08:00
wyike ff6fcd9f10
support component revision based rollout (#1919)
* WIP almost finish main logic

WIP make reviewable

finish manual test

fix rollout plan related test

WIP refactro some logic

WIP finish e2e-test

* fix failed e2e-test

* fix failed interagtion test

* move rollout to trait packege

* modify e2e-test testdata change apiVersion

* add v1alpha1 to scheme in test

* more wait time

* fix comment

* split rollout test

fix makefile

* rename test name

delete equal quata

try to fix

fix

* add more test
2021-07-20 16:53:39 +08:00
yangsoon 644cafe0a1
fix bug: application can not create component which contains namespace resource (#1920)
* align initializer's namespace to vela-system

* fix makefile

* fix terraform namespace

* add test
2021-07-15 19:53:41 +08:00
chival 38cf4c8195
Add terraform controller as built-in addon (#1905)
* add terraform controller as addon

* change addon name to terraform

* fix init controller depends logic

* rebase

* fix CI

* unfocus
2021-07-14 14:38:32 +08:00
chival 87576cc67e
Implement addon mechanism (#1867)
* - add: list/enable/disable an addon.

- add: test addon

- add: full flux addon

- fix: flaky test

* try again

* 1. add readme
2. gen demo file

* fix ci

* change name

* try again
2021-07-13 13:03:25 +08:00
LeoLiuYan 5b6f248152
Feat: no need create appRevision if it already presents in histories (#1896)
* Feat no need create appRevision if it already presents

Signed-off-by: LeoLiuYan <929908264@qq.com>

* Remove some logic

* Fix golint

* Feat add unit test and fix e2e

* Fix unit-test

Signed-off-by: LeoLiuYan <929908264@qq.com>
2021-07-08 23:03:29 +08:00
wyike 9a3c63a843
override initial replicas of workload in first scale operation (#1891)
* clean up some logic

rebase and reorder phase

add log and modify e2e-test

fix reviwable

fix comment

* fix condition relate comments

finish test func

fix formate error
2021-07-08 19:45:18 +08:00
wyike 14a2f8a7bd
dont't template source in rollout and rollout first component (#1888)
* fix rollout and only rollout the first component

* determine rollout component before render

* let other resources apply when target worklaod not ready

* immutable resource only update ownerRef

* add annotation

* fix unit test

add handle sourceWorkload

add anotation

add comment

add more e2e-test

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
2021-07-06 23:45:52 +08:00
wyike 4eb33e9239
split out oam-spec v0.2 charts (#1842)
* WIP disable oam related controller and webhok

change velue

fix spell error

change namespace

add e2e for oam-runtime

fix charts hack

fix e2e definition namespace

fix diasble contains list

fix e2e-test

* disable components handler

* fix flaky ac test

add every definition in oam-runtime-system namespace

* upload ac e2e-test

replace files

fix upload reports

* more wait time
2021-07-01 16:32:01 +08:00
yangsoon aec9913557
fix invalid metadata.labels error when specify the version of the trait in the app (#1855)
* fix trait name

* add test
2021-06-29 15:53:57 +08:00
yangsoon e176fcfc56
Add the basic ability to initialize a single-cluster environment for the initializer (#1829)
* init Initializer

* update spec

* add status check

* add e2e-test

* fix Initializer version
2021-06-25 18:54:26 +08:00
wyike 93234e8290
fix flaky test (#1841) 2021-06-25 10:32:47 +08:00
Chwetion b582ccc060
add application component name duplication check in webhook (#1811)
* add application component name duplication check in webhook

* Helm test will not clean up the test data, and the application test of the component with the same name created failed during e2e.

* fix the problems encountered during the test:

* ignore the parsing failure caused by the existing application without definition when checking;

* after the addition is successful, the resources left by the helm test are automatically cleaned up;

Co-authored-by: chwetion <chwetion@foxmail.com>
2021-06-24 16:47:17 +08:00