Commit Graph

355 Commits

Author SHA1 Message Date
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
Yue Wang 5a778b4732
add API v1beta1.ComponentManifest (#1814)
rfc appfile pkg: remove appConfig&component

fix unit test

rfc vela cli dryrun & livediff

fix unit test & e2e test

rfc app controller: remove appConfig&component

fix unit test & e2e test

fix rollout and webhook

fix use AppRevision as others' owner

move ComponentManifest to oam.types

add a util to make conversion between AppConfig and ComponentManifest

complete Component revision mechanism in app controller

add test for component revision

rename

fix unit tests

add clean up for component revision

fix unit test

Signed-off-by: roywang <seiwy2010@gmail.com>
2021-06-24 15:06:58 +08:00
wyike 4040c8e67c
fix rt flaky test (#1825) 2021-06-22 12:13:35 +08:00
wyike b752511e74
skip finalizer validation (#1815)
add some time to check cloneset replicas

fix flaky test
2021-06-18 14:36:40 +08:00
wyike 70eeec4c89
support restart scale operation by modify targetSize of AppRollout (#1812)
* WIP first commit

fix

* more wait time

* fix flaky test
2021-06-17 22:30:07 +08:00
wyike 649e0376cc
fix status completed bug (#1802)
refactor to helper and add unit-test

neat imports
2021-06-16 17:24:18 +08:00
Yue Wang fbb0cddb30
fix flaky e2e test (#1791)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
2021-06-13 15:20:01 +08:00
Yue Wang 889e38e984
remove appContext from app/appRollout controller (#1774)
* refine  assemble and dispatch

Signed-off-by: roy wang <seiwy2010@gmail.com>

* remove app context in app controller

modify clean up app revision

remove old resource tracker related logic

fix unit tests

Signed-off-by: roy wang <seiwy2010@gmail.com>

* fix e2e-test

- get rid of appCtx in test cases
- fix test cases according other logic changes in app controller

remove whole appcontext_test.go file

disable rollout related e2e test provisionally

disable resource tracker related e2e test provisionally

Signed-off-by: roy wang <seiwy2010@gmail.com>

* add finalizer logic for app controller

Signed-off-by: roywang <seiwy2010@gmail.com>

* add new apply option MustBeControllableByAny

make dispatch idempotent

Signed-off-by: roywang <seiwy2010@gmail.com>

* refactor rollout

* fix rollout finalize succeed

Signed-off-by: roywang <seiwy2010@gmail.com>

* add update trait and gc test

fix lint

* fix flaky e2e test

Signed-off-by: roywang <seiwy2010@gmail.com>

* fix comment

* fix comments and add sourceRevision dispatch

delete useless

Signed-off-by: Yue Wang <seiwy2010@gmail.com>

* fix app finalizer backward compatible

Signed-off-by: roywang <seiwy2010@gmail.com>

* fix backward compatability for deprecation of appContext

add unit test for apply option

add e2e test

Signed-off-by: Yue Wang <seiwy2010@gmail.com>

* fix app controller unit test

Signed-off-by: Yue Wang <seiwy2010@gmail.com>

* refine app controller apply logic

Signed-off-by: Yue Wang <seiwy2010@gmail.com>

* fix e2e test of resource tracker

fix e2e test of rollout plan

fix flaky e2e tests

Signed-off-by: Yue Wang <seiwy2010@gmail.com>

* refine comments and remove useless codes

Signed-off-by: Yue Wang <seiwy2010@gmail.com>

* disable appCtx controller

add Component handler into app controller

Signed-off-by: Yue Wang <seiwy2010@gmail.com>

Co-authored-by: wangyike <wangyike.wyk@alibaba-inc.com>
2021-06-12 14:46:32 +08:00
Yue Wang c7e46e49ca
fix flaxy e2e-test (#1752)
Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-06-03 15:31:18 +08:00
yangsoon 931ca3ea3e
fix bug: When the Component contains multiple traits of the same type, the status of the trait in the Application is reported incorrectly (#1731)
* fix status

* add test

* fix webhook

* add paramter context for customStatus
2021-05-31 18:44:15 +08:00
Hongchao Deng 9a10e967ee update APIs and docs for workflow design 2021-05-28 20:44:50 -04:00
chival de9b06e716
optimize goimports (#1716) 2021-05-26 18:41:50 +08:00
yangsoon fed40a1060
fix webhook: set a default workload.type for componentdefinition which doesn't refer to a workload (#1686)
* fix webhook

* fix controller

* fix error message
2021-05-24 23:32:02 +08:00
yangsoon 59a8765aa1
refactor the way of get OpenAPISchema in trait/component definition controller (#1691)
* refactor trait/componet definition controller

* fix test
2021-05-23 14:16:06 +08:00
Yue Wang ef1cd50a1a
fix flaky e2e test (#1698)
Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-05-22 16:03:22 +08:00
Yue Wang 0556f03f28
fix traitDef appliesToWorkloads (#1667)
update docs

Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-05-20 19:06:38 +08:00
yangsoon d3fcbf4d45
fix bug: remove unneeded workload definitions (#1656)
* fix controller

* fix test
2021-05-17 22:47:57 +08:00
yangsoon a11ae2f95d
Add Dynamic Admission Control for ComponentDefinition (#1648)
* add webhook

* add test

* fix package discover
2021-05-15 11:43:33 +08:00
Yue Wang d2f471df3f
make ResourceTracker to own cluster-scope resource (#1634)
add e2e tests and unit tests

Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-05-15 11:34:33 +08:00
yangsoon 4ef8cb3f12
fix bug: Use stricter syntax check for CUE (#1643)
* fix cue render

* fix e2e-api-test

* add test
2021-05-13 21:44:08 +08:00
wyike 0a4c20c999
fix empty rolloutBatch will panic whole controller bug (#1646)
* add webhook for app and avoid controller panic

neat imports

* add test for rollout verify
2021-05-12 19:00:55 +08:00
wyike 83c9c17cc7
fix application rollout annotation false issue (#1633)
* fix annotation false issue

neat imports

* rewrite judge logic

* add webhook

* add webhook verify annotation

* fix test

fix bug

* modify error message
2021-05-11 19:12:25 +08:00
wyike 4b897baae8
add app embed rollout pause test (#1626)
* add pause test

* verify update plan shouldn't generate new revision

fix error test
2021-05-10 18:49:26 +08:00
wyike d90e78af97
fix error test and add middle state test (#1622) 2021-05-08 21:00:50 +08:00
yangsoon 1866753769
Enable Dynamic Admission Control for Application (#1619)
* add webhook

* fix test

* fix validating_handler
2021-05-08 21:00:33 +08:00
yangsoon 1660930ed3
applicaiton supports specifying different versions of Definition (#1597)
* app support specify the version of definition

* add e2e-test

* add docs

* add helm related test

* fix doc

* add more test

* fix docs
2021-05-07 17:52:44 +08:00
wyike 29744a6f18
[Feature] embed rollout in an application (#1568)
* WIP refactor rollout reconcile

add construct func for reconcile

refactor application  event

WIP fix failed test

fix event reason

delete useless yaml

fix samll issue

add more test

fix more test

add e2e test and extract rollout plan from appRevision

extract inline appRollout status from appStatus

* fix-plugin-test

* debug e2e

* fix comments and rename app-embed-test

* delete empty line

* fix docs

* update rollout docs

fix appRollout docs

* update docs and delete useless debug info

* fix deployment plugin bug and algin with rollout related workload to deployment

* fix docs comment

* rename package crossplane-runtime v1alpha2

* copy from https://github.com/wangyikewxgm/kubevela/pull/1

* fix some comments issue and add todo

* fix error test
2021-04-30 15:17:43 +08:00
wyike ebc8476a31
garbage collection mechanism for AppRevision (#1501)
* WIP refactor gc func

WIP write gc code

WIP update chart,cmd args

add cleanupRevison func into garbageCollection

add more test

finish unit-test

refactor use func implements

Complete e2e test

WIP rewrite some logic

add func test and rewirte context pointing to func

fix cilint

refactor some function

fix typo

fix ci error

change gc logic

after change gc number, fix all test

add check appRevision collection

WIP finish most code

* add rollout batch to fix rollout e2e-tet

* fix component name in rollout

* ignore gc error, just log the error
2021-04-16 16:46:41 +08:00
Jianbo Sun c6b65cbd5b
fix flaky test (#1498)
* fix flaky test

* fix flaky check apprevision created more than one

* remove unused annottaion
2021-04-15 18:25:17 +08:00
Jianbo Sun ce20f55382
add an overview for end user guide (#1469)
* add an overview for end user guide

end user guide

* add explore section

* finish scale section

* add expose section

* remove trait already contains as built-in feature

* try fix flaky test
2021-04-14 21:38:04 +08:00
Yue Wang dcf79a9b57
fix falky unit test (#1474)
Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-04-13 20:01:47 +08:00
Ryan Zhang 2e43a6dc78
make sure we don't create more pods (#1452) 2021-04-12 15:48:20 -07:00
Jianbo Sun 26163aacdc
fix flaky test (#1467) 2021-04-12 16:51:06 +08:00
Shiwen Cheng 4b86689d63
Update copyright year (#1464)
* Update copyright year to 2021 for The KubeVela Authors

* Update copyright year to 2021 for other project authors
2021-04-11 21:00:14 +08:00
wyike bc6000f794
fix flaky appcontext e2e-test (#1449) 2021-04-09 21:42:17 +08:00
Ryan Zhang 6d65169449
fix webhooks and try to fix e2e (#1441)
* fix webhooks and try to fix e2e

* address comments
2021-04-09 13:27:16 +08:00
Jianbo Sun a44257e153
fix flaky test (#1427) 2021-04-08 14:34:36 +08:00
Ryan Zhang 325a4cdb0e
Add a new cloneset scale controller (#1301)
* add scale implementation

* fine tune the logic and adjust e2e test

* fix tests and fine tune logic

* try to fix flaky verification

* allow zero size step

* fix scale down check
2021-04-07 11:14:46 -07:00
wyike b33b6fbead
garbage collection for cross-namespace workloads and traits in application layer (#1421)
* add logic for gc cross ns resources

WIP regenerate api and charts

rewrite handle resourceTracker logic

WIP add e2e test logic

add more e2e  test

* WIP refactor sevral funs name and add comments for code

* WIP add more corener case e2e test

* add unit test and fix bug

* WIP refactor handleResouceTracker  logic

* refactor func name aglin with others and add comments

* make generate to fix check-diff ci error

* change resourceTracker status as a subresource
2021-04-07 21:34:48 +08:00
wyike 20f6e0ab02
skip check cross ns resource owner, add tests (#1374) 2021-03-31 15:00:16 +08:00
Jianbo Sun 96c1d0786a
the application context should not own application object (#1370)
* the application context should not own application object

* add time for flaky test
2021-03-31 13:55:57 +08:00
Ryan Zhang 0629049e1f
add initial finalizer and abandon support (#1362)
* add initial finalizer and abandon support

* fix lint
2021-03-30 02:04:38 -07:00
天元 74a95133b2 fix log 2021-03-30 00:39:18 +08:00
天元 72f533e5eb use AppContext as the ownerRef 2021-03-30 00:21:17 +08:00
天元 4918b5cee7 fix test 2021-03-29 23:48:51 +08:00
天元 0d8f656cdb fix some tests 2021-03-29 23:45:29 +08:00
wyike 4540270813
Support create resources (workloads/traits) in different namespace with application (#1197)
[WIP]create tracker if needed and update components

[WIP] add finalizer code and add logic for ac controller

[WIP] refactor handle  func to app handler

[WIP] support helm cross namespace

[WIP] rewrite application  controller logic

rebase master and solve conflict

WIP add base cross namespace workload and fix some bugs

add more e2e-test and fix some bugs

rebase master and resolve confilict

move resourceTracker to v1beta1

add v1beta1 to test scheme to  fix test

modify e2e test, change v1alpha2 application to v1beta1

delete resourceTracker crossplane catagory

add controller logic test

add unittest for finalizer related func

add more unit test

neet order import

walk around check-diff error

add docs

add some comments in AC controller

as review said modify some issues
2021-03-27 15:19:43 +08:00
Jianbo Sun 68a0e40db4
propagate AppRevision Into context.AppRevision (#1323)
* refactor: calculate revision first before render AC and Components

* fix flaky e2e case

* add e2e test
2021-03-26 21:12:44 -07:00
Yue Wang aa21bfcb60
fix e2e test of kube schematic (#1321)
* fix kube schematic

Signed-off-by: roywang <seiwy2010@gmail.com>

* fix e2e test

Signed-off-by: roywang <seiwy2010@gmail.com>
2021-03-27 10:15:57 +08:00
Yue Wang baa8d87e71
implemente kube schematic (#1298)
* implemente kube schematic

generate schema for kube schematic parameters

add e2e test

Signed-off-by: roywang <seiwy2010@gmail.com>

* add unit test

Signed-off-by: roy wang <seiwy2010@gmail.com>

* add doc

Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-03-26 23:02:58 +08:00
Jianbo Sun 1c89435515
fix app upgrade without rollout and rollout plan will create multiple version resources (#1315)
* fix app upgrade without rollout and rollout plan will create multiple version resources

* add and enhance tests

* fix test
2021-03-26 22:20:55 +08:00
wyike 0e9a3ceb3b
fix unstable appcontext test (#1312) 2021-03-26 15:46:01 +08:00
wyike 74a82e0397
add header-check.sh (#1310)
add ci workflow

update scripts

add missed licence  header for all files
2021-03-26 15:24:19 +08:00
Ryan Zhang 0926469541
fix appRollout CRD version (#1303)
* fix appRollout CRD version

* make rollout e2e more robust
2021-03-26 08:23:10 +08:00
Yue Wang 06a099f540
fix isControlledByApp in AC controller (#1294)
fix component_version e2e

Signed-off-by: roywang <seiwy2010@gmail.com>
2021-03-25 21:19:07 +08:00
Ryan Zhang efa5078d81
fix appRevision label getting overridden (#1293)
* fix lable getting overidden

* randomize namespace
2021-03-25 17:28:17 +08:00
Ryan Zhang c5d81c975a
add abandoning state to the rollout (#1290)
* add abandoning state

* fine tunee2e timing and improve logging

* add back one application UT and fine tune timing in e2e and improve test robustness
2021-03-25 14:04:06 +08:00
Jianbo Sun 53ae9aaa40
add webhook convert. (#1282)
fix diff

update example and test data version

fix convert function

fix e2e for helm

clean up creationTimestamp in a hack way

fix ci

pending package suit test

fix group version

fix ci

fix ut

rename type to kind

fix example

fix conflicts

Co-authored-by: yangsoon <yangsoonlx@gmail.com>
2021-03-24 17:15:20 -07:00
Ryan Zhang a4fda31829
Restore rollout after the change to point to appRevision (#1271)
* modify appRollout to reference appRevision

* fine tune rollout e2e tests
2021-03-24 14:09:40 -07:00
yangsoon fc55b65aad
Compatible with Application containing WorkloadDefinition type helm moudle (#1261)
* add workloaddef ref to helm.

* fix package_suit_test

* show git diff result.
2021-03-24 21:22:29 +08:00
Yue Wang b6218bf67d
re-open e2e-test for helm schematic (#1277)
Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-03-24 15:19:50 +08:00
yangsoon 4b9e933ca5
add v1beta1 types (#1268) 2021-03-24 13:27:29 +08:00
Jianbo Sun 4c392d263a
fix ci (#1276) 2021-03-24 11:28:27 +08:00
Yue Wang f554523196
generate OpenAPI schema for Helm schematic compDef (#1250)
* get JSON schema for Helm schematic ComponentDefinition

Signed-off-by: roy wang <seiwy2010@gmail.com>

* add e2e test

update doc

add unit tests

Signed-off-by: roywang <seiwy2010@gmail.com>
2021-03-23 00:16:17 +08:00
wyike dbc4593b23
Add e2e test for App Context (#1240)
* add e2e test for context

add workload check

should not create AC

add test  trait render

update e2e-test logic

add switching context write status back to AppRevision logic

add create and pull apprevision test

quick fix for appContext ownerReference problem

add more tests

fix test

* add boilerplate

* rebase master fix issue

* rebase master and fix test

* fix check  interval time
2021-03-22 01:36:37 -07:00
Ryan Zhang 135282834d
swap appConfig with appContext (#1245)
* swap appConfig with appContext

* fix e2e test

* fix e2e test

* surpress helm test
2021-03-20 00:02:58 -07:00
天元 7931e2a0a5 more useful vela system dry-run 2021-03-20 12:51:00 +08:00
Jianbo Sun 657baf9f15
init applicationRevision Object as revision of Application (#1210)
* generate appRevision and create AC with the same name

* Update pkg/controller/core.oam.dev/v1alpha2/application/application_controller_test.go

* fix ci

Co-authored-by: Ryan Zhang <yangzhangrice@hotmail.com>
2021-03-19 12:30:31 -07:00
yangsoon b788401920 fix e2e_test 2021-03-18 12:12:08 +08:00
yangsoon c349c94181 fix app_controller & helm related tests. 2021-03-18 12:12:08 +08:00
Yue Wang b216c0a636
move test/integration (#1212)
Signed-off-by: roywang <seiwy2010@gmail.com>
2021-03-17 17:25:22 -07:00
roy wang 4c762ebf83 fix unstable e2e test
Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-03-16 17:31:12 +09:00
Ryan Zhang e61cba4add add deployment demo 2021-03-15 20:40:02 -07:00
Ryan Zhang 96d9287525 add deployment rollout demo 2021-03-15 20:39:55 -07:00
Yue Wang 1652b4cf0c
init Helm module (#1131)
use settings from App to override Values

add discovery util to get workload created by helm module

add helm typed structs into workloadDef and traitDef

update doc & refine code

add e2e test for helm module application

use oam.dev/catalog as helm repo

Signed-off-by: roywang <seiwy2010@gmail.com>
2021-03-15 00:54:43 -07:00
wyike ccc5826616
Remove 3 standard controller (route autoscaler metrics ) (#1172)
* delete 4 standard controllers related  code

delete related yaml

delete setup controller

add back podspecworkload controller

try to fix e2e

update related docs

fix failed test

fix docs problem

remove useless scheme

up timeout for e2e-test

change doc  structure

* fix go mod
2021-03-12 14:57:59 +08:00
Ryan Zhang b64009c02d rollback after rollout failure 2021-03-11 18:31:41 -08:00
Ryan Zhang 2cebad6ff4
Enable more rollout e2e tests (#1176)
* enable a few CI tests

* fix webhook related test failure
2021-03-11 17:35:22 -08:00
Ryan Zhang 1048b399fd
rename appRollout and add more fine tune tests (#1166)
* rename appRollout and add more fine tune tests

* improve rollout

* do not advance AC if we are not rolling

* fix e2e test bug

* fix the test
2021-03-11 15:56:38 +08:00
Ryan Zhang 28fce2d7de
rename applicationDeployment to appRollout (#1146)
* rename applicationDeployment to appRollout

* Update test/e2e-test/rollout_plan_test.go

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

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2021-03-05 14:28:53 -08:00
WYike 994ef23c0c
modify controller,webhook,api,chart (#1085)
solve failed test

add compatibility test for old crd

add app ns for cli

modify compatibility test

solve compatibility problem

add testing for  GetDefinition func with cluster scope CRD

generate code for compatibility-test

move testdata generate to makefile

optimize ci pipeline for compatibility-test
2021-03-04 23:14:18 -08:00
Ryan Zhang 1976a0fa64 removing the definitions by removing their CRDs 2021-03-04 19:56:54 -08:00
Ryan Zhang 6b73436362 add first rollout e2e test 2021-03-04 18:25:30 -08:00
天元 8c8ca60756 align workload/trait definition schema with v0.2.2 spec 2021-03-02 17:35:58 +08:00
Ryan Zhang d3511415c2
add webhooks to the rollout plan and use AC as App snapshot (#1031)
* add webhooks

* app controller change

* add component revision and appconfig revision and test

* solidify the component revision logic and fix component revisoin bugs

* fix command cli e2e failure

* fix the bug caused by rawExtention

* fix UT test

* retry on component not found

* lint

* revert component revision create order
2021-02-19 12:11:26 -08:00
roy wang 93ae8a9099 fix staticcheck issues
add staticcheck CI action

add staticcheck in Makefile

Signed-off-by: roywang <seiwy2010@gmail.com>
2021-01-29 18:42:03 +09:00
Ryan Zhang e664831ff6 application deployment 2021-01-25 22:17:35 -08:00
roywang 59a6ef5140 implement util/apply with three-way diff
add/fix unit tests

fix e2e tests

update doc & add unit test

Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-01-21 18:05:29 +09:00
天元 f694d1ad5d add tests 2021-01-08 18:16:03 +08:00
天元 3a47d5de73 refactor application object to have more strict schema 2020-12-29 15:48:32 +08:00