Commit Graph

270 Commits

Author SHA1 Message Date
Hongchao Deng 75c123df2f
fix metadata missing in AppRevision spec data (#1257)
* fix metadata missing in AppRevision spec data

* fix test
2021-03-22 11:29:25 +08: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
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
wyike 4903eb7cb2
refactor ac reconcile so that we can reuse it in new AC (#1236)
* refactor ac reconcile so that it returns the status

* add appContext to reuse appconfig reconcile logic

* fix lint

* update makefile for verbose info

* fix appcontext register error

* fix application configuration finalizer bug

Co-authored-by: Ryan Zhang <yangzhangrice@hotmail.com>
2021-03-19 00:04:01 -07:00
Jianbo Sun 276d544766
Merge pull request #1226 from oam-dev/fix-rollout
allow state transition to be modified at any state
2021-03-19 12:23:22 +08:00
mengjiao.liu f4223ebc1a Fix the function and method names that does not conform to the naming convention 2021-03-18 20:09:36 +08:00
Ryan Zhang b0bf9b1d96 allow state transition to be modified at any state 2021-03-18 00:39:02 -07:00
yangsoon 6a96062464 add related test. 2021-03-18 12:12:09 +08:00
Jianbo Sun 5b2b27e6a4
init ApplicationRevision CRD Object as revision of Application (#1214) 2021-03-17 18:34:10 -07:00
Ryan Zhang d4c2b7cb5a
Refactor appConfig Controller to make it reusable and rename appDeployment to appRollout (#1208)
* temp

* rename appDeploy and refactor AC controller
2021-03-16 22:46:38 -07:00
Ryan Zhang e61cba4add add deployment demo 2021-03-15 20:40:02 -07:00
Ryan Zhang 7bd96bb324 implement deployment controller 2021-03-15 20:40:02 -07:00
Ryan Zhang c34c5a9a6c finalize controller interface 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
yangsoon 60df873b93
Store ComponentDefinition capability schema in configMap (#1180)
* store componentdefinition capability  schema in configMap

* fix componenetdef & traitdef controller test.

* change some componentdefinition field

* fix unit test error

* fix some code bug

* fix some yaml file error.

* fix copyright error
2021-03-15 11:08:46 +08:00
Jianbo Sun 52657ac7ba
Merge pull request #1174 from wonderflow/cli
align cli to the application object
2021-03-12 16:42:06 +08: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
天元 9d5b31be2b remove local files, diretly use Definition/Application in Cluster 2021-03-12 10:59:24 +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
Zheng Xi Zhou c2b6e6efdd
Store capability OpenAPI V3 JSON schema in ConfigMap (#1106)
* Store capability OpenAPI V3 JSON schema in ConfigMap

Store the OpenAPI v3 JSON Schema generated from the parameters of
a capability which could be used by api server

To fix #899

address comments
try to fix data race issue

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

* address comments: generate cue instance from cue json instead of local file

* update ConfigMap data at any time

* add more unit-test

* fix conflicts

* adapt to new spec.schematic.cue.template

* adapt to new spec.schematic.cue.template for controller unittest cases

* fix ci issues

* adapt to namespaced scope definition

* add more testcases on namespaced definitions with and without namespaces

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2021-03-10 10:44:58 +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 eac2d37551
add webhook and kruise (#1135) 2021-03-03 23:21:02 -08:00
Jianbo Sun 570cf01949
Merge pull request #1117 from wonderflow/cap
align workload/trait definition schema with v0.2.2 spec
2021-03-04 11:55:08 +08:00
天元 8c8ca60756 align workload/trait definition schema with v0.2.2 spec 2021-03-02 17:35:58 +08:00
Ryan Zhang 7207819080
fine tune rollout experience with demo (#1119)
* fine tune rollout experience with demo

* fix test
2021-03-02 17:24:12 +08:00
天元 66177ddd13 update CRD and fix workload not create first time 2021-03-02 10:13:54 +08:00
Jianbo Sun b4b3a8ab69 parent override child when annotation/labels conflicts && one revision will apply once only in force mode && AC.status CRD updated (#1109)
* when annotation/labels passthrough from parent to child conflicts, the parent will override the child.
e.g. 1) AC will override its component/workload; 2) workload will override child-resource; 3) AC will override its trait

* apply once only force will block workload apply when revision not changed even ac generation updated
2021-03-02 10:13:54 +08:00
Ryan Zhang abf9270473 manual e2e test example with bug fixes 2021-03-01 01:00:27 -08:00
Ryan Zhang 2b24bad2b8 appConfig prepare for workload rollout for the first time and complete the stand alone rollout logic 2021-02-25 00:58:17 -08:00
Ryan Zhang 073f3bc0c7
add hashtag and consolidate libs (#1082)
* add hashtag and consolidate libs

* fix CI
2021-02-20 23:10:15 -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
zhinong.gt 994c194d0f add data passing mechanism in kubevela 2021-02-07 16:43:13 +08:00
roy wang 47ab481eee implement ApplyOnceOnlyForce
add unit test

Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-02-06 12:58:32 +09:00
Ryan Zhang b564e0ef26
add more code to complete the rollout plan (#1024) 2021-02-05 12:08:19 -08:00
Jianbo Sun 4b06961e6f
Merge pull request #1014 from wonderflow/definition
move template out from extension to spec.template
2021-02-05 15:51:44 +08:00
天元 96a589b098 move template out from extension 2021-02-05 14:45:30 +08:00
Ryan Zhang 15020660c9 cloneset controller draft 2021-02-04 17:01:22 -08:00
Jianbo Sun b6f10bb1fa
Merge pull request #975 from leejanee/app-status
display trait status information with customized style
2021-02-04 20:22:19 +08:00
天元 868e0925d4 move health check and status out of extention 2021-02-04 17:56:20 +08:00
zzxwill 5aea4c4baa Fix openAPIV3Schema validatation issue
Legacy crd charts/vela-core/crds/standard.oam.dev_routes.yaml could not
be applied to old Kubernetes clusters like 1.15.12.
Fix #993
2021-02-03 22:20:39 +08:00
天元 f310665fe0 implement vela status in application CRD controller and refactor the health check code 2021-02-03 18:13:47 +08:00
Holger Protzek f737379738
Added ingressClass to route trait (#947)
* Added ingressClass to route trait

* typo

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

* run make reviewable

* fixed ingress test

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2021-02-02 09:52:20 +08:00
Ryan Zhang 7f64974701
This PR spells out the rollout states (#972)
* add rollout state transition:

* address comments
2021-02-01 17:40:59 +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 ad496b132a further develop appDeployment controller 2021-01-28 17:59:31 -08:00
Zheng Xi Zhou 2a943c9429
Using Terraform as IaC module in KubeVela (#863)
* Integrate Terraform into KubeVela

Integrated Terrafrom into KubeVela to enable it to deploy
infrastruce resouces by `vela up`

* extend Terraform modules/files as WorkloadDefinition

stop printing terraform log to console

Support one workload consumes two cloud services

Refactor Terraform plugin based on Application Object

add testcase

* refactor code per reviewer's comments

fix rebase issue

* find lost code back

* refactor code to make the modification as little as to that of branch master

* remove blank lines from imports
2021-01-28 18:36:52 +08:00
Ryan Zhang a257f6e60c application controller ignore annotation 2021-01-26 00:03:53 -08:00
Ryan Zhang e664831ff6 application deployment 2021-01-25 22:17:35 -08:00
Jianbo Sun 97f45ae859
code refactor (#935)
* code refactor

* update boilerplate.go.txt
2021-01-26 10:26:41 +08:00
Ryan Zhang adbe1f9368 add the rollout code framework 2021-01-20 13:08:00 -08:00
Ryan Zhang 023d24d392 draft 2021-01-19 15:50:38 -08:00
Ryan Zhang f6345534e6 fix field name 2021-01-15 19:19:32 -08:00
Ryan Zhang df32d4b1ba update rollout CRD spec 2021-01-15 19:19:32 -08:00
天元 1f1f3af7b7 refacter and add tests 2021-01-11 20:48:17 +08:00
天元 2761e7afb9 use map[string]string for scope 2021-01-11 10:54:57 +08:00
天元 718a4b1999 fix ci 2021-01-07 17:52:15 +08:00
天元 4cfee561b9 refactor and add scope to application 2021-01-07 13:07:12 +08:00
天元 3a47d5de73 refactor application object to have more strict schema 2020-12-29 15:48:32 +08:00
天元 4bed55b400 support strategy patch datainput merge for slice case 2020-12-23 21:53:05 +08:00
roywang 582c3788c4 implement TraitConflict check in webhook
add unit tests

Signed-off-by: roy wang <seiwy2010@gmail.com>
2020-12-16 18:01:44 +09:00
Jian.Li e882a650ae
Extend application's capabilities by trait definition (#742)
* add dsl pkg

* realize context capabilities for application

* fix golint

* fix check-diff

* upgrade vela server sample

* comment group

* Definition Reference be Optional & fix  three-part trait crd apply without namespace

* Improve samples
2020-12-13 20:00:06 -08:00
Jian.Li ee906dbd5a
Using CUE to implement OAM model on Kubernetes server side (#669)
Init: Using CUE to implement OAM model on Kubernetes server side
* vela server

* fix refator

* lint code

* vela server

* fix refator

* lint code

* rebase upstream

* remove lister

* add vela-server sample

* fix lint error

* fix lint error

* fix check-diff error

* add test case

* add test case for application controller

* add reconciler test with ginkgo

* remove make server

* remove the kustomize scripts

* fix units test bug

* config direct

* suite test

* add application validater

Co-authored-by: lj176172 <lj176172@alibaba-inc.com>
2020-12-03 17:09:55 +08:00
Jiaming Hu 5e4f270b1e move GetConfig function into specific commands 2020-12-01 21:44:06 -05:00
天元 43754e89b6 merge CI and makefile
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 12:16:36 +08:00
天元 6480873e81 change import headers
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 11:08:54 +08:00
天元 2e975e678c merge code: apis,pkg all moved
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 11:07:50 +08:00
roy wang bfb0f94b82 fix lint issues in /pkg/controller
fix lint issues in /apis

Signed-off-by: roy wang <seiwy2010@gmail.com>
2020-11-26 16:12:03 +09:00
天元 fc805214c7 standardize project structure: change api to apis
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-25 17:28:09 +08:00