Commit Graph

196 Commits

Author SHA1 Message Date
Jianbo Sun 537f19f06b
Fix: remove podspecworkload controller and CRD (#2269) 2021-09-12 10:17:09 +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
Penthaa Patel 161bab7d62
Refactor(#2185): remove unused config options in Makefile (#2200)
Fixes issue #2185
2021-08-31 10:06:21 +08:00
qiaozp 0c7048b2a0
Feat(addon): add default enable addon (#2172) 2021-08-29 11:24:40 +08:00
Concurrensee 9b7c4562ca
modified openkruise version to v0.9.0 (#2076)
Co-authored-by: 314785 <wuyida.wuyida@alibaba-inc.com>
2021-08-18 17:37:52 +08:00
Tianxin Dong 601510e43c
feat(def): add built-in workflow definitions (#2094)
* use_vela_bin

* Update gen_definitions.sh

add version print

* Update gen_definitions.sh

* Update gen_definitions.sh

* update crossplatform build check

* test

* feat(def): add built-in workflow definitions

* delete pod disruptive in workflow step def

* make cue files reviewable

* fix workflow step definition

* fix ci

* add clean up step

* add build clean up

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
Co-authored-by: Somefive <Somefive@foxmail.com>
2021-08-18 13:22:57 +08:00
Somefive 51669f0e41
enable vela def to use import decl (#2084)
* enable vela def to use import decl

* fix def_test

* add comment

* add more test
2021-08-13 18:44:01 +08:00
wyike 682385dea9
runtime rollout chart (#2075)
* first commit

WIP

finish all tests

finish github  workflow

only for test

only for test

revert test code

minimize rbac

neats imports

fix tests

* reorg

small change

* rename
2021-08-12 21:33:00 +08:00
Hongchao Deng 201c3c466d add test for catalog service 2021-08-12 11:13:41 +08:00
Hongchao Deng 638957a333 leave only catalog code 2021-08-12 11:13:41 +08:00
wangyuan249 fa57fcf66e Merge velacp to apiserver branch in oam repo (#2039)
* move velacp into vela core as apiserver

* fix lint

* add license

* fix err lint

* fix err

* rm vela install service

* add makefile
2021-08-12 11:13:41 +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
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
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
wangyuan249 d77969b52e
Help developer install build-in necessary definitions. (#1907)
* fix

* add install def shell

* change to make command

* fix shell

* fix bak
2021-07-20 14:05: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 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
yangsoon c53cebef0a
add Fluxcd addon (#1863)
* add fluxcd addon

* fix apiserver
2021-07-02 17:34:02 +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
Mason Kwok ed4844d518
remove implementation of vela install (#1798) 2021-06-16 10:03:20 +08:00
yangsoon 2c9cf94817
add options (#1775)
1. add ConcurrentReconciles for setting the concurrent reconcile number of the controller
2. add DependCheckWait for setting the time to wait for ApplicationConfiguration's dependent-resource ready
2021-06-08 10:38:30 +08:00
Zheng Xi Zhou dd682919a8
Fix wrong cue directory (#1749)
Fixed the wrong directory of cue files when formating
2021-06-02 22:37:39 +08:00
Lian Bai 6dab3fb985
fix the fmt command of the makefile (#1745) 2021-06-02 18:31:44 +08:00
chival 8c864f33b9
organize registry directory (#1733)
* organize registry directory

* fix cue not found

* install cue

* move definitions to and to-be-generated cue&yaml to root directory

* fix publish registry dir

* fix duplication of cue install

* try again

* try again
2021-06-02 13:34:01 +08:00
chival de9b06e716
optimize goimports (#1716) 2021-05-26 18:41:50 +08:00
yangsoon 512a87466e
update docker image (#1677) 2021-05-18 17:23:46 +08:00
yangsoon 2fa02bc1c0
Preview and Build website in docker container (#1668)
* start/build docs in docker

* restore old fashion

* fix release ci
2021-05-17 19:09:37 +08:00
wangyuan249 ba8c6c020a
upgrade Go version to 1.16 latest (#1577)
* bump go version to 1.16

* fix gox

* fix

* fix

* del sleep

* del

* gosum fix conflict 0511

* rm stop fix

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-05-11 21:27:33 +08:00
Zheng Xi Zhou f137a9adf3
Update samples for "vela show xxx --web" (#1616)
* Update samples for "vela show xxx --web"

Also stop generating components/traits docs under
docs/en/end-user and remove the command from Makefile

Fix #1602

* fix doc build issue

* Update references/plugins/references.go

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

* Enhance --web feature for "vela show"

- Find the capability in "vela-system" if notfound in the current ns
- Don't depend on local capabilities

* add ut for GetCapabilityByName in references/plugins/cluster.go

* add ut for GetNamespacedCapabilitiesFromCluster in references/plugins/cluster.go

* add ut for GenerateTerraformCapabilityProperties in references/plugins/references.go

* fix import issue

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2021-05-09 08:50:31 +08:00
chival 6a956f9343
calculate e2e-test into coverage (#1553) 2021-04-28 15:29:08 +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
yangsoon 3a68ec77fd
fix CI: add action to release kubectl-vela binary file (#1503)
* add kubectl-vela release

* add docs
2021-04-15 22:54:31 +08:00
yangsoon 199e747865
Introduce vela as a kubectl plugin (#1485)
* add kubectl plugin

* add vela show

* add test
2021-04-15 18:25:46 +08:00
yangsoon 1659528015
fix-resources-url (#1492) 2021-04-14 23:50:07 +08:00
Shiwen Cheng e5a9be8de9
Improve makefile and dockerfile (#1445)
* Improve makefile and dockerfile

* Add entrypoint.sh to support entrypoint and debugging

* Add docker base image discussion issue #1448 in dockerfile
2021-04-09 20:12:57 +08:00
Jianbo Sun f47ca0f4da
remove no used ingress notes in charts (#1405)
* remove no used ingress notes in charts

* remove helm repo update
2021-04-02 10:58:07 +08:00
Jianbo Sun 6b8875012d
use shell instead action to sync website && don't sync index.js and config.js (#1386)
* use shell instead action to sync website && don't sync index.js and config.js

* update test website build

* use bash instead sh
2021-04-01 10:06:34 +08:00
Jianbo Sun bbea29c8e5
fix kube-webhook-certgen to patch CRD conversation && remove cert-manager in CI e2e test && remove issuer create from CLI env (#1267)
* remove cert-manager in CI e2e test and remove issuer create from CLI env

* update job patch image(https://github.com/wonderflow/kube-webhook-certgen)
2021-03-31 21:21:28 +08:00
yangsoon 553b5d19eb
add docs readme (#1359) 2021-03-30 16:37:46 +08:00
Jian.Li cfabcee181
Import kube package(cue) by GroupVersion (#1309)
* package upgrade

* package import

* Classified by groupversion

* fix test cases

* add test cases

* check diff

* lint code

* fix test

* add pacakge reference

* VersionKind

* package upgrade

package import

Classified by groupversion

fix test cases

add test cases

check diff

lint code

fix test

add pacakge reference

VersionKind

fix ci
2021-03-28 18:08:31 +08:00
Jianbo Sun 8e8ec58b97
merge e2e in one to save time (#1318) 2021-03-26 20:40:19 +08:00
Yue Wang 30baeabadc
fix CI (#1317)
Signed-off-by: roywang <seiwy2010@gmail.com>
2021-03-26 19:34:00 +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
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
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
Jianbo Sun acf497b1c7
make CUE inner kube package as a standalone package && clean code (#1263) 2021-03-23 16:30:49 +08:00
天元 868530316c fix release pipeline 2021-03-20 15:44:06 +08:00
kushthedude e978e26c25 feat: add debug-flag for enabling logs in core-run
Signed-off-by: kushthedude <kushthedude@gmail.com>
2021-03-19 22:29:29 +05:30
Ryan Zhang 7e22c19383
move out rollout e2e (#1205)
* move out rollout e2e

* fix go workflow
2021-03-17 19:13:24 -07:00
Yue Wang b216c0a636
move test/integration (#1212)
Signed-off-by: roywang <seiwy2010@gmail.com>
2021-03-17 17:25:22 -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
天元 339889813b add quick start for application CRD
add quick start for application CRD

Update docs/en/quick-start.md

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

Update docs/en/quick-start.md

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-03-10 10:57:26 +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
yangsoon 6c794bda08 fix issue #1140 delete image after e2e test 2021-03-05 12:04:07 +08:00
Ryan Zhang eac2d37551
add webhook and kruise (#1135) 2021-03-03 23:21:02 -08:00
Jianbo Sun 003db753aa
Merge pull request #1134 from Cweiping/fix/fix/arm_build_error
fix arm64 build failed and block our release pipeline
2021-03-04 11:10:19 +08:00
Weiping Cai 2fb2306117
fix arm64 build failed and block our release pipeline
Signed-off-by: Weiping Cai <weiping.cai@daocloud.io>
2021-03-04 09:59:43 +08:00
Holger Protzek d6f28bfd9e
Removed prometheus and certmanager crd's (#1005)
* Removed prometheus and certmanager crd's, use cert-manager helm chart dependency instead

* Fixed unit and 2e2 tests. Added servicemonitors and certmanager crd dependencies for tests as testdata.

* Run `helm dependency update`

* Delete kubevela helm release and namespace if existing

* WIP - Bad hack to add the certmanager crds before installing kubevela with cert-manager as dependency. The cert-manager crds are not available, when kubevela Issuer are installed otherwise.

* WIP Added admission patch for webhook

* WIP Refactored secrets config

* WIP Fixed helm chart

* WIP Disabled metrics cap, due missing prometheus dependency by default

* WIP Added certmanager for e2e tests

* WIP Added certmanager for e2e tests

* WIP cleanup

* Updated docs

* Re-added certificate mount path
2021-02-26 16:46:01 +08:00
Jianbo Sun dd222ac876
refactor cli/dashboard/apiserver to reference folder (#1084)
* refactor cli/dashboard/apiserver to reference folder

* address comments
2021-02-23 13:03:38 +08:00
kinsolee 05bd7a3ab2 fix: remove lagacy command of 'make core-install' 2021-02-19 22:26:33 +08:00
zzxwill d404ae9459 build with npm instead of yarn 2021-02-08 16:18:22 +08:00
zzxwill 9230e5c181 Revert package management and build tool to npm
As yarn failed to build and start the dashboard most
of time, revert the tool to npm
2021-02-05 11:31:37 +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
Jianbo Sun c41bd241ce
update kubevela installation guide (#955)
* update kubevela installation guide

* adress comments

* Update docs/en/install.md

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

* Update docs/en/install.md

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

* remove line

* address comments

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-01-29 15:46:58 +08:00
天元 bed609e192 build linux/arm64 cli command 2021-01-29 12:18:38 +08:00
Ryan Zhang e664831ff6 application deployment 2021-01-25 22:17:35 -08:00
Ryan Zhang d74dbb4fda refactor application controller 2021-01-21 00:34:04 -08:00
Jianbo Sun 89863b30e8
fix ci and refactor code (#887)
* adjust CI scripts

* fix go ci order

* try fix

* use appfile to update trait

* fix vela status

* use assert.ObjectAreEqual to check diff for map case

* remove application controller own AC and Components

* tune place

* fix lint

* update

* remove error check of vela init test

Co-authored-by: Ryan Zhang <yangzhangrice@hotmail.com>
2021-01-15 19:04:12 +08:00
天元 3a47d5de73 refactor application object to have more strict schema 2020-12-29 15:48:32 +08:00
Zheng Xi Zhou ddba62fba0
Generate restful api based on Swagger (#765)
* Generate restful api based on Swagger

As OpenAPI has to be quickly developped to support front-end developement, so
did the restufl api docs. Based on swagger, generate the docs automatically

* fix conflicts and add application list annotation
2020-12-22 16:35:26 -08:00
天元 b8fd6f9823 add blog about how to extend kubevela by cuelang 2020-12-15 20:14:50 +08:00
majian cf2a57c96a
Integrate swagger and add env api (#764)
* 1.swagger integrate
2.add env swagger comment

Signed-off-by: majian <majian159@live.com>

* use swagger.json

Signed-off-by: majian <majian159@live.com>
2020-12-12 08:54:33 -08:00
majian 7acc52ebdb
1.use yarn (#769)
2.reinstall package

Signed-off-by: majian <majian159@live.com>
2020-12-11 10:28:08 -08:00
guoxudong ec287a181f Adapted for brew installation 2020-12-11 10:20:53 +08:00
Zheng Xi Zhou 50f4d10b00
Add make target to start both OpenAPI server and dashboard (#766)
Start up dashboard all in one
2020-12-10 11:10:10 -08:00
天元 ee547ec441 add release version into README 2020-12-07 15:30:39 +08:00
天元 21cae61f93 build version into vela-core and lock helm version on release 2020-12-04 16:45:37 +08:00
Jianbo Sun 7d3397ac31
Merge pull request #673 from zzxwill/docs-reference
Auto-generate reference docs
2020-12-03 18:11:49 +08:00
天元 1a37228e03 add a tip for make diff fail
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-12-02 13:54:19 +08:00
zzxwill f7718b4c08 Auto-generate reference docs
Automatically generate reference docs for all workloads and traits.
1) moved design part from hack/references/configurations/rollout.yaml to design/vela-core/rollout.md
2) added usages for all workloads/traits, except route (#672)
3) renamed some reference docs

Attention: atuo-generation of specifications for all parameters has NOT been implemented, they are generated
based on files under `hack/references/configurations`

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2020-12-01 13:56:24 +08:00
天元 6b931d9b32 fix unstable test as workload changed by reconcile
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 20:11:26 +08:00
天元 43754e89b6 merge CI and makefile
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 12:16:36 +08:00
天元 26b4e3c2d5 merge main.go
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 11:08:58 +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
天元 2e975e678c merge code: apis,pkg all moved
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-27 11:07:50 +08: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
天元 ba7a4a33fc add more strict golangci check
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>

add description for export const variable and function, fix golint

Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-23 16:19:20 +08:00
天元 974027e233 fix go imports lint complain
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-17 20:40:08 +08:00
天元 9a89699691 refactor crd generate mode
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-14 09:10:39 +08:00
天元 cd4615405f updated oam-k8s-runtime and go through rollout fix bugs
Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
2020-11-13 11:24:49 +08:00
天元 5c0f26c6f6 fix doc gen path 2020-11-10 20:16:15 +08:00
Hongchao Deng 6b4325eebc skip capability e2e due to rate limit
plan to change e2e into a mock UT to avoid remote call.

Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
2020-11-03 21:37:35 -08:00
Hongchao Deng e20b6c9bf4 doc: add app init, config, and capability references
additionally:

- change backend workload type to worker
- add cue format script

Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
2020-11-03 19:25:41 -08:00
Hongchao Deng 7cfc80cd41 add render-only to ini cmd and ignore route if domain is empty 2020-11-01 23:34:12 -08:00
zzxwill cc93367b22 Fix `charts/vela-core/crds/_.yaml` generation issue
Fixed the issue of `charts/vela-core/crds/_.yaml` generation
by removing unkonwn struct in pkg/commands/show.go.
2020-10-31 13:43:10 +08:00
Hongchao Deng 9c2b75d9af update
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
2020-10-30 19:07:00 -07:00
Hongchao Deng 9be4316256 doc: separate appfile chapter into a few sections to gradually add traits, workloads
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
2020-10-30 19:07:00 -07:00
Hongchao Deng 0ef3d8650b fix and clean up charts
currently the charts has following issues:
- cert-manager has manifests in multiple places. Should be combined into one.
  Prefer pure yaml since its helm chart requires `--set installCRDs=true` flag and uninstalling CRD via helm is inconvient.
- The bootstrap of vela-core will setup metrics controller. This requires Prometheus Operator CRD. Move related CRD to vela-core chart.
- move prometheus to vela-system namespace. Remove monitoring namespace.
- remove grafana. It's already a dependency of prometheus chart.
- change default image pull policy to IfNotPresent. Should not be Always.

Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
2020-10-29 13:56:33 -07:00
Hongchao Deng 42115e7774 e2e: delete kind cluster in setup
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
2020-10-27 20:55:50 -07:00