Commit Graph

344 Commits

Author SHA1 Message Date
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
roywang 9730cb438d fix unstable integration test
Signed-off-by: roywang <seiwy2010@gmail.com>
2020-12-24 18:22:27 +09:00
Yue Wang 630f1e48bc
enable webhooks for AppConfig/Comp (#781)
rename webhooks

fix e2e tests

Signed-off-by: roywang <seiwy2010@gmail.com>
2020-12-23 11:02:06 -08:00
天元 9aae23e163 fix route reconcile too frequency and replace oam-runtime imports
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-12-01 14:05:12 +08:00
天元 43754e89b6 merge CI and makefile
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 12:16:36 +08:00
天元 cfadfd8763 merge tests and run on CI
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 11:08:58 +08:00