* removes default name for terraform provider
Signed-off-by: afzalbin64 <afzal442@gmail.com>
(cherry picked from commit 92e7bf8263)
* fixes minor typos
Signed-off-by: afzalbin64 <afzal442@gmail.com>
undo the changes to typo
fixes minor typos in go_test files
updates config_test to support name as required param
(cherry picked from commit 51c2650a95)
---------
Co-authored-by: afzalbin64 <afzal442@gmail.com>
* fix#5368, use the namespace specified in the resource if -n is not specified
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
(cherry picked from commit 47c9b4457b)
* add default namespace for the case missing namespace in resourceRef
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
(cherry picked from commit 3ae0657796)
* add test case
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
(cherry picked from commit 4ba5eb88eb)
---------
Co-authored-by: Basuotian <basuoluomiu@gmail.com>
Error Details:
E0106 08:12:02.807341 1 controller.go:317] controller/application "msg"="Reconciler error" "error"="Application.core.oam.dev \"test\" is invalid: status.workflow.endTime: Invalid value: \"null\": status.workflow.endTime in body must be of type string: \"null\"" "name"="test" "namespace"="test" "reconciler group"="core.oam.dev" "reconciler kind"="Application"
If the workflow is not completed, the endtime should be null, and the deletion of the application will fail
Signed-off-by: old.prince <di7zhang@gmail.com>
(cherry picked from commit 16b6a02018)
Co-authored-by: old.prince <di7zhang@gmail.com>
* Fix: update cache to lru cache with expire time
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: add auto refresh to topology view and fix the refresh bug in resource view
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Chore: remove appdeployment examples as it's already deprecated
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Chore: remove approllout docs as it's already deprecated
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Chore: remove kubecon 2020 demo as it's not worked due to deprecation
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Chore: remove unused Observability Implementation
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: fix the stuck problem and use lru cache to promote the speed of loading topology
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: reuse existing lru golang library
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: do not change the workflow after the env changed
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: check app when deleting the target from a env
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: Refer to the generation when checking the application status
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: add the test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the starting status overrided the deleting status
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add content to help view
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add the feature of viewing log of pod
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add the container view
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: add test case and fix some bugs
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix some bugs
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add content to help view
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add cluster data to pod view
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add the feature of viewing log of pod
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: support to manage the integrations by the CLI and the workflow
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: remove the xml
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: add the unit test for the nacos writer
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add the integration API
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: make the provider commands to be deprecated
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: make the unit test work
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: rename the integration to the config
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: make the unit test cases work
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: refactor the config commands
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add the distribution status for the config
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: sort the import packages
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: refine the code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: refine the code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: get the content format before render the content
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add some examples
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the command test cases
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add the definitions of the workflow step
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: add some tests
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: add some tests
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the name
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: retry the CI
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: refine some words
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: provide stage field for TraitDefinition
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
* Feat: Refactor the collect health status fn
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
* Feat: add some feature
1. add more column of application and managed resource
2. alter <ESC> to exist key and add <Q> as the back key
Signed-off-by: HanMengnan <1448189829@qq.com>
* Refactor: refactor the yaml view and help view with singleton design pattern
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: some small fix
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: some small fix
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: add test case
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix the bug of cluster list
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add some feature
1. add more column of application and managed resource
2. alter <ESC> to exist key and add <Q> as the back key
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: rename two interface name to make the name more specific
1. rename the ResourceListener to ViewListener
2. rename the Component to View
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: update the type of ”Main“ field in component.app
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: rename some functions of pageStack to make the name more readable
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix some name
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: add more test case
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix time format bug
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix test case in cluster_namespace_test.go
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix test case of the refactored code and some bugs
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: highlight yaml text
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix the bug in table stop.
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix test case of the refactored code and some bugs
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: rename the interface of ResourceView
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: fix inconsistent menu hints
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add the feature that a new view of yaml was added and by it the user can load the yaml text of resource
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: System Info & Diagnose
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:1.misspelling 2.license
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix: pattern of imported package
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix: pattern of imported package
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.
* Feat: 1.the system info command displays the environment variables
* Fix: Making syntax simple
* Feat(system info):1.ARGS多行展示2.指定名称时无须指定namespace3.优化界面展示,支持原始打印或者以wide/yaml形式打印4.指定名称时,打印更可读信息
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:add comment
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:syntactic redundancy
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:Display all ARGS
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:Display all ARGS
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
Add signoff
* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:System diagnose
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:Diagnose cluster-gateway pod's status
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat: System Info & Diagnose
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:1.misspelling 2.license
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix: pattern of imported package
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix: pattern of imported package
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.
* Feat: 1.the system info command displays the environment variables
* Fix: Making syntax simple
* Feat(system info):1.ARGS多行展示2.指定名称时无须指定namespace3.优化界面展示,支持原始打印或者以wide/yaml形式打印4.指定名称时,打印更可读信息
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:add comment
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:syntactic redundancy
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:Display all ARGS
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Feat:Display all ARGS
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
Add signoff
* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
newly added system info including:
1. Cluster num
2. App running num
3. cpu and mem usage condition of vela-core
4. cpu and mem usage condition of vela-core cluster gateway
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: when `vela top` launch, can specify the namespace of the presentation application
Signed-off-by: HanMengnan <1448189829@qq.com>
* Feat: add filtering function to the k8s object view of the `vela top` command, which can be filtered by cluster and cluster namespace
Signed-off-by: HanMengnan <1448189829@qq.com>
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: remove the cloudshell dockerfile
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the configmap name
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the way to get the namespace
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add the daemonset resource policy for building the tree
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the import package
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change some function and variable names
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add http status and code from http cmd run
Signed-off-by: suxiang <704427617@qq.com>
* Feat: fix unit test error
Signed-off-by: suxiang <704427617@qq.com>
* Feat: status is not necessary
Signed-off-by: suxiang <704427617@qq.com>
* Feat: make reviewable
Signed-off-by: suxiang <704427617@qq.com>
* Feat: add unit test
Signed-off-by: suxiang <704427617@qq.com>
* Feat: make reviewable
Signed-off-by: suxiang <704427617@qq.com>
* Feat: support set labels for env
Signed-off-by: codinghuang <codinghuang@qq.com>
* Refactor: Remove util.ParseLabelString
use k8s.io/apimachinery/pkg/labels
Signed-off-by: codinghuang <codinghuang@qq.com>
* Fix: failed to assign the default role for the users who log in from dex
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: cluster e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the ensure namespace error is ignored
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: System Info & Diagnose
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:1.misspelling 2.license
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix: pattern of imported package
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix: pattern of imported package
Signed-off-by: foursevenlove <foursevenlove@gmail.com>
* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.
* Feat: 1.the system info command displays the environment variables
* Fix: Making syntax simple
* Feat: support to query the alias of the project member
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: optimize the e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: support to test login with dex
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: support to update the user when the login mode is dex
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: systemInfoService is nil
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to init the roles of the user which login by dex
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: add the comment
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: make the sub string to lower
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support to sync the revision and the workflow status
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: pass the unit test and e2e test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: update the component pod view
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the pod struct does not match
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: optimize the e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* feature: don't ask user confirmation when delete with --force or --yes
Signed-off-by: Sumit Tembe <sumit.tembe@outlook.com>
* added a new flag 'yes'
* don't skip user confirmation for --force
* skip user confirmation for --yes
* fix: ref-objects parameter with invalid field definition
which cause validating webhook failed when use ref-objects component
Signed-off-by: jiangshantao <jiangshantao-dbg@qq.com>
* fix: run make reviewable
Signed-off-by: jiangshantao <jiangshantao-dbg@qq.com>
Co-authored-by: jst <jst@meitu.com>
* Feat: search useful addon version automatically
Verify whether the current addon version meets the system version requirements according to the obtained specified version. There are two system version requirements: Vela core version, K8s version.
If meet the requirements and continue to perform the next task.
If the requirements are not met, obtain the highest version that meets the requirements
Refs #4181
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: Optimize function implementation and code order, and modify test cases
add more comments of function
optimize package import sequence
optimize user interaction logic and error information extraction logic
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: change template string of regular expression to const type string
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: provider can't be added since 1.4 as context abused
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add cache for remote terraform module in vela show
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: add message for terraform resource in error state
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: fixed the problems of display definition in web
Some ComponentDefinitions, TraitDefinitions, WorkflowDefinitions
failed to show the usage in web browser
Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
* set printable type for {}
Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
* support WorkflowSteps and Policies
Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
Co-authored-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
* Feat: add the API for querying the image info
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the code style
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add the feature that views in addon are applied independently.(#3905)
separate the deployment of views in addon and deploy them separately instead of nested in application.
see the issue for details
Refs #3905
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: add test case of readViewFile.
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: add the apply method of yaml view.
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: add addon suit-test case
Signed-off-by: HanMengnan <1448189829@qq.com>
* Fix: ignore the error that the definition API schema is not exist
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: disable the cache when listing the definitions
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Add description column to vela trait and component command (#4107)
Signed-off-by: Holger Protzek <holger.protzek@springernature.com>
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Fix: mongoDB datastore can't list special email user(#4104)
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Fix: mongoDB datastore can't list special email user(#4104)
change the function name from verifyUserValue to verifyValue
add test case to test kubeapi.go:87
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Fix: mongoDB datastore can't list special email user(#4104)
change the function name from verifyUserValue to verifyValue
add test case to test kubeapi.go:87
add delete test case
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Fix: mongoDB datastore can't list special email user(#4104)
optimize the test case
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Fix: mongoDB datastore can't list special email user(#4104)
optimize the test case use user
change all verify timing in kubeapi
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Fix: mongoDB datastore can't list special email user(#4104)
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Fix: mongoDB datastore can't list special email user(#4104)
Signed-off-by: fengkang <fengkangb@digitalchina.com>
Co-authored-by: Holger Protzek <3481523+hprotzek@users.noreply.github.com>
* Fix: split the image build process to make it faster
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: bump oamdev/kube-webhook-certgen to v2.4.1 to support arm64
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Chore: change the key features and add the demo entrance
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Chore: reuse the Highlights
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Chore: remove the demo
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Signed-off-by: zhengq2006 <zhengq200618@cmbchina.com>
workflow substep develop
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
Feat: support step group with substep in the workflow
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
* Feat(cli): Added an offline flag to the 'dry-run' command
Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>
* Using a fake client now for offline mode
Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>
* Fix(cli): try to get mapValue type name
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Fix: update output format based on comment and fix typo
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Style: make the change reviewable
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Fix: test
Signed-off-by: Cuichen Li <cuichli@cisco.com>
* Feat: support force delete Terraform typed application
If a Terraform typed application hangs on deletion, it could be forced to
delete by command line `vela delete xxx --force`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix copyright
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Upgrade terraform controller api version
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add one more tests
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix two unit-tests
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: check existence of an image
Checked existence of an image in
- public docker hub
- private image registry
Add an API to retrieve image registry secrets by an image and or
its tag. In veluaUX, it will help auto-fill uesrs' imagePullSecrets
fields
Fix https://github.com/kubevela/velaux/issues/436
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* replace the implementation with libary google/go-containerregistry
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* address comments
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add more testcases
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix UT
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: show available versions and dependencies in `addon status`
Also prettify output
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: show addon dependencies in `addon status`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: adjust `addon status` output
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: remove spaces in `addon status` output
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: truncate string if available versions too long
if a local addon has been installed, the AVAILABLE-VERSIONS column of the registry one will not truncate. this commit fixes that.
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Perf: avoid unnecessary network requests to improve performance
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: do not display remote info for local addons
Limit Description length when using `addon list`
Use simpler method to get addon info
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for cli/addon limitStringLength, generateParameterString
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: fix output being empty if the searched addon does not exist anywhere
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for generateAddonInfo
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for generateAddonInfo and FindWholeAddonPackagesFromRegistry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: format code
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: correct unnecessarily focused tests
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: remove unused code blocks
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: remove unnecessary output to stdout
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: remove added registry after tests has been completed
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: new RegistryDataStore every test, to avoid panics
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: fix failing tests due to incorrect registry name
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: move logic to get addon package out of where it is supposed to get addon status
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add test cases for secret-getting in TestGetAddonStatus
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: return error if an addon is not installed, nor does it exist in the registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: rename GetAddonWholePackage to GetDetailedAddon as per wonderflow
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: require --verbose option to show details in `vela addon status`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: require --verbose option to show details in `vela addon status`
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* chore: run make reviewable
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: fix configmap being already existed
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Fix: fix output show addon does not exist when verbose is off and an addon is not installed, but it does exist in the registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: fix golangci-lint issues
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Feat: support filter the resource by kind or apiVersion
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: update the env workflow after deleting a component
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change the default workflow step with deploy type
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: format the cue script of the deploy step
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: error words
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* fix(charts): remove a not built in cap "containerizedwokrload" from disableCaps
Signed-off-by: cnfatal <cnfatal@gmail.com>
* Perf(charts): mv cluster-gateway to a dir
Signed-off-by: cnfatal <cnfatal@gmail.com>
* Feat(charts): support cert-manager on "cluster-gateway"
changes:
1. replace flag "--cert-dir" with "--tls-cert-file" and "--tls-private-key-file" due to cert-manager Certificate only support "k8s" style tls secret(with files "tls.crt","tls.key","ca.crt").
2. add cert-manager cainject annotation for APIService "v1alpha1.cluster.core.oam.dev"
3. add cert-manager Certificate for secret "<release>-cluster-gateway-tls"
4. fix a typo in `values.yaml` , "optimize.optimizeCachedGvks" -> "optimize.cachedGvks" withch cause helm template failed
Signed-off-by: cnfatal <cnfatal@gmail.com>
* Fix(makefile): update kustomize version to be available for darwin-arm64
Signed-off-by: Carmendelope <carmen@napptive.com>
* make reviewable changes
Signed-off-by: Carmendelope <carmen@napptive.com>
* Fix: resolve locally installed addons not being displayed
Addressed an issue where locally installed addons may not be displayed
if one with the same name is in the registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: revert incorrect auto-formatting
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: change original variable name to avoid confusions
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add tests for outputs from `vela addon list`
when an addon with the same as registry one is locally installed
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: use more concise method to check length
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Test: add one more test condition for dual addons
i.e. local and registry
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Refactor: simplify testing logic by removing unneeded looping
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Style: add missing license header
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
* Add application name to the generated workload
Signed-off-by: Daniel Higuero <daniel@napptive.com>
* Make the PR reviewable
Signed-off-by: Daniel Higuero <daniel@napptive.com>
* Feat: add a api for update the ui schema
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add an API to change the definition status
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change cache key
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the error words
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: use Terraform provider name as application in CLI
In CLI, use Terraform provider name as application name when
create a Provider. Also display there providers in VelaUX.
1). manually created a Terraform Provider object, like https://github.com/oam-dev/terraform-controller/blob/master/getting-started.md#aws
2). by enabling a Terraform provider addon in version older than v1.3.0
3). by create a Terraform provider via `vela provider add`
4). by VelaUX
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add UTs
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: check whether a project matched a config's project
If the config project is not nil, it's matched whether the project
matched the target project.
If the config project is nil, the target project matched the config.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* change imports order
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* change imported libraries order again
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: The policy controller generate the OpenAPI schema (#3683)
Signed-off-by: DESKTOP-FV8IFEC\10690 <1069029381@qq.com>
* Feat(lang): The policy controller generate the OpenAPI schema (#3683)
The policy controller does not generate the OpenAPI schema #3683
add CapabilityPolicyDefinition struct comment
add StoreOpenAPISchema of CapabilityPolicyDefinition comment
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Feat(lang): The policy controller generate the OpenAPI schema (#3683)
The policy controller does not generate the OpenAPI schema #3683
fix unit-test
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Feat(lang): The policy controller generate the OpenAPI schema (#3683)
fix unit-test about policydefinition_controller_test.go
The policy controller does not generate the OpenAPI schema #3683
fix unit-test
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Feat(lang): The policy controller generate the OpenAPI schema (#3683)
fix unit-test about policydefinition_controller_test.go
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Feat(lang): The policy controller generate the OpenAPI schema (#3683) gen crd
Signed-off-by: fengkang <fengkangb@digitalchina.com>
* Feat(lang): The policy controller generate the OpenAPI schema (#3683) make reviewable
Signed-off-by: fengkang01 <fengkangb@digitalchina.com>
Co-authored-by: DESKTOP-FV8IFEC\10690 <1069029381@qq.com>
* fix: "builtin-apply-component.cue: file does not exist"
Signed-off-by: lei.chu <1062186165@qq.com>
* fix: "builtin-apply-component.cue: file does not exist"
Signed-off-by: lei.chu <1062186165@qq.com>
- For VelaUX, hidden a provider name (users don't need to manual set it). Used
the application/component name (config name) to be the provider name.
- Store description of a config to the annotation of the config application
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: can not query the instance list for the app with apply once policy
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change the test case about ListResourcesInApp
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: duplicately list pods in velaQL
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the create time of synced app is empty
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
When there are configs, but not in the project where the appliation
is about to deploy, the sync application will hit an issue. It will
lead to block the deploy of an application.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: add api of listing configs for project
In a project, list configs by its type
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* address comments
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix ci
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add query parameter definition
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Update pkg/apiserver/rest/webservice/project.go
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: support multiple-tenant cloud resources
Split terraform-xxx to two parts, the original addon will only install
definitions, and the provider object will be created by `vela provider`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* continue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* continue 0302
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support `vela provider list`
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* generate a configmap in an addon terraform-xxx
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix listing providers
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support add a provider
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support delete a provider
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* support legacy providers
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix bugs in using local filepath as markdown filename; fix bugs in parseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* ignore control character mismatch between lc.TerraformConfiguration and raw text
Signed-off-by: Nicola115 <2225992901@qq.com>
* goimports
Signed-off-by: Nicola115 <2225992901@qq.com>
* store remote and local in MarkDownReference struct
Signed-off-by: Nicola115 <2225992901@qq.com>
* gofmt
Signed-off-by: Nicola115 <2225992901@qq.com>
* fix too many argument bugs in generate.go:45
Signed-off-by: Nicola115 <2225992901@qq.com>
* fix invalid comment
Signed-off-by: Nicola115 <2225992901@qq.com>
* Feat: add the rbac data model
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add some api about the project
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add CRUD about the project and the project user
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add CRUD about the role and perm check filter function
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: update swagger config
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add default roles and perm policies
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add perm check filter for all webservice
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change the method that find project name
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: query applications and envs by user perm
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support get login user info
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change default permissions
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: change PermPolicy to Permission
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add some unit test and fix the e2e test error
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: change some comment word
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e api path error
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix(context): add support for context.appLables and context.appAnnotations (#3463)
Signed-off-by: zxbyoyoyo <596908030@qq.com>
Signed-off-by: 朱晓兵 <596908030@qq.com>
* Fix: unit test
Signed-off-by: 朱晓兵 <596908030@qq.com>
* Fix: recover deleted field
Signed-off-by: 朱晓兵 <596908030@qq.com>
* Feat: support the mountPath parameter of trait-storage-secret is optional Signed-off-by: maxiangbo maxiangboo@cmbchina.com
Signed-off-by: fourierr <maxiangboo@qq.com>
* Feat: support the mountPath parameter of trait-storage is optional Signed-off-by: maxiangbo maxiangboo@cmbchina.com
Signed-off-by: fourierr <maxiangboo@qq.com>
It seems that the `issue-commands` workflow keeps failing.
This commit fixes the `issue-commands` workflow by bumping up the
action version and replacing `npm install` with `npm ci` for
reproducibility.
Refs: https://github.com/oam-dev/kubevela-github-actions/pull/11
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Feat: add auto clear data function for the memory cache
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add memory cache store
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add some test case for the utils package
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: poll multi-cluster metrics and export to prometheus
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* pass context to polling loop
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* move metrics definition to montitor/metrics/multicluster.go
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* remove pod usage metric and make reviewable
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* revert the change of GetClusterMetricsFromMetricsAPI
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* revert the change of GetClusterMetricsFromMetricsAPI
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Separate the polling logic into a function
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* add start menber function
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* make refreshPeriod a menber var
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* fix typo
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* 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>
* Feat: update api doc
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: make the component list is in reverse order.
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: update swagger config
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* add doc-gen --local <LocalFile> and corresponding functions
Signed-off-by: Nicola115 <2225992901@qq.com>
* go format
Signed-off-by: Nicola115 <2225992901@qq.com>
* refactor the usage of vela def doc-gen from local file; refactor the function GenerateReferenceDoc
Signed-off-by: Nicola115 <2225992901@qq.com>
* gofmt and goimports
Signed-off-by: Nicola115 <2225992901@qq.com>
* update prompts info
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove parseLocalDefinition struct, using ComponentDefinition instead
Signed-off-by: Nicola115 <2225992901@qq.com>
* standardize the function ParseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* add unit test for ParseLocalFile
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove redundant functions
Signed-off-by: Nicola115 <2225992901@qq.com>
* remove redundant lines and do goimports formatting
Signed-off-by: Nicola115 <2225992901@qq.com>
Currently, multicluster round trippers are modifying request directly.
However, golang documentation says `RoundTrip` should not modify the
request.
This commit fixes round trippers to clone the request before the
modification.
https://pkg.go.dev/net/http#RoundTripper
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
The UT `TestGetOpenAPISchemaFromTerraformComponentDefinition` won't
succeed 100%. The required variables in the generated isn't in the expected
order all the time.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Optimize error msg of addon enable/upgrade local path
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Fix and add unit test
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Run make reviewable to include all changes
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* remove test case for windows
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* fix unit test.
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
* Fix: can not collector pod list with rollout trait
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: cue format error
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: default values and optional parameters cannot coexist
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Add another unit test when the configuration of Terraform locates
in a subpath of a git remote repository
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: retrieve Terraform variables from variables.tf
If Terraform modules/resources are stored in remote git repos, get
variables from file `varialbes.tf`, or from `main.tf`.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: extend gateway trait to set class in spec
`kubernetes.io/ingress.class` annotation is deprecated in favor of
`.spec.ingressClassName`. However, there is no way to set it through
the gateway trait for now.
This commit extends the gateway trait by adding `classInSpec` to
parameter. Forcing the use of `.spec.ingressClassName` makes sense, but
some ingress controllers (including old versions) may not recognize
this field. Therefore, set default value of `classInSpec` to `false`
for backward compatibility.
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Chore: update classInSpec usage
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Fix: prioritize namespace flag for `vela up`
Currently, CLI applies application to `default` namespace when there is
no explicit namespace in application spec, even if the namespace flag
is set.
This commit fixes issue by overriding the namespace if the namespace
flag is set.
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
* Test: add test cases for overriding namespaces
Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
Besides generating a Terraform ComponentDefinition from a remote git repo,
support generate one from local HCL file
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
Added application samples for all Terraform typed ComponentDefinition,
and also localize the title for AWS and AZure
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: support generate cloud resource docs in Chinese
`vela def doc-gen` will also generate Chinese cloud resource docs
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Continue the development
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add ut
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add ut and fix linting issue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Address comments
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix `Should not use dot imports. (ST1001) ` issue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add copyright
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: add cluster name in service endpoint
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: add cli unit test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: add cue binary requirement in Development doc
If the version of cue binary is less than v0.3.0, like v0.2.0, `make reviewable`
will fail due to issue: "make: *** [fmt] Error 1". As `make reviewable` is a
required step for code contribution, add this prerequiste in the doc.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Update contribute/developer-guide.md
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Fix: when a provider is set in ComponentDefinition, it should look for the provider
Fixed the issue "The error message is not correct when AWS provider is not available"
Fix#3046
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: Generate doc for Terraform typed ComponentDefinition
When the configuration of a Terraform Typed ComponentDefinition is in
remote Git, generate the properties for it. And generated outputs for
all Terraform ComponentDefinition
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: don't skip health check for observability in single cluster
When there is no clusters, users use cli to enable observability,
we use workflow `apply-application-in-parallel` to enable the addon.
This workflow will skip health check and the addon won't become ready.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix CI issue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: change Grafana service type and remove domain parameter
Use Grafana service's external IP to visit the dashboard and
remove the prameter domain
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* address CI issues
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix api issue
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix ci
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix ci
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Refactor: use createOrUpdateNamespace as a common util function
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add ENV webservice handelr
* Fix: fix Env usecase logic
* Feat: Add Delete Env API
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: filter empty addon data
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: split makefiels and make it clear
* Feat: add k8s utils test
* Feat: Add env update interface
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: change env implementation
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: minor fix
* Revert "Fix: minor fix"
This reverts commit 9cafefa65a.
* Fix: use appusecase as parameter
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Refactor: align CLI vela env with new env design
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: minor fix
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Feat: add page index and alias of env
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: fix tests and licence header
* Fix: fix makefile and add default target
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: update build swagger.json
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: change update env api
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: list env with alias
* Feat: add log to env delete
* Fix: can not get app status
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support update workflow and refactor code
* Fix: lint
* Fix: remove swagger check
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: fix cli vela delete
* Fix: update test
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: update test
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* Fix: app deploy unit test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: SortOrderDescending is not effective
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test case
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Feat: support default project/target/env
* Fix: make test and add swagger
* Fix: use separated datasource for unit test
* Fix: app rollback bug
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: fix e2e test
* Fix: kubeapi driver sort bug
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test
* Fix: api e2e test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: e2e test fix
* Fix: try fix e2e test
* Fix: api e2e test
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: vela port-forward supports Addon Observability
Support port forwarding service of Addon Observability in
multiple clusters
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* fix CI issues
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: implement addons/observability/status API
Return all domains and the IPs from all clusters. And
provider the way to visit the console of observability
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* add unit tests
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix: can not find target name in pod list
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: set create time for init trait
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: enable Observability in runtime clusters
Enabled add-on observability in runtime clusters. In each cluster, a sub-domain
will be allocated to the cluste
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Fix:add workflow step definition and ut
Added a new workflow step definition `apply-application-in-parallel`,
and added more unit tests
* Feat: refactor velaql with new ResourceTracker architecture
Signed-off-by: yangsoon <yangsoonlx@gmail.com>
* Feat: concurrently request the pod created by helm
Signed-off-by: yangsoon <yangsoonlx@gmail.com>
* Fix: cli add addon registry
add more detail info for addon workflow info
Signed-off-by: wangyike <wangyike_wyk@163.com>
* fix: set app status in addon status directly
Signed-off-by: wangyike <wangyike_wyk@163.com>
* add e2e test
Signed-off-by: wangyike <wangyike_wyk@163.com>
* Fix: read oss addon prefix bug
This bug is about list OSS bucket by prefix which will cause confusion between `terraform` and `terraform-alibaba`
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
* add test
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
* fix data race
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
* fix channel block
add test
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
* reviewable
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
* Fix: cloud resource type applications could not be identified
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: the cloud app properties can not set empty region value
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
* Fix: pass on properties of Terraform typed application to Configuration
Pass on properties like `writeConnectionSecretRef`, `Region` and `providerRef`
to Configuration.
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* revert definitions
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
* Feat: automatically populate the provider and region configuration for cloud app.
* Fix: fix e2e test bug
* Fix: component name and type inconsistency
* Fix: fix unit test bug
* Fix: fix unit test bug
Co-authored-by: barnettZQG <yiyun.pro>
* Fix: add more fields for Terraform types definitions in api schema
Added `writeConnectionStringSecrecto`, `region` and `deleteResoruce`
fields for Terraform types definitions in OpenAPI schema
* fix ci issue
* fix header
* Fix: fix update envBinding related workflow bug
* Fix: support cloudresource step
* Fix: add unit test
* Fix: add unit test
* Fix: add unit test
* unit test
Co-authored-by: zhuxiaobing <zhuxiaobing@lixiang.com>
- Clean RBAC
- Generate Job/Pod/ConfigMap/Secret in the namespace of a Configuration
- Fix: The secret generated by Terraform won't regenerate after it's manually deleted
- Fix status ProvisioningAndChecking
- The Kubernetes backend should keep consistent
- Override Region of a provider in Configuration
- Set region to spec.region
* Feat: support auto creating workflow step for cloud app
* Fix: fix unit test bug
* Fix: fix component cant not find bug
Co-authored-by: barnettZQG <yiyun.pro>
* Fix: support exposing cloud resource identifier and console url
To help users quickly navigate to the instance in the web console, exposing
necessary information in ComponentDefinition and convert them to Configuration
* fix ci
* Check whether wl.FullTemplate.ComponentDefinition is nil before getting annotations
* 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
* Fix: healthscope failed since appRevision is not set && rollout controller amend appRevision to workload since compRev does not have this one
* Fix: test
* Fix: addon name should not add prefix `resources`
- Adding prefix `resources will hit issues as:
'unable to parse requirement: invalid label value:
"resources-prometheus-server-register-grafana-datasource-5576f7f6b4":
at key: "controller.oam.dev/component": must be no more than 63 characters'
- This won't avoid the name confliction with other components
* address comments
* Fix: support naming a terraform provider
Support set the name for a terraform provider.
Fix#2595
* Style: format
Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
* 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>
1. load component in arrary, so apply them in order addon's needNamespace will be apply firstly
2. apply application in controle plane will be first workflowStep
3. bigger application reconcile timeout context get avoid of time out
* Feat: add application revision actions
* refactor workflow record and application revision
* generate doc
* fix rebase
* fix rebase
* delete comment
* fix comment
* delete suspend status
* use apply instead of update
* find latest comlete revision if the revision is not specified
* delete name
* fix primary key
* 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>
* Feat: EnableAddon supports runtime cluster
If use runtime cluster mode, the definitions will be applied to control plane k8s directly, not included in the Application object.
* add owner
* comment
* Fix: allow external cloud resources to be kept when Application is deleted
Provide an option for users whether to keep provisioned cloud resources when Terraform-typed Application is deleted.
Fix#2697
* delete file
* upgrade release version of Terraform controller
* fix ci
* 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>
* Feat: change api spec
* Feat: change DeployEvent to ApplicationRevision
* Fix: fix test bug
* Fix: fix unit test bug
Co-authored-by: barnettZQG <yiyun.pro>
* 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.
* Fix: vela status from app.status.services
* Feat: refine cli and support terraform logs
* Feat: support remote exec
* Feat: port-forward support multicluster
* Fix: vela status+port-forward test
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
* 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>
* 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
* 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>
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
* 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
* 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>
* Feat: add nocalhost dev config trait definition
* Feat: add nocalhost dev config trait example
add nocalhost dev config trait example in `docs/examples/nocalhost`
Signed-off-by: yuyicai <yuyicai@hotmail.com>
Formated canaray rollout manifests and changed orders for some traits
of a component to make it clear to see the difference between first-deploy.yaml
and rollout-v2.yaml, between rollout-v2.yaml and rollback.yaml
* Feat: workflow status add timestamp
* Feat: add workflow recorder
* Fix: finish state process
* Fix: test cases
* Fix: revert comments history->recorder
* Feat: omitempty execution time
* Fix: workflow_test.go
* Feat: add application test case for record
* Feat: terminate record
* Feat: trigger only by anno
* Feat: remove initializers CRD
* Feat: add support for envbinding with namespace selector
* Fix: service account kubeconfig e2e-test
* Docs: add comments to explain functions
* Docs: add envbinding example
* Feat: support serviceaccount in multicluster
* Fix: add compatibility & support sa
* Fix: add multicluster sa test
* Fix: add test for upgrade func
* Style: format
* 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
* 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>
* Fix: move charts from github repo to Alibaba Cloud OSS repo
Charts in Github repo is not always avaialable for some users, so
moved them to OSS repo
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
* Update charts/vela-core/templates/addons/observability-asset.yaml
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
* Update vela-templates/addons/observability-asset/definitions/trait-import-grafana-dashboard.yaml
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
* Update vela-templates/addons/auto-gen/observability-asset.yaml
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
Enable users to set `db_instance_storage_type`. This can fix the issue
happended since Sept. 14, 2021.
{"Code":"InvalidNetworkTypeClassicWhenCloudStorage","HostId":
"rds.aliyuncs.com","Message":"The Specified InstanceNetworkType
value Classic is not valid when choose cloud storage type."
* 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
* 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
* Feat: vela show annotations display undefined should be refined
Co-authored-by: Reeta Singh <reetas@twitter.com>
* 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
Co-authored-by: Reeta Singh <reetas@twitter.com>
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>
Fixed the issue: When component properties don't meet the parameter
of the ComponentDefinition, it will hit 'EOF' event
Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com>
Fix#2132
Check whether its needed before status update, add log before
each reconcile returns, and also correct Klog.InfoS to klog.ErrorS
when trying to log err information
Fix#2153
* 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
Storing OSS bucket and endpoint to Github Action secret will help
a developer to test the function without needing to changing code,
revert code. Instead, he/she just need to configure the secret contect
* Support Obsevability
- Support displaying and filter logs
- Support metrics and traces
* register datasource
* install prometheus
* install prometheus and register datasource
* Also install and register Prometheus
* remove unneeded file
* register datasource with clusterip
* register prometheus
* Support importing Grafana Dashboard
Added a trait to import Grafana Dashboard on component Grafana
* tmp
* 1. make observability as addon
2. make it more esay to gen addon
* use [[]] as gen addon delim
* url->urls
* add 2 url
* fix template
* fix args
* remove doc
* move url,fix test
* last modify!
* change arg name to grafana-domain
Co-authored-by: zzxwill <zzxwill@gmail.com>
* 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
* Feat allow users to specify component revision name
* Add unit tests
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add ExternalRevision field to ComponentManifest
* Add handleComponentRevisionNameUnspecified func
* Add unit tests for webhook
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add more unit tests
* Feat allow users to specify component revision name
* Add unit tests
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add ExternalRevision field to ComponentManifest
* Add handleComponentRevisionNameUnspecified func
* Add unit tests for webhook
Signed-off-by: LeoLiuYan <929908264@qq.com>
* Add more unit tests
* Try to fix webhook unit tests
* fix race (#2040)
* fix test bug
* More unit tst
* More unit test and trigger ci
Co-authored-by: yangsoon <yangsoonlx@gmail.com>
Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
* 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
* 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
* 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
* add logic and test for component context replace
* add more test
* add comments
* fix comments
* rename context revision name
* add bad revision name test
* 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
* 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
* - 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
* 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>
* 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
* 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>
* allow vela CLI to specify NS
* vela up support application yaml
* fix
* add default cap center to vela CLI
* add alias for `vela components`(`vela comp`,or `vela component`) and `vela traits`(`vela trait`)
* fix cap ls STATUS fields are always "uninstalled"
* fix vela up process
* Revert "allow vela CLI to specify NS"
This reverts commit 33f27362
will refactor to use Initializer
* add --discover for vela CLI
* * rfc capcenter to reuse registry type
* change default cap center to oss
* judge if application file in advance
* fix CI
* try CI
* fix error check
* Add two filter
* only filter in app->ac and ac->other
* move filter logic to assemble phase
* simplify, add indication
* simplify trim
* add unit test
* clean up testdata
* 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>
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>
* [FIX]incorrect pod-disruptive defalut configuration in label of traits
* [FIX]incorrect pod-disruptive defalut configuration in annotation of traits
* [FIX]incorrect pod-disruptive defalut configuration in annotation of traits
* 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>
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
* add probe to worker and webservice, add memory limit to webservice
* add interacitve answer
* make generate
* move Probe def outside the parameter.
* make all PodSpec alternative param done
* add doc, gen yaml
* fix docs
* 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
* 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
* Update terraform.md
Update Documentation. Fix Terraform controller version to avoid mistake.
* Update terraform.md
Change version to the latest one.
* Update terraform.md
Rollback modification on example.
* vela show support show the paramters of KUBE model ComponentDefinition
* fix
* fix
fix
* enchance test case and add function in show -web
fmt and vet
fix
fix522
* add resolve for kubedef type trait in reconcil process
* fix StoreOpenAPISchema args para and ret para
* fix GetCapabilityObject uncover
* Add service-binding trait to chart
Also add docs for the trait.
* Update charts/vela-core/templates/defwithtemplate/service-binding.yaml
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* address comments
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* 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>
As the file name (.cue/.yaml) of trait "cpusclaer" and "scaler"
are "cpuhpa" and "manaualscale" respectively, renmae them in
order to avoid confustions
As we don't need to sync the defintiion .yaml and .cue to local and
then extract it, besides, there is a simliar function "SyncDefinitionsToLocal"
just besides it, rename function "SyncDefinitionToLocal" in order
not to cause confustions
* Support server-side Terraform as cloud resource provider
Provide another schematic `Terraform` to provision cloud
resource.
Fix#698
* make namespace optional
add unit-tests
* support vela show to generate componentdefinition usage
* add unit-tests
* tidy go mod
* clean go mod and updated go sum
* Remove `variable` from `properties` of Terraform compoent
* don't literally set component catagory
* refine error message when a capability could not be found
* fix ut
* Code refactor and add unittests
* fix ci issues
* Update references/plugins/references.go
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* add test cases
* fix ci issue
* revert lowercase of "Properties"
* fix ci issue
* add ut for appfile
* fix e2e issue
* add docs
* fix official site build
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* 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
* Enable "vela show" to support namespaced capability
Provide option `-namespace`, if not set, the default namespace
is default. If not found, as by default, capabilities are located in
vela-system, it will continue to retrieve the capability in
vela-system directory.
Fix#1520
* add e2e tests
* Address comments: Revert env context back
Get namespace from env, instead of adding option "-namespace"
* fix unittest issue
* Address comments
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* fix e2e
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Add parameters commetns for crossplane definitions
Added parameter comments for ComponentDefinition alibaba-oss
alibaba-rds and TraitDefinition service-binding
* add the result of vela show
* Add cloud service docs for end-users
Split cloud service into two section, one for platform engineers,
and the other for end-users
* correct titles
* adjust componentdefinition and traitdefinition order
* address comments
* 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
* 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
* Create codeql-analysis.yml
* rm schedule from codeql
* codeql: master & release branches only on push
* codeql: use release-* pattern
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
move dry-run and live-diff into an independent pkg
WIP add sample and doc
WIP unit test for live-diff
add unit test
Signed-off-by: roy wang <seiwy2010@gmail.com>
* [Improvement-1457] Use kind cmd code to load docker image instead of local kind binary
* [Improvement-1457] Update copyright year and kind repo declaration
* Add unit-tests for ApplicationRollout related packages
Part I: pkg/controller/common/rollout
* Add more unittets
* add unit tests for cloneset controller
* fix test issue
* add more unit-tests for cloneset_controller and deployment_controller
* fix rebase issues
* add podDisruptive to traitdefinition
* fix docs & example
* fix diff and add docs
* use bool type for podDisruptive
Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
* 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
* 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
# This file is a github code protect rule follow the codeowners https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
Briefly describe what this pull request does. We love pull requests that resolve an open KubeVela issue. If yours does, you
can uncomment the below line to indicate which issue your PR fixes, for example
"Fixes #500":
-->
Fixes #
I have:
- [ ] Read and followed KubeVela's [contribution process](https://github.com/kubevela/kubevela/blob/master/contribute/create-pull-request.md).
- [ ] [Related Docs](https://github.com/kubevela/kubevela.io) updated properly. In a new feature or configuration option, an update to the documentation is necessary.
- [ ] Run `make reviewable` to ensure this PR is ready for review.
- [ ] Added `backport release-x.y` labels to auto-backport this PR if necessary.
### How has this code been tested
<!--
Before reviewers can be confident in the correctness of this pull request, it
needs to tested and shown to be correct. Briefly describe the testing that has
already been done or which is planned for this change.
-->
### Special notes for your reviewer
<!--
Be sure to direct your reviewers'
attention to anything that needs special consideration.
The bot is configured via [issue-commands.json](https://github.com/kubevela/kubevela/blob/master/.github/issue-commands.json)
and some other GitHub [workflows](https://github.com/kubevela/kubevela/blob/master/.github/workflows).
By default, users with write access to the repo is allowed to use the comments,
the [userlist](https://github.com/kubevela/kubevela/blob/master/.github/comment.userlist)
file is for adding additional members who do not have access and want to contribute to the issue triage.
Comment commands:
* Write the word `/needsInvestigation` in a comment, and the bot will add the corresponding label.
* Write the word `/needsMoreInfo` in a comment, and the bot will add the correct label and standard message.
* Write the word `/duplicate #<number>` to have `type/duplicate` label, the issue number is required for remind where is the other issue.
* Write the word `/type/*` in a comment, and the bot will add the corresponding label `/type/*`.
* Write the word `/area/*` in a comment, and the bot will add the corresponding label `/area/*`.
* Write the word `/priority/*` in a comment, and the bot will add the corresponding label `/priority/*`.
The `*` mention above represent a specific word. Please read the details about label category in [ISSUE_TRIAGE.md](https://github.com/kubevela/kubevela/blob/master/ISSUE_TRIAGE.md)
Label commands:
* Add label `bot/question` the bot will close with standard question message and add label `type/question`
* Add label `bot/needs more info` for bot to request more info (or use comment command mentioned above)
* Add label `bot/no new info` for bot to close an issue where we asked for more info but has not received any updates in at least 14 days.
* Add label `bot/duplicate` to have `type/duplicate` label & the bot will close issue with an appropriate message.
* Add label `bot/close feature request` for bot to close a feature request with standard message.
Assign:
When you participating in an issue area, and you want to assign to others
to distribute this task or self-assign to give a solution. You can use the comment bellow.
* Write the word `/assign githubname` in a comment, the robot will automatically assign to the corresponding person.
* Specially, write the word `/assign` in a comment, you can assgin this task to yourself.
"comment":"Thanks for creating this issue! It looks like this has already been reported by another user. We’ve closed this in favor of the existing one. Please consider adding any details you think is missing to that issue.\n\nTo avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
},
{
"type":"label",
"name":"bot/no new info",
"action":"close",
"comment":"We've closed this issue since it needs more information and hasn't had any activity recently. We can re-open it after you you add more information. To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
},
{
"type":"label",
"name":"bot/close feature request",
"action":"close",
"comment":"This feature request has been open for a long time with few received upvotes or comments, so we are closing it. We're trying to limit open GitHub issues in order to better track planned work and features. \r\n\r\nThis doesn't mean that we'll never ever implement it or that we will never accept a PR for it. A closed issue can still attract upvotes and act as a ticket to track feature demand\/interest. \r\n\r\nThank You to you for taking the time to create this issue!"
This is a minor fix for release-1.0, please refer to release-1.1.x for the latest feature.
1. Fix podDisruptive field for inner traits #1844
# v1.0.6
1. fix bug: When the Component contains multiple traits of the same type, the status of the trait in the Application is reported incorrectly (#1731) (#1743)
2. Fix terraform component can't work normally, generate OpenAPI JSON schema for Terraform Component (#1738) (#1753)
3. Improve the logging system #1735#1758
4. add ConcurrentReconciles for setting the concurrent reconcile number of the controller #1775
# v1.0.5
1. Fix Terraform application status issue (#1611)
2. application supports specifying different versions of Definition (#1597)
3. Enable Dynamic Admission Control for Application (#1619)
4. Update inner samples for "vela show xxx --web" (#1616)
5. fix empty rolloutBatch will panic whole controller bug (#1646)
6. Use stricter syntax check for CUE (#1643)
7. make ResourceTracker to own cluster-scope resource (#1634)
8. update docs
# v1.0.4
## Upgrade to this release
**Please update Application CRD to upgrade from v1.0.3 to this release**
**Check the upgrade docs to upgrade from other release: https://kubevela.io/docs/advanced-install#upgrade**
## Changelog
1. add more PVC volume traits and docs (#1524)
2. automatically sync vela api code to the repo([kubevela-core-api](https://github.com/oam-dev/kubevela-core-api)) on release, you can use this repo as import package for kubevela integration (#1523)
3. fix cue template of worker and ingress with more accurate error info (#1532)
4. add critical path k8s event for Application (#1463)
5. support K8s Deployment for AppRollout #1539#1557
6. vela cli: enable "vela show" to support namespaced capability (#1521)
7. Add scpoe reference in Application object `status.Service` (#1540)
8. vela cli: `vela show` support list the parameter of ComponentDefinition created by helm charts (#1543)
9. Add revision mechanism for Component/Trait Definition and default revision histroy will keep 20 revisions #1531
10. fix CRD for legacy K8s cluser(<=1.14) (#1531)
11. fix duplate key in kubevela chart webhook yaml (#1571)
12. Check whether parameter.cmd is nill for `sidecar` trait (#1575)
13. add e2e-test into test coverage report (#1553)
14. support krew install for kubectl vela plugin #1582
15. fix controller cannot start due to the format error of the third-party CRD (#1584)
16. use accelerate domain for helm chart repo to speed up for global users (#1585)
17. embed rollout in an application, now you can use rolloutPlan in Application (#1568)
18. Support server-side Terraform as cloud resource provider #1519
# v1.0.3
More end user guide was added in `Application Deployment` section.
1. add helm test to verify the chart of KubeVela have been installed successfully (#1415)
2. fix bug which Component/TraitDefinition won't work when contains “`_|_`” in value (#1450)
3. add volumes definition in worker/webservice (#1459)
4. Remove local kind binary dependency #1458
5. ignore error not found when deleting resourceTracker (#1462)
6. add context.appRevisionNum as runtime context (#1466)
7. implement cli `vela system live-diff` to check diff before upgrade (#1419)
8. add webhook validation on CUE template outputs name (#1460)
9. Fix helm chart about wrong webhook policy (#1483)
10. Remove trait-injector from controller options (#1490)
12. add app name as label for AppRevision (#1488)
13. Introduce vela as a kubectl plugin (#1485)
14. update status of appContext by patch to avoid resourceVersion conflict error (#1500)
15. add workloadDefinitionRef to application status.services (#1471)
16. Add garbage collection mechanism for AppRevision, it will only keep 10 revisions by default (#1501)
17. Remove AGE in definition crd print columns (#1509)
# v1.0.2
1. remove no used ingress notes in KubeVela charts (#1405)
2. fix import inner package in the format of third party package path and add docs (#1412#1417)
3. vela cli support use "vela system cue-packages" to list cue-package (#1417)
4. Fix bug that the registered k8s built-in gvk does not exist in third party package path (#1414)
5. Fix bug that patchKey not work when strategyUnify function not work with close call (#1430)
6. add podDisruptive to traitdefinition to notify wether a trait update will cause restart of pod or not (#1192)
7. Add a new cloneset scale controller (#1301)
8. Support garbage collection for across-namespace workloads and traits (#1421)
9. Add short name for crds && Remove redundant and ambiguous short names #1434
10. Refresh built-in packages when component/trait definition are registered (#1402)
**You should upgrade following CRDs to upgrade from v1.0.1, all CRDs changes are backward compatible**:
8. refine CRD print results: add additional print column and short Name for CRD (#1377)
Many other docs improvements.
Thanks for all the contributors!
# v1.0.0
We're excited to announce the release of KubeVela 1.0.0! 🎉🎉🎉🎉
Thanks to all the new and existing contributors who helped make this release happen!
You may already noticed the awesome community has shipped a brand new KubeVela website https://kubevela.io ! 🎉🎉
If you're new to KubeVela, feel free to start with its [getting started page](https://kubevela.io/docs/quick-start) and learning about [its core concepts](https://kubevela.io/docs/concepts). The full feature of vela is explained in [platform builder guide](https://kubevela.io/docs/platform-engineers/overview).
For existing adopters, please follow the [installing](https://kubevela.io/docs/install) or [upgrading](https://kubevela.io/docs/install#upgrade) KubeVela to version 1.0.0.
## Acknowledgements ❤️
Thanks to everyone who made this release possible!
All user facing APIs have been upgraded to `v1beta1`, you could learn more details in the [API Changes](#API-Changes) section below.
## `ComponentDefinition`
The [`ComponentDefinition`](https://kubevela.io/docs/platform-engineers/definition-and-templates) now takes the responsibility of defining encapsulation and abstraction for your app components. And you are free to choose to use Helm chart or CUE to define them. This leaves `WorkloadDefinition` focusing on declaring workload characteristic such as `replicable`, `childResource` etc, so the `spec.schematic` field in `WorkloadDefinition` could be deprecated in next few releases.
## Application Versioning and Progressive Rollout
* A rolling style upgrade was supported by the object called [`AppRollout`](https://kubevela.io/docs/rollout/rollout/). It can help you to upgrade an Application from source revision to the target and support Blue/Green, Canary and A/B testing rollout strategy.
* Multi-Version, Multi-Cluster Application Deployment was supported by the object called [`AppDeployment`](https://kubevela.io/docs/rollout/appdeploy). It can help you to deploy multiple revision apps to multiple clusters with leverage of Service Mesh.
## Visualization Enhancement
KubeVela now automatically generates Open-API-v3 Schema for all the definition abstractions including CUE, Helm and raw Kubernetes resource templates. You can integrate KubeVela with your own dashboard and [generate forms from definitions](https://kubevela.io/docs/platform-engineers/openapi-v3-json-schema) at ease!
## Application Abstraction
There're several major updates on the `Application` abstraction itself:
* [Helm based abstraction](https://kubevela.io/docs/helm/component) was supported with few [limitations](https://kubevela.io/docs/helm/known-issues). In other words, you can now declare any existing Helm chart as an app component in KubeVela. The most exciting part is the trait system of KubeVela works seamlessly with the Helm based components, yes, just [attach trait](https://kubevela.io/docs/helm/trait) to it!
* [Raw Kubernetes resource templates](https://kubevela.io/docs/kube/component) was still supported, that's simpler but less powerful comparing to [the CUE way](https://kubevela.io/docs/cue/component). Of course, the trait system also [works seamless](https://kubevela.io/docs/kube/trait) with it.
## CUE Template Enhancement
* [Runtime information context](https://kubevela.io/docs/cue/component#full-available-information-in-cue-context) was supported, you could use this information to render the resources in CUE template.
* [Data passing](https://kubevela.io/docs/cue/advanced#data-passing) was supported during CUE rendering. Specifically, the `context.output` contains the rendered workload API resource and the `context.outputs.<xx>` contains all the other rendered API resources.
* [K8s API resources are now built-in packages](https://kubevela.io/docs/cue/basic#import-kube-package): the K8s built-in API including CRD will be discovered by KubeVela and automatically built as CUE packages, you can use it in your CUE template. This is very helpful in validation especially on writing new CUE templates.
* [Dry-run Application](https://kubevela.io/docs/platform-engineers/debug-test-cue) was supported along with a debug and test guide for building CUE template. You can create CUE based definitions with confidence now!
* [Deploy resources in different namespaces](https://kubevela.io/docs/cue/cross-namespace-resource/) was supported now, you can specify namespace in your CUE template.
## Declare and Consume Cloud Resources
* [Declare and consume cloud resources](https://kubevela.io/docs/platform-engineers/cloud-services/) were supported now in KubeVela, you can easily register cloud resources by `ComponentDefinition` and bind the service into the applications.
## A brand new website
We have upgraded our website [kubevela.io](https://github.com/oam-dev/kubevela.io) based on "Docusaurus". All docs is automatically generated from [KubeVela](https://github.com/oam-dev/kubevela/tree/master/docs) while the blogs are on [kubevela.io/blogs](https://github.com/oam-dev/kubevela.io/tree/main/blog).
# Changes
## API Changes
1. Change definition from cluster scope to namespace scope #1085 the cluster scope CRD was still compatible.
2. Application Spec changes.
-`spec.components[x].settings` in v1alpha2 was changed to `spec.components[x].properties` in v1beta1
-`spec.components[x].traits[x].name` in v1alpha2 was changed to `spec.components[x].traits[x].type` in v1beta1
Example of the v1alpha2 Spec:
```
apiVersion: core.oam.dev/v1alpha2
kind: Application
metadata:
name: first-vela-app
spec:
components:
- name: express-server
type: webservice
settings:
...
traits:
- name: ingress
properties:
...
```
Example of the v1beta1 Spec:
```
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-app
spec:
components:
- name: express-server
type: webservice
properties:
...
traits:
- type: ingress
properties:
...
```
## Deprecation
1. route/autoscaler/metrics these three traits and their controllers were moved out from the vela core. #1172 You could still find and use them from https://github.com/oam-dev/catalog.
2. the dashboard was deprecated in KubeVela and we will merge these features and create a new in [velacp](https://github.com/oam-dev/velacp) soon.
3. vela CLI will only support run/modify an app from appfile by using `vela up`, so some other commands related were deprecated, such as `vela svc deploy`, `vela <trait> ...`
## Other Notable changes
1.`prometheus` and `certmanager` CRD are not required in installation #1005
2. Parent overrides child when annotation/labels conflicts && one revision will apply once only in force mode && AC.status CRD updated #1109
3.`ApplicationRevision` CRD Object was introduced as revision of Application #1214
4. KubeVela chart image pull policy was changed to `Always` from `IfNotPresent`#1228
5.` Application` Controller will use `AppContext` to manage the resources generation #1245, in other word, you can run KubeVela `Application Controller` without any `v1apha2 Object`.
6. The regular time for all events automatically sync changed from 5min to 1 hour #1285
7.`vela system dry-run` will print raw K8s resources in a better format #1246
# Known Issues
1. Built-in CUE package was not supported now for K8s Cluster v1.20, we will support in the next release. #1313
2. Resources created in different namespace from application will only be garbage collected (GC) when the application deleted, an update will not trigger GC for now, we will fix it in the next release. #1339
69. Feat: Make applicationComponent can be modified in step (#2304)
70. Fix: generate service in canary-traffic trait (#2307)
# v1.1.0
Note: the documents (https://kubevela.io/) for v1.1.0 is still WIP, so we mark it as pre-release. The ETA for documents is next 2 weeks.
We would like to extend our thanks to all [the new and existing contributors](https://github.com/oam-dev/kubevela/graphs/contributors) who helped make this release happen.
Please follow the guide to [install](https://kubevela.io/docs/next/getting-started/quick-install) or [upgrade](https://kubevela.io/docs/next/platform-engineers/advanced-install/) KubeVela to version v1.1.0.
## What's New
- **Hybrid Environment App Delivery Control plane**
- In the new release, we have fully upgraded KubeVela to a multi-cluster/hybrid-cloud/multi-cloud app delivery control plane with leverage of OAM as the consistent app delivery model across clouds and infrastructures.
- **Workflow**
- KubeVela has added a Workflow mechanism that empowers users to glue any operational tasks to customize the control logic to build more complex operations. Workflow is modular by design and each module is mainly composed in CUE -- so you can define complex operations in a declarative, data-driven manner.
- **Environment**
- KubeVela added an Initializer which allow users to define what constructs the environment. The environment Initialized by the Initilizer could contain different kinds of resources include K8s cluster, system components, policies and almost everything. Of course, you can destry an environment very easily with the help of Initializer.
- **Out of Box Addons**
- With the help of Initilizer, KubeVela has support lots of out of box addons. You can list/enable/disable them by `vela addon` command. Each addon is an Initializer that deloy the CRD Controllers and other resources related.
- **Cloud Resources Support**
- We also support terraform to provision almost every cloud resources and pass through to other components defined in KubeVela application.
- **Tools to edit and manage X-Definition**
- We also provide the `vela def` tool sets to provide unified CUE based capability to manage X-Definition.
- **Others**
- Allow specify name for component revision auto-generated by Application. Allow specify name for auto generated Definition revision.
- Controller runtime dependency upgrade that can compatible with Kubernetes v1.21 . KubeVela support Kubernetes v1.18~v1.21.
- Other details you could read changelog in the release history.
## Change log since v1.1-rc2
1. fix configmap patchkey bug (#2080)
2. Merge velacp to apiserver branch in oam repo (#2039) (#2127) (#2087)
3. support rollout controller seprated and install as helm chart in runtime cluster (#2075)
4. fix bug that KubeVela can not be installed in specified namespace (#2083)
5. enable vela def to use import decl (#2084)
6. enhance envbinding: support apply resources to cluster (#2093)
* Feat: add JFrog webhook trigger by @chwetion in https://github.com/oam-dev/kubevela/pull/3104
* Fix: trait/comp command output without a new line by @chivalryq in https://github.com/oam-dev/kubevela/pull/3112
* Feat: support wild match for env patch by @Somefive in https://github.com/oam-dev/kubevela/pull/3111
* Fix: fix revision will change when add new trait with skiprevisionaffect to application by @chwetion in https://github.com/oam-dev/kubevela/pull/3032
* Fix: add app samples for Terraform definition by @zzxwill in https://github.com/oam-dev/kubevela/pull/3118
* Feat: add port name in webservice by @FogDong in https://github.com/oam-dev/kubevela/pull/3110
* Fix: add imagePullSecrets for helm templates to support private docker registry by @StevenLeiZhang in https://github.com/oam-dev/kubevela/pull/3122
* Fix: workflow skip executing all steps occasionally by @leejanee in https://github.com/oam-dev/kubevela/pull/3025
* Fix: support generate Terraform ComponentDefinition from local HCL file by @zzxwill in https://github.com/oam-dev/kubevela/pull/3132
* Fix: prioritize namespace flag for `vela up` by @devholic in https://github.com/oam-dev/kubevela/pull/3135
* Fix: handle workflow cache reconcile by @FogDong in https://github.com/oam-dev/kubevela/pull/3128
* Feat: extend gateway trait to set class in spec by @devholic in https://github.com/oam-dev/kubevela/pull/3138
* Fix: add providerRef in generated ComponentDefinition by @zzxwill in https://github.com/oam-dev/kubevela/pull/3142
* Fix: retrieve Terraform variables from variables.tf by @zzxwill in https://github.com/oam-dev/kubevela/pull/3149
* Feat: addon parameter support ui-shcema by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3154
* Fix: vela addnon enable cannot support '=' by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3156
* Fix: add context parameters into the error message by @zeed-w-beez in https://github.com/oam-dev/kubevela/pull/3145
* Feat: support vela show for workflow step definition by @FogDong in https://github.com/oam-dev/kubevela/pull/3140
## New Contributors
*@devholic made their first contribution in https://github.com/oam-dev/kubevela/pull/3135
Docs have been updated about the release at https://kubevela.io/docs/next/ .
**Changelog Between v1.2.0-rc.2~v1.2.0**: https://github.com/oam-dev/kubevela/compare/v1.2.0-rc.2...v1.2.0
## What's New
### UI Console Supported
Check how to use the GUI by this [how-to document](https://kubevela.io/docs/next/how-to/dashboard/application/create-application).
**GUI frontend code repo is here: https://github.com/oam-dev/velaux**
**API Server Code is here: https://github.com/oam-dev/kubevela/tree/master/pkg/apiserver**
We also add a [VelaQL](https://kubevela.io/docs/next/platform-engineers/system-operation/velaql) feature that could allow apiserver to interact with K8s Object in an extended way.
### Addon System
We add a new addon system in v1.2, this helps KubeVela install it's extension including more than X-Definition files.
The community has already supported some built-in addons here(https://github.com/oam-dev/catalog/tree/master/addons ), there're also some experimental addons here (https://github.com/oam-dev/catalog/tree/master/experimental/addons)。
You can learn how to use it [from docs](https://kubevela.io/docs/next/how-to/cli/addon/addon).
You can [build and contribute](https://kubevela.io/docs/next/platform-engineers/addon/intro) your own addons.
### CI/CD Integration
You can use triggers to integrate with different CI and image registry systems on VelaUX.
* Feat: add DockerHub webhook trigger for CI/CD (#3081)
### Cloud Resources Enhancement
* Feature: support terraform/provider-azure addon by @zzxwill in https://github.com/oam-dev/kubevela/pull/2402
* Fix: aws/azure Terraform provider are broken by @zzxwill in https://github.com/oam-dev/kubevela/pull/2513 , https://github.com/oam-dev/kubevela/pull/2520 , https://github.com/oam-dev/kubevela/pull/2465
* Feat: Add Terraform Azure Storage Account by @maciejgwizdala in https://github.com/oam-dev/kubevela/pull/2646
* Docs: add vpc and vswitch cloud resource templates of alicloud by @lowkeyrd in https://github.com/oam-dev/kubevela/pull/2663
* Fix: allow external cloud resources to be kept when Application is deleted by @zzxwill in https://github.com/oam-dev/kubevela/pull/2698
* Feat: add alibaba cloud redis definition by @chivalryq in https://github.com/oam-dev/kubevela/pull/2507
* Feat: envbinding support cloud resource deploy and share by @Somefive in https://github.com/oam-dev/kubevela/pull/2734
* Fix: support naming a terraform provider by @zzxwill in https://github.com/oam-dev/kubevela/pull/2794
### Multi-Cluster Enhancement
* Feat: multicluster support ServiceAccountToken by @Somefive in https://github.com/oam-dev/kubevela/pull/2356
* Feat: add secure tls for cluster-gateway by @Somefive in https://github.com/oam-dev/kubevela/pull/2426
* Feat: add support for envbinding with namespace selector by @Somefive in https://github.com/oam-dev/kubevela/pull/2432
* Feat: upgrade cluster gateway to support remote debug by @Somefive in https://github.com/oam-dev/kubevela/pull/2673
* Feat: set multicluster enabled by default by @Somefive in #2930
### Workflow Enhancement
* Feat: add apply raw built in workflow steps by @FogDong in https://github.com/oam-dev/kubevela/pull/2420
* Feat: add read object step def by @FogDong in https://github.com/oam-dev/kubevela/pull/2480
* Feat: add export config and secret def for workflow by @FogDong in https://github.com/oam-dev/kubevela/pull/2484
* Feat: support secret in webhook notification by @FogDong in https://github.com/oam-dev/kubevela/pull/2509
* Feat: Record workflow execution state by @leejanee in https://github.com/oam-dev/kubevela/pull/2479
* Fix(cli): use flag instead of env in workflow cli by @FogDong in https://github.com/oam-dev/kubevela/pull/2512
* Not update resource if render hash equal. by @leejanee in https://github.com/oam-dev/kubevela/pull/2522
* Feat: add email support in webhook notification by @FogDong in https://github.com/oam-dev/kubevela/pull/2535
* Feat: add render component and apply component remaining by @FogDong in https://github.com/oam-dev/kubevela/pull/2587
* Feat: add list application records api by @FogDong in https://github.com/oam-dev/kubevela/pull/2757
* Feat: component-pod-view support filter resource by cluster name and cluster namespace by @yangsoon in https://github.com/oam-dev/kubevela/pull/2754
* Feat: workflow support update by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2760
* Feat: add workflow reconciling backoff time and failed limit times by @FogDong in #2881
### Component/Trait Enhancement
* Feat: add health check and custom status for helm type component by @chivalryq in https://github.com/oam-dev/kubevela/pull/2499
* Feat: add nocalhost dev config trait definition by @yuyicai in https://github.com/oam-dev/kubevela/pull/2545
* Feat(rollout): fill rolloutBatches if empty when scale up/down by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2569
* Feat: allow import package in custom status cue template by @Chwetion in https://github.com/oam-dev/kubevela/pull/2585
* Feat: add trait service-account by @yangsoon in https://github.com/oam-dev/kubevela/pull/2878
* Fix: add ingress class as arguments by @Somefive in https://github.com/oam-dev/kubevela/pull/2445
* Fix: add libgit2 support for gitops by @FogDong in https://github.com/oam-dev/kubevela/pull/2477
* Fix: make nginx class to be default value and allow pvc trait to attach more than once by @wonderflow in https://github.com/oam-dev/kubevela/pull/2466
* Feat: add imagePullPolicy/imagePullSecret to task def by @chivalryq in https://github.com/oam-dev/kubevela/pull/2503
### Vela CLI Enhancement
* Feat: add vela prob to test cluster by @wonderflow in https://github.com/oam-dev/kubevela/pull/2635
* Feat: vela logs support multicluster by @chivalryq in https://github.com/oam-dev/kubevela/pull/2593
* Feat: vela-cli support use ocm to join/list/detach cluster by @yangsoon in https://github.com/oam-dev/kubevela/pull/2599
* Feat: add vela exec for multi cluster by @wonderflow in https://github.com/oam-dev/kubevela/pull/2299
* Feat: multicluster vela status/exec/port-forward by @Somefive in https://github.com/oam-dev/kubevela/pull/2662
* Fix: support `-n` flag for all commands to specify namespace by @chivalryq in https://github.com/oam-dev/kubevela/pull/2719
* Feat: vela delete add wait and force options by @yangsoon in https://github.com/oam-dev/kubevela/pull/2747
* Feat: add workflow rollback cli by @FogDong in https://github.com/oam-dev/kubevela/pull/2795
* Refactor: refine cli commands && align kubectl-vela with vela && use getnamespaceAndEnv for all by @wonderflow in #3048
### Overall Enhancements
* Feat: ResourceTracker new architecture by @Somefive in https://github.com/oam-dev/kubevela/pull/2849
* New Resource Management Model: Garbage Collection and Resource State Keeper [Desigin Doc](https://github.com/oam-dev/kubevela/blob/master/design/vela-core/resourcetracker_design.md)
* Feat: output log with structured tag & add step duration metrics by @leejanee in https://github.com/oam-dev/kubevela/pull/2683
* Feat: support user defined image registry that allows private installation by @wonderflow in https://github.com/oam-dev/kubevela/pull/2623
* Feat: add a built in garbage-collect policy to application by @yangsoon in https://github.com/oam-dev/kubevela/pull/2575
* Feat: health scope controller support check trait-managing workload by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2527
* Chore: add homebrew bump to support `brew install kubevela` by @basefas in https://github.com/oam-dev/kubevela/pull/2434
* Chore: Update release action to support build binaries for more platform by @basefas in https://github.com/oam-dev/kubevela/pull/2537
* Feat: add reconcile timeout configuration for vela-core by @Somefive in https://github.com/oam-dev/kubevela/pull/2630
* Chore: push docker images to Alibaba Cloud ACR by @zzxwill in https://github.com/oam-dev/kubevela/pull/2601
## What's Changed/Deprecated
* Deprecated: containerized workload by @reetasingh in https://github.com/oam-dev/kubevela/pull/2330
* Deprecated: initializer CRD controller by @chivalryq in https://github.com/oam-dev/kubevela/pull/2491
* Deprecated: remove envbinding controller, use #ApplyComponent for EnvBinding by @Somefive in https://github.com/oam-dev/kubevela/pull/2556 , https://github.com/oam-dev/kubevela/pull/2382
* Deprecated(cli): CLI vela config by @chivalryq in https://github.com/oam-dev/kubevela/pull/2037
* Deprecated: remove addon with no definitions by @chivalryq in https://github.com/oam-dev/kubevela/pull/2574
* Refactor: remove apiserver component from the chart, users should use velaux addon instead by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2838
* Refactor: all addons are migrated from initializer to application objects by @chivalryq in https://github.com/oam-dev/kubevela/pull/2444
* Refactor: change rollout's json tag so the status of rollout will be optional by @GingoBang in https://github.com/oam-dev/kubevela/pull/2314
* Deprecated: deprecate CRD discovery for CUE import in Definition to prevent memory leak and OOM crash (#2925)
* Deprecated: delete approllout related code #3040
* Deprecate: delete appDeployment related logic #3050
## Bugfix
* Feat: rework resource tracker to solve bugs by @Somefive in https://github.com/oam-dev/kubevela/pull/2797
* Fix: change raw extension to pointer by @FogDong in https://github.com/oam-dev/kubevela/pull/2451
* Fix: show reconcile error log by @wonderflow in https://github.com/oam-dev/kubevela/pull/2626
* Fix: Closure Bug In newValue by @leejanee in https://github.com/oam-dev/kubevela/pull/2437
* Fix: resourceTracker compatibility bug by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2467
* Fix(application): nil pointer for component properties by @kinsolee in https://github.com/oam-dev/kubevela/pull/2481
* Fix: Commit step-generate data without success by @leejanee in https://github.com/oam-dev/kubevela/pull/2539
* Fix(cli): client-side throttling in vela CLI by @chivalryq in https://github.com/oam-dev/kubevela/pull/2581
* Fix: fix delete a component from application not delete workload by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2680
* Fix: lookupByScript don't support `import` by @leejanee in https://github.com/oam-dev/kubevela/pull/2788
* Fix: resourcetracker do not garbage collect legacyRTs correctly by @Somefive in https://github.com/oam-dev/kubevela/pull/2817
* Fix: application conditions confusion. by @leejanee in https://github.com/oam-dev/kubevela/pull/2834
## New Contributors
*@GingoBang made their first contribution in https://github.com/oam-dev/kubevela/pull/2314
*@basefas made their first contribution in https://github.com/oam-dev/kubevela/pull/2434
*@yuyicai made their first contribution in https://github.com/oam-dev/kubevela/pull/2540
*@maciejgwizdala made their first contribution in https://github.com/oam-dev/kubevela/pull/2646
*@lowkeyrd made their first contribution in https://github.com/oam-dev/kubevela/pull/2663
*@zxbyoyoyo made their first contribution in https://github.com/oam-dev/kubevela/pull/2703
*@yue9944882 made their first contribution in https://github.com/oam-dev/kubevela/pull/2751
*@snyk-bot made their first contribution in https://github.com/oam-dev/kubevela/pull/2857
*@yunjianzhong made their first contribution in https://github.com/oam-dev/kubevela/pull/3005
*@songminglong made their first contribution in https://github.com/oam-dev/kubevela/pull/3064
*@basuotian made their first contribution in https://github.com/oam-dev/kubevela/pull/3059
*@K1ngram4 made their first contribution in https://github.com/oam-dev/kubevela/pull/3065
KubeVela project is initialized and maintained by the cloud native community since day 0 with [bootstrapping contributors from 8+ different organizations](https://github.com/oam-dev/kubevela/graphs/contributors).
We intend for KubeVela to have an open governance since the very beginning and donate the project to neutral foundation as soon as it's released.
This doc explains how to set up a development environment, so you can get started
contributing to `kubevela` or build a PoC (Proof of Concept).
## Development
### Prerequisites
1. Golang version 1.13+
2. Kubernetes version v1.16+ with `~/.kube/config` configured.
3. ginkgo 1.14.0+ (just for [E2E test](./CONTRIBUTING.md#e2e-test))
4. golangci-lint 1.31.0+, it will install automatically if you run `make`, you can [install it manually](https://golangci-lint.run/usage/install/#local-installation) if the installation is too slow.
We also recommend you to learn about KubeVela's [design](https://kubevela.io/#/en/concepts) before dive into its code.
### Build
* Clone this project
```shell script
git clone git@github.com:oam-dev/kubevela.git
```
KubeVela includes two parts, `vela core` and `vela cli`.
- The `vela core` is actually a K8s controller, it will watch OAM Spec CRD and deploy resources.
- The `vela cli` is a command line tool that can build, run apps(with the help of `vela core`).
For local development, we probably need to build both of them.
* Build Vela CLI
```shell script
make
```
After the vela cli built successfully, `make` command will create `vela` binary to `bin/` under the project.
Firstly make sure your cluster has CRDs, below is the command that can help install all CRDs.
```shell script
make core-install
```
Run locally:
```shell script
make core-run
```
This command will run controller locally, it will use your local KubeConfig which means you need to have a k8s cluster
locally. If you don't have a one, we suggest that you could setup up a cluster with [kind](https://kind.sigs.k8s.io/).
When you're developing `vela-core`, make sure the controller installed by helm chart is not running.
Otherwise, it will conflict with your local running controller.
You can check and uninstall it by using helm.
```shell script
helm list -A
helm uninstall -n vela-system kubevela
```
### Use
You can try use your local built binaries follow [the documentation](https://kubevela.io/#/en/quick-start).
## Testing
### Unit test
```shell script
make test
```
### E2E test
**Before e2e test start, make sure you have vela-core running.**
```shell script
make core-run
```
Start to test.
```
make e2e-test
```
## Make a pull request
Remember to write unit-test and e2e-test after you have finished your code.
Run following checks before making a pull request.
```shell script
make reviewable
```
The command will do some lint checks and clean code.
After that, check in all changes and send a pull request.
## Merge Regulations
Before merging, the pull request should obey the following rules:
- The commit title and message should be clear about what this PR does.
- All test CI should pass green.
- The `codecov/project` should pass. This means the coverage should not drop. See [Codecov commit status](https://docs.codecov.io/docs/commit-status#project-status).
Please refer to https://kubevela.io/docs/contributor/overview for details.
go build -a -ldflags "-X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
-o manager-${TARGETARCH}cmd/core/main.go
# Use ubuntu as base image for convenience.
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Could use `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot` to overwrite
ARG BASE_IMAGE
FROM${BASE_IMAGE:-ubuntu:latest}
# This is required by daemon connnecting with cri
RUN ln -s /usr/bin/* /usr/sbin/ && apt-get update -y \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
-o apiserver-${TARGETARCH} cmd/apiserver/main.go
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}"\
-o apiserver-${TARGETARCH} cmd/apiserver/main.go
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
| close issue + ---- + done +---------------------+
+----------------+ +-----------+
```
## 1. Find uncategorized issues
To get started with issue triage and finding issues that haven't been triaged you have two alternatives.
### Browse unlabeled issues
The easiest and straight forward way of getting started and finding issues that haven't been triaged is to browse
[unlabeled issues](https://github.com/kubevela/kubevela/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and starting from
the bottom and working yourself to the top.
### Subscribe to all notifications
The more advanced, but recommended way is to subscribe to all notifications from this repository which means that
all new issues, pull requests, comments and important status changes are sent to your configured email address.
Read this [guide](https://help.github.com/en/articles/watching-and-unwatching-repositories#watching-a-single-repository)
for help with setting this up.
It's highly recommended that you setup filters to automatically remove emails from the inbox and label/categorize
them accordingly to make it easy for you to understand when you need to act upon a notification or where to look for
finding issues that haven't been triaged etc.
## 2. Ensure the issue contains basic information
Before triaging an issue very far, make sure that the issue's author provided the standard issue information.
This will help you make an educated recommendation on how to categorize the issue.
The KubeVela project utilizes [GitHub issue templates](https://help.github.com/en/articles/creating-issue-templates-for-your-repository)
to guide contributors to provide standard information that must be included for each type of template or type of issue.
### Standard issue information that must be included
Given a certain [issue template]([template](https://github.com/kubevela/kubevela/issues/new/choose)) have been used
by the issue author or depending how the issue is perceived by the issue triage responsible, the following should
help you understand what standard issue information that must be included.
#### Bug reports
Should explain what happened, what was expected and how to reproduce it together with any additional information that
may help giving a complete picture of what happened such as screenshots, application related YAMLs, and any environment
related information that's applicable and/or maybe related to the reported problem:
- KubeVela version
- K8s cluster version KubeVela is installed on
- Which other K8s CRD controllers used
- Development environment like Go versions, if applicable
#### Enhancement requests
Should explain what enhancement or feature that the author wants to be added and why that is needed.
### Good practices
To make it easier for everyone to understand and find issues they're searching for it's suggested as a general rule of thumbs to:
- Make sure that issue titles are named to explain the subject of the issue, has a correct spelling and doesn't include irrelevant information and/or sensitive information.
- Make sure that issue descriptions doesn't include irrelevant information, information from template that haven't been filled out and/or sensitive information.
- Do your best effort to change title and description or request suggested changes by adding a comment.
> **Note:** Above rules is applicable to both new and existing issues of the KubeVela project.
### Do you have all the information needed to categorize an issue?
Depending on the issue, you might not feel all this information is needed. Use your best judgement.
If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the
above information to clarify the problem. Label issue with `needs more info` and add any related `area/*` or `type/*` labels.
If the author provides the standard information but you are still unable to triage the issue, request additional information.
Do this kindly and politely because you are asking for more of the author's time.
If the author does not respond to the requested information within the timespan of a week,
close the issue with a kind note stating that the author can request for the issue to be reopened when the necessary information is provided.
When you feel you have all the information needed you're ready to [categorizing the issue](#3-categorizing-an-issue).
If you receive a notification with additional information provided but you are not anymore on issue triage and
you feel you do not have time to handle it, you should delegate it to the current person on issue triage.
## 3. Categorizing an issue
An issue can have multiple of the following labels. Typically, a properly categorized issue should at least have:
- One label identifying its type (`type/*`).
- One or multiple labels identifying the functional areas of interest or component (`area/*`), if applicable.
| `type/bug` | A feature isn't working as expected given design or documentation. |
| `type/enhancement` | Request for a new feature or enhancement. |
| `type/docs` | Documentation problem or enhancement. |
| `type/question` | Issue is a question or is perceived as such. |
| `type/duplicate` | An existing issue of the same subject/request have already been reported. |
| `type/wontfix` | A reported bug works as intended/by design. |
| `type/invalid` | A reported bug with invalid usage. |
| `area/*` | Subject is related to a functional area of interest or component. |
### Duplicate issues
Make sure it's not a duplicate by searching existing issues using related terms from the issue title and description.
If you think you know there is an existing issue, but can't find it, please reach out to one of the maintainers and ask for help.
If you identify that the issue is a duplicate of an existing issue:
1. Add a comment `/duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
2. The KubeVela bot will do the rest, adding the correct label and closing comment
3. Optionally add any related `area/*` labels.
### Bug reports
If it's not perfectly clear that it's an actual bug, quickly try to reproduce it.
**It's a bug/it can be reproduced:**
1. Add a comment describing detailed steps for how to reproduce it, if applicable.
2. Label the issue `type/bug` and at least one `area/*` label.
3. If you know that maintainers won't be able to put any resources into it for some time then label the issue
with `help wanted` and optionally `good first issue` together with pointers on which code to update to fix the bug.
This should signal to the community that we would appreciate any help we can get to resolve this.
4. Move on to [prioritizing the issue](#4-prioritization-of-issues).
**It can't be reproduced:**
1. Either [ask for more information](#2-ensure-the-issue-contains-basic-information) needed to investigate it more thoroughly.
2. Either [delegate further investigations](#investigation-of-issues) to someone else.
**It works as intended/by design:**
1. Kindly and politely add a comment explaining briefly why we think it works as intended and close the issue.
2. Label the issue `type/wontfix`.
### Enhancement/feature?
1. Label the issue `type/enhancement` and at least one `area/*` label.
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
### Documentation issue?
First, evaluate if the documentation makes sense to be included in the KubeVela project:
- Is this something we want/can maintain as a project?
- Is this referring to usage of some specific integration/tool and in that case is that a popular use case in combination with KubeVela?
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments)
to identify that lots of other users want/need this.
Second, label the issue `type/docs` and at least one `area/*` label.
**Minor typo/error/lack of information:**
There's a minor typo/error/lack of information that adds a lot of confusion for users and given the amount of work is a big win to make sure fixing it:
1. Either update the documentation yourself and open a pull request.
2. Either delegate the work to someone else by assigning that person to the issue and add the issue to next major/minor milestone.
**Major error/lack of information:**
1. Label the issue with `help wanted` and `good first issue`, if applicable, to signal that we find this important to
fix and we would appreciate any help we can get from the community.
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
### Support requests and questions
1. Kindly and politely direct the issue author to the [github discussion](https://github.com/kubevela/kubevela/discussions)
and explain that issue is mainly used for tracking bugs and feature requests.
If possible, it's usually a good idea to add some pointers to the issue author's question.
2. Close the issue and label it with `type/question`.
## 4. Prioritization of issues
In general bugs and enhancement issues should be labeled with a priority.
This is the most difficult thing with triaging issues since it requires a lot of knowledge, context and experience
before being able to think of and start feel comfortable adding a certain priority label.
The key here is asking for help and discuss issues to understand how more experienced project members think and reason.
By doing that you learn more and eventually be more and more comfortable with prioritizing issues.
In case there is an uncertainty around the prioritization of an issue, please ask the maintainers for help.
| `priority/critical` | Highest priority. Must be actively worked on as someone's top priority right now. |
| `priority/important-soon` | Must be staffed and worked on either currently, or very soon, ideally in time for the next release. |
| `priority/important-longterm` | Important over the long term, but may not be staffed and/or may need multiple releases to complete. |
| `priority/nice-to-have` | It's a good idea, but not scheduled for any release. |
| `priority/awaiting-more-evidence` | Lowest priority. Possibly useful, but not yet enough interest in it. |
| `priority/unscheduled` | Something to look into before and to be discussed during the planning of the next (upcoming) major/minor stable release. |
**Critical bugs**
1. If a bug has been categorized and any of the following criteria apply, the bug should be labeled as critical and
must be actively worked on as someone's top priority right now.
- Results in any crash or data loss.
- Critical security or performance issues
- Problem that makes a feature unusable
- Multiple users experience a severe problem affecting their business, users etc.
2. Label the issue `priority/critical`.
3. Add the issue to the next upcoming patch release milestone. Create a new milestone if there are none.
4. Escalate the problem to the maintainers.
5. Assign or ask a maintainer for help assigning someone to make this issue their top priority right now.
**Important short-term**
1. Label the issue `priority/important-soon`.
2. Add the issue to the next upcoming patch or major/minor stable release milestone. Ask maintainers for help if unsure if it's a patch or not.
Create a new milestone if there are none.
3. Make sure to add the issue to a suitable backlog of a GitHub project and prioritize it or assign someone to work on it now or very soon.
4. Consider requesting [help from the community](#5-requesting-help-from-the-community), even though it may be problematic given a short amount of time until it should be released.
**Important long-term**
1. Label the issue `priority/important-longterm`.
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
**Nice to have**
1. Label the issue `priority/nice-to-have`.
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
**Not critical, but unsure?**
1. Label the issue `priority/unscheduled`.
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
## 5. Requesting help from the community
Depending on the issue and/or priority, it's always a good idea to consider signalling to the community that help from community
is appreciated and needed in case an issue is not prioritized to be worked on by maintainers. Use your best judgement.
In general, requesting help from the community means that a contribution has a good chance of getting accepted and merged.
1. Kindly and politely add a comment to signal to users subscribed to updates of the issue.
- Explain that the issue would be nice to get resolved, but it isn't prioritized to work on by maintainers for an unforeseen future.
- If possible or applicable, try to help contributors getting starting by adding pointers and references to
what code/files need to be changed and/or ideas of a good way to solve/implement the issue.
2. Label the issue with `help wanted`.
3. If applicable, label the issue with `good first issue` to denote that the issue is suitable for a beginner to work on.
4. If possible, try to estimate the amount of work by adding `effort/small`, `effort/medium` or `effort/large`.
## Investigation of issues
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported
problem at a first glance, the issue is labeled [Needs investigation](https://github.com/oam-dev/kubevela/labels/needs%20investigation).
Depending on the perceived severity and/or number of [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments),
the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor)
picks it up and eventually starts investigating it.
Investigating issues can be a very time consuming task, especially for the maintainers, provide as much related info will
make it easier for maintainers to investigate.
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments)
the issue if you happen to have the same problem. If you have further details that may help investigating the issue
please provide as much information as possible.
## Automation
We have some automation that triggers on comments or labels being added to issues.
Many of these automated behaviors are defined in [issue-commands.json](https://github.com/oam-dev/kubevela/blob/master/.github/issue-commands.json).
* Add comment `/duplicate #<number>` to have `type/duplicate` label, the issue number is required for remind where is the other issue.
* Add label `bot/no new info` for bot to close an issue where we asked for more info but has not received any updates in at least 14 days.
Read more bot actions on [bot.md](https://github.com/oam-dev/kubevela/blob/master/.github/bot.md)
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq(,$(shellgoenvGOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
includemakefiles/const.mk
includemakefiles/dependency.mk
includemakefiles/release.mk
includemakefiles/develop.mk
includemakefiles/build.mk
includemakefiles/e2e.mk
.DEFAULT_GOAL:= all
all:build
# Run tests
test:vetlintstaticcheck
go test -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... ./cmd/...
go test -race -covermode=atomic ./references/apiserver/... ./references/appfile/... ./references/cli/... ./references/common/... ./references/plugins/...
test:unit-test-coretest-cli-gen
@$(OK) unit-tests pass
# Build manager binary
build:fmtvetlintstaticcheck
go run hack/chart/generate.go
go build -o bin/vela -ldflags ${LDFLAGS} references/cmd/cli/main.go
KubeVela is a modern application delivery platform that makes deploying and operating applications across today's hybrid, multi-cloud environments easier, faster and more reliable.
# KubeVela

KubeVela is the platform engine to create *PaaS-like* experience on Kubernetes, in a scalable approach.
## Highlights
## Community
KubeVela practices the "render, orchestrate, deploy" workflow with below highlighted values added to existing ecosystem:
- Bi-weekly Community Call: [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs)
*Deployment as Code
> NOTE: KubeVela is still iterating quickly. It's currently under pre-beta release.
Declare your deployment plan as workflow, run it automatically with any CI/CD or GitOps system, extend or re-program the workflow steps with CUE. No add-hoc scripts, no dirty glue code, just deploy. The deployment workflow in KubeVela is powered by [Open Application Model](https://oam.dev/).
## What problems does it solve?
* Built-in security and compliance building blocks
Building **developer-centric platforms** with Kubernetes requires higher level primitives which is out-of-scope of Kubernetes itself. Hence, we platform teams build abstractions.
Choose from the wide range of LDAP integrations we provided out-of-box, enjoy multi-cluster authorization that is fully automated, pick and apply fine-grained RBAC modules and customize them per your own supply chain requirements.
However, great in flexibility and extensibility, the existing solutions such as IaC (Infrastructure-as-Code) and client-side templating tools all lead to ***Configuration Drift*** (i.e. the generated instances are not in line with the expected configuration) which is a nightmare in production.
* Multi-cloud/hybrid-environments app delivery as first-class citizen
KubeVela allows platform teams to create developer-centric abstractions with IaC butmaintain them with the battle tested [Kubernetes Control Loop](https://kubernetes.io/docs/concepts/architecture/controller/). Think about a plug-in that turns your Kubernetes cluster into a *"PaaS"* via abstractions designed by yourself.
Progressive rollout across test/staging/production environments, automatic canary, blue-green and continuous verification, rich placement strategy across clusters and clouds, fully managed cloud environments provision.
- [How it works](https://kubevela.io/#/en/concepts)
## Features
- **Robust, repeatable and extensible approach to create and maintain abstractions** - design your abstractions with [CUE](https://cuelang.org/) or [Helm](https://helm.sh), ship them to end users by `kubectl apply -f`, automatically generating GUI forms, upgrade your abstractions at runtime, and let Kubernetes controller guarantee determinism of the abstractions, no configuration drift.
- **Generic progressive rollout framework** - built-in rollout framework and strategies to upgrade your microservice regardless of its workload type (e.g. stateless, stateful, or even custom operators etc), seamless integration with observability systems.
- **Multi-enviroment app delievry model (WIP)** - built-in model to deliver or rollout your apps across multiple enviroments and/or clusters, seamless integration with Service Mesh for traffic management.
- **Simple and Kubernetes native** - KubeVela is just a simple custom controller, all its app delivery abstractions and features are defined as [Kubernetes Custom Resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) so they naturally work with any CI/CD or GitOps tools.
* [Deploy Your Application](https://kubevela.io/docs/quick-start)
## Documentation
Visit the [KubeVela documentation site](https://kubevela.io/) to find *Installation Instruction*, *Platform Builder Guide* and *Developer Experience Guide*.
Full documentation is available on the [KubeVela website](https://kubevela.io/).
## Blog
Official blog is available on [KubeVela blog](https://kubevela.io/blog).
## Community
We want your contributions and suggestions!
One of the easiest ways to contribute is to participate in discussions on the Github Issues/Discussion, chat on IM or the bi-weekly community calls.
For more information on the community engagement, developer and contributing guidelines and more, head over to the [KubeVela community repo](https://github.com/kubevela/community).
### Contact Us
Reach out with any questions you may have and we'll make sure to answer them as soon as possible!
| 🎤 Talks | - [KubeVela - The Modern App Delivery System in Alibaba](https://docs.google.com/presentation/d/1CWCLcsKpDQB3bBDTfdv2BZ8ilGGJv2E8L-iOA5HMrV0/edit?usp=sharing) |
| 🌎 KubeCon | - [ [NA 2020] Standardizing Cloud Native Application Delivery Across Different Clouds](https://www.youtube.com/watch?v=0yhVuBIbHcI) <br> - [ [EU 2021] Zero Pain Microservice Development and Deployment with Dapr and KubeVela](https://sched.co/iE4S) |
| 📺 Conferences | - [Dapr, Rudr, OAM: Mark Russinovich presents next gen app development & deployment](https://www.youtube.com/watch?v=eJCu6a-x9uo) <br> - [Mark Russinovich presents "The Future of Cloud Native Applications with OAM and Dapr"](https://myignite.techcommunity.microsoft.com/sessions/82059)|
Check out [KubeVela videos](https://kubevela.io/videos/talks/en/oam-dapr) for these talks and conferences.
## Contributing
Check out [CONTRIBUTING](./CONTRIBUTING.md) to see how to develop with KubeVela.
Check out [CONTRIBUTING](https://kubevela.io/docs/contributor/overview) to see how to develop with KubeVela.
## Report Vulnerability
Security is a first priority thing for us at KubeVela. If you come across a related issue, please send email to security@mail.kubevela.io .
## Code of Conduct
KubeVela adopts [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
// Traits define the trait of one component, the type must be array to keep the order.
Traits[]ApplicationTrait`json:"traits,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
// scopes in ApplicationComponent defines the component-level scopes
// the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance.
Scopesmap[string]string`json:"scopes,omitempty"`
// ReplicaKey is not empty means the component is replicated. This field is designed so that it can't be specified in application directly.
// So we set the json tag as "-". Instead, this will be filled when using replication policy.
ReplicaKeystring`json:"-"`
}
// ClusterSelector defines the rules to select a Cluster resource.
// Either name or labels is needed.
typeClusterSelectorstruct{
// Name is the name of the cluster.
Namestring`json:"name,omitempty"`
// Labels defines the label selector to select the cluster.
Labelsmap[string]string`json:"labels,omitempty"`
}
// Distribution defines the replica distribution of an AppRevision to a cluster.
typeDistributionstruct{
// Replicas is the replica number.
Replicasint`json:"replicas,omitempty"`
}
// ClusterPlacement defines the cluster placement rules for an app revision.
typeClusterPlacementstruct{
// ClusterSelector selects the cluster to deploy apps to.
// If not specified, it indicates the host cluster per se.
// Traits define the trait of one component, the type must be array to keep the order.
Traits[]ApplicationTrait`json:"traits,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
// scopes in ApplicationComponent defines the component-level scopes
// the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance.
Scopesmap[string]string`json:"scopes,omitempty"`
// Workflow defines workflow steps and other attributes
// PolicyDefinitionList contains a list of PolicyDefinition
typePolicyDefinitionListstruct{
metav1.TypeMeta`json:",inline"`
metav1.ListMeta`json:"metadata,omitempty"`
Items[]PolicyDefinition`json:"items"`
}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.