Commit Graph

99 Commits

Author SHA1 Message Date
StevenLeiZhang 90246065d9
Fix: vela dry-run can not render Applicaiton, if x-definition(Compnent/Trait) is not installed to vela-system namespace (#6135)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-06-27 23:08:23 +08:00
Somefive f15eba2c5f
Chore: remove legacy rollout and scope (#6068)
* Chore: remove legacy rollout & scope

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

* remove outdated params

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

* fix

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-05 10:57:38 +08:00
Somefive dd899c2b39
Chore: remove outdated apis(v1alppha2 ApplicationConfiguration Component, and HealthScope, Rollout) (#6041)
* remove outdated api

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

* fix rt test: no component rt

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

* recover context.revision to component hash

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-01 09:32:49 +08:00
Somefive ef4bb07fb3
Chore: remove dm (#6036)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-25 13:54:35 +08:00
yyzxw 3cb0f7b330
refactor: parse trait & scope (#6017)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-22 19:21:01 +08:00
Somefive d59b116d06
Feat: upgrade ginkgo to v2 (#5940)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-15 16:07:51 +08:00
Somefive d8af202242
Feat: upgrade k8s.io to 0.26 (#5758)
* Feat: upgrade k8s.io to 0.26

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

* Feat: replace temp replace

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

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-10 11:19:05 +08:00
qiaozp c24cbdc6f9
Feat: compatibility on componentDefinition spec.workload.definition field (#5800)
* Feat: compatibility on componentDefinition spec.workload.definition field

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* rollback

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove hack fallback

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-04-06 11:48:26 +08:00
barnettZQG 79f1d5cb03
Chore: optimize the package dependencies (#5596)
* Chore: optimize the package dependces

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

* Fix: the code style

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

* Fix: remove the repetitive context

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

* Fix: change the context key

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

* Fix: Optimize the e2e test case

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

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-07 16:19:37 +08:00
Jianbo Sun ac9cf58afa
Feat: support fallback to kubeconfig namespace when env not set (#5182)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-13 14:53:54 +08:00
Diego Pinheiro 0aaab7fa30
fix typo (#4827)
Signed-off-by: Diego Pinheiro <diego.milhomes@gmail.com>

Signed-off-by: Diego Pinheiro <diego.milhomes@gmail.com>
2022-10-07 17:05:46 +08:00
Somefive 668a637f86
Feat: upgrade go1.19 (#4790) 2022-09-28 10:19:28 +08:00
Somefive ac52f4aba8
Chore: remove manualscaler (#4716)
* chore: remove manualscaler CRD define in apis/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manualscaler CRDs yaml in charts/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler design in design/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler code in doc/ hack/ legacy/ references/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler code in pkg/ test/ vela-templates/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: fix some code

Signed-off-by: arcosx <arcosx@outlook.com>

* Chore: remove manualscaler in test

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

* Chore: remove outdated tests

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

* Chore: remove outdated tests

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

Signed-off-by: arcosx <arcosx@outlook.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: arcosx <arcosx@outlook.com>
2022-09-14 16:28:09 +08:00
Somefive 0cb85d897a
Fix: health check use original ns if no override and original exists (#4349)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 16:46:14 +08:00
huiwq1990 c97124a30f
Feat: add policy parser test (#4174)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-07-06 15:42:06 +08:00
Somefive 2d28fb35eb
Feat: multi-cluster authentication (#3713)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-24 14:48:26 +08:00
Somefive 571e154af3
Fix: bind env to system namespace (#3706)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-19 20:55:59 +08:00
wyike 2ac4ddad03
Feat: calculate systemInfo everyday periodically and store them in datastore (#3689)
* add framework

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

add

finish the framework

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

finish test manually

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

add update time

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

adding test

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

finish test

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

abs

fix test

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

* move start func to leader election call back funcs

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

* resolve the recycle import problecm

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

fix issue

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

fix ci
2022-04-19 10:24:54 +08:00
Sunghoon Kang 1300a980f0
Feat: reconcile app with scoped permissions (#3434)
* Refactor: refactor multi cluster round trippers

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

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

Refs #3432

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

* Feat: reconcile app with scoped permissions

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

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

Refs #3432

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

* Refactor: extract context setter as method

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

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

* Feat: use annotation instead of spec

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

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

* Refactor: unify service account setter caller

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

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

* Refactor: rename GetServiceAccountName

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

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
2022-03-15 11:55:50 +08:00
Somefive 7a30ec61d6
Fix: remove unused variable (#3377)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-07 11:57:59 +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
barnettZQG b85dda35f3 Feat: add namesapce create and list api (#2514)
Co-authored-by: barnettZQG <yiyun.pro>
2021-10-23 00:29:43 +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
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
Jianbo Sun 0a9518f583
Fix: remove appcontext CRD and controller (#2270) 2021-09-23 15:05:47 +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
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
yangsoon abbec2c36b
definitions support specify the revision name (#2044)
* support named defRev

* add test
2021-08-10 20:03:45 +08:00
Somefive ee0282af18
[Vela CLI] Vela def enhancement & replace mergedef.sh (#2031)
* draft vela def enhancement

* add format and amend test

* fix generation bugs

* force CI

* work around lifecycle definition in avoid of vela show --web crash

* fix data race in envbinding
2021-08-06 17:10:52 +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
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
Yue Wang fba53cfbf3
handle ending reconcile with conditions (#1859)
Signed-off-by: roywang <seiwy2010@gmail.com>
2021-07-06 13:54:23 +08:00
Jianbo Sun bd41d49311
allow component to defer insert secret and config (#1869) 2021-07-02 15:09:45 +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
yangsoon 447ab4a35a
Improve the logging system (#1735)
* change to klog/v2

* add logfilepath opt in helm chart

* replace klog.InfoF with klog.InfoS and improve messages

Remove string formatting from log message, improve messages in klog.InfoS and use lowerCamelCase to fmt Name arguments in klog.InfoS

* fix klog.Error

for expected errors (errors that can happen during routine operations) use klog.InfoS and pass error in err key instead.

* use klog.KObj and klog.KRef for Kubernetes objects

ensure that kubernetes objects references are consistent within the codebase

* enable set logdebug level

* add log-file-max-size
2021-06-03 12:07:30 +08:00
Zheng Xi Zhou 8dcbb61cb8
Generate OpenAPI JSON schema for Terraform Component (#1738)
Fix #1736
2021-06-03 11:23:20 +08:00
Hongchao Deng b93460cbb4 add workflow package 2021-06-02 07:34:54 -07:00
Hongchao Deng 9a10e967ee update APIs and docs for workflow design 2021-05-28 20:44:50 -04: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
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
yangsoon fd44069a21
fix unit-tests (#1569) 2021-04-27 14:02:10 +08:00
yangsoon ed3e8d384a
add DefinitionRevison and make Componet/TraitDefinition revisionable && fix legacy CRD (#1531)
* add definitionrevison type

* fix controller

* add test

* fix legacy

* fix unit-tests
2021-04-26 10:07:55 +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
wyike a7bfb2fb6f
refactor appRevison extract func to utils (#1481)
* refactor appRevison extract func to utils

* add some corener case check

* add more checks
2021-04-14 15:48:23 +08:00
Yue Wang 2d6f2083db
refactor pkg/appfile (#1447)
Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-04-11 14:10:16 +08:00
yangsoon 9bf6cc2659
update version (#1442) 2021-04-09 12:28:04 +08:00
yangsoon 08a1dc5a22
Add package discover refresh when component/trait definition are registered (#1402)
* add discover refresh

* add test

* fix store openapi schema

* fix discovermapper
2021-04-08 20:35:21 +08:00